Commit Graph

24 Commits

Author SHA1 Message Date
Bharat Mediratta
37758d15de Drop the right tables at uninstall time 2008-12-03 03:43:50 +00:00
Bharat Mediratta
91c4bda1ec Prototype access control model. There's much left to do, but it's a
working implementation.
2008-12-01 08:50:00 +00:00
Bharat Mediratta
4271f7702a Add access model (not fully baked yet).
Update scaffolding to allow addition of just albums (helpful for testing permissions)
2008-11-29 22:47:15 +00:00
Bharat Mediratta
c95c17b133 Centralize logging around installing/uninstalling modules. 2008-11-27 09:45:26 +00:00
Tim Almdal
25b0dff45c Add a thumbnail to the root directory, in case it gets displayed in a tag dynamic album 2008-11-26 18:49:20 +00:00
Tim Almdal
992cf22c79 Revert module block approach 2008-11-21 07:06:11 +00:00
Tim Almdal
b78cee6395 A look at away to allow modules to define html head contents (links and js) and also allow modules to contribute blocks to the layout. 2008-11-20 17:32:58 +00:00
Tim Almdal
103bd8e8d2 Add the original item height and width to the item table 2008-11-19 22:45:30 +00:00
Bharat Mediratta
3e67a35cb0 change mime_type column from 255 chars to 64 2008-11-19 03:39:38 +00:00
Tim Almdal
c7b2090f0c add the mime type column on the item table 2008-11-19 03:29:53 +00:00
Bharat Mediratta
0fe8d44472 Create module helper and refactor all the code that creates, updates
and deletes modules into it.
2008-11-13 10:38:28 +00:00
Bharat Mediratta
418c0aab69 Create permanent owner_id column in the item table, and use a soft
relationship to bind the two.  To do this, I overrode __get in
Item_Model so that $item->owner returns the appropriate User_Model.
2008-11-08 07:48:36 +00:00
Bharat Mediratta
36d1be4717 44 --> E_DATABASE_ERROR 2008-11-08 05:12:37 +00:00
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
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
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
04a738bc18 Declare install/uninstall stat.c 2008-11-05 01:30:59 +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
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
7ae73fcd65 Change structure of item table to match MPTT class (which is a little different from ORM_MPTT which we used in gx 2008-11-03 00:26:55 +00:00
Bharat Mediratta
e173f36bcb Create some basic infrastructure:
* item model (contains basic item info, similar to the gx version)
  * module model (has info about each module and which version of it is installed)
  * added a very basic unit test to verify that we can create an instance of item
  * Updated our test controller to require a unit_test db config and
    call core::install if it hasn't been done already.

New pattern:
  * core/helpers/core_installer.php creates core_installer helper.
    When we install a new module you call xxx_installer::install(),
    and when you want it to go away, you do xxx_installer::uninstall()

Create
2008-11-02 23:55:09 +00:00