Permalink
Browse files

Refactor for MVC

  • Loading branch information...
William Entriken
William Entriken committed Dec 31, 2014
1 parent 0278db6 commit 851528c60e28566491e59c52ea2ca6c8b26d90f3
Showing with 7,930 additions and 18,108 deletions.
  1. +4 −2 .gitignore
  2. +0 −3 .gitmodules
  3. +15 −21 .htaccess
  4. +106 −0 CONTRIBUTING.md
  5. +0 −123 Changelog
  6. +0 −46 HACKING
  7. +0 −61 INSTALL
  8. +22 −33 README.md
  9. +36 −56 TODO
  10. +0 −1 VERSION
  11. +0 −83 admin/admin.inc
  12. +0 −182 admin/appearance.php
  13. +0 −203 admin/comments.php
  14. +0 −48 admin/controller_prefs.php
  15. +0 −163 admin/files.php
  16. +0 −84 admin/filestore.php
  17. +0 −209 admin/index.php
  18. +0 −274 admin/logs.php
  19. +0 −96 admin/security.php
  20. +0 −101 admin/thumbnails.php
  21. +0 −17 album.php
  22. +0 −100 album_controller.php
  23. BIN {setup/images → assets}/clear.gif
  24. BIN {modules/iconset/sehar → assets}/folder.png
  25. 0 {setup → assets}/install.mysql
  26. 0 {setup → assets}/install.sqlite3
  27. 0 modules/theme/bootstrap/css-extra/custom.css → assets/main.css
  28. BIN {modules/iconset/sehar → assets}/main.png
  29. BIN {modules/iconset/sehar → assets}/search.png
  30. BIN {modules/iconset/sehar → assets}/topic.png
  31. 0 {images/cache → caches}/deleteme.placeholder
  32. +3 −2 composer.json
  33. +49 −0 composer.lock
  34. BIN composer.phar
  35. +8 −0 config-example.php
  36. BIN favicon.ico
  37. BIN filedone.wav
  38. +0 −21 folder.php
  39. +24 −5 index.php
  40. +0 −13 login.php
  41. +0 −39 login_controller.php
  42. +0 −13 logout.php
  43. +0 −282 main.inc
  44. +0 −105 media.php
  45. +0 −15 modules/README
  46. +0 −14 modules/config-example.inc
  47. +0 −186 modules/core/database.php
  48. +0 −16 modules/core/module.inc
  49. +0 −70 modules/core/view.class.php
  50. +0 −200 modules/filestore/local/module.inc
  51. +0 −80 modules/filestore/module.inc
  52. BIN modules/iconset/cartoonic/folder.png
  53. +0 −679 modules/iconset/cartoonic/folder.svg
  54. BIN modules/iconset/cartoonic/folder.xcf
  55. BIN modules/iconset/cartoonic/main.png
  56. +0 −241 modules/iconset/cartoonic/main.svg
  57. +0 −9 modules/iconset/cartoonic/module-info.json
  58. BIN modules/iconset/cartoonic/search.png
  59. +0 −85 modules/iconset/cartoonic/search.svg
  60. BIN modules/iconset/cartoonic/topic.png
  61. +0 −143 modules/iconset/cartoonic/topic.svg
  62. BIN modules/iconset/gnomish/folder.png
  63. BIN modules/iconset/gnomish/main.png
  64. +0 −9 modules/iconset/gnomish/module-info.json
  65. BIN modules/iconset/gnomish/search.png
  66. BIN modules/iconset/gnomish/topic.png
  67. +0 −89 modules/iconset/iconset-debug.php
  68. BIN modules/iconset/oxygen/folder.png
  69. BIN modules/iconset/oxygen/folder.svgz
  70. BIN modules/iconset/oxygen/main.png
  71. BIN modules/iconset/oxygen/main.svgz
  72. +0 −9 modules/iconset/oxygen/module-info.json
  73. BIN modules/iconset/oxygen/search.png
  74. BIN modules/iconset/oxygen/search.svgz
  75. BIN modules/iconset/oxygen/topic.png
  76. BIN modules/iconset/oxygen/topic.svgz
  77. BIN modules/iconset/photogenic/folder.png
  78. BIN modules/iconset/photogenic/folder.xcf
  79. BIN modules/iconset/photogenic/main.png
  80. +0 −9 modules/iconset/photogenic/module-info.json
  81. BIN modules/iconset/photogenic/search.jpg
  82. BIN modules/iconset/photogenic/topic.png
  83. +0 −9 modules/iconset/sehar/module-info.json
  84. BIN modules/iconset/webpolis/folder.png
  85. +0 −1,420 modules/iconset/webpolis/folder.svg
  86. BIN modules/iconset/webpolis/main.png
  87. +0 −1,459 modules/iconset/webpolis/main.svg
  88. +0 −9 modules/iconset/webpolis/module-info.json
  89. BIN modules/iconset/webpolis/search.png
  90. +0 −1,456 modules/iconset/webpolis/search.svg
  91. BIN modules/iconset/webpolis/topic.png
  92. +0 −1,779 modules/iconset/webpolis/topic.svg
  93. +0 −61 modules/imageprocessing/module.inc
  94. +0 −65 modules/module.inc
  95. +0 −220 modules/security/default/administer.php
  96. +0 −59 modules/security/default/login.php
  97. +0 −43 modules/security/default/login_controller.php
  98. +0 −9 modules/security/default/module-info.json
  99. +0 −205 modules/security/default/module.inc
  100. +0 −55 modules/security/module.inc
  101. +0 −223 modules/security/openid/administer.php
  102. +0 −1 modules/security/openid/lightopenid
  103. +0 −64 modules/security/openid/login.php
  104. +0 −43 modules/security/openid/login_controller.php
  105. +0 −9 modules/security/openid/module-info.json
  106. +0 −220 modules/security/openid/module.inc
  107. +0 −74 modules/security/openid/openid-en.js
  108. +0 −153 modules/security/openid/openid-jquery.js
  109. BIN modules/security/openid/openid-providers-en.png
  110. +0 −69 modules/security/openid/openid.css
  111. +0 −46 modules/security/openid/process.php
  112. +0 −51 modules/theme/bootstrap/ajax.js
  113. +0 −126 modules/theme/bootstrap/album.inc
  114. +0 −1,240 modules/theme/bootstrap/dropzone.js
  115. +0 −125 modules/theme/bootstrap/folder.inc
  116. BIN modules/theme/bootstrap/images/footer_bckg.gif
  117. BIN modules/theme/bootstrap/images/head_bckg.jpg
  118. BIN modules/theme/bootstrap/images/li.gif
  119. BIN modules/theme/bootstrap/images/menu_bckg.gif
  120. BIN modules/theme/bootstrap/images/picture.jpg
  121. BIN modules/theme/bootstrap/images/sidebar_bckg.gif
  122. BIN modules/theme/bootstrap/images/splitter.gif
  123. BIN modules/theme/bootstrap/images/umbrella.gif
  124. BIN modules/theme/bootstrap/img/glyphicons-halflings-white.png
  125. BIN modules/theme/bootstrap/img/glyphicons-halflings.png
  126. +0 −155 modules/theme/bootstrap/index.inc
  127. BIN modules/theme/bootstrap/login.gif
  128. +0 −62 modules/theme/bootstrap/login.inc
  129. BIN modules/theme/bootstrap/login.png
  130. BIN modules/theme/bootstrap/module-icon.png
  131. +0 −9 modules/theme/bootstrap/module-info.json
  132. +0 −399 modules/theme/bootstrap/module.inc
  133. +0 −477 modules/theme/bootstrap/photo.inc
  134. +0 −46 modules/theme/bootstrap/photo.js
  135. +0 −127 modules/theme/bootstrap/search.inc
  136. +0 −277 modules/theme/bootstrap/style.css
  137. +0 −28 modules/theme/bootstrap/theme.js
  138. +0 −109 modules/theme/bootstrap/topic.inc
  139. +0 −80 modules/theme/bootstrap/upload.inc
  140. +0 −16 modules/theme/module.inc
  141. +0 −20 opensearch.xml.php
  142. +0 −25 photo.php
  143. +0 −131 photo_controller.php
  144. 0 {images → }/photos/deleteme.placeholder
  145. +0 −67 rss-folders.php
  146. +0 −79 rss.php
  147. +0 −52 search.php
  148. +0 −7 setup/.htaccess
  149. BIN setup/images/helpalbums.jpg
  150. +0 −167 setup/images/helpalbums.svg
  151. BIN setup/images/intro1.png
  152. +0 −145 setup/index.php
  153. +0 −364 setup/index2.php
  154. +0 −274 setup/index3.php
  155. +0 −118 setup/index4.php
  156. +0 −14 setup/upgrade/README
  157. +0 −35 setup/upgrade/schemaupdater.inc
  158. +0 −25 setup/upgrade/schemaupdater1.inc
  159. +0 −81 setup/upgrade/schemaupdater2.inc
  160. +0 −74 setup/upgrade/schemaupdater3.inc
  161. +0 −86 setup/upgrade/schemaupdater4.inc
  162. +0 −73 setup/upgrade/schemaupdater5.inc
  163. +0 −71 setup/upgrade/upgrade.php
  164. +0 −119 sitemap.xml.php
  165. +49 −0 sources/Controllers/AdminAppearanceController.php
  166. +72 −0 sources/Controllers/AdminCommentsController.php
  167. +80 −0 sources/Controllers/AdminController.php
  168. +44 −0 sources/Controllers/AdminFileStoreController.php
  169. +91 −0 sources/Controllers/AdminLogsController.php
  170. +48 −0 sources/Controllers/AdminSecurityController.php
  171. +90 −0 sources/Controllers/AdminThumbnailController.php
  172. +279 −0 sources/Controllers/Controller.php
  173. +55 −0 sources/Controllers/FavoritesController.php
  174. +85 −0 sources/Controllers/FolderController.php
  175. +73 −0 sources/Controllers/HtmlController.php
  176. +137 −0 sources/Controllers/LoginController.php
  177. +74 −0 sources/Controllers/MainPageController.php
  178. +113 −0 sources/Controllers/MediaController.php
  179. +80 −0 sources/Controllers/PhotoController.php
  180. +92 −0 sources/Controllers/SearchController.php
  181. +363 −0 sources/Controllers/SetupInstall2Controller.php
  182. +193 −0 sources/Controllers/SetupInstallController.php
  183. +35 −0 sources/Controllers/StatisticsController.php
  184. +56 −0 sources/Controllers/TagCollectionController.php
  185. +66 −0 sources/Controllers/TagController.php
  186. +29 −34 modules/core/audittrail.class.php → sources/Models/AuditTrail.php
  187. +335 −0 sources/Models/Database.php
  188. +1 −1 modules/core/databaseiterator.php → sources/Models/DatabaseIterator.php
  189. +106 −0 sources/Models/Favorites.php
  190. +181 −0 sources/Models/FileStore.php
  191. +35 −59 modules/core/folder.class.php → sources/Models/Folder.php
  192. +7 −16 modules/imageprocessing/gd/module.inc → sources/Models/Image.php
  193. +21 −0 sources/Models/IndexedModel.php
  194. +143 −77 modules/core/photo.class.php → sources/Models/Photo.php
  195. +67 −0 sources/Models/Preferences.php
  196. +26 −62 modules/core/search.class.php → sources/Models/Search.php
  197. +19 −32 modules/core/stats.class.php → sources/Models/Statistics.php
  198. +14 −35 modules/core/album.class.php → sources/Models/Tag.php
  199. +16 −28 modules/core/topic.class.php → sources/Models/TagCollection.php
  200. +169 −0 sources/Models/User.php
  201. +148 −0 sources/Views/AdminCommentsView.php
  202. +196 −0 sources/Views/AdminLogsView.php
  203. +99 −0 sources/Views/AdminPreferencesView.php
  204. +54 −0 sources/Views/AdminSecurityView.php
  205. +245 −0 sources/Views/AdminView.php
  206. +42 −0 sources/Views/BreadcrumbView.php
  207. +69 −0 sources/Views/ExceptionView.php
  208. +68 −0 sources/Views/FooterView.php
  209. +68 −0 sources/Views/GridView.php
  210. +178 −0 sources/Views/HeaderView.php
  211. +189 −0 sources/Views/MainPageView.php
  212. +111 −0 sources/Views/PageSelectorView.php
  213. +180 −0 sources/Views/PhotoView.php
  214. +38 −29 modules/theme/bootstrap/stats.inc → sources/Views/StatisticsView.php
  215. +51 −0 sources/Views/TabView.php
  216. +26 −0 sources/Views/View.php
  217. +41 −0 sources/autoload.php
  218. +0 −15 stats.php
  219. +0 −70 tests/databaseTest.php
  220. +0 −62 tests/statsTest.php
  221. +0 −11 tests/stubCameraLife.php
  222. BIN tests/test.sqlite3
  223. +0 −21 topic.php
  224. +0 −14 upload.php
  225. +0 −197 upload_controller.php
  226. +7 −0 vendor/autoload.php
  227. +387 −0 vendor/composer/ClassLoader.php
  228. +13 −0 vendor/composer/autoload_classmap.php
  229. +9 −0 vendor/composer/autoload_namespaces.php
  230. +9 −0 vendor/composer/autoload_psr4.php
  231. +50 −0 vendor/composer/autoload_real.php
  232. +31 −0 vendor/composer/installed.json
  233. +21 −0 vendor/lightopenid/lightopenid/LICENSE
  234. +13 −0 vendor/lightopenid/lightopenid/composer.json
  235. +24 −0 vendor/lightopenid/lightopenid/example-google.php
  236. +28 −0 vendor/lightopenid/lightopenid/example.php
  237. +831 −0 vendor/lightopenid/lightopenid/openid.php
  238. +194 −0 vendor/lightopenid/lightopenid/provider/example-mysql.php
  239. +53 −0 vendor/lightopenid/lightopenid/provider/example.php
  240. +846 −0 vendor/lightopenid/lightopenid/provider/provider.php
