diff options
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/theme.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/helpers/theme.php b/core/helpers/theme.php index 20e9a9d8..65e1eb20 100644 --- a/core/helpers/theme.php +++ b/core/helpers/theme.php @@ -39,9 +39,14 @@ class theme_Core { } public static function get_edit_form_admin($theme) { - $form = new Forge("admin/themes/edit/$theme->name"); + $form = new Forge("admin/themes/edit/{$theme->id}/bogus"); $group = $form->group("edit_theme")->label($theme->description); - $group->input("name")->label(t("Name"))->id("gName")->value($theme->name); + $group->input("page_size")->label(t("Items per page"))->id("gPageSize")-> + value(self::_get_var($theme->id, "page_size", 90)); + $group->input("thumb_size")->label(t("Thumbnail size (in pixels)"))->id("gThumbSize")-> + value(self::_get_var($theme->id, "thumb_size", 300)); + $group->input("resize_size")->label(t("Resized image size (in pixels)"))->id("gResizeSize")-> + value(self::_get_var($theme->id, "resize_size", 600)); $group->submit(t("Modify Theme")); return $form; } @@ -50,5 +55,9 @@ class theme_Core { $file = THEMEPATH . $theme_name . "/theme.info"; $theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS); } + + public static function _get_var($theme_id, $name, $default_value = null) { + return module::get_var($theme_id, $name, module::get_var("core", $name, $default_value)); + } } |