diff --git a/3.0/client/Python/pylibgal3/libg3/G3Items.py b/3.0/client/Python/pylibgal3/libg3/G3Items.py index 0fdae593..ce812551 100644 --- a/3.0/client/Python/pylibgal3/libg3/G3Items.py +++ b/3.0/client/Python/pylibgal3/libg3/G3Items.py @@ -22,7 +22,16 @@ __all__ = ['Album' , 'Image' , 'LocalImage' , 'RemoteImage' , 'LocalMovie' , 'RemoteMovie' , 'getItemFromResp' , 'getItemsFromResp'] from datetime import datetime -import json , weakref , types , os , mimetypes , re +import weakref , types , os , mimetypes , re +try: + import json +except: + try: + import simplejson + except ImportError , e: + raise ImportError('You must have either the "json" or "simplejson"' + 'library installed!') + class BaseRemote(object): def __init__(self , respObj , weakGalObj , weakParent=None): diff --git a/3.0/client/Python/pylibgal3/libg3/Gallery3.py b/3.0/client/Python/pylibgal3/libg3/Gallery3.py index 6345c1a8..13409c8a 100644 --- a/3.0/client/Python/pylibgal3/libg3/Gallery3.py +++ b/3.0/client/Python/pylibgal3/libg3/Gallery3.py @@ -26,7 +26,15 @@ from G3Items import getItemFromResp , getItemsFromResp , BaseRemote , Album , \ RemoteImage , Tag from urllib import quote , urlencode from uuid import uuid4 -import urllib2 , os , json +import urllib2 , os +try: + import json +except: + try: + import simplejson + except ImportError , e: + raise ImportError('You must have either the "json" or "simplejson"' + 'library installed!') class Gallery3(object): """ @@ -129,7 +137,6 @@ class Gallery3(object): uri(str) : The uri string defining the resource on the defined host """ url = self._buildUrl(uri , kwargs) - print url return self.getRespFromUrl(url) def addAlbum(self , parent , albumName , title , description=''): diff --git a/3.0/client/Python/pylibgal3/libg3/__init__.py b/3.0/client/Python/pylibgal3/libg3/__init__.py index eec91668..3805ff18 100644 --- a/3.0/client/Python/pylibgal3/libg3/__init__.py +++ b/3.0/client/Python/pylibgal3/libg3/__init__.py @@ -21,4 +21,4 @@ from G3Items import * from Gallery3 import * -__version__ = '0.1.4' +__version__ = '0.1.5' diff --git a/3.0/modules/fittoscreen/controllers/admin_fittoscreen.php b/3.0/modules/fittoscreen/controllers/admin_fittoscreen.php new file mode 100644 index 00000000..3a8eb456 --- /dev/null +++ b/3.0/modules/fittoscreen/controllers/admin_fittoscreen.php @@ -0,0 +1,46 @@ +_get_view(); + } + + private function _get_view($form=null) { + $view = new Admin_View("admin.html"); + $view->page_title = t("Fit to Screen parameters"); + + $view->content = new View("admin_fittoscreen.html"); + $view->content->form = (empty($form) ? $this->_get_form() : $form) ; + + return $view; + } + + private function _get_form() { + $form = new Forge("admin/fittoscreen/save", "", "post", array("id" => "g-admin-form")); + + $form->dropdown("width_unit")->label(t("Image width unit"))->options(array("px"=>"pixel margin","pr"=>"max pourcentage"))->selected(module::get_var("fittoscreen", "width_unit")); + $form->input("width")->label(t('width'))->rules("required|valid_numeric|length[1,5]")->value(module::get_var("fittoscreen", "width")); + $form->dropdown("height_unit")->label(t("Image height unit"))->options(array("px"=>"pixel margin","pr"=>"max pourcentage"))->selected(module::get_var("fittoscreen", "height_unit")); + $form->input("height")->label(t('height'))->rules("required|valid_numeric|length[1,5]")->value(module::get_var("fittoscreen", "height")); + + $form->submit("submit")->value(t("Save")); + return $form; + } + + public function save(){ + access::verify_csrf(); + + $form = $this->_get_form(); + if ($form->validate()) { + module::set_var("fittoscreen", "width_unit", $form->width_unit->value); + module::set_var("fittoscreen", "width", $form->width->value); + module::set_var("fittoscreen", "height_unit", $form->height_unit->value); + module::set_var("fittoscreen", "height", $form->height->value); + + } + + print $this->_get_view($form); + } +} + +?> diff --git a/3.0/modules/fittoscreen/helpers/fittoscreen_event.php b/3.0/modules/fittoscreen/helpers/fittoscreen_event.php new file mode 100644 index 00000000..5dbe65f7 --- /dev/null +++ b/3.0/modules/fittoscreen/helpers/fittoscreen_event.php @@ -0,0 +1,13 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("fittoscreen_menu") + ->label(t("Fit to Screen")) + ->url(url::site("admin/fittoscreen"))); + } +} + +?> diff --git a/3.0/modules/fittoscreen/helpers/fittoscreen_installer.php b/3.0/modules/fittoscreen/helpers/fittoscreen_installer.php new file mode 100644 index 00000000..0e4b7ec0 --- /dev/null +++ b/3.0/modules/fittoscreen/helpers/fittoscreen_installer.php @@ -0,0 +1,14 @@ + + diff --git a/3.0/modules/fittoscreen/helpers/fittoscreen_theme.php b/3.0/modules/fittoscreen/helpers/fittoscreen_theme.php new file mode 100644 index 00000000..de804e95 --- /dev/null +++ b/3.0/modules/fittoscreen/helpers/fittoscreen_theme.php @@ -0,0 +1,9 @@ + diff --git a/3.0/modules/fittoscreen/module.info b/3.0/modules/fittoscreen/module.info new file mode 100644 index 00000000..39067339 --- /dev/null +++ b/3.0/modules/fittoscreen/module.info @@ -0,0 +1,7 @@ +name = "Fit to Screen" +description = "Dynamicaly resize the photo size to fit the screen.
Version 1.0 | By Matthieu Bouthors | Visit plugin Site | Support | Settings" +version = 10 +author_name = "Matthieu Bouthors" +author_url = "http://www.bouthors.fr" +info_url = "http://codex.gallery2.org/Gallery3:Modules:Fittoscreen" +discuss_url = "http://gallery.menalto.com/node/103929" diff --git a/3.0/modules/fittoscreen/views/admin_fittoscreen.html.php b/3.0/modules/fittoscreen/views/admin_fittoscreen.html.php new file mode 100644 index 00000000..dffd8e8d --- /dev/null +++ b/3.0/modules/fittoscreen/views/admin_fittoscreen.html.php @@ -0,0 +1,7 @@ + +
+