View
@@ -1,2 +1,4 @@
-/.htaccess
-/modules/config.inc
+config.php
+
+# https://stackoverflow.com/q/27726794
+/vendor/**/.git/
View
@@ -1,3 +0,0 @@
-[submodule "modules/security/openid/lightopenid"]
- path = modules/security/openid/lightopenid
- url = git://gitorious.org/lightopenid/lightopenid.git
View
@@ -6,26 +6,20 @@ php_value upload_max_filesize 20971520
php_value memory_limit 128M
<IfModule mod_rewrite.c>
-RewriteEngine on
-RewriteRule photos/(\d+)$ photo.php?id=$1&%{QUERY_STRING}
-RewriteRule photos/([^/]+)/(\d+)-(\d+)\. media.php?format=$1&id=$2&ver=$3
-RewriteRule photos/([^/]+)/(\d+)\. media.php?format=$1&id=$2&ver=%{QUERY_STRING}
-RewriteRule photos/(\d+)\.([^?]+)$ media.php?id=$1&%{QUERY_STRING}
-RewriteRule folders/(.*) folder.php?path=/$1&%{QUERY_STRING}
-RewriteRule albums/(\d+) album.php?id=$1&%{QUERY_STRING}
-RewriteRule topics/(.+) topic.php?name=$1&%{QUERY_STRING}
-#
-# Note: these rewrites affect photo.class.php, who analyzes the HTTP referer
-#
+ # Tell PHP that the mod_rewrite module is ENABLED.
+ SetEnv HTTP_MOD_REWRITE On
-RewriteCond %{REQUEST_FILENAME}.php -f
-RewriteRule ^([^\.]+)$ $1.php [NC,L]
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule (.*) search.php?q=$1 [L]
+ RewriteEngine on
+
+ # Do not rewrite assets/ directory
+ RewriteRule assets/ - [L]
+ RewriteRule ^$ - [L]
+ RewriteRule ^index.php - [L]
+
+ # URL for controllers
+ RewriteRule ([^/]+)/(.+)$ index.php?page=$1&id=$2&%{QUERY_STRING} [L]
+ RewriteRule ([^/]+)/$ index.php?page=$1&id=$2&%{QUERY_STRING} [L]
+
+ # Catch all for like http://camera.phor.net/cameralife/search+term
+ RewriteRule ^(.*)$ index.php?page=search&id=$1&%{QUERY_STRING} [L]
</IfModule>
-
-<Files ~ ".inc">
-Order allow,deny
-Deny from all
-</Files>
View
@@ -0,0 +1,106 @@
+Project Goals
+=============
+
+1. Release often
+
+2. Integrate with Content Management Systems
+
+3. Integrate with other great services
+
+Feedback, hints and a couple patches are always coming, which is great. Code is highly modular, and patches are always coming from people integrating into their own site.
+
+How does this code work?
+========================
+
+This project follows the Model-View-Controller philosophy as well as PSR-1, -2, and -4 interoperability conventions. A typical page view is described below and separates concerns into Models, Views, and Controllers.
+
+1. A user loads <http://camera.phor.net/cameralife/photo/20739>
+
+2. ModRewrite in `.htaccess` translates to <http://camera.phor.net/cameralife/index.php?page=photo&id=20739>
+
+3. `index.php` loads the site configuration `config.php` and calls `Controller::handleRequest()`
+
+4. The `Controller` base class instantiates and delegates the request to `PhotoController` based on the URL
+
+5. `PhotoController` accessess the `Photo` model and other models to collect needed information
+
+6. `PhotoController` instantiates and calls `render()` on `PhotoView`, passing in the models
+
+7. `PhotoView` reads data from the models to write HTML to the browser
+
+Complete API documentation is at <http://camera.phor.net/docs/>
+
+Release Process
+===============
+
+Regression testing (move all this to Continuous Integration)
+------------------------------------------------------------
+
+- Validate OpenSearch: <http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fcamera.phor.net%2Fcameralife%2Fopensearch.xml.php>
+
+- Validate OpenGraph: https://developers.facebook.com/tools/debug/og/object?q=camera.phor.net
+
+- Validate RSS: http://validator.w3.org/feed/check.cgi?url=camera.phor.net/cameralife/rss.php%3Fq%3Dwill
+
+- Try to upload a non-image
+
+- `git grep -i Deprecated` # create issues for these
+
+- `git grep -i TODO` # create issues for these and remove from code?
+
+- static code analysis in PHPStorm
+
+- http://html5.validator.nu/?doc=http%3A%2F%2Fcamera.phor.net%2Fcameralife%2F
+
+- http://html5.validator.nu/?doc=http%3A%2F%2Fcamera.phor.net%2Fcameralife%2Fphotos%2F15608
+
+- http://html5.validator.nu/?doc=http%3A%2F%2Fcamera.phor.net%2Fcameralife%2Ftopics%2FPeople
+
+- http://html5.validator.nu/?doc=http%3A%2F%2Fcamera.phor.net%2Fcameralife%2Falbums%2F168
+
+- http://html5.validator.nu/?doc=http%3A%2F%2Fcamera.phor.net%2Fcameralife%2Ffolders%2F2012%2F2012-06%2520Pool%2520party%2F
+
+- `git grep GET` and remove these
+
+- `git grep PHP_SELF` and remove these
+
+- `git grep Database -- sources/Controllers`
+
+- `git grep Database -- sources/Views`
+
+- Validate OpenID login
+
+- XSSme SQLinjectme wapiti zaproxy
+
+When Changing the Database Schema
+---------------------------------
+
+1. Increment version number in module-config.inc, main.inc, and setup/upgrade/upgrade.php
+
+2. Update db schema at setup/index2.php
+
+3. Update install.mysql
+
+4. Write an upgrader in setup/upgrade
+
+Release process
+---------------
+
+- Make a new flyover install video
+
+- edit composer.json
+
+- Update screenshots in README.md
+
+- Check https://packagist.org/packages/fulldecent/cameralife
+
+- Complete automated release below
+
+ VERSION='2.7.0a6' # <-- EDIT THIS
+ sed -i "/CAMERALIFE_VERSION/s/, '.*'/, '$VERSION'/" index.php
+ git commit -am "Releasing version $VERSION"
+ git tag -a "$VERSION" -m "Version $VERSION"
+ git push --tags
+ phpdoc --directory . --target ../docs/ --title 'Camera Life Developer Manual' --ignore 'vendor/'
+
+ 
View
123 Changelog
@@ -1,123 +0,0 @@
-2.7.0 William Entriken <cameralife AT phor.net>
-* Automatically name files if possible
-* Update PhotoStore, Search API
-* Remove hacks
-* Do not delete photos
-* Use CDN for bootstrap
-* Supports OpenGraph
-* Drop Gallery Remote support
-* Support Travis CI and PSR code quality standards
-* Improve support for unicode utf-8 file names
-
-2.6.6 William Entriken <cameralife AT phor.net>
-* Improve install process
-* Clean up rarely-used extensions
-* Fix UI errors
-
-2.6.5 William Entriken <cameralife AT phor.net>
-* Support Google Analytics
-* Create PHP code style guidelines and adopt
-* Add Facebook photo sharing
-* Validate HTML (Bootstrap theme)
-* Drop unneded logs.value_old
-* Remove iPhone support
-
-2.6.4 William Entriken <cameralife AT phor.net>
-* Added support for OpenID login, this will be default soon
-* Added upgrade tool
-* Supports Gravitar
-* Added 2 new iconsets
-* Use left and right arrow to navigate between photos
-* Bootstrap everywhere and it looks beautiful
-
-2.6.3 William Entriken <cameralife AT phor.net>
-* Huge documentation update by Aysha Mohamed Rafiq
-* Added hacks/widget.php - put this on your blog
-* Add options for image sizes, thinks Jack Snodgrass
-* Resolve issue at http://www.xssed.com/mirror/55648/
-* Resolve issues at http://secunia.com/advisories/31234/
-* Resolve other XSS and SQL injection issues
-* Site now passes SQLInjectme, XSSme and Wapiti vulnerability tests
-* Add autorotate for new and existing photos
-* Added search like on php.net: http://example.com/cameralife/SEARCHTERM
-* Fix install issues, thanks Eoin McLoughlin
-* Update install documentation and process, takes one less click to install
-* Rethemed Admin section, thanks Keith Bishop
-* Supports GPS in photo metadata, links to Google maps
-* Cleaned up RSS feed
-* Return 404 code for unfound photos, albums, topics, folders
-* Added documentation for an external thumbnailing server
-* Link to online help from inside the site - for error messages
-* Fixed Amazon S3 support
-* Automatic htaccess setup
-* Checkpoint and rollback is easier to manage with batch process
-
-2.6.2 William Entriken <cameralife AT phor.net>
-* Website update, thanks to Rajesh Sundaram
-* Security updates, thanks to Omer Singer and BackDoor
-* Merge themes
-* Fix some XSS and injection exploits
-* New iconsets and themes
-* Amazon S3 Support
-* Flickr support
-* iPhone support
-* Add support for remote file storage over FTP, SSH, ...
-* Fixed gallery API (iPhoto support)
-* Separated filesystem calls and preferences into modules
-* Check for update from the admin interface
-* Moved all theme to its own separate API
-* Automatically updates when the photos directory is changed
-* Renames and flags can be undone immediately (a la gmail)
-* PNG support
-* Uses mod_rewrite if possible, setup checks for mod_rewrite
-
-2.6.0 William Entriken <cameralife AT phor.net>
-* Support for Gallery Remote API (upload from iPhoto, DigiKam, ...)
-* Microformats, Sitemaps, OpenSearch
-* RSS feeds, supports iPhoto photocasting
-* Photo keywords with delicious-like keyword editor!
-* Checkpoints allow you to review and approve changes to the site
-* Comments and ratings
-* Order prints online
-* Allow multiple photos with same file name!
-* Photos may be in a directory not accessible from the web
-* More fun stats
-* Huge changes under the hood (V4 -> V8 engine)
-* Code is now in SVN
-* Photo thumbnails are not generated until needed
-* Security fixes to avoid DOS
-
-2.5.5 William Entriken <cameralife AT phor.net>
-* Cleaned up administrative tasks
-* Ask constructive users to create an account (photo.php)
-
-2.5.4 William Entriken <cameralife AT phor.net>
-* Safer printing of photo descriptions
-* Better documentation of basic functions
-* Simpler explanation of albums
-* Better error messages
-* Viewing a photo finds other photos you may be interested in
-
-2.5.3 William Entriken <cameralife AT phor.net>
-* Simpler install instructions, with help for cPanel users
-* Sugar coated album creation and editing
-* Themes no longer require menu-bullet
-* Bugfix: users.php with db_prefix now works (thanks Brian)
-
-2.5.2 William Entriken <cameralife AT phor.net>
-* Upload multiple photos in a zip (OMG finally!!?)
- - Requires unzip command line utility
-* Main index allows sort by Newset Folders (thanks Kevin)
-* Photos display "added by AUTHOR" if it was uploaded
-* Seperated config.php out of common.php (easier install)
-* Filedone.wav is played when upload is done
-* Supports a table name prefix (thanks Kevin)
-* Bugfix: photo descriptions with " in them
-
-2004-10-05 William Entriken <cameralife AT phor.net>
-* Fixed that folder problem...
-* Upload to individual folders
-* New default theme: clean
-* Better SQL queries for logs (doesn't need mysql 4.1)
-* Create albums on the fly
-* Bugfix: Deletes logs while erasing photos
View
46 HACKING
@@ -1,46 +0,0 @@
-*
-* Camera Life
-* https://github.com/fulldecent/cameralife
-*
-* Hacker guide
-* Information for people looking to contribute.
-*
-
-Project goals:
- - Release often
- - Integrate with Content Management Systems
- - Integrate with other great services
-
-Feedback, hints and a couple patches are always coming, which is great. Code is highly modular, and patches are always coming from people integrating into their own site.
-
-
-*
-* What happens when the user loads a page?
-* A typical page load...
-*
-
- - The user loads http://camera.phor.net/photos/5392
-
- - Apache translates this using Rewrite into http://camera.phor.net/photo.php?id=5392
-
- - photo.php runs and instantiates main.inc which loads a CameraLife object and sets everything up
-
- - photo.php uses $_GET['id'] to instantiate a Photo object. The photo class is defined in modules/core/photo.class.inc
-
- - The photo class looks up information about the photo by retreiving from the database
-
- - The database functionality is delegated as a feature through CameraLife, and it is currently implemented by the MysqlDatabase class which lives in modules/database/mysql/mysql.inc
-
- - photo.php delegates displaying the page through a Theme module (showPage function)
-
- - The theme is responsible for displaying stuff to the user
-
- - Any post requests or ajax calls are sent to photo_controller.php
-
-
-*
-* Coding standards
-*
-
-We are preferring PSR-2 style PHP code, and all code will be accepted. Please also use phpdoc.
-
View
61 INSTALL
@@ -1,61 +0,0 @@
-*
-* Camera Life
-* https://github.com/fulldecent/cameralife
-*
-* Install guide
-*
-* This file will help you install Camera Life
-* if you are upgrading, simply copy modules/config.php to the new release
-*
-
- A. Pre-requesites
-
- Camera Life requires: PHP with MySQL support and GD with JPEG support.
- The server needs to support Content Negotiation (see the .htaccess file).
-
- To add GD support on Ubuntu, use: apt-get install php5-gd; reboot
-
- B. Auto install
-
- Untar the package and point your browser to the created folder.
-
- C. The hard way - if auto install fails
-
- Note: If using tablename prefixes: edit setup/install.mysql and add the
- prefix to each table in each INSERT and CREATE statement
-
- Using linux:
-
- $ su
- # mysqladmin create cameralife
- # mysql cameralife
- mysql> grant all privileges on cameralife.* to USER identified by 'PASS';
- mysql> quit
- # mysql cameralife < setup/install.mysql
-
- Using cPanel X - click MySQL Databases
-
- Add Db: cameralife
- Add User: USER PASS
- Add user to Db with all privs
-
- Click phpMyAdmin
- Choose the database on the left
- Click SQL on the top
- Browse for setup/install.mysql
-
- Now edit modules/config.inc with the credentials you chose.
-
- Point your web broswer to the site and register an account.
-
- Run the SQL command: UPDATE users SET auth=5;
- * prefix users with your tablename prefix if necessary
-
- View http://YOURSITE/setup/install3.php
-
-
- D. Trouble
-
- We would love to improve the program by hearing your feedback. Mail us
- at cameralife AT phor.net (start subject with "CAMERALIFE-BUGS:")
-
Oops, something went wrong.

0 comments on commit 851528c

Please sign in to comment.