82 Commits

Author SHA1 Message Date
Bharat Mediratta
53c1ae7dca Merge pull request #204 from jozefs/issue1838
#1838 - thumb_proportion should have a minimum size.
2013-03-11 16:38:53 -07:00
shadlaws
b6dc597c66 Fix Theme_View::siblings bug - limit and offset reversed in sibling_callback.
I wonder if this could be causing some random issues I see on the forums...
2013-03-11 23:10:27 +01:00
Jozef Selesi
3c47deb9ef Themes can choose child thumbnail when asking for proportion.
This helps themes better calculate an item's container size, for cases
when the first item significantly differs in size from the rest.

Trac-Ticket: #1838
2013-03-11 15:59:00 +01:00
Jozef Selesi
bae14a76e5 Themes can set minimum thumbnail size when calculating proportions.
This prevents broken item rendering when thumbnails are smaller than the
theme design allows.

Trac-Ticket: #1838
2013-03-11 15:54:20 +01:00
shadlaws
9b9f1a7b07 #2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
2013-03-02 13:25:10 +01:00
Bharat Mediratta
9dbe2e15ad Extend siblings callbacks to take a $limit and an $offset for navigating
large sibling sets.  Useful for the thumbnav module since we don't want to
iterate a thousand siblings to find the one we care about.  Fixes #1999.
2013-02-09 14:53:34 -05:00
Bharat Mediratta
49dd0994df Follow-on to 1e4d75c120 for #1975.
Create a siblings() function which pulls together the siblings_callback
function and makes it a more palatable API.
2013-01-30 19:32:35 -05:00
Bharat Mediratta
eefc9d5553 Use the thumb proportion from the first item in an album if the album has children. Fixes #1958. 2013-01-23 14:03:44 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
34ac1a466d Verify that theme names are well formed. Fixes #1856. 2012-05-11 15:12:30 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
1ed54ab5dc Make the Theme_View::thumb_proportion() API call backwards compatible to
the API before dc21cf36b6.

Fixes #1775
2011-08-30 20:49:23 -07:00
Bharat Mediratta
084c2717c0 Merge branch 'master' into bharat_dev 2011-08-27 20:56:03 -07:00
Bharat Mediratta
5cf38ed816 Stop using Pagination() and instead use $theme->pager() in views.
Move the pager() function up to Gallery_View and replace
themes/admin_wind/views/pager.html.php (Pagination based) with a
modified version from the wind theme in
themes/admin_wind/views/paginator.html.php.  Fixes #1718.
2011-04-26 09:48:21 -07:00
Tim Almdal
4b01676f32 Fix for ticket #541
Added a theme_info variable to the theme globals.  The properties in the theme.info file are now contained in this theme_info structure.

Access is:
  <?= $theme_info->author ?>
will display the theme author.
2011-04-23 07:25:33 -07:00
Bharat Mediratta
dc21cf36b6 Change the $thumb_proportions variable to be a theme callback which
takes an item as an argument.  This will let us figure out proportions
in the case where a module has defined custom thumbnail sizes.
2011-03-20 10:25:59 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
08c41f2976 Add "html_attributes" theme callback to allow modules to inject attributes into
the <html> element, including things like namespaces.   Fixes #1615.
2011-01-21 00:07:00 -08:00
Bharat Mediratta
5ac49d497f Create new APIs for allowing themers to control what CSS/JS get
combined and when.  Backwards compatible in that old themes will work,
but their CSS/JS will no longer be combined unless they make some
changes.  Fixes #1600.
2011-01-10 22:20:12 -08:00
Joe7
f364e8a96b Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 2011-01-03 11:38:21 -08:00
Bharat Mediratta
b6c202d572 Swap the order of the CSS and JS for performance. Fixes #1540. 2010-12-16 22:18:04 -08:00
Bharat Mediratta
ab598b2931 Put the theme CSS at the end of the module CSS so that the theme has
the final say.  Fixes ticket #1315.
2010-08-29 21:15:58 -07:00
Bharat Mediratta
400c248e2d default maintenance_mode from false -> 0 for consistency with the value we set in the db 2010-08-01 21:10:27 -07:00
Bharat Mediratta
c33b24c9fa Make maintenance mode a variable instead of a config. Then create
links on the Admin > Maintenance page to allow you to turn it on and
off.  This should be efficient since we cache all vars and look them
up on every request anyway.

This also allows us to have the Fix task enable maintenance mode while
it's running which greatly reduces the chances that somebody will come
along and hork the database while we're tinkering with MPTT pointers.

Fixes ticket #1259.
2010-08-01 21:00:30 -07:00
Bharat Mediratta
1240878df0 Fix-ups for d98b85f7d3
- Pass the CSS selector of the active image in as an arg to site_menu
  so that quick operations know what they're operating on.
