Commit Graph

51 Commits

Author SHA1 Message Date
Bharat Mediratta
89c4dadec2 Rename module::get_list() to module::installed() 2008-11-28 18:39:18 +00:00
Bharat Mediratta
4d71975f37 Add credits theme callback, point the powered-by link at GMC 2008-11-28 09:46:29 +00:00
Bharat Mediratta
18412bb14e Add tag() function 2008-11-28 01:18:45 +00:00
Tim Almdal
bac4ff2046 1) Create a Theme_View class that combines the functionality of the Theme class with the View class.
2) Only define the form.html.php::DrawForm method once if there are multiple forms on the page (i.e. comments and add tags)
2008-11-27 16:19:07 +00:00
Bharat Mediratta
34a286ae90 Add navigation_top() and navigation_bottom() insertion points
Move "My Gallery" navigation tab into the user module and only show it
if you're logged in
2008-11-27 11:33:45 +00:00
Bharat Mediratta
8e33f5d7b9 Add page_type() function 2008-11-27 04:58:38 +00:00
Bharat Mediratta
974f9f7788 Add a new "tag" page type.
Create the concept of "page types" which let us specify the kind of
page that we're rendering in high level terms.  Currently there are
three page types: album, photo and tag.

The tag page type uses slightly different variables.  It has a $tag
but no $item.  Adjust all sidebar_block() functions to avoid printing
stuff that's dependent on the item if there is no item.

Simplify the tag code to stop trying to fake an item.

Update the theme slightly to use $item and $tag where appropriate
(notably, for making the <title> element).
2008-11-26 21:50:45 +00:00
Bharat Mediratta
496007d2ae NULL -> null 2008-11-26 21:15:37 +00:00
Andy Staudacher
66f51f3c17 Initial commit of the translation class, I18n_Core and some tests.
- Port of Ruby's I18n gem (http://rails-i18n.org/)
- Added proper plural handling on top of that.
- Using CLDR 1.6's plural form data
- See I18n_Test for example usage.
- Not integrated into G3 templates yet. Probably adding __() as alias for I18n::instance->translate().
- No specific plan yet where localization files should live.
2008-11-26 11:46:56 +00:00
Bharat Mediratta
229e531ab9 Change url() to use url::file() since it's more concise. 2008-11-25 04:41:14 +00:00
Bharat Mediratta
8b84b188bf Remove module() since it's now unused. We can add it back if we decide that we want it again. 2008-11-25 04:40:07 +00:00
Bharat Mediratta
b22494a4ea Move the in-place-edit JS into the page_footer callback and out of
Theme.php.
2008-11-25 04:37:21 +00:00
Bharat Mediratta
6935cfef40 Add gClearFix to the annotated theme elements, which makes the box surround its contents better (thanks thumb!) 2008-11-25 02:27:00 +00:00
Bharat Mediratta
dcf3693b3e Add theme debugging. Activate it in the [info] tab in the
scaffolding, then browse around your Gallery3 to see where you can add
visible elements via modules.
2008-11-25 02:17:53 +00:00
Tim Almdal
dd200ce5ff Don't bother trying to check if the class file exists, just use method_exists, which will use the php auto loader to find the class. 2008-11-24 06:02:38 +00:00
Tim Almdal
7491e3c44a Add a site-config parameter to the config.php file. Created a core_block:head method to insert the title into the head section. If the config value is false, the default Browse Photos::$item->title is used. A string value with a trailing '-' will append the config value to $item-title. Otherwise, the page title is set with the supplied value. 2008-11-23 16:51:06 +00:00
Tim Almdal
bdbb115296 Remove extra quotes around variable that already contained a string value 2008-11-23 08:38:24 +00:00
Bharat Mediratta
1b76def26f Create thumbnail insertion points (top/bottom/info) and move
the generic item info into the info module.
2008-11-22 21:59:41 +00:00
Bharat Mediratta
35cfbfdef4 Pass extra args on to the block function.
Avoid excess string concatenation (not benchmarked).
2008-11-22 21:50:39 +00:00
Bharat Mediratta
c6f0cc036d Move all block callbacks from View::block_type() to
$theme->block_type() so that the themer has a consistent interface.
Also added a bunch more callbacks and normalized the names so that the
module author has plenty of options for where stuff gets put on the
page.  Especially renamed album/photo/sidebar to be album_blocks()
photo_blocks() and sidebar_blocks() to make it clear that those are
going to be larger content sections and not just basic insertion
points.

