Commit Graph
1018 Commits
Author SHA1 Message Date
Tim Almdal 57683d5b70 Change how the modules table doesn't exist is caught. In running unit test, sometimes i would get the message "There was an SQL error: Table 'gallery3_unittest.modules' doesn't exist - ...." and sometimes I would get the message "Table modules does not exist in your database." In both cases the error code was 44. 2008-11-08 01:19:03 +00:00
Bharat Mediratta dc90ad9739 Change add() to add photos:albums at a ratio of 10:1 2008-11-07 10:46:06 +00:00
Bharat Mediratta 81ab478559 move block.html.php into the default theme 2008-11-07 07:37:49 +00:00
Bharat Mediratta 76436c0029 Add automatic pagination. All you have to do is add <?= $theme->pager
?> to your theme file and you get a well formed pager.  Themes can
customize this any way they want.  A version that matches the mockup
is provided in the default theme.
2008-11-07 07:33:43 +00:00
Bharat Mediratta ae359b50e0 Use get_object_vars to simplify code 2008-11-07 07:31:11 +00:00
Bharat Mediratta 936decb437 Add children_count() to ORM_MPTT 2008-11-07 06:46:38 +00:00
Bharat Mediratta 6b5b5ec3a6 Use jquery.cookie to keep the same tab open when you refresh
Add a switch to turn profiling on/off
2008-11-07 05:49:45 +00:00
Bharat Mediratta c526a9cd25 Move default theme up above modules so that it can override module views 2008-11-07 05:04:15 +00:00
Bharat Mediratta 6f1c46da6e Oops, these files got left out of r18525. 2008-11-06 10:22:34 +00:00
Bharat Mediratta 6cafc61f96 album::set_thumbnail is now part of Item_Model so it can go.
Fix a bug in the scaffolding where we weren't saving the album after
adding its thumbnail (so its dimensions weren't getting set).
2008-11-06 05:51:20 +00:00
Bharat Mediratta d6e942f2e3 Add quick-link to the deepest photo to test hierarchical navigation 2008-11-06 04:56:50 +00:00
Bharat Mediratta 3fe8cd7135 Drop the ? from the base url; we're going to count on Apache PathInfo for navigation. 2008-11-06 04:55:22 +00:00
Chad Kieffer c4407f7bda spruce up the display of commands 2008-11-06 04:37:28 +00:00
Bharat Mediratta cf27982466 When uninstalling the core, uninstall all the other modules first.
Otherwise, when you reinstall the other module's tables are still
hanging around and interfere with their install.
2008-11-06 03:58:37 +00:00
Bharat Mediratta 2738d4b6a6 Fix a typo. 2008-11-06 03:55:32 +00:00
Bharat Mediratta 91a0236f8c Guard the module loading code against database errors (in case the database isn't configured yet) 2008-11-05 22:29:42 +00:00
Chris Kelly 0493cf4ecd replaced Feature URLs with new one 2008-11-05 18:32:50 +00:00
Bharat Mediratta 24787b5545 remove tabs 2008-11-05 17:32:59 +00:00
Bharat Mediratta 3feb0b288b Add info section with MPTT graphs 2008-11-05 09:50:20 +00:00
Bharat Mediratta ae00f73944 * Add thumbnail and resize dimensions to the item table and use them
properly in the theme.
* Move thumbnail and resize generation down into the model for
  consistency.
* Add a sample thumbnail for albums
* Fix a bug in the ORM to clear the cache when we reload an object.
* Add Kohana docs to the scaffold.
2008-11-05 09:42:47 +00:00
Bharat Mediratta e35c154414 Style/doc cleanups. 2008-11-05 07:57:59 +00:00
Bharat Mediratta e44ff9bb60 ORM_MPTT::parents() should not include the node itself. 2008-11-05 07:47:19 +00:00
Bharat Mediratta d21f3437e6 Add the photo controller, and tie it to the photo page in our theme.
Implement a real breadcrumb.
2008-11-05 07:42:52 +00:00
Bharat Mediratta 581e931c43 Change the default theme to actually render what's in the Gallery.
Currently only the album view works, albums have no thumbnails, and
there's only 1 image in use.

Improved Item_Model to have the following API methods
  file_path() -- returns the path to the source image or album dir
  thumbnail_path(), thumbnail_url() -- returns path/url to the thumbnail
  resize_path(), resize_url() -- returns path/url to the resize

All tests updated.
2008-11-05 07:13:46 +00:00
Bharat Mediratta 00513a71d2 Report the number of photos/albums 2008-11-05 06:17:35 +00:00
Bharat Mediratta fd3e21e2fd Move Google Maps block off into its own gmaps module. 2008-11-05 05:41:19 +00:00
Bharat Mediratta 8e880b4c41 Item Info block is now off into the info module. Yay! 2008-11-05 05:35:47 +00:00
Tim Almdal 3c65b68e1c The start of the user module. At this point, it shows up on the scaffolding screen and you can install and uninstall it. Which creates the tables, defines 2 groups (adminstrator, registered) and one user (admin). 2008-11-05 05:32:47 +00:00
Bharat Mediratta a60944e07d Tags are now off in their own module, hooray! 2008-11-05 05:28:20 +00:00
Bharat Mediratta b82332192a The carousel block is now off into its own module. The
sidebar.html.php file loops over $theme->blocks() which in turn calls
carousel::block() which uses the Block object to create a standard
block UI.  Hooray!
2008-11-05 05:20:20 +00:00
Tim Almdal f7560a7e8b Don't overwrite the version number of installed modules when searching for uninstalled modules. 2008-11-05 04:32:58 +00:00
Bharat Mediratta 25bd62f906 Use jQuery magic to make the scaffold look shiny. 2008-11-05 03:26:28 +00:00
Bharat Mediratta 836874ba68 Updated for new MPTT API 2008-11-05 03:24:09 +00:00
Bharat Mediratta ef0bb33a95 Order the children() 2008-11-05 01:40:41 +00:00
Bharat Mediratta 190b439807 Moved MPTT related tests to ORM_MPTT_Test 2008-11-05 01:39:21 +00:00
Bharat Mediratta 04a738bc18 Declare install/uninstall stat.c 2008-11-05 01:30:59 +00:00
Bharat Mediratta f011971ade Further simplify the code. 2008-11-05 01:08:16 +00:00
Bharat Mediratta 667d79c705 _readModules -> _readModules
Simplify the installer-detection code.
2008-11-05 01:05:21 +00:00
Tim Almdal da286fbf6b Clean up camel humped names and move private function to bottom of file 2008-11-05 00:07:16 +00:00
Bharat Mediratta 212e6a0778 New tests for the ORM_MPTT class. 2008-11-04 23:16:42 +00:00
Tim Almdal d0629584b5 Have the scaffolding code see what what modules are available and list whether they need to be installed or uninstalled. 2008-11-04 22:18:00 +00:00
Bharat Mediratta 605d2de336 Lots of new stuff!
Replace theme HTML with *almost* the latest stuff from the
mockups.  (it doesn't include r18467 yet).

Our theme format is now modelled after WordPress / Habari's style
where you have one entry point per type (eg: album.php) which can
load up whatever parts it needs (eg: $theme->display("header"))

Created album and photo helpers which have create() functions
that form the base of our new API, along with tests for them.

Created our own version of the ORM_MPTT since the existing
versions were too buggy and unsupported to depend upon.  Only has
a minimal implementation so far, and the tests are not yet
committed.

Added path(), thumbnail_path() and resize_path() to Item_Model

Extended the scaffolding to allow you to add lots of
photos/albums into your hierarchy.

Deleted modules/mptt -- we're not going to use this anymore.
2008-11-04 21:24:42 +00:00
Bharat Mediratta ade1650846 Add a test to detect tabs in our code, and convert all tabs to spaces
so that the test passes.
2008-11-04 05:22:06 +00:00
Bharat Mediratta 630b0f26fc Restructure the theme code to be more like WordPress / Habari. Now,
the controller initiates a request to a top level page (eg:
album.html.php) which is then free to include whatever other page
chunks it wants with calls like <?= $theme->display('header.html') ?>

Variables like $item and $children are in the global space for all
views.

theme.php helper is now Theme.php library which lets us store the name
of the theme inside the variable itself.  This means that the theme
does not have to know its own name because you can use $theme->url()
for all urls to stuff inside the theme itself, which makes it possible
to cline a theme without changing a single line.

Still using the mock album UI.
2008-11-04 05:02:37 +00:00
Bharat Mediratta 8a4ab78bfb Oops, injecting the function name caused an extra call in the call
stack.  The test passed, but the actual code failed.  Fixed now.
2008-11-03 06:02:40 +00:00
Bharat Mediratta fa9dda4c01 Create an initial attempt at the album controller, set it up with a default route
and add a link to it from the welcome page.
2008-11-03 05:55:34 +00:00
Bharat Mediratta 6da6b8ed52 Theme helper. Right now it has one api method, theme::url which
returns a url local to the theme that you're in.  For example, if
you're in themes/foo/views/page_header.html.php and you call
theme::url("images/foo.png") then it'll create a url to:
themes/foo/images/foo.png
2008-11-03 05:52:13 +00:00
Bharat Mediratta 6c35abd30a whitespace fix 2008-11-03 05:36:44 +00:00
Bharat Mediratta 8831e89f40 More bootstrap code.
* core_installer::install now creates the root album and the albums/thumbnails
  directories under VARPATH.
* Add a test for core_installer
2008-11-03 02:08:07 +00:00
Bharat Mediratta 019ea9cd35 Rename columns lft/rgt to left/right. 2008-11-03 02:05:11 +00:00