- Change the ids from g-{photo,movie}-id to the generic g-item-id
- Initialize ajax handlers for site menu on the photo and movie page
- Drop the movie context menu, it's now in the site menu
2010-05-14 16:55:15 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Tim Almdal
bd9f945e3f Remove the display of the "body_attributes" div when in debug mode. debug mode is by default set up to add new div's to display the location of the content. "body_attributes" are attributes on the body tag and trying to add content introduces an extra > in the html stream. 2010-01-08 12:49:16 -08:00
Bharat Mediratta
3d4672ba88 Give the theme a chance to handle theme function callbacks as well. 2009-11-28 23:48:38 -08:00
Bharat Mediratta
22149b52c3 Move the theme fallback checking into theme::load_themes() so that
we're calling it once per request.
2009-11-27 17:12:13 -08:00
Bharat Mediratta
9d40f6fc00 Paginator: don't try to set the position for "other" page types. 2009-11-20 20:29:49 -08:00
Tim Almdal
57adefc5ba Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.
2009-11-19 11:44:01 -08:00
Tim Almdal
26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -08:00
Bharat Mediratta
670312ff10 For album pagination, don't let the last_visible_position exceed the
total.  Fixes ticket #903.
2009-11-18 11:26:19 -08:00
Bharat Mediratta
1067e68292 Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics.  Currently the top level bucket

   collection, item, other

Here are the core subtypes so far:

   collection: album, search, tag
   item: movie, photo
   other: login, reset, comment-fragment, comment

It's legal to create new page_subtypes whenever you want.  Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Bharat Mediratta
5df00737c9 Fix a couple of errors in the refctored paginator code:
1) We weren't showing previous page links for albums when we should have
2) We needed to wrap the results of url::merge() in url::site() so that we
   generate server-relative urls.
2009-11-15 15:24:49 -08:00
Bharat Mediratta
aa1ddba155 Oops. Fix a typo that the forced page_type to always be "tag" 2009-11-14 16:36:25 -08:00
Bharat Mediratta
cd8663b81d Fix pagination so that it does not require any domain specific logic
to support tags and search.  Instead, just modify the page param to
the current page.
2009-11-14 16:31:56 -08:00
Bharat Mediratta
29efb6ba9f Rename "pager" to "paginator" so that we differentiate page.html.php
from paginator.html.php
2009-11-14 16:20:36 -08:00
Bharat Mediratta
081ce9f6ca Normalize pagination so that pager.html.php can handle pagination for
both albums and movies.  Kohana's paginator is not quite sufficient
for this, so create our own pagination logic in Theme_View with only
the stuff we need.

Clearly document the variables available in pager.html so that themers
know how to use it.

Fixes ticket #626.
2009-11-14 14:25:39 -08:00
Tim Almdal
0fe32a61f6 Standardize the name of the blocks. 2009-11-13 13:56:05 -08:00
Tim Almdal
b5f2dbc2c4 Create a user_menu for the top of the page. Change the login, edit profile and logout portions of the banner to be rendered by the Theme_View::user_menu callback. This fires the user_menu event. Fixes Ticket #871. 2009-11-06 14:08:46 -08:00
Bharat Mediratta
13faf6035d Remove Menu::compact() in favor of putting an if-then clause in
menu.html.php.  This serves two purposes:

1) It's more efficient since we're doing less passes over the Menu tree
2) We're allowing themers to decide whether or not to show empty menus
2009-10-27 14:00:32 -07:00
Bharat Mediratta
76c0c7f3a1 Change our menu building blocks to use PHP templates so that themes
can override them and define their own menu formats.  I worry a little
bit that this approach may be too heavy since we're now doing a lot
more template includes than we were before.  Also, I had to change the
Menu API to stop using __toString() because you can't throw exceptions
from __toString() which would make it an unhappy experience for
developers.
2009-10-27 13:48:41 -07:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Tim Almdal
60d35b8992 Use the block_manager to manage site sidebar panels. Fixes ticket #110.
* Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list.
* Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks.
* Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks
* Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach
* Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules.
* Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules.
* Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated
* Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar.
2009-09-30 07:31:12 -07:00
Tim Almdal
89a67dba63 * Remove the @todo in module event and always try to call gallery_event::$function first
* Refactor gallery.php to move site_menu, admin_menu, and context_menu to gallery_event.php
* Change Theme_View and Admin_view to call module::event("site_menu|admin_menu|context_menu"...)
2009-09-29 08:50:53 -07:00
Tim Almdal
c51c76dcaa Fix Admin_View to look for the the variable active_admin_theme instead of active_site_theme. In addition check for the existence of THEMEPATH . instead of theme/ 2009-09-24 15:06:40 -07:00