+
+ +
+
diff --git a/3.0/modules/fittoscreen/views/fittoscreen_photo.html.php b/3.0/modules/fittoscreen/views/fittoscreen_photo.html.php new file mode 100644 index 00000000..762a588d --- /dev/null +++ b/3.0/modules/fittoscreen/views/fittoscreen_photo.html.php @@ -0,0 +1,35 @@ + + + diff --git a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/tag_albums_album.html.php b/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/tag_albums_album.html.php deleted file mode 100644 index 3a348d3b..00000000 --- a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/tag_albums_album.html.php +++ /dev/null @@ -1,135 +0,0 @@ - -album_top() was changed to $theme->dynamic_top(). - // $item->title and $item->description have been changed to $title and $description. - // - // The g-album-grid block was also taken from album.html.php. The section for uploading new photos to an empty album - // has been removed. Also, $theme->context_menu has been removed as well (it was crashing the page). -?> - -
- dynamic_top() ?> -

bb2html(html::purify($title), 1) ?>

-
- -add_paginator("top"); ?> - -album_descmode == "top") and ($description)): ?> -
bb2html(html::purify($description), 1) ?>
- - - -
-
-
-
- - -
-
'; - $content .= $theme->thumb_bottom($child); - $content .= ''; - - print $content; - // End rWatcher Edit. -?> - - -
  • - - - -dynamic_bottom() ?> - -album_descmode == "bottom") and ($description)): ?> -
    bb2html(html::purify($description), 1) ?>
    - - -add_paginator("bottom"); ?> diff --git a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/calpage.html.php b/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/calpage.html.php similarity index 83% rename from 3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/calpage.html.php rename to 3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/calpage.html.php index 6d39f820..d385a514 100644 --- a/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/calpage.html.php +++ b/3.0/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/calpage.html.php @@ -19,7 +19,7 @@ load_sessioninfo(); ?> - + html_attributes() ?> xml:lang="en" lang="en" is_rtl)? "dir=rtl" : null; ?> > item(); @@ -55,10 +55,6 @@ -blendpagetrans): ?> - - - " /> @@ -74,7 +70,6 @@ : ; action-uri=; icon-uri=favicon.ico" /> - appletouchicon): ?> @@ -100,22 +95,12 @@ head() ?> - -script("animation.js"); ?> -script("ui.support.js"); ?> - + +theme_js_inject(); ?> theme_css_inject(); ?> - - -get_combined("css"); ?> - -css_link("colorpacks/" . $theme->colorpack . "/colors.css", FALSE); ?> -css_link("framepacks/" . $theme->framepack . "/frame.css", FALSE); ?> -custom_css_path != ""): ?> -css_link($theme->custom_css_path, TRUE); ?> - - -get_combined("script") ?> +get_combined("css"); // LOOKING FOR YOUR CSS? It's all been combined into the link ?> +custom_css_inject(TRUE); ?> +get_combined("script") // LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link ?>
    Mosaic
    -
    + diff --git a/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/tag_albums_album.html.php b/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/tag_albums_album.html.php deleted file mode 100644 index 3a348d3b..00000000 --- a/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/tag_albums_album.html.php +++ /dev/null @@ -1,135 +0,0 @@ - -album_top() was changed to $theme->dynamic_top(). - // $item->title and $item->description have been changed to $title and $description. - // - // The g-album-grid block was also taken from album.html.php. The section for uploading new photos to an empty album - // has been removed. Also, $theme->context_menu has been removed as well (it was crashing the page). -?> - -
    - dynamic_top() ?> -

    bb2html(html::purify($title), 1) ?>

    -
    - -add_paginator("top"); ?> - -album_descmode == "top") and ($description)): ?> -
    bb2html(html::purify($description), 1) ?>
    - - - -
    -
    -
    -
    - - -
    -
    '; - $content .= $theme->thumb_bottom($child); - $content .= ''; - - print $content; - // End rWatcher Edit. -?> - - -
  • - - - -dynamic_bottom() ?> - -album_descmode == "bottom") and ($description)): ?> -
    bb2html(html::purify($description), 1) ?>
    - - -add_paginator("bottom"); ?> diff --git a/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/calpage.html.php b/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/calpage.html.php similarity index 83% rename from 3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/calpage.html.php rename to 3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/calpage.html.php index 6d39f820..d385a514 100644 --- a/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.0.8/views/calpage.html.php +++ b/3.1/modules/tag_albums/-- Theme Files/GreyDragon 3.1.0/views/calpage.html.php @@ -19,7 +19,7 @@ load_sessioninfo(); ?> - + html_attributes() ?> xml:lang="en" lang="en" is_rtl)? "dir=rtl" : null; ?> > item(); @@ -55,10 +55,6 @@ -blendpagetrans): ?> - - - " /> @@ -74,7 +70,6 @@ : ; action-uri=; icon-uri=favicon.ico" /> - appletouchicon): ?> @@ -100,22 +95,12 @@ head() ?> - -script("animation.js"); ?> -script("ui.support.js"); ?> - + +theme_js_inject(); ?> theme_css_inject(); ?> - - -get_combined("css"); ?> - -css_link("colorpacks/" . $theme->colorpack . "/colors.css", FALSE); ?> -css_link("framepacks/" . $theme->framepack . "/frame.css", FALSE); ?> -custom_css_path != ""): ?> -css_link($theme->custom_css_path, TRUE); ?> - - -get_combined("script") ?> +get_combined("css"); // LOOKING FOR YOUR CSS? It's all been combined into the link ?> +custom_css_inject(TRUE); ?> +get_combined("script") // LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link ?>