diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..5b4346fd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+icons/depricated
+temp/
diff --git a/admin/controllers/admin_theme_options.php b/admin/controllers/admin_theme_options.php
index 4135c0d8..136cef6e 100644
--- a/admin/controllers/admin_theme_options.php
+++ b/admin/controllers/admin_theme_options.php
@@ -9,7 +9,8 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
protected $min_gallery_ver = 46;
private function load_theme_info() {
- $file = THEMEPATH . "pear4gallery3/theme.info";
+ $theme_id = module::get_var("gallery", "active_site_theme");
+ $file = THEMEPATH . "$theme_id/theme.info";
$theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
return $theme_info;
}
@@ -24,22 +25,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
return ($theme_info->name);
}
- private function get_packlist($type, $filename) {
- $packlist = array();
- $packroot = THEMEPATH . 'pear4gallery3/css/' . $type . '/';
-
- foreach (scandir($packroot) as $pack_name):
- if (file_exists($packroot . "$pack_name/" . $filename . ".css")):
- if ($pack_name[0] == "."):
- continue;
- endif;
-
- $packlist[$pack_name] = t($pack_name);
- endif;
- endforeach;
- return $packlist;
- }
-
private function prerequisite_check($group, $id, $is_ok, $caption, $caption_ok, $caption_failed, $iswarning, $msg_error) {
$confirmation_caption = ($is_ok)? $caption_ok : $caption_failed;
$checkbox = $group->checkbox($id)
@@ -57,10 +42,11 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
/* Convert old values ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
protected function upgrade_settings() {
-/* if (module::get_var("th_pear4gallery3", "hide_thumbmeta")):
- module::set_var("th_pear4gallery3", "thumb_metamode", "hide");
- module::clear_var("th_pear4gallery3", "hide_thumbmeta");
- endif;*/
+ if (module::get_var("th_pear4gallery3", "show_logo")):
+ module::clear_var("th_pear4gallery3", "show_logo");
+ else:
+ module::set_var("th_pear4gallery3", "hide_logo", TRUE);
+ endif;
}
protected function get_edit_form_admin() {
@@ -97,9 +83,9 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
/* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
$group = $form->group("edit_theme_adv_main")->label(t("Advanced Options - General"));
- $group->checkbox("show_logo")
- ->label(t("Show Bottom Pear Logo"))
- ->checked(module::get_var("th_pear4gallery3", "show_logo"));
+ $group->checkbox("hide_logo")
+ ->label(t("Hide Bottom Pear Logo"))
+ ->checked(module::get_var("th_pear4gallery3", "hide_logo"));
$group->dropdown("mainmenu_view")
->label(t("Main page View"))
->options(array("grid" => t("Grid (Default)"), "mosaic" => t("Mosaic")))
@@ -192,7 +178,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
}
protected function legacy() {
- module::clear_var("th_pear4gallery3", "show_logo");
+ module::clear_var("th_pear4gallery3", "hide_logo");
module::clear_var("th_pear4gallery3", "mainmenu_view");
module::clear_var("th_pear4gallery3", "show_guest_menu");
module::clear_var("th_pear4gallery3", "background");
@@ -208,6 +194,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
module::set_var("gallery", "footer_text", "");
module::set_var("gallery", "show_credits", FALSE);
module::clear_all_vars("th_pear4gallery3");
+ module::clear_var("th_pear4gallery3", "hide_logo");
}
public function save() {
@@ -275,7 +262,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
// * Advanced Options - General ******************************************
- $this->save_item_state("show_logo", $form->edit_theme_adv_main->show_logo->value, TRUE);
+ $this->save_item_state("hide_logo", $form->edit_theme_adv_main->hide_logo->value, TRUE);
$this->save_item_state("mainmenu_view", $form->edit_theme_adv_main->mainmenu_view->value != "grid", $form->edit_theme_adv_main->mainmenu_view->value);
$this->save_item_state("show_guest_menu",$form->edit_theme_adv_main->show_guest_menu->value, TRUE);
$this->save_item_state("background", $form->edit_theme_adv_main->background->value != "black", $form->edit_theme_adv_main->background->value);
diff --git a/admin/views/admin_include.html.php b/admin/views/admin_include.html.php
index 9fd04a6b..8d818bb7 100644
--- a/admin/views/admin_include.html.php
+++ b/admin/views/admin_include.html.php
@@ -71,7 +71,7 @@ input.ui-state-hover { background-image: url(/themes/greydragon/images/button-gr
= t($admin_info->name) ?> - = $version ?>
-
- = t("Home") ?> |
+ - = t("Home") ?> |
if (isset($admin_info->support)): ?>
- = t("Support") ?> |
endif; ?>
diff --git a/admin/views/admin_theme_options.html.php b/admin/views/admin_theme_options.html.php
index e0c6c918..a0894dc2 100644
--- a/admin/views/admin_theme_options.html.php
+++ b/admin/views/admin_theme_options.html.php
@@ -6,7 +6,7 @@
$view = new View("admin_include.html");
$view->is_module = FALSE;
- $view->name = "pear4gallery3";
+ $view->name = module::get_var("gallery", "active_site_theme");
$view->form = $form;
$view->help = $help;
print $view;
diff --git a/icons/depricated/button_left.psd b/icons/depricated/button_left.psd
deleted file mode 100644
index 3904392e..00000000
Binary files a/icons/depricated/button_left.psd and /dev/null differ
diff --git a/icons/depricated/button_right.psd b/icons/depricated/button_right.psd
deleted file mode 100644
index 2c92dcbc..00000000
Binary files a/icons/depricated/button_right.psd and /dev/null differ
diff --git a/icons/depricated/carousel.psd b/icons/depricated/carousel.psd
deleted file mode 100644
index 8967b0f5..00000000
Binary files a/icons/depricated/carousel.psd and /dev/null differ
diff --git a/icons/depricated/download.psd b/icons/depricated/download.psd
deleted file mode 100644
index 6b98eb78..00000000
Binary files a/icons/depricated/download.psd and /dev/null differ
diff --git a/icons/depricated/email.psd b/icons/depricated/email.psd
deleted file mode 100644
index 7ac6e69c..00000000
Binary files a/icons/depricated/email.psd and /dev/null differ
diff --git a/icons/depricated/filmStrip.php b/icons/depricated/filmStrip.php
deleted file mode 100644
index 47fb09de..00000000
--- a/icons/depricated/filmStrip.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
-$src = array (
- "rounded_black.png",
- "rounded_dkgrey.png",
- "rounded_ltgrey.png",
- "rounded_white.png"
- );
-$under = 0; // combine images underneath or not?
-// -- end of config
-
-$imgBuf = array ();
-$maxW=0; $maxH=0;
-foreach ($src as $link)
-{
- switch(substr ($link,strrpos ($link,".")+1))
- {
- case 'png':
- $iTmp = imagecreatefrompng($link);
- break;
- case 'gif':
- $iTmp = imagecreatefromgif($link);
- break;
- case 'jpeg':
- case 'jpg':
- $iTmp = imagecreatefromjpeg($link);
- break;
- }
-
- if ($under)
- {
- $maxW=(imagesx($iTmp)>$maxW)?imagesx($iTmp):$maxW;
- $maxH+=imagesy($iTmp);
- }
- else
- {
- $maxW+=imagesx($iTmp);
- $maxH=(imagesy($iTmp)>$maxH)?imagesy($iTmp):$maxH;
- }
-
- array_push ($imgBuf,$iTmp);
-}
-
-$iOut = imagecreatetruecolor ($maxW,$maxH) ;
-$iOut = imagecreate ($maxW,$maxH) ;
-
-$pos=0;
-foreach ($imgBuf as $img)
-{
- if ($under)
- imagecopy ($iOut,$img,0,$pos,0,0,imagesx($img),imagesy($img));
- else
- imagecopy ($iOut,$img,$pos,0,0,0,imagesx($img),imagesy($img));
- $pos+= $under ? imagesy($img) : imagesx($img);
- imagedestroy ($img);
-}
-//header("Content-type: image/jpg");
-
-imagealphablending($iOut, true);
-imagesavealpha($iOut, true);
-
-imagepng($iOut);
-
-?>
diff --git a/icons/depricated/grid.psd b/icons/depricated/grid.psd
deleted file mode 100644
index b14c31a6..00000000
Binary files a/icons/depricated/grid.psd and /dev/null differ
diff --git a/icons/depricated/knob.psd b/icons/depricated/knob.psd
deleted file mode 100644
index 9070fcdc..00000000
Binary files a/icons/depricated/knob.psd and /dev/null differ
diff --git a/icons/depricated/larger.psd b/icons/depricated/larger.psd
deleted file mode 100644
index 453acd39..00000000
Binary files a/icons/depricated/larger.psd and /dev/null differ
diff --git a/icons/depricated/mosaic.psd b/icons/depricated/mosaic.psd
deleted file mode 100644
index 2dffdd8d..00000000
Binary files a/icons/depricated/mosaic.psd and /dev/null differ
diff --git a/icons/depricated/options_bar_bg.psd b/icons/depricated/options_bar_bg.psd
deleted file mode 100644
index e7b888fd..00000000
Binary files a/icons/depricated/options_bar_bg.psd and /dev/null differ
diff --git a/icons/depricated/pear_logo.psd b/icons/depricated/pear_logo.psd
deleted file mode 100644
index f189804a..00000000
Binary files a/icons/depricated/pear_logo.psd and /dev/null differ
diff --git a/icons/depricated/slideshow.psd b/icons/depricated/slideshow.psd
deleted file mode 100644
index 96545903..00000000
Binary files a/icons/depricated/slideshow.psd and /dev/null differ
diff --git a/icons/depricated/smaller.psd b/icons/depricated/smaller.psd
deleted file mode 100644
index ac7a78bd..00000000
Binary files a/icons/depricated/smaller.psd and /dev/null differ
diff --git a/icons/depricated/subscribe.psd b/icons/depricated/subscribe.psd
deleted file mode 100644
index 0477de31..00000000
Binary files a/icons/depricated/subscribe.psd and /dev/null differ
diff --git a/icons/depricated/top_bar_bg.psd b/icons/depricated/top_bar_bg.psd
deleted file mode 100644
index e37f3c8d..00000000
Binary files a/icons/depricated/top_bar_bg.psd and /dev/null differ
diff --git a/icons/depricated/track_fill_left.psd b/icons/depricated/track_fill_left.psd
deleted file mode 100644
index d9293674..00000000
Binary files a/icons/depricated/track_fill_left.psd and /dev/null differ
diff --git a/icons/depricated/upload.psd b/icons/depricated/upload.psd
deleted file mode 100644
index d42ee0b7..00000000
Binary files a/icons/depricated/upload.psd and /dev/null differ
diff --git a/theme.info b/theme.info
index fdf39433..410d1a3d 100644
--- a/theme.info
+++ b/theme.info
@@ -1,6 +1,10 @@
name = ".Pear Theme"
description = "A theme with the intention to mimic Apples mobile me gallery."
-version = 1.0.2
+version = 1.0.3
author = "Fredrik Erlandsson "
site = 1
admin = 0
+author_name = "Fredrik Erlandsson"
+author_url = "mailto:fredrik.e@gmail.com"
+info_url = "http://codex.gallery2.org/Gallery3:Themes:pear4gallery3"
+discuss_url = "http://gallery.menalto.com/node/102280"
diff --git a/views/page.html.php b/views/page.html.php
index e04522d8..f893e47e 100644
--- a/views/page.html.php
+++ b/views/page.html.php
@@ -39,6 +39,7 @@
= $theme->script("json2-min.js") ?>
= $theme->script("jquery.js") ?>
= $theme->script("jquery.form.js") ?>
+ = $theme->script("jquery-ui.js") ?>
= $theme->script("jquery-ui-1.7.3.custom.min.js") ?>
= $theme->script("gallery.common.js") ?>
/* MSG_CANCEL is required by gallery.dialog.js */ ?>
@@ -175,7 +176,7 @@
- if (module::get_var("th_pear4gallery3", "show_logo")): ?>
+ if (module::get_var("th_pear4gallery3", "hide_logo")): ?>
/*class="pear"*/ ?>
endif ?>