Used __call() to collapse all functions in the theme, which
incidentally makes it trivially easy to add a new insertion point.
2008-11-22 21:46:34 +00:00
Tim Almdal
8eadddfa87 Convert gmaps, info, and tag modules to the new block module 2008-11-22 05:51:15 +00:00
Tim Almdal
01c8cdc8dd Convert the carousel module to provide its block through the new api 2008-11-21 23:55:29 +00:00
Tim Almdal
60191f1d2c Be consistent in naming the album_top block 2008-11-21 23:36:41 +00:00
Tim Almdal
6ec266faa6 2nd attempt at inserting html by modules. 2008-11-21 20:13:28 +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
6fd261c8b0 Add unittest and caching for ORM_MTPP::descendants 2008-11-20 06:05:22 +00:00
Tim Almdal
604e58346b Add unittest and caching to ORM_MTPP::descendants_count 2008-11-20 05:06:24 +00:00
Bharat Mediratta
611627231b Clean up the MediaRSS module a little bit:
* Media_RSS_Controller::$LIMIT is now self::$page_size
* We use ORM_MPTT descendant_counts()
* If the page is out of bounds, put it on a boundary
* Move pub_date into the controller to simplify the mrss file
* Put all the view assignment in one block for easier reading
* Removed stray ; from the end of lines in the mrss file

Clean up ORM_MPTT a bit:
* fix spelling: decendent -> descendant
* Remove unnecessary order_by() clauses
* Set the default for $type to null (not "all").
2008-11-20 02:59:43 +00:00
Jozef Selesi
c3fc1cb7ec * Added HTTP status constants and helper functions to REST helper.
* HTTP header setting in comment module now going through REST helper API.
* Fixed items controller test.
* Fixed user installer test.
* Fixed _create() handling in the REST controller.
* Fixed routing for edit and add forms.
* Added some tests for the REST controller.
* Set svn:eol-style to LF on a bunch of files.
* Added preamble to MY_Forge.php.
2008-11-20 01:25:29 +00:00
Tim Almdal
bd76b2e89f changed descendents_by_type to descendents and added descendent_count 2008-11-20 00:45:40 +00:00
Tim Almdal
b3314fc1dc Update the media rss template to include the resize and the fullsize
added descendants by type method to the item model to allow for the selection of children by type
2008-11-19 18:23:30 +00:00
Bharat Mediratta
4610fc8e7f Create Forge::add_rules_from() which pulls validation rules from the model and
associates them with the form.  This replaces the various _add_validation_rules()
functions in the user and comment modules.

Move user edit form into user helper for consistency with the comment module.

Implement missing _form method in the user controller.
2008-11-16 07:51:42 +00:00
Bharat Mediratta
e3be3cecf5 Second half of renaming the tags module. Change all occurrences of
gTags to gTag in the CSS.
2008-11-16 07:20:58 +00:00
Tim Almdal
be67187ad9 Create MY_Forge to specify the defaul html 2008-11-16 06:43:31 +00:00
Bharat Mediratta
e901d613bf Add Theme::module() and module::get() 2008-11-15 09:08:18 +00:00
Bharat Mediratta
fd4faa89e6 Override View_Core::render so that we trap errors stemming from bad
PHP includes and show a visible stack trace to help developers.
2008-11-11 23:07:30 +00:00
Bharat Mediratta
950c58e6d3 Add support for in-place editing of data fields. 2008-11-08 09:28:11 +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
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
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
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
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
Bharat Mediratta
ef0bb33a95 Order the children() 2008-11-05 01:40:41 +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