Commit Graph

32 Commits

Author SHA1 Message Date
Bharat Mediratta
24b511b44a Move theme::get_edit_form_admin into admin_theme_options since that's
the only place where it's used and the theme helper is loaded on every
page view.
2010-08-29 16:03:09 -07:00
Tim Almdal
1ad1f9517f Fix for ticket #1279. In admin themes sanitize the theme name before checking that theme.info exists. 2010-08-08 17:29:22 -07:00
Bharat Mediratta
5767971f43 Sentence casing. 2010-06-26 12:00:55 -07:00
Bharat Mediratta
6b619e1098 Differentiate in our logs between missing site and admin theme overrides. 2010-06-26 12:00:14 -07:00
Tim Almdal
8ecf28d3ef Better fix for the problem that a preview of an admin theme was not showing up. 2010-06-25 10:23:11 -07:00
Tim Almdal
e380f19ee2 Fix an issue where a preview of the admin view would not work. 2010-06-25 10:17:06 -07:00
Tim Almdal
d66c496fb1 Change the theme option page to display using tabs if the site theme has an admin page. 2010-06-25 06:45:09 -07:00
Bharat Mediratta
886337e1dd Add error messages to theme::get_edit_form_admin() 2010-04-10 20:45:09 -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
Bharat Mediratta
c803cb2909 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-01 19:44:29 -08:00
Bharat Mediratta
01bad461df Publish theme_edit_form and theme_edit_form_completed events so that themes can piggyback on the regular Admin > Appearance > Theme Options page. 2009-11-29 12:39:21 -08:00
Bharat Mediratta
3f63e1c521 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/helpers/theme.php
	modules/gallery/libraries/Admin_View.php
	modules/gallery/libraries/Theme_View.php
2009-11-29 02:45:39 -08:00
Bharat Mediratta
f3981bbaa9 Rework the theme loading code to allow themes to be treated as Gallery
modules, and have an admin subdirectory that is treated like a Kohana
module (as distinct from a Gallery module).

The main advantage of creating the separate admin subdirectory is that
we will not load an admin theme and a site theme at the same time.
We'll only load a few specialized bits of the site theme while the
admin theme is active.

Concrete examples. A site theme named "xxx":
- will receive events at themes/xxx/helpers/xxx_event.php
- will have working controllers at themes/xxx/controllers/xxx.php

If theme xxx has an admin subdir, then in admin mode it:
- will receive events at themes/xxx/admin/helpers/xxx_event.php
- will have working controllers at themes/xxx/admin/controllers/xxx.php
2009-11-28 23:25:07 -08:00
Bharat Mediratta
b677778253 Expose theme::$is_admin 2009-11-28 15:42:11 -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
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
f5b0ce1f47 Revert "Currently Admin_Theme_Options controller assumes that all the themes will provide the same values. This change corrects that assumption and moves the management of the theme options, including creating the form and updating the theme options into the theme."
This reverts commit 1692ee1308.
2009-11-19 11:44:09 -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
Tim Almdal
1692ee1308 Currently Admin_Theme_Options controller assumes that all the themes will provide the same values. This change corrects that assumption and moves the management of the theme options, including creating the form and updating the theme options into the theme. 2009-11-18 14:37:49 -08:00
Tim Almdal
4d4e81ca26 Create a helper to load the theme information from theme.info 2009-11-18 08:38:11 -08:00
Bharat Mediratta
b8e94302bd Tweak load_themes() to match exactly "/admin" or the "/admin/" prefix,
but not just the "/admin" prefix because that breaks if you add an
image like "admin_photostream".
2009-11-17 15:36:02 -08:00
Bharat Mediratta
96cbfe23a6 Respect the "theme" variable if we're an admin. This requires us to
change the order of operations in gallery_event::gallery_ready() so
that we load users before themes.  Fixes ticket #836.
2009-11-03 14:03:36 -08:00
Bharat Mediratta
91e9df7834 Update themes::load_theme() to work with mod_rewrite's short urls. 2009-10-24 10:37:12 -07:00
Tim Almdal
68411cc903 Allow themes to override event handlers. In gallery::ready() grab the server
PATH_INFO and pass it to the theme::load_themes method.  If it starts with
\"/admin\", then set the theme to the active admin theme, otherwise set it to
the active site theme.  Fixes ticket #841: Themes cannot overload event classes."
2009-10-23 17:58:55 -07:00
Tim Almdal
2634a683b3 Revert "Create a gallery::plugin_path which returns the appropriate path to the module or theme. This checks for the existence of an application/modules or application/themes first."
This reverts commit e1e1461a77caf5bff457927f098366497de6ffff.
2009-10-04 10:12:22 -07:00
Tim Almdal
aa0529d557 Create a gallery::plugin_path which returns the appropriate path to the module or theme. This checks for the existence of an application/modules or application/themes first. 2009-10-04 10:12:21 -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
Bharat Mediratta
b9b68e0952 Add a new "show credits" check box in the theme options so that you
can disable any module credits if you want.  Update the theme to obey
it.
2009-06-23 16:05:32 -07:00
Bharat Mediratta
0b23433d94 Rename theme_details to theme_options. These changes got left out of
68fd196d66 leaving us in a temporarily
broken state.
2009-06-11 12:50:50 -07:00
Bharat Mediratta
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Bharat Mediratta
28b41056e3 Restructure things so that the application is now just another module.
Kohana makes this type of transition fairly straightforward in that
all controllers/helpers/etc are still located in the cascading
filesystem without any extra effort, except that I've temporarily
added a hack to force modules/gallery into the module path.

Rename what's left of "core" to be "application" so that it conforms
more closely to the Kohana standard (basically, just
application/config/config.php which is the minimal thing that you need
in the application directory)

There's still considerable work left to be done here.
2009-05-27 15:07:27 -07:00