diff --git a/modules/google_analytics/module.info b/modules/google_analytics/module.info index 4743a47a..c1e566d1 100644 --- a/modules/google_analytics/module.info +++ b/modules/google_analytics/module.info @@ -1,3 +1,3 @@ name = Google Analytics description = Renders the Google Analytics Code at the end of the page. Written by 'mcp'. -version = 1.2 +version = 2 diff --git a/themes/3nids_theme/3nids/views/album.html.php b/themes/3nids_theme/3nids/views/album.html.php deleted file mode 100755 index 63f2c45d..00000000 --- a/themes/3nids_theme/3nids/views/album.html.php +++ /dev/null @@ -1,48 +0,0 @@ - - -
- album_top() ?> -

title) ?>

-
description)) ?>
-
-viewable()->children(); - $theme->pagination = new Pagination(); - $theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic")); - $children_offset = ($theme->pagination->current_page -1) * $page_size ; ?> - - - -album_bottom() ?> - -pager() ?> diff --git a/themes/3nids_theme/3nids/views/comments.html.php b/themes/3nids_theme/3nids/views/comments.html.php deleted file mode 100755 index 81093787..00000000 --- a/themes/3nids_theme/3nids/views/comments.html.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("gallery.common.css") ?> - css("jquery.fancybox.css") ?> - css("screen.css") ?> - css("3nids.css") ?> - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - script("jquery.easing.js") ?> - script("jquery.fancybox.js") ?> - script("ui.init.js") ?> -head() ?> - - -
- " id="g-admin-comment-button" - class="g-button ui-corner-all ui-icon-left ui-state-default right"> - - - -
- count()): ?> -

- -

- - -
- - diff --git a/themes/3nids_theme/3nids/views/image_block_block.html.php b/themes/3nids_theme/3nids/views/image_block_block.html.php deleted file mode 100755 index 103be25d..00000000 --- a/themes/3nids_theme/3nids/views/image_block_block.html.php +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/themes/3nids_theme/3nids/views/movie.html.php b/themes/3nids_theme/3nids/views/movie.html.php deleted file mode 100755 index 74aa88bf..00000000 --- a/themes/3nids_theme/3nids/views/movie.html.php +++ /dev/null @@ -1,39 +0,0 @@ - -
- photo_top() ?> - -
  • - - - - - - - -
  • -
  • $position, "total" => $sibling_count)) ?>
  • -
  • - - - - - - - -
  • - -*/ ?> - - - movie_img(array("class" => "g-movie", "id" => "g-movie-id-{$item->id}")) ?> - -
    -

    title) ?>

    -
    description)) ?>
    -
    - - photo_bottom() ?> - context_menu($item, "#g-movie-id-{$item->id}") ?> -
    diff --git a/themes/3nids_theme/3nids/views/pager.html.php b/themes/3nids_theme/3nids/views/pager.html.php deleted file mode 100755 index 1c259579..00000000 --- a/themes/3nids_theme/3nids/views/pager.html.php +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/themes/3nids_theme/3nids/views/photo.html.php b/themes/3nids_theme/3nids/views/photo.html.php deleted file mode 100644 index a748daf2..00000000 --- a/themes/3nids_theme/3nids/views/photo.html.php +++ /dev/null @@ -1,59 +0,0 @@ - - -item())): ?> - - - - -
    - photo_top() ?> - - - -
    - resize_top($item) ?> - - for_html_attr() ?>"> - - resize_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize")) ?> - - - - resize_bottom($item) ?> - context_menu($item, "#g-photo-id-{$item->id}") ?> -
    - -
    -

    title) ?>

    -
    description)) ?>
    -
    - - photo_bottom() ?> -
    diff --git a/themes/3nids_theme/last_commit.txt b/themes/3nids_theme/last_commit.txt deleted file mode 100755 index fb37b765..00000000 --- a/themes/3nids_theme/last_commit.txt +++ /dev/null @@ -1 +0,0 @@ -Admin config for item title \ No newline at end of file diff --git a/themes/3nids_theme/modules/tagsmap/controllers/admin_tagsmap.php b/themes/3nids_theme/modules/tagsmap/controllers/admin_tagsmap.php deleted file mode 100755 index 34ccf7bc..00000000 --- a/themes/3nids_theme/modules/tagsmap/controllers/admin_tagsmap.php +++ /dev/null @@ -1,238 +0,0 @@ -content = new View("admin_tagsmap.html"); - - // Generate a form for Google Maps Settings. - $view->content->googlemaps_form = $this->_get_googlemaps_form(); - - // Generate a list of tags to display. - $query = ORM::factory("tag"); - $view->content->tags = $query->orderby("name", "ASC")->find_all(); - - // Display the page. - print $view; - } - - public function edit_gps($tag_id) { - // Generate a new admin page to edit gps data for the tag specified by $tag_id. - - // Determine the name of the tag. - $tagName = ORM::factory("tag") - ->where("id", $tag_id) - ->find_all(); - - // Set up the admin page. - $view = new Admin_View("admin.html"); - $view->content = new View("admin_tagsmap_edit.html"); - $view->content->tagsmapedit_form = $this->_get_tagsgpsedit_form($tag_id); - $view->content->tag_name = $tagName[0]->name; - print $view; - } - - public function orphaned_tags() { - // Locate and delete any orphaned GPS data. - $int_deleted_records = 0; - - // Generate a list of all tags with GPS data. - $existingGPS = ORM::factory("tags_gps") - ->find_all(); - - // Loop through each record and see if a corresponding tag exists. - foreach ($existingGPS as $oneGPS) { - $oneTag = ORM::factory("tag") - ->where("id", $oneGPS->tag_id) - ->find_all(); - - // If the tag no longer exists then delete the record. - if (count($oneTag) == 0) { - // Delete the record. - ORM::factory("tags_gps") - ->where("tag_id", $oneGPS->tag_id) - ->delete_all(); - $int_deleted_records++; - } - } - - // Redirect back to the main screen and display a "success" message. - message::success($int_deleted_records . t(" Orphaned Record(s) have been deleted.")); - url::redirect("admin/tagsmap"); - } - - public function confirm_delete_gps($tag_id) { - // Make sure the user meant to hit the delete button. - $view = new Admin_View("admin.html"); - $view->content = new View("admin_tagsmap_delete.html"); - $view->content->tag_id = $tag_id; - - // Determine the name of the tag. - $tagName = ORM::factory("tag") - ->where("id", $tag_id) - ->find_all(); - $view->content->tag_name = $tagName[0]->name; - - print $view; - } - - public function delete_gps($tag_id) { - // Delete the GSP data associated with a tag. - - // Delete the record. - ORM::factory("tags_gps") - ->where("tag_id", $tag_id) - ->delete_all(); - - // Redirect back to the main screen and display a "success" message. - message::success(t("Your Settings Have Been Saved.")); - url::redirect("admin/tagsmap"); - } - - private function _get_tagsgpsedit_form($tag_id) { - // Make a new form for editing GPS data associated with a tag ($tag_id). - $form = new Forge("admin/tagsmap/savegps", "", "post", - array("id" => "gTagsMapAdminForm")); - - // Add a few input boxes for GPS and Description - $tagsgps_group = $form->group("TagsMapGPS"); - $tagsgps_group->hidden("tag_id")->value($tag_id); - - // Check and see if this ID already has GPS data, then create - // input boxes to either update it or enter in new information. - $existingGPS = ORM::factory("tags_gps") - ->where("tag_id", $tag_id) - ->find_all(); - if (count($existingGPS) == 0) { - $tagsgps_group->input("gps_latitude")->label(t("Latitude"))->value(); - $tagsgps_group->input("gps_longitude")->label(t("Longitude"))->value(); - $tagsgps_group->textarea("gps_description")->label(t("Description"))->value(); - } else { - $tagsgps_group->input("gps_latitude")->label(t("Latitude"))->value($existingGPS[0]->latitude); - $tagsgps_group->input("gps_longitude")->label(t("Longitude"))->value($existingGPS[0]->longitude); - $tagsgps_group->textarea("gps_description")->label(t("Description"))->value($existingGPS[0]->description); - } - - // Add a save button to the form. - $tagsgps_group->submit("SaveGPS")->value(t("Save")); - - // Return the newly generated form. - return $form; - } - - public function savegps() { - // Save the GPS coordinates to the database. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Figure out the values of the text boxes - $str_tagid = Input::instance()->post("tag_id"); - $str_latitude = Input::instance()->post("gps_latitude"); - $str_longitude = Input::instance()->post("gps_longitude"); - $str_description = Input::instance()->post("gps_description"); - - // Save to database. - // Check and see if this ID already has GPS data, - // Update it if it does, create a new record if it doesn't. - $existingGPS = ORM::factory("tags_gps") - ->where("tag_id", $str_tagid) - ->find_all(); - if (count($existingGPS) == 0) { - $newgps = ORM::factory("tags_gps"); - $newgps->tag_id = $str_tagid; - $newgps->latitude = $str_latitude; - $newgps->longitude = $str_longitude; - $newgps->description = $str_description; - $newgps->save(); - } else { - $updatedGPS = ORM::factory("tags_gps", $existingGPS[0]->id); - $updatedGPS->tag_id = $str_tagid; - $updatedGPS->latitude = $str_latitude; - $updatedGPS->longitude = $str_longitude; - $updatedGPS->description = $str_description; - $updatedGPS->save(); - } - - // Redirect back to the main screen and display a "success" message. - message::success(t("Your Settings Have Been Saved.")); - url::redirect("admin/tagsmap"); - } - - private function _get_googlemaps_form() { - // Make a new form for inputing information associated with google maps. - $form = new Forge("admin/tagsmap/savemapprefs", "", "post", - array("id" => "gTagsMapAdminForm")); - - // Input box for the Maps API Key - $googlemap_group = $form->group("GoogleMapsKey"); - $googlemap_group->input("google_api_key") - ->label(t("Google Maps API Key")) - ->value(module::get_var("tagsmap", "googlemap_api_key")); - - // Input boxes for the Maps starting location map type and zoom. - $startingmap_group = $form->group("GoogleMapsPos"); - $startingmap_group->input("google_starting_latitude") - ->label(t("Starting Latitude")) - ->value(module::get_var("tagsmap", "googlemap_latitude")); - $startingmap_group->input("google_starting_longitude") - ->label(t("Starting Longitude")) - ->value(module::get_var("tagsmap", "googlemap_longitude")); - $startingmap_group->input("google_default_zoom") - ->label(t("Default Zoom Level")) - ->value(module::get_var("tagsmap", "googlemap_zoom")); - $startingmap_group->input("google_default_type") - ->label(t("Default Map Type") . " (G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP, G_SATELLITE_3D_MAP)") - ->value(module::get_var("tagsmap", "googlemap_type")); - - // Add a save button to the form. - $form->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } - - public function savemapprefs() { - // Save information associated with Google Maps to the database. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Figure out the values of the text boxes - $str_googlekey = Input::instance()->post("google_api_key"); - $str_googlelatitude = Input::instance()->post("google_starting_latitude"); - $str_googlelongitude = Input::instance()->post("google_starting_longitude"); - $str_googlezoom = Input::instance()->post("google_default_zoom"); - $str_googlemaptype = Input::instance()->post("google_default_type"); - - // Save Settings. - module::set_var("tagsmap", "googlemap_api_key", $str_googlekey); - module::set_var("tagsmap", "googlemap_latitude", $str_googlelatitude); - module::set_var("tagsmap", "googlemap_longitude", $str_googlelongitude); - module::set_var("tagsmap", "googlemap_zoom", $str_googlezoom); - module::set_var("tagsmap", "googlemap_type", $str_googlemaptype); - - // Display a success message and redirect back to the TagsMap admin page. - message::success(t("Your Settings Have Been Saved.")); - url::redirect("admin/tagsmap"); - } -} \ No newline at end of file diff --git a/themes/3nids_theme/modules/tagsmap/controllers/tagsmap.php b/themes/3nids_theme/modules/tagsmap/controllers/tagsmap.php deleted file mode 100755 index 60e9c1c9..00000000 --- a/themes/3nids_theme/modules/tagsmap/controllers/tagsmap.php +++ /dev/null @@ -1,62 +0,0 @@ -find_all(); - - // Set up and display the actual page. - // If fullsize is true, allow the map to take up the entire browser window, - // if not, then display the map in the gallery theme. - if ($fullsize == true) { - $view = new View("tagsmap_googlemap.html"); - $view->map_fullsize = true; - - // Load in module preferences. - $view->tags_gps = $tagsGPS; - $view->google_map_key = module::get_var("tagsmap", "googlemap_api_key"); - $view->google_map_latitude = module::get_var("tagsmap", "googlemap_latitude"); - $view->google_map_longitude = module::get_var("tagsmap", "googlemap_longitude"); - $view->google_map_zoom = module::get_var("tagsmap", "googlemap_zoom"); - $view->google_map_type = module::get_var("tagsmap", "googlemap_type"); - - print $view; - } else { - $template = new Theme_View("page.html", "other", "Contact"); - //$template->body_attributes("onload=\"GLoad\" onunload=\"Gunload\""); - $template->page_title = t("Gallery :: map"); - $template->content = new View("tagsmap_googlemap.html"); - - // Load in module preferences. - $template->content->tags_gps = $tagsGPS; - $template->content->google_map_key = module::get_var("tagsmap", "googlemap_api_key"); - $template->content->google_map_latitude = module::get_var("tagsmap", "googlemap_latitude"); - $template->content->google_map_longitude = module::get_var("tagsmap", "googlemap_longitude"); - $template->content->google_map_zoom = module::get_var("tagsmap", "googlemap_zoom"); - $template->content->google_map_type = module::get_var("tagsmap", "googlemap_type"); - - print $template; - } - } - - -} diff --git a/themes/3nids_theme/modules/tagsmap/css/tagsmap.css b/themes/3nids_theme/modules/tagsmap/css/tagsmap.css deleted file mode 100755 index eb6dc89a..00000000 --- a/themes/3nids_theme/modules/tagsmap/css/tagsmap.css +++ /dev/null @@ -1,97 +0,0 @@ -.tooltip{ - position: absolute; - left: 10px; - top: 10px; - width: 150px; - background-color: #777; - color: #ffffcc; - border: 1px solid #f9db01; - font: bold 13px "Trebuchet MS", Verdana, Arial, sans-serif; - padding: 4px; - z-index: 20; - -moz-border-radius: 10px; - -moz-opacity: .87; - filter:alpha(opacity=87); - opacity:.87; -} - -.g-map-thumb-table{ - width:200px; - height: 80px; - font-size: 0.9em; - font-style: normal; - color: #FFFFCC; -} -.g-map-thumb-img{ - overflow:auto; - position: relative; - height:125px; -} -.g-map-thumb-link{ - height: 15px; -} -.g-map-thumb-td{ - padding: 0; - text-align: center; -} -.gMapThumbnail{ - height: 80px; -} -#gmInfo{ - width: 230px; -} -#gmInfo_contents{ - background: #3d3d3d; -} -#gmInfo_contents div{ - font-style: italic; - vertical-align: middle; - margin: 0 10px; -} -#gmInfo_tl{ - width: 14px; - height: 14px; - background: url('../images/gmInfo_tl.png') top left no-repeat transparent; -} -#gmInfo_t{ - background: url('../images/gmInfo_t.png') top left repeat-x transparent; -} -#gmInfo_tr{ - width: 14px; - height: 14px; - background: url('../images/gmInfo_tr.png') top left no-repeat transparent; -} -#gmInfo_l{ - width: 14px; - background: url('../images/gmInfo_l.png') top left repeat-y transparent; -} -#gmInfo_r{ - width: 14px; - background: url('../images/gmInfo_r.png') top right repeat-y transparent; -} -#gmInfo_bl{ - width: 14px; - height: 14px; - background: url('../images/gmInfo_bl.png') top left no-repeat transparent; -} -#gmInfo_b{ - background: url('../images/gmInfo_b.png') top left repeat-x transparent; -} -#gmInfo_br{ - width: 14px; - height: 14px; - background: url('../images/gmInfo_br.png') top left no-repeat transparent; -} -#gmInfo_close{ - width: 30px; - height: 30px; - background: url('../images/gmInfo_close.png') top left no-repeat transparent; - margin: -10px 0 0 10px; - cursor: pointer; -} -#gmInfo_beak{ - width: 27px; - height: 33px; - background: url('../images/gmInfo_beak.png') top left no-repeat transparent; -} - diff --git a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_event.php b/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_event.php deleted file mode 100755 index 27b47ca6..00000000 --- a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_event.php +++ /dev/null @@ -1,43 +0,0 @@ -deactivate)) { - site_status::warning( - t("The TagsMap module requires the Tags module. " . - "Activate the Tags module now", - array("url" => url::site("admin/modules"))), - "tagsmap_needs_tag"); - } else { - site_status::clear("tagsmap_needs_tag"); - } - } - - static function admin_menu($menu, $theme) { - // Add a link to the TagsMap admin page to the Content menu. - $menu->get("content_menu") - ->append(Menu::factory("link") - ->id("tagsmap") - ->label(t("TagsMap Settings")) - ->url(url::site("admin/tagsmap"))); - } -} \ No newline at end of file diff --git a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_installer.php b/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_installer.php deleted file mode 100755 index a956ef24..00000000 --- a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_installer.php +++ /dev/null @@ -1,48 +0,0 @@ -query("CREATE TABLE IF NOT EXISTS {tags_gpses} ( - `id` int(9) NOT NULL auto_increment, - `tag_id` int(9) NOT NULL, - `latitude` varchar(128) NOT NULL, - `longitude` varchar(128) NOT NULL, - `description` varchar(2048) default NULL, - PRIMARY KEY (`id`), - KEY(`tag_id`, `id`)) - DEFAULT CHARSET=utf8;"); - - // Set the module's version number. - module::set_version("tagsmap", 1); - } - - static function deactivate() { - site_status::clear("tagsmap_needs_tag"); - } - - static function uninstall() { - // Delete the GPS table before uninstalling. - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {tags_gpses};"); - module::delete("tagsmap"); - } -} diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_b.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_b.png deleted file mode 100755 index 92aee80b..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_b.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_beak.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_beak.png deleted file mode 100755 index 240b6501..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_beak.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_bl.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_bl.png deleted file mode 100755 index 8f7ecf0f..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_bl.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_br.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_br.png deleted file mode 100755 index 919727f1..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_br.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_close.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_close.png deleted file mode 100755 index 3dda09b9..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_close.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_l.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_l.png deleted file mode 100755 index 16ffebba..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_l.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_r.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_r.png deleted file mode 100755 index b0e42b11..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_r.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_t.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_t.png deleted file mode 100755 index 66eeda45..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_t.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_tl.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_tl.png deleted file mode 100755 index 955cffbe..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_tl.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/gmInfo_tr.png b/themes/3nids_theme/modules/tagsmap/images/gmInfo_tr.png deleted file mode 100755 index 44a2e07b..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/gmInfo_tr.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/landscape16.png b/themes/3nids_theme/modules/tagsmap/images/landscape16.png deleted file mode 100755 index 7004faaa..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/landscape16.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/marker_shadow.png b/themes/3nids_theme/modules/tagsmap/images/marker_shadow.png deleted file mode 100755 index 3a89759f..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/marker_shadow.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/markero.png b/themes/3nids_theme/modules/tagsmap/images/markero.png deleted file mode 100755 index 37780950..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/markero.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/images/markery.png b/themes/3nids_theme/modules/tagsmap/images/markery.png deleted file mode 100755 index 25aaebbe..00000000 Binary files a/themes/3nids_theme/modules/tagsmap/images/markery.png and /dev/null differ diff --git a/themes/3nids_theme/modules/tagsmap/js/extinfowindow.js b/themes/3nids_theme/modules/tagsmap/js/extinfowindow.js deleted file mode 100755 index 79249423..00000000 --- a/themes/3nids_theme/modules/tagsmap/js/extinfowindow.js +++ /dev/null @@ -1,610 +0,0 @@ -/* -* ExtInfoWindow Class, v1.0 -* Copyright (c) 2007, Joe Monahan (http://www.seejoecode.com) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -* This class lets you add an info window to the map which mimics GInfoWindow -* and allows for users to skin it via CSS. Additionally it has options to -* pull in HTML content from an ajax request, triggered when a user clicks on -* the associated marker. -*/ - - -/** - * Creates a new ExtInfoWindow that will initialize by reading styles from css - * - * @constructor - * @param {GMarker} marker The marker associated with the info window - * @param {String} windowId The DOM Id we will use to reference the info window - * @param {String} html The HTML contents - * @param {Object} opt_opts A contianer for optional arguments: - * {String} ajaxUrl The Url to hit on the server to request some contents - * {Number} paddingX The padding size in pixels that the info window will leave on - * the left and right sides of the map when panning is involved. - * {Number} paddingY The padding size in pixels that the info window will leave on - * the top and bottom sides of the map when panning is involved. - * {Number} beakOffset The repositioning offset for when aligning the beak element. - * This is used to make sure the beak lines up correcting if the - * info window styling containers a border. - */ -function ExtInfoWindow(marker, windowId, html, opt_opts) { - this.html_ = html; - this.marker_ = marker; - this.infoWindowId_ = windowId; - - this.options_ = opt_opts == null ? {} : opt_opts; - this.ajaxUrl_ = this.options_.ajaxUrl == null ? null : this.options_.ajaxUrl; - this.callback_ = this.options_.ajaxCallback == null ? null : this.options_.ajaxCallback; - - this.borderSize_ = this.options_.beakOffset == null ? 0 : this.options_.beakOffset; - this.paddingX_ = this.options_.paddingX == null ? 0 + this.borderSize_ : this.options_.paddingX + this.borderSize_; - this.paddingY_ = this.options_.paddingY == null ? 0 + this.borderSize_ : this.options_.paddingY + this.borderSize_; - - this.map_ = null; - - this.container_ = document.createElement('div'); - this.container_.style.position = 'relative'; - this.container_.style.display = 'none'; - - this.contentDiv_ = document.createElement('div'); - this.contentDiv_.id = this.infoWindowId_ + '_contents'; - this.contentDiv_.innerHTML = this.html_; - this.contentDiv_.style.display = 'block'; - this.contentDiv_.style.visibility = 'hidden'; - - this.wrapperDiv_ = document.createElement('div'); -}; - -//use the GOverlay class -ExtInfoWindow.prototype = new GOverlay(); - -/** - * Called by GMap2's addOverlay method. Creates the wrapping div for our info window and adds - * it to the relevant map pane. Also binds mousedown event to a private function so that they - * are not passed to the underlying map. Finally, performs ajax request if set up to use ajax - * in the constructor. - * @param {GMap2} map The map that has had this extInfoWindow is added to it. - */ -ExtInfoWindow.prototype.initialize = function(map) { - this.map_ = map; - - this.defaultStyles = { - containerWidth: this.map_.getSize().width / 2, - borderSize: 1 - }; - - this.wrapperParts = { - tl:{t:0, l:0, w:0, h:0, domElement: null}, - t:{t:0, l:0, w:0, h:0, domElement: null}, - tr:{t:0, l:0, w:0, h:0, domElement: null}, - l:{t:0, l:0, w:0, h:0, domElement: null}, - r:{t:0, l:0, w:0, h:0, domElement: null}, - bl:{t:0, l:0, w:0, h:0, domElement: null}, - b:{t:0, l:0, w:0, h:0, domElement: null}, - br:{t:0, l:0, w:0, h:0, domElement: null}, - beak:{t:0, l:0, w:0, h:0, domElement: null}, - close:{t:0, l:0, w:0, h:0, domElement: null} - }; - - for (var i in this.wrapperParts ) { - var tempElement = document.createElement('div'); - tempElement.id = this.infoWindowId_ + '_' + i; - tempElement.style.visibility = 'hidden'; - document.body.appendChild(tempElement); - tempElement = document.getElementById(this.infoWindowId_ + '_' + i); - var tempWrapperPart = eval('this.wrapperParts.' + i); - tempWrapperPart.w = parseInt(this.getStyle_(tempElement, 'width')); - tempWrapperPart.h = parseInt(this.getStyle_(tempElement, 'height')); - document.body.removeChild(tempElement); - } - for (var i in this.wrapperParts) { - if (i == 'close' ) { - //first append the content so the close button is layered above it - this.wrapperDiv_.appendChild(this.contentDiv_); - } - var wrapperPartsDiv = null; - if (this.wrapperParts[i].domElement == null) { - wrapperPartsDiv = document.createElement('div'); - this.wrapperDiv_.appendChild(wrapperPartsDiv); - } else { - wrapperPartsDiv = this.wrapperParts[i].domElement; - } - wrapperPartsDiv.id = this.infoWindowId_ + '_' + i; - wrapperPartsDiv.style.position = 'absolute'; - wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px'; - wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px'; - wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px'; - wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px'; - this.wrapperParts[i].domElement = wrapperPartsDiv; - } - - this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_); - this.container_.id = this.infoWindowId_; - var containerWidth = this.getStyle_(document.getElementById(this.infoWindowId_), 'width'); - this.container_.style.width = (containerWidth == null ? this.defaultStyles.containerWidth : containerWidth); - - this.map_.getContainer().appendChild(this.contentDiv_); - this.contentWidth = this.getDimensions_(this.container_).width; - this.contentDiv_.style.width = this.contentWidth + 'px'; - this.contentDiv_.style.position = 'absolute'; - - this.container_.appendChild(this.wrapperDiv_); - - GEvent.bindDom(this.container_, 'mousedown', this,this.onClick_); - GEvent.bindDom(this.container_, 'dblclick', this,this.onClick_); - GEvent.bindDom(this.container_, 'DOMMouseScroll', this, this.onClick_); - - - GEvent.trigger(this.map_, 'extinfowindowopen'); - if (this.ajaxUrl_ != null ) { - this.ajaxRequest_(this.ajaxUrl_); - } -}; - -/** - * Private function to steal mouse click events to prevent it from returning to the map. - * Without this links in the ExtInfoWindow would not work, and you could click to zoom or drag - * the map behind it. - * @private - * @param {MouseEvent} e The mouse event caught by this function - */ -ExtInfoWindow.prototype.onClick_ = function(e) { - if(navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) { - window.event.cancelBubble = true; - window.event.returnValue = false; - } else { - //e.preventDefault(); - e.stopPropagation(); - } -}; - -/** - * Remove the extInfoWindow container from the map pane. - */ -ExtInfoWindow.prototype.remove = function() { - if (this.map_.getExtInfoWindow() != null) { - GEvent.trigger(this.map_, 'extinfowindowbeforeclose'); - - GEvent.clearInstanceListeners(this.container_); - if (this.container_.outerHTML) { - this.container_.outerHTML = ''; //prevent pseudo-leak in IE - } - if (this.container_.parentNode) { - this.container_.parentNode.removeChild(this.container_); - } - this.container_ = null; - GEvent.trigger(this.map_, 'extinfowindowclose'); - this.map_.setExtInfoWindow_(null); - } -}; - -/** - * Return a copy of this overlay, for the parent Map to duplicate itself in full. This - * is part of the Overlay interface and is used, for example, to copy everything in the - * main view into the mini-map. - * @return {GOverlay} - */ -ExtInfoWindow.prototype.copy = function() { - return new ExtInfoWindow(this.marker_, this.infoWindowId_, this.html_, this.options_); -}; - -/** - * Draw extInfoWindow and wrapping decorators onto the map. Resize and reposition - * the map as necessary. - * @param {Boolean} force Will be true when pixel coordinates need to be recomputed. - */ -ExtInfoWindow.prototype.redraw = function(force) { - if (!force || this.container_ == null) return; - - //set the content section's height, needed so browser font resizing does not affect the window's dimensions - var contentHeight = this.contentDiv_.offsetHeight; - this.contentDiv_.style.height = contentHeight + 'px'; - - //reposition contents depending on wrapper parts. - //this is necessary for content that is pulled in via ajax - this.contentDiv_.style.left = this.wrapperParts.l.w + 'px'; - this.contentDiv_.style.top = this.wrapperParts.tl.h + 'px'; - this.contentDiv_.style.visibility = 'visible'; - - //Finish configuring wrapper parts that were not set in initialization - this.wrapperParts.tl.t = 0; - this.wrapperParts.tl.l = 0; - this.wrapperParts.t.l = this.wrapperParts.tl.w; - this.wrapperParts.t.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.tl.w - this.wrapperParts.tr.w; - this.wrapperParts.t.h = this.wrapperParts.tl.h; - this.wrapperParts.tr.l = this.wrapperParts.t.w + this.wrapperParts.tl.w; - this.wrapperParts.l.t = this.wrapperParts.tl.h; - this.wrapperParts.l.h = contentHeight; - this.wrapperParts.r.l = this.contentWidth + this.wrapperParts.l.w; - this.wrapperParts.r.t = this.wrapperParts.tr.h; - this.wrapperParts.r.h = contentHeight; - this.wrapperParts.bl.t = contentHeight + this.wrapperParts.tl.h; - this.wrapperParts.b.l = this.wrapperParts.bl.w; - this.wrapperParts.b.t = contentHeight + this.wrapperParts.tl.h; - this.wrapperParts.b.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.bl.w - this.wrapperParts.br.w; - this.wrapperParts.b.h = this.wrapperParts.bl.h; - this.wrapperParts.br.l = this.wrapperParts.b.w + this.wrapperParts.bl.w; - this.wrapperParts.br.t = contentHeight + this.wrapperParts.tr.h; - this.wrapperParts.close.l = this.wrapperParts.tr.l +this.wrapperParts.tr.w - this.wrapperParts.close.w - this.borderSize_; - this.wrapperParts.close.t = this.borderSize_; - this.wrapperParts.beak.l = this.borderSize_ + (this.contentWidth / 2) - (this.wrapperParts.beak.w / 2); - this.wrapperParts.beak.t = this.wrapperParts.bl.t + this.wrapperParts.bl.h - this.borderSize_; - - //create the decoration wrapper DOM objects - //append the styled info window to the container - for (var i in this.wrapperParts) { - if (i == 'close' ) { - //first append the content so the close button is layered above it - this.wrapperDiv_.insertBefore(this.contentDiv_, this.wrapperParts[i].domElement); - } - var wrapperPartsDiv = null; - if (this.wrapperParts[i].domElement == null) { - wrapperPartsDiv = document.createElement('div'); - this.wrapperDiv_.appendChild(wrapperPartsDiv); - } else { - wrapperPartsDiv = this.wrapperParts[i].domElement; - } - wrapperPartsDiv.id = this.infoWindowId_ + '_' + i; - wrapperPartsDiv.style.position='absolute'; - wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px'; - wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px'; - wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px'; - wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px'; - this.wrapperParts[i].domElement = wrapperPartsDiv; - } - - //add event handler for the close box - var currentMarker = this.marker_; - var thisMap = this.map_; - GEvent.addDomListener(this.wrapperParts.close.domElement, 'click', - function() { - thisMap.closeExtInfoWindow(); - } - ); - - //position the container on the map, over the marker - var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint()); - this.container_.style.position = 'absolute'; - var markerIcon = this.marker_.getIcon(); - this.container_.style.left = (pixelLocation.x - - (this.contentWidth / 2) - - markerIcon.iconAnchor.x - + markerIcon.infoWindowAnchor.x - ) + 'px'; - - this.container_.style.top = (pixelLocation.y - - this.wrapperParts.bl.h - - contentHeight - - this.wrapperParts.tl.h - - this.wrapperParts.beak.h - - markerIcon.iconAnchor.y - + markerIcon.infoWindowAnchor.y - + this.borderSize_ - ) + 'px'; - - this.container_.style.display = 'block'; - - if(this.map_.getExtInfoWindow() != null) { - this.repositionMap_(); - } -}; - -/** - * Determine the dimensions of the contents to recalculate and reposition the - * wrapping decorator elements accordingly. - */ -ExtInfoWindow.prototype.resize = function(){ - - //Create temporary DOM node for new contents to get new height - //This is done because if you manipulate this.contentDiv_ directly it causes visual errors in IE6 - var tempElement = this.contentDiv_.cloneNode(true); - tempElement.id = this.infoWindowId_ + '_tempContents'; - tempElement.style.visibility = 'hidden'; - tempElement.style.height = 'auto'; - document.body.appendChild(tempElement); - tempElement = document.getElementById(this.infoWindowId_ + '_tempContents'); - var contentHeight = tempElement.offsetHeight; - document.body.removeChild(tempElement); - - //Set the new height to eliminate visual defects that can be caused by font resizing in browser - this.contentDiv_.style.height = contentHeight + 'px'; - - var contentWidth = this.contentDiv_.offsetWidth; - var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint()); - - var oldWindowHeight = this.wrapperParts.t.domElement.offsetHeight + this.wrapperParts.l.domElement.offsetHeight + this.wrapperParts.b.domElement.offsetHeight; - var oldWindowPosTop = this.wrapperParts.t.domElement.offsetTop; - - //resize info window to look correct for new height - this.wrapperParts.l.domElement.style.height = contentHeight + 'px'; - this.wrapperParts.r.domElement.style.height = contentHeight + 'px'; - var newPosTop = this.wrapperParts.b.domElement.offsetTop - contentHeight; - this.wrapperParts.l.domElement.style.top = newPosTop + 'px'; - this.wrapperParts.r.domElement.style.top = newPosTop + 'px'; - this.contentDiv_.style.top = newPosTop + 'px'; - windowTHeight = parseInt(this.wrapperParts.t.domElement.style.height); - newPosTop -= windowTHeight; - this.wrapperParts.close.domElement.style.top = newPosTop + this.borderSize_ + 'px'; - this.wrapperParts.tl.domElement.style.top = newPosTop + 'px'; - this.wrapperParts.t.domElement.style.top = newPosTop + 'px'; - this.wrapperParts.tr.domElement.style.top = newPosTop + 'px'; - - this.repositionMap_(); -}; - -/** - * Check to see if the displayed extInfoWindow is positioned off the viewable - * map region and by how much. Use that information to pan the map so that - * the extInfoWindow is completely displayed. - * @private - */ -ExtInfoWindow.prototype.repositionMap_ = function(){ - //pan if necessary so it shows on the screen - var mapNE = this.map_.fromLatLngToDivPixel( - this.map_.getBounds().getNorthEast() - ); - var mapSW = this.map_.fromLatLngToDivPixel( - this.map_.getBounds().getSouthWest() - ); - var markerPosition = this.map_.fromLatLngToDivPixel( - this.marker_.getPoint() - ); - - var panX = 0; - var panY = 0; - var paddingX = this.paddingX_; - var paddingY = this.paddingY_; - var infoWindowAnchor = this.marker_.getIcon().infoWindowAnchor; - var iconAnchor = this.marker_.getIcon().iconAnchor; - - //test top of screen - var windowT = this.wrapperParts.t.domElement; - var windowL = this.wrapperParts.l.domElement; - var windowB = this.wrapperParts.b.domElement; - var windowR = this.wrapperParts.r.domElement; - var windowBeak = this.wrapperParts.beak.domElement; - - var offsetTop = markerPosition.y - ( -infoWindowAnchor.y + iconAnchor.y + this.getDimensions_(windowBeak).height + this.getDimensions_(windowB).height + this.getDimensions_(windowL).height + this.getDimensions_(windowT).height + this.paddingY_); - if (offsetTop < mapNE.y) { - panY = mapNE.y - offsetTop; - } else { - //test bottom of screen - var offsetBottom = markerPosition.y + this.paddingY_; - if (offsetBottom >= mapSW.y) { - panY = -(offsetBottom - mapSW.y); - } - } - - //test right of screen - var offsetRight = Math.round(markerPosition.x + this.getDimensions_(this.container_).width/2 + this.getDimensions_(windowR).width + this.paddingX_ + infoWindowAnchor.x - iconAnchor.x); - if (offsetRight > mapNE.x) { - panX = -( offsetRight - mapNE.x); - } else { - //test left of screen - var offsetLeft = - (Math.round( (this.getDimensions_(this.container_).width/2 - this.marker_.getIcon().iconSize.width/2) + this.getDimensions_(windowL).width + this.borderSize_ + this.paddingX_) - markerPosition.x - infoWindowAnchor.x + iconAnchor.x); - if( offsetLeft < mapSW.x) { - panX = mapSW.x - offsetLeft; - } - } - - if (panX != 0 || panY != 0 && this.map_.getExtInfoWindow() != null ) { - this.map_.panBy(new GSize(panX,panY)); - } -}; - -/** - * Private function that handles performing an ajax request to the server. The response - * information is assumed to be HTML and is placed inside this extInfoWindow's contents region. - * Last, check to see if the height has changed, and resize the extInfoWindow accordingly. - * @private - * @param {String} url The Url of where to make the ajax request on the server - */ -ExtInfoWindow.prototype.ajaxRequest_ = function(url){ - var thisMap = this.map_; - var thisCallback = this.callback_; - GDownloadUrl(url, function(response, status){ - var infoWindow = document.getElementById(thisMap.getExtInfoWindow().infoWindowId_ + '_contents'); - if (response == null || status == -1 ) { - infoWindow.innerHTML = 'ERROR: The Ajax request failed to get HTML content from "' + url + '"'; - } else { - infoWindow.innerHTML = response; - } - if (thisCallback != null ) { - thisCallback(); - } - thisMap.getExtInfoWindow().resize(); - GEvent.trigger(thisMap, 'extinfowindowupdate'); - }); -}; - -/** - * Private function derived from Prototype.js to get a given element's - * height and width - * @private - * @param {Object} element The DOM element that will have height and - * width will be calculated for it. - * @return {Object} Object with keys: width, height - */ -ExtInfoWindow.prototype.getDimensions_ = function(element) { - var display = this.getStyle_(element, 'display'); - if (display != 'none' && display != null) { // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - } - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; -}; - -/** - * Private function derived from Prototype.js to get a given element's - * value that is associated with the passed style - * @private - * @param {Object} element The DOM element that will be checked. - * @param {String} style The style name that will be have it's value returned. - * @return {Object} - */ -ExtInfoWindow.prototype.getStyle_ = function(element, style) { - var found = false; - style = this.camelize_(style); - var value = element.style[style]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } else if (element.currentStyle) { - value = element.currentStyle[style]; - } - } - if((value == 'auto') && (style == 'width' || style == 'height') && (this.getStyle_(element, 'display') != 'none')) { - if( style == 'width' ) { - value = element.offsetWidth; - }else { - value = element.offsetHeight; - } - } - return (value == 'auto') ? null : value; -}; - -/** - * Private function pulled from Prototype.js that will change a hyphened - * style name into camel case. - * @private - * @param {String} element The string that will be parsed and made into camel case - * @return {String} - */ -ExtInfoWindow.prototype.camelize_ = function(element) { - var parts = element.split('-'), len = parts.length; - if (len == 1) return parts[0]; - var camelized = element.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) { - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - } - return camelized; -}; - -GMap.prototype.ExtInfoWindowInstance_ = null; -GMap.prototype.ClickListener_ = null; -GMap.prototype.InfoWindowListener_ = null; - -/** - * Creates a new instance of ExtInfoWindow for the GMarker. Register the newly created - * instance with the map, ensuring only one window is open at a time. If this is the first - * ExtInfoWindow ever opened, add event listeners to the map to close the ExtInfoWindow on - * zoom and click, to mimic the default GInfoWindow behavior. - * - * @param {GMap} map The GMap2 object where the ExtInfoWindow will open - * @param {String} cssId The id we will use to reference the info window - * @param {String} html The HTML contents - * @param {Object} opt_opts A contianer for optional arguments: - * {String} ajaxUrl The Url to hit on the server to request some contents - * {Number} paddingX The padding size in pixels that the info window will leave on - * the left and right sides of the map when panning is involved. - * {Number} paddingX The padding size in pixels that the info window will leave on - * the top and bottom sides of the map when panning is involved. - * {Number} beakOffset The repositioning offset for when aligning the beak element. - * This is used to make sure the beak lines up correcting if the - * info window styling containers a border. - */ -GMarker.prototype.openExtInfoWindow = function(map, cssId, html, opt_opts) { - if (map == null) { - throw 'Error in GMarker.openExtInfoWindow: map cannot be null'; - return false; - } - if (cssId == null || cssId == '') { - throw 'Error in GMarker.openExtInfoWindow: must specify a cssId'; - return false; - } - - map.closeInfoWindow(); - if (map.getExtInfoWindow() != null) { - map.closeExtInfoWindow(); - } - if (map.getExtInfoWindow() == null) { - map.setExtInfoWindow_( new ExtInfoWindow( - this, - cssId, - html, - opt_opts - ) ); - if (map.ClickListener_ == null) { - //listen for map click, close ExtInfoWindow if open - map.ClickListener_ = GEvent.addListener(map, 'click', - function(event) { - if( !event && map.getExtInfoWindow() != null ){ - map.closeExtInfoWindow(); - } - } - ); - } - if (map.InfoWindowListener_ == null) { - //listen for default info window open, close ExtInfoWindow if open - map.InfoWindowListener_ = GEvent.addListener(map, 'infowindowopen', - function(event) { - if (map.getExtInfoWindow() != null) { - map.closeExtInfoWindow(); - } - } - ); - } - map.addOverlay(map.getExtInfoWindow()); - } -}; - -/** - * Remove the ExtInfoWindow instance - * @param {GMap2} map The map where the GMarker and ExtInfoWindow exist - */ -GMarker.prototype.closeExtInfoWindow = function(map) { - if( map.getExtInfWindow() != null ){ - map.closeExtInfoWindow(); - } -}; - -/** - * Get the ExtInfoWindow instance from the map - */ -GMap2.prototype.getExtInfoWindow = function(){ - return this.ExtInfoWindowInstance_; -}; -/** - * Set the ExtInfoWindow instance for the map - * @private - */ -GMap2.prototype.setExtInfoWindow_ = function( extInfoWindow ){ - this.ExtInfoWindowInstance_ = extInfoWindow; -} -/** - * Remove the ExtInfoWindow from the map - */ -GMap2.prototype.closeExtInfoWindow = function(){ - if( this.getExtInfoWindow() != null ){ - this.ExtInfoWindowInstance_.remove(); - } -}; diff --git a/themes/3nids_theme/modules/tagsmap/models/tags_gps.php b/themes/3nids_theme/modules/tagsmap/models/tags_gps.php deleted file mode 100755 index c9fda760..00000000 --- a/themes/3nids_theme/modules/tagsmap/models/tags_gps.php +++ /dev/null @@ -1,21 +0,0 @@ - -

    - -

    -
    -

    - -

    -
    You may sign up for a Google Maps API key here.

    - -
    - -
    -

    - -

    - count()/5 ?> - - - - - - - - -
    - count()) ?> -
    - $tag): ?> - name, 0, 1)) ?> - - - -
      - - $tags_per_column): /* new column */ ?> -
    - - - - - -
      - - -
    • - where("tag_id", $tag->id) - ->find_all(); - ?> - - - - name) ?> - (count ?>) - - id") ?>"> - - 0) { ?> - | id") ?>"> - - - - -
    • - - - - -
    -
    -
    - -
    -

    - -

    - - -
    - "> - - -
    -
    diff --git a/themes/3nids_theme/modules/tagsmap/views/admin_tagsmap_delete.html.php b/themes/3nids_theme/modules/tagsmap/views/admin_tagsmap_delete.html.php deleted file mode 100755 index b85641e5..00000000 --- a/themes/3nids_theme/modules/tagsmap/views/admin_tagsmap_delete.html.php +++ /dev/null @@ -1,9 +0,0 @@ - -
    -

    -

    -">Delete -">Cancel - -
    - diff --git a/themes/3nids_theme/modules/tagsmap/views/admin_tagsmap_edit.html.php b/themes/3nids_theme/modules/tagsmap/views/admin_tagsmap_edit.html.php deleted file mode 100755 index 66795291..00000000 --- a/themes/3nids_theme/modules/tagsmap/views/admin_tagsmap_edit.html.php +++ /dev/null @@ -1,56 +0,0 @@ - -
    -

    - -
    - - -
    - diff --git a/themes/3nids_theme/modules/tagsmap/views/tagsmap_googlemap.html.php b/themes/3nids_theme/modules/tagsmap/views/tagsmap_googlemap.html.php deleted file mode 100755 index d8673482..00000000 --- a/themes/3nids_theme/modules/tagsmap/views/tagsmap_googlemap.html.php +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - <?= t("Gallery :: Map") ?> - - - - - - - - - - -
    - - -

    - - diff --git a/themes/3nids_theme/modules/theme_3nids/controllers/comments_3nids.php b/themes/3nids_theme/modules/theme_3nids/controllers/comments_3nids.php deleted file mode 100755 index f45e54e2..00000000 --- a/themes/3nids_theme/modules/theme_3nids/controllers/comments_3nids.php +++ /dev/null @@ -1,192 +0,0 @@ -input->get('item_id'); - $item = ORM::factory("item", $item_id); - access::required("view", $item); - - $comments = ORM::factory("comment") - ->where("item_id", $item->id) - ->where("state", "published") - ->orderby("created", "ASC") - ->find_all(); - - switch (rest::output_format()) { - case "json": - foreach ($comments as $comment) { - $data[] = array( - "id" => $comment->id, - "author_name" => html::clean($comment->author_name()), - "created" => $comment->created, - "text" => nl2br(html::purify($comment->text))); - } - print json_encode($data); - break; - - case "html": - $view = new Theme_View("comments.html", "other", "page"); - $view->comments = $comments; - $view->item_id = $item_id; - $view->thumb = $item->thumb_url(); - print $view; - break; - } - } - - /** - * Add a new comment to the collection. - * @see REST_Controller::_create($resource) - */ - public function _create($comment) { - $item = ORM::factory("item", $this->input->post("item_id")); - access::required("view", $item); - - $form = comment_3nids::get_add_form($item); - $valid = $form->validate(); - if ($valid) { - if (user::active()->guest && !$form->add_comment->inputs["name"]->value) { - $form->add_comment->inputs["name"]->add_error("missing", 1); - $valid = false; - } - - if (!$form->add_comment->text->value) { - $form->add_comment->text->add_error("missing", 1); - $valid = false; - } - } - - if ($valid) { - $comment = comment::create( - $item, user::active(), - $form->add_comment->text->value, - $form->add_comment->inputs["name"]->value, - $form->add_comment->email->value, - $form->add_comment->url->value); - - $active = user::active(); - if ($active->guest) { - $form->add_comment->inputs["name"]->value(""); - $form->add_comment->email->value(""); - $form->add_comment->url->value(""); - } else { - $form->add_comment->inputs["name"]->value($active->full_name); - $form->add_comment->email->value($active->email); - $form->add_comment->url->value($active->url); - } - } - url::redirect(url::site("comments_3nids?item_id=".$item->id)); -} - /** - * Display an existing comment. - * @todo Set proper Content-Type in a central place (REST_Controller::dispatch?). - * @see REST_Controller::_show($resource) - */ - public function _show($comment) { - $item = ORM::factory("item", $comment->item_id); - access::required("view", $item); - if ($comment->state != "published") { - return; - } - - if (rest::output_format() == "json") { - print json_encode( - array("result" => "success", - "data" => array( - "id" => $comment->id, - "author_name" => html::clean($comment->author_name()), - "created" => $comment->created, - "text" => nl2br(html::purify($comment->text))))); - } else { - $view = new Theme_View("comment.html", "other", "fragment"); - $view->comment = $comment; - print $view; - } - } - - /** - * Change an existing comment. - * @see REST_Controller::_update($resource) - */ - public function _update($comment) { - $item = ORM::factory("item", $comment->item_id); - access::required("view", $item); - access::required("edit", $item); - - $form = comment_3nids::get_edit_form($comment); - if ($form->validate()) { - $comment->guest_name = $form->edit_comment->inputs["name"]->value; - $comment->guest_email = $form->edit_comment->email->value; - $comment->url = $form->edit_comment->url->value; - $comment->text = $form->edit_comment->text->value; - $comment->save(); - - print json_encode( - array("result" => "success", - "resource" => url::site("comments/{$comment->id}"))); - } else { - print json_encode( - array("result" => "error", - "html" => $form->__toString())); - } - } - - /** - * Delete existing comment. - * @see REST_Controller::_delete($resource) - */ - public function _delete($comment) { - $item = ORM::factory("item", $comment->item_id); - access::required("view", $item); - access::required("edit", $item); - - $comment->delete(); - print json_encode(array("result" => "success")); - } - - /** - * Present a form for adding a new comment to this item or editing an existing comment. - * @see REST_Controller::form_add($resource) - */ - public function _form_add($item_id) { - $item = ORM::factory("item", $item_id); - access::required("view", $item); - - print comment_3nids::get_add_form($item); - } - - /** - * Present a form for editing an existing comment. - * @see REST_Controller::form_edit($resource) - */ - public function _form_edit($comment) { - if (!user::active()->admin) { - access::forbidden(); - } - print comment_3nids::get_edit_form($comment); - } -} diff --git a/themes/3nids_theme/modules/theme_3nids/controllers/movie_3nids.php b/themes/3nids_theme/modules/theme_3nids/controllers/movie_3nids.php deleted file mode 100755 index fd938c32..00000000 --- a/themes/3nids_theme/modules/theme_3nids/controllers/movie_3nids.php +++ /dev/null @@ -1,38 +0,0 @@ -item = $item; - $view->attrs = array("class" => "g-movie", "id" => "g-movie-id-{$item->id}", "style" => "display:block;width:{$item->width}px;height:{$item->height}px"); - print $view; - break; - } -} \ No newline at end of file diff --git a/themes/3nids_theme/modules/theme_3nids/controllers/photo_3nids.php b/themes/3nids_theme/modules/theme_3nids/controllers/photo_3nids.php deleted file mode 100755 index 3d3087ce..00000000 --- a/themes/3nids_theme/modules/theme_3nids/controllers/photo_3nids.php +++ /dev/null @@ -1,43 +0,0 @@ -item = $item; - $photo_size = module::get_var("theme_3nids","photo_size"); - if ($photo_size == "full"){ - $view->item_url = $item->file_url(); - }else{ - $view->item_url = $item->resize_url(); - } - print $view; - break; - } -} \ No newline at end of file diff --git a/themes/3nids_theme/modules/theme_3nids/helpers/comment_3nids.php b/themes/3nids_theme/modules/theme_3nids/helpers/comment_3nids.php deleted file mode 100755 index a35fb450..00000000 --- a/themes/3nids_theme/modules/theme_3nids/helpers/comment_3nids.php +++ /dev/null @@ -1,128 +0,0 @@ -where("item_id", $item->id) - ->where("state", "published") - ->orderby("created", "DESC") - ->find_all(); - - return $comments->count(); - } - - /** - * Create a new comment. - * @param Item_MOdel $item the parent item - * @param User_Model $author the author User_Model - * @param string $text comment body - * @param string $guest_name guest's name (if the author is a guest user, default empty) - * @param string $guest_email guest's email (if the author is a guest user, default empty) - * @param string $guest_url guest's url (if the author is a guest user, default empty) - * @return Comment_Model - */ - static function create($item, $author, $text, $guest_name=null, - $guest_email=null, $guest_url=null) { - $comment = ORM::factory("comment"); - $comment->author_id = $author->id; - $comment->guest_email = $guest_email; - $comment->guest_name = $guest_name; - $comment->guest_url = $guest_url; - $comment->item_id = $item->id; - $comment->text = $text; - $comment->state = "published"; - - // These values are useful for spam fighting, so save them with the comment. - $input = Input::instance(); - $comment->server_http_accept = substr($input->server("HTTP_ACCEPT"), 0, 128); - $comment->server_http_accept_charset = substr($input->server("HTTP_ACCEPT_CHARSET"), 0, 64); - $comment->server_http_accept_encoding = substr($input->server("HTTP_ACCEPT_ENCODING"), 0, 64); - $comment->server_http_accept_language = substr($input->server("HTTP_ACCEPT_LANGUAGE"), 0, 64); - $comment->server_http_connection = substr($input->server("HTTP_CONNECTION"), 0, 64); - $comment->server_http_host = substr($input->server("HTTP_HOST"), 0, 64); - $comment->server_http_referer = substr($input->server("HTTP_REFERER"), 0, 255); - $comment->server_http_user_agent = substr($input->server("HTTP_USER_AGENT"), 0, 128); - $comment->server_query_string = substr($input->server("QUERY_STRING"), 0, 64); - $comment->server_remote_addr = substr($input->server("REMOTE_ADDR"), 0, 32); - $comment->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64); - $comment->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16); - $comment->save(); - - return $comment; - } - - static function get_add_form($item) { - $form = new Forge("comments_3nids?item_id=".$item->id, "", "post", array("id" => "gAddCommentForm")); - $group = $form->group("add_comment")->label(t("Add comment")); - $group->input("name") ->label(t("Name")) ->id("gAuthor"); - $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); - $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); - $group->textarea("text")->label(t("Comment")) ->id("gText"); - $group->hidden("item_id")->value($item->id); - module::event("comment_add_form", $form); - $group->submit("")->value(t("Add")) ->class("gButtonLink ui-corner-all ui-icon-left ui-state-default"); - - $active = user::active(); - if (!$active->guest) { - $group->inputs["name"]->value($active->full_name)->disabled("disabled"); - $group->email->value($active->email)->disabled("disabled"); - $group->url->value($active->url)->disabled("disabled"); - } else { - $group->inputs["name"]->error_messages("missing", t("You must provide a name")); - } - $group->text->error_messages("missing", t("You must provide a comment")); - - return $form; - } - - static function get_edit_form($comment) { - $form = new Forge("comments/{$comment->id}?_method=put", "", "post", - array("id" => "gEditCommentForm")); - $group = $form->group("edit_comment")->label(t("Edit comment")); - $group->input("name") ->label(t("Author")) ->id("gAuthor"); - $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); - $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); - $group->textarea("text")->label(t("Comment")) ->id("gText"); - $group->submit("")->value(t("Edit")); - - $group->text = $comment->text; - $author = $comment->author(); - if ($author->guest) { - $group->inputs["name"]->value = $comment->guest_name; - $group->email = $comment->guest_email; - $group->url = $comment->guest_url; - } else { - $group->inputs["name"]->value($author->full_name)->disabled("disabled"); - $group->email->value($author->email)->disabled("disabled"); - $group->url->value($author->url)->disabled("disabled"); - } - return $form; - } -} - diff --git a/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids.php b/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids.php deleted file mode 100755 index d5bb5dab..00000000 --- a/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids.php +++ /dev/null @@ -1,101 +0,0 @@ -width; - $height = $item->height; - }else{ - $width = $item->resize_width; - $height = $item->resize_height; - } - - $desriptionMode = module::get_var("theme_3nids", "description"); - $description = ""; - $tags = tag::item_tags($item); - if(count($tags) && $desriptionMode == "tags"){ - $description = " || " . implode(", ", $tags); - }elseif($desriptionMode == "item" && $item->description != ""){ - $description = " || " . str_replace("\"",""",$item->description); - }elseif (($desriptionMode == "parent" || $desriptionMode == "item") && $item->parent()->description != ""){ - $description = " || " . str_replace("\"",""",$item->parent()->description); - } - - $titleMode = module::get_var("theme_3nids", "title"); - if ($titleMode == "parent"){ - $title = html::clean($item->parent()->title); - }else{ - $title = html::clean($item->title); - } - - $rel = ""; - if ($groupImg == true) {$rel = " rel=\"fancygroup\" ";} - - if ($item->is_photo() || ($item->is_movie()) && module::is_active("theme_3nids")){ - $fancymodule = ""; - if (module::is_active("exif")){ - $fancymodule .= "exif::" . url::site("exif/show/{$item->id}") . ";;";} - if (module::is_active("comment") && module::is_active("theme_3nids")){ - $fancymodule .= "comment::" . url::site("comments_3nids?item_id={$item->id}") . ";;comment_count::" . comment_3nids::count($item) . ";;" ;} - if ($item->is_photo()){ - $link .= "id}") ."/?w=" . $width . "xewx&h=" . $height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $title . $description ."\" name=\"" . $fancymodule . " \">"; - }else{ - $link .= "id}") . "/?w=" . strval(20+($width)) . "xewx&h=" . strval(50+($height)) . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $item->parent()->title . $description ."\" name=\"" . $fancymodule . " \">"; - } - } elseif( $item->is_album() && $viewtype != "header"){ - $link .= "url() . "\">"; - } - - if($viewtype != "header"){ - $link .= $item->thumb_img(array("class" => "g-thumbnail")) . ""; - if( $item->is_album() && $viewtype == "album" ){ - $link .= "url() . "?show=" . $item->id . "\"><$parentTitleClass>" . html::clean($item->title) . ""; - } elseif ( !($item->is_album()) && $viewtype == "dynamic") { - $link .= "parent()->url() . "?show=" . $item->id . "\" class=\"g-parent-album\"><$parentTitleClass>" . html::clean($item->parent()->title) . ""; - } - - if (($item->is_photo() || $item->is_movie()) && $displayComment==true && module::is_active("comment") && module::is_active("theme_3nids")) { - $link .= ""; - } - }else{ - $link .= ""; - } - return $link; - } - - - - - -} - -?> \ No newline at end of file diff --git a/themes/3nids_theme/modules/theme_3nids/module.info b/themes/3nids_theme/modules/theme_3nids/module.info deleted file mode 100755 index 6f7bfff0..00000000 --- a/themes/3nids_theme/modules/theme_3nids/module.info +++ /dev/null @@ -1,3 +0,0 @@ -name = "3nids theme" -description = "Module needed to display correctly 3nids theme (especialy videos and comments)" -version = 1 diff --git a/themes/3nids_theme/README b/themes/three_nids/README old mode 100755 new mode 100644 similarity index 59% rename from themes/3nids_theme/README rename to themes/three_nids/README index 828c27dd..baaf2497 --- a/themes/3nids_theme/README +++ b/themes/three_nids/README @@ -1,22 +1,21 @@ This is a theme for gallery3. -It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher). +It uses jquery lightbox slideshow (fancybox) to display images. ********* -Demo @ http://gallery.3nids.ch +Demo @ http://gallery.3nids.ch ********* Requirements: -- Gallery 3 last experimental version @ http://github.com/gallery/gallery3 -- Tag module activated (if want to use tagsmap) -- theme_3nids module must be activated to display properly the theme. +- Gallery 3 last experimental version @ http://github.com/gallery/gallery3 +- Tag and tagsmap modules activated (optional) ********* Installation: -1. Copy the theme folder (3nids) into gallery3/themes directory. -2. Copy modules folder into gallery3 directory. It includes tagsmap and theme_3nids modules. -3. Activate tagsmap and theme_3nids module. - +1. Copy the theme folder (three_nids) into gallery3/themes directory. +2. Copy the tagsmap module into the gallery3/modules folder. +3. Activate tagsmap module and three_nids theme. + ********* Configuration: Go to admin -> content -> Theme 3nids settings to configure the theme properly. @@ -24,7 +23,7 @@ Go to admin -> content -> Theme 3nids settings to configure the theme properly. ********* Use: This theme displays full size images. So be carefull to upload not too large images! -The theme uses the tagsmap module which has been enhanced. +The theme optionally uses the tagsmap module. For advanced users: If you want to separate geotag from others, name those with the "map." prefix., the "map." prefix will not be displayed on the map. @@ -33,6 +32,6 @@ If you want to remove the prefix in the tag cloud sidebar, wou will have to upda return ORM::factory("tag") ->orderby("count", "DESC") ->notregex("name","map\.") - ->limit($count) + ->limit($count) ->find_all(); } diff --git a/themes/3nids_theme/modules/theme_3nids/controllers/admin_theme_3nids.php b/themes/three_nids/admin/controllers/admin_three_nids.php old mode 100755 new mode 100644 similarity index 65% rename from themes/3nids_theme/modules/theme_3nids/controllers/admin_theme_3nids.php rename to themes/three_nids/admin/controllers/admin_three_nids.php index 133bb143..fb5fd67a --- a/themes/3nids_theme/modules/theme_3nids/controllers/admin_theme_3nids.php +++ b/themes/three_nids/admin/controllers/admin_three_nids.php @@ -18,36 +18,34 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Admin_theme_3nids_Controller extends Admin_Controller { +class Admin_Three_Nids_Controller extends Admin_Controller { public function index() { // Generate a new admin page. $view = new Admin_View("admin.html"); - $view->content = new View("admin_theme_3nids.html"); + $view->content = new View("admin_three_nids.html"); // Generate a form for Google Maps Settings. - $view->content->theme_form = $this->_get_3nids_form(); - + $view->content->theme_form = $this->_get_three_nids_form(); // Display the page. print $view; } - - private function _get_3nids_form() { + private function _get_three_nids_form() { // Make a new form for inputing information associated with google maps. - $form = new Forge("admin/theme_3nids/save3nidsprefs", "", "post", + $form = new Forge("admin/three_nids/savethree_nidsprefs", "", "post", array("id" => "gTagsMapAdminForm")); // Input box for the Maps API Key $form->input("title") - ->label(t("item title : parent or item.")) - ->value(module::get_var("theme_3nids", "title")); + ->label(t("item title : parent or item.")) + ->value(module::get_var("three_nids", "title")); $form->input("description") - ->label(t("item description : tags or item or parent or nothing. If item description chosen and not available, then parent description is used.")) - ->value(module::get_var("theme_3nids", "description")); + ->label(t("item description : tags or item or parent or nothing. If item description chosen and not available, then parent description is used.")) + ->value(module::get_var("three_nids", "description")); $form->input("photo_size") - ->label(t("Photo size: resize or full.")) - ->value(module::get_var("theme_3nids", "photo_size")); + ->label(t("Photo size: resize or full.")) + ->value(module::get_var("three_nids", "photo_size")); // Add a save button to the form. $form->submit("SaveSettings")->value(t("Save")); @@ -55,8 +53,8 @@ class Admin_theme_3nids_Controller extends Admin_Controller { // Return the newly generated form. return $form; } - - public function save3nidsprefs() { + + public function savethree_nidsprefs() { // Save information associated with Google Maps to the database. // Prevent Cross Site Request Forgery @@ -66,14 +64,14 @@ class Admin_theme_3nids_Controller extends Admin_Controller { $description = Input::instance()->post("description"); $title = Input::instance()->post("title"); $photo_size = Input::instance()->post("photo_size"); - + // Save Settings. - module::set_var("theme_3nids", "description", $description); - module::set_var("theme_3nids", "title", $title); - module::set_var("theme_3nids", "photo_size", $photo_size); + module::set_var("three_nids", "description", $description); + module::set_var("three_nids", "title", $title); + module::set_var("three_nids", "photo_size", $photo_size); // Display a success message and redirect back to the TagsMap admin page. message::success(t("Your Settings Have Been Saved.")); - url::redirect("admin/theme_3nids"); + url::redirect("admin/three_nids"); } } \ No newline at end of file diff --git a/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids_event.php b/themes/three_nids/admin/helpers/three_nids_event.php old mode 100755 new mode 100644 similarity index 78% rename from themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids_event.php rename to themes/three_nids/admin/helpers/three_nids_event.php index 0e36dab0..bd91b1b1 --- a/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids_event.php +++ b/themes/three_nids/admin/helpers/three_nids_event.php @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class theme_3nids_event_Core { +class three_nids_event_Core { static function admin_menu($menu, $theme) { - // Add a link to the TagsMap admin page to the Content menu. - $menu->get("content_menu") + // Add a link to the three_nids admin page to the Content menu. + $menu->get("appearance_menu") ->append(Menu::factory("link") - ->id("theme_3nids") - ->label(t("Theme 3nids Settings")) - ->url(url::site("admin/theme_3nids"))); + ->id("three_nids") + ->label(t("3nids settings")) + ->url(url::site("admin/three_nids"))); } } \ No newline at end of file diff --git a/themes/3nids_theme/modules/theme_3nids/views/admin_theme_3nids.html.php b/themes/three_nids/admin/views/admin_three_nids.html.php old mode 100755 new mode 100644 similarity index 54% rename from themes/3nids_theme/modules/theme_3nids/views/admin_theme_3nids.html.php rename to themes/three_nids/admin/views/admin_three_nids.html.php index 72b15787..3d8c8878 --- a/themes/3nids_theme/modules/theme_3nids/views/admin_theme_3nids.html.php +++ b/themes/three_nids/admin/views/admin_three_nids.html.php @@ -1,11 +1,8 @@ -

    - -

    +

    + +

    -

    - -

    diff --git a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap.php b/themes/three_nids/controllers/three_nids.php old mode 100755 new mode 100644 similarity index 65% rename from themes/3nids_theme/modules/tagsmap/helpers/tagsmap.php rename to themes/three_nids/controllers/three_nids.php index 717e7d2e..465b8345 --- a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap.php +++ b/themes/three_nids/controllers/three_nids.php @@ -17,23 +17,20 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +class Three_Nids_Controller extends Controller { + public function show_comments($id) { + $item = ORM::factory("item", $id); + access::required("view", $item); -/** - * This is the API for handling comments. - * - * Note: by design, this class does not do any permission checking. - */ -class tagsmap_Core { + $comments = ORM::factory("comment") + ->where("item_id", $item->id) + ->where("state", "published") + ->orderby("created", "ASC") + ->find_all(); - public function tagitems($tag) { - $tagitems = ORM::factory("item") - ->viewable() - ->join("items_tags", "items.id", "items_tags.item_id") - ->where("items_tags.tag_id", $tag->tag_id) - ->orderby("items.name", "DESC") - ->find_all(); - return $tagitems; - } + $v = new Theme_View("comments.html", "other", "comment-fragment"); + $v->comments = $comments; + $v->item = $item; + print $v; + } } - -?> \ No newline at end of file diff --git a/themes/3nids_theme/3nids/css/fix-ie.css b/themes/three_nids/css/fix-ie.css old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/fix-ie.css rename to themes/three_nids/css/fix-ie.css diff --git a/themes/3nids_theme/3nids/css/jquery.fancybox.css b/themes/three_nids/css/jquery.fancybox.css old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/jquery.fancybox.css rename to themes/three_nids/css/jquery.fancybox.css diff --git a/themes/3nids_theme/3nids/css/screen.css b/themes/three_nids/css/screen.css old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/screen.css rename to themes/three_nids/css/screen.css diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_0_333333_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_0_333333_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_0_333333_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_0_333333_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_0_484848_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_0_484848_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_0_484848_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_0_484848_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_000000_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_100_000000_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_000000_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_100_000000_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_333333_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_100_333333_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_333333_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_100_333333_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_484848_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_100_484848_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_484848_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_100_484848_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_b30000_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_100_b30000_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_100_b30000_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_100_b30000_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_55_fbec88_40x100.png b/themes/three_nids/css/themeroller/images/ui-bg_flat_55_fbec88_40x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_flat_55_fbec88_40x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_flat_55_fbec88_40x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_glass_95_fef1ec_1x400.png b/themes/three_nids/css/themeroller/images/ui-bg_glass_95_fef1ec_1x400.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_glass_95_fef1ec_1x400.png rename to themes/three_nids/css/themeroller/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_gloss-wave_16_121212_500x100.png b/themes/three_nids/css/themeroller/images/ui-bg_gloss-wave_16_121212_500x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_gloss-wave_16_121212_500x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_gloss-wave_16_121212_500x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png b/themes/three_nids/css/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-hard_15_888888_1x100.png b/themes/three_nids/css/themeroller/images/ui-bg_highlight-hard_15_888888_1x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-hard_15_888888_1x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_highlight-hard_15_888888_1x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-hard_55_555555_1x100.png b/themes/three_nids/css/themeroller/images/ui-bg_highlight-hard_55_555555_1x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-hard_55_555555_1x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_highlight-hard_55_555555_1x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-soft_35_adadad_1x100.png b/themes/three_nids/css/themeroller/images/ui-bg_highlight-soft_35_adadad_1x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-soft_35_adadad_1x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_highlight-soft_35_adadad_1x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-soft_60_dddddd_1x100.png b/themes/three_nids/css/themeroller/images/ui-bg_highlight-soft_60_dddddd_1x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_highlight-soft_60_dddddd_1x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_highlight-soft_60_dddddd_1x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-bg_inset-soft_15_121212_1x100.png b/themes/three_nids/css/themeroller/images/ui-bg_inset-soft_15_121212_1x100.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-bg_inset-soft_15_121212_1x100.png rename to themes/three_nids/css/themeroller/images/ui-bg_inset-soft_15_121212_1x100.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_222222_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_222222_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_222222_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_222222_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_333333_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_333333_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_333333_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_333333_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_444444_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_444444_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_444444_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_444444_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_666666_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_666666_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_666666_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_666666_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_aaaaaa_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_aaaaaa_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_aaaaaa_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_aaaaaa_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_bbbbbb_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_bbbbbb_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_bbbbbb_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_bbbbbb_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_cccccc_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_cccccc_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_cccccc_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_cccccc_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_cd0a0a_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_cd0a0a_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_cd0a0a_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_cd0a0a_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_f9bd01_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_f9bd01_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_f9bd01_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_f9bd01_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/images/ui-icons_f9db01_256x240.png b/themes/three_nids/css/themeroller/images/ui-icons_f9db01_256x240.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/images/ui-icons_f9db01_256x240.png rename to themes/three_nids/css/themeroller/images/ui-icons_f9db01_256x240.png diff --git a/themes/3nids_theme/3nids/css/themeroller/ui.base.css b/themes/three_nids/css/themeroller/ui.base.css old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/themeroller/ui.base.css rename to themes/three_nids/css/themeroller/ui.base.css diff --git a/themes/3nids_theme/3nids/css/3nids.css b/themes/three_nids/css/three_nids.css old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/css/3nids.css rename to themes/three_nids/css/three_nids.css diff --git a/themes/three_nids/helpers/three_nids.php b/themes/three_nids/helpers/three_nids.php new file mode 100644 index 00000000..29042ff2 --- /dev/null +++ b/themes/three_nids/helpers/three_nids.php @@ -0,0 +1,125 @@ +is_movie()){ + $width = $item->width; + $height = $item->height; + }else{ + $width = $item->resize_width; + $height = $item->resize_height; + } + + $description_mode = module::get_var("three_nids", "description"); + $description = ""; + $tags = tag::item_tags($item); + if(count($tags) && $description_mode == "tags"){ + $description = " || " . implode(", ", $tags); + } else if ($description_mode == "item" && $item->description != ""){ + $description = " || " . str_replace("\"",""",$item->description); + } else if (($description_mode == "parent" || + $description_mode == "item") && $item->parent()->description != ""){ + $description = " || " . str_replace("\"", """, $item->parent()->description); + } + + $title_mode = module::get_var("three_nids", "title"); + if ($title_mode == "parent"){ + $title = html::clean($item->parent()->title); + } else { + $title = html::clean($item->title); + } + + $rel = ""; + if ($group_img == true) { + $rel = " rel=\"fancygroup\" "; + } + + if ($item->is_photo() || $item->is_movie()){ + $fancymodule = ""; + if (module::is_active("exif")) { + $fancymodule .= "exif::" . url::site("exif/show/{$item->id}") . ";;"; + } + if (module::is_active("comment")) { + $fancymodule .= "comment::" . url::site("three_nids/show_comments/{$item->id}") . + ";;comment_count::" . three_nids::comment_count($item) . ";;"; + } + if ($item->is_photo()){ + $link .= "id}") ."/?w=" . $width . + "xewx&h=" . $height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . + $title . $description ."\" name=\"" . $fancymodule . " \">"; + } else { + $link .= "id}") . "/?w=" . + strval(20 + $width) . "xewx&h=" . strval(50 + $height) . "xehx\" " . $rel . + " class=\"fancyclass iframe\" title=\"" . $item->parent()->title . $description . + "\" name=\"" . $fancymodule . " \">"; + } + } else if ($item->is_album() && $view_type != "header") { + $link .= "url() . "\">"; + } else { + // NOTE: we don't want to open an here because $view_type is "header", but lower down + // we're going to close one, so that's going to generate a mismatch. For now, just open a + // link anyway. + // @todo: figure out what we really should be doing here. + $link .= "url() . "\">"; + } + + if ($view_type != "header") { + $link .= $item->thumb_img(array("class" => "g-thumbnail")) . ""; + if ($item->is_album() && $view_type == "album") { + $link .= "url() . "?show=" . $item->id . + "\"><$parent_title_class>" . html::clean($item->title) . + ""; + } else if (!($item->is_album()) && $view_type == "dynamic") { + $link .= "parent()->url() . "?show=" . $item->id . + "\" class=\"g-parent-album\"><$parent_title_class>" . + html::clean($item->parent()->title) . ""; + } + + if (($item->is_photo() || $item->is_movie()) && $display_comment && + module::is_active("comment")) { + $link .= ""; + } + } else { + $link .= ""; + } + return $link; + } + + public function comment_count($item) { + access::required("view", $item); + + return ORM::factory("comment") + ->where("item_id", $item->id) + ->where("state", "published") + ->orderby("created", "DESC") + ->count_all(); + } +} +?> \ No newline at end of file diff --git a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_theme.php b/themes/three_nids/helpers/three_nids_event.php old mode 100755 new mode 100644 similarity index 71% rename from themes/3nids_theme/modules/tagsmap/helpers/tagsmap_theme.php rename to themes/three_nids/helpers/three_nids_event.php index dc895b5b..bd91b1b1 --- a/themes/3nids_theme/modules/tagsmap/helpers/tagsmap_theme.php +++ b/themes/three_nids/helpers/three_nids_event.php @@ -17,8 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class tagsmap_theme { - static function head($theme) { - $theme->css("tagsmap.css"); - } -} +class three_nids_event_Core { + static function admin_menu($menu, $theme) { + // Add a link to the three_nids admin page to the Content menu. + $menu->get("appearance_menu") + ->append(Menu::factory("link") + ->id("three_nids") + ->label(t("3nids settings")) + ->url(url::site("admin/three_nids"))); + } +} \ No newline at end of file diff --git a/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids_theme.php b/themes/three_nids/helpers/three_nids_theme.php old mode 100755 new mode 100644 similarity index 88% rename from themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids_theme.php rename to themes/three_nids/helpers/three_nids_theme.php index bc035674..a24d6ea3 --- a/themes/3nids_theme/modules/theme_3nids/helpers/theme_3nids_theme.php +++ b/themes/three_nids/helpers/three_nids_theme.php @@ -16,11 +16,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class theme_3nids_theme { - +class three_nids_theme { static function credits($theme) { - return "3nids theme"; + return "three_nids theme"; } - } diff --git a/themes/3nids_theme/3nids/images/avatar.jpg b/themes/three_nids/images/avatar.jpg old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/avatar.jpg rename to themes/three_nids/images/avatar.jpg diff --git a/themes/3nids_theme/3nids/images/fancy_closebox.png b/themes/three_nids/images/fancy_closebox.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_closebox.png rename to themes/three_nids/images/fancy_closebox.png diff --git a/themes/3nids_theme/3nids/images/fancy_left.png b/themes/three_nids/images/fancy_left.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_left.png rename to themes/three_nids/images/fancy_left.png diff --git a/themes/3nids_theme/3nids/images/fancy_progress.png b/themes/three_nids/images/fancy_progress.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_progress.png rename to themes/three_nids/images/fancy_progress.png diff --git a/themes/3nids_theme/3nids/images/fancy_right.png b/themes/three_nids/images/fancy_right.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_right.png rename to themes/three_nids/images/fancy_right.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_e.png b/themes/three_nids/images/fancy_shadow_e.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_e.png rename to themes/three_nids/images/fancy_shadow_e.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_n.png b/themes/three_nids/images/fancy_shadow_n.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_n.png rename to themes/three_nids/images/fancy_shadow_n.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_ne.png b/themes/three_nids/images/fancy_shadow_ne.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_ne.png rename to themes/three_nids/images/fancy_shadow_ne.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_nw.png b/themes/three_nids/images/fancy_shadow_nw.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_nw.png rename to themes/three_nids/images/fancy_shadow_nw.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_s.png b/themes/three_nids/images/fancy_shadow_s.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_s.png rename to themes/three_nids/images/fancy_shadow_s.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_se.png b/themes/three_nids/images/fancy_shadow_se.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_se.png rename to themes/three_nids/images/fancy_shadow_se.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_sw.png b/themes/three_nids/images/fancy_shadow_sw.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_sw.png rename to themes/three_nids/images/fancy_shadow_sw.png diff --git a/themes/3nids_theme/3nids/images/fancy_shadow_w.png b/themes/three_nids/images/fancy_shadow_w.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_shadow_w.png rename to themes/three_nids/images/fancy_shadow_w.png diff --git a/themes/3nids_theme/3nids/images/fancy_title_left.png b/themes/three_nids/images/fancy_title_left.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_title_left.png rename to themes/three_nids/images/fancy_title_left.png diff --git a/themes/3nids_theme/3nids/images/fancy_title_main.png b/themes/three_nids/images/fancy_title_main.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_title_main.png rename to themes/three_nids/images/fancy_title_main.png diff --git a/themes/3nids_theme/3nids/images/fancy_title_right.png b/themes/three_nids/images/fancy_title_right.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/fancy_title_right.png rename to themes/three_nids/images/fancy_title_right.png diff --git a/themes/3nids_theme/3nids/images/ico-album.png b/themes/three_nids/images/ico-album.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/ico-album.png rename to themes/three_nids/images/ico-album.png diff --git a/themes/3nids_theme/3nids/images/ico-help.png b/themes/three_nids/images/ico-help.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/ico-help.png rename to themes/three_nids/images/ico-help.png diff --git a/themes/3nids_theme/3nids/images/ico-print.png b/themes/three_nids/images/ico-print.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/ico-print.png rename to themes/three_nids/images/ico-print.png diff --git a/themes/3nids_theme/3nids/images/ico-view-comments.png b/themes/three_nids/images/ico-view-comments.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/ico-view-comments.png rename to themes/three_nids/images/ico-view-comments.png diff --git a/themes/3nids_theme/3nids/images/ico-view-fullsize.png b/themes/three_nids/images/ico-view-fullsize.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/ico-view-fullsize.png rename to themes/three_nids/images/ico-view-fullsize.png diff --git a/themes/3nids_theme/3nids/images/ico-view-slideshow.png b/themes/three_nids/images/ico-view-slideshow.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/ico-view-slideshow.png rename to themes/three_nids/images/ico-view-slideshow.png diff --git a/themes/3nids_theme/3nids/images/map.png b/themes/three_nids/images/map.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/map.png rename to themes/three_nids/images/map.png diff --git a/themes/3nids_theme/3nids/images/select-photos-backg.png b/themes/three_nids/images/select-photos-backg.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/images/select-photos-backg.png rename to themes/three_nids/images/select-photos-backg.png diff --git a/themes/3nids_theme/3nids/js/jquery.easing.js b/themes/three_nids/js/jquery.easing.js old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/js/jquery.easing.js rename to themes/three_nids/js/jquery.easing.js diff --git a/themes/3nids_theme/3nids/js/jquery.fancybox.js b/themes/three_nids/js/jquery.fancybox.js old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/js/jquery.fancybox.js rename to themes/three_nids/js/jquery.fancybox.js diff --git a/themes/3nids_theme/3nids/js/ui.init.js b/themes/three_nids/js/ui.init.js old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/js/ui.init.js rename to themes/three_nids/js/ui.init.js diff --git a/themes/3nids_theme/3nids/theme.info b/themes/three_nids/theme.info old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/theme.info rename to themes/three_nids/theme.info diff --git a/themes/3nids_theme/3nids/thumbnail.png b/themes/three_nids/thumbnail.png old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/thumbnail.png rename to themes/three_nids/thumbnail.png diff --git a/themes/three_nids/views/album.html.php b/themes/three_nids/views/album.html.php new file mode 100644 index 00000000..ab67f100 --- /dev/null +++ b/themes/three_nids/views/album.html.php @@ -0,0 +1,51 @@ + + +
    + album_top() ?> +

    title) ?>

    +
    description)) ?>
    +
    +viewable()->children(); +$theme->pagination = new Pagination(); +$theme->pagination->initialize( + array("query_string" => "page", "total_items" => $children_count, "items_per_page" => $page_size, "style" => "classic")); +$children_offset = ($theme->pagination->current_page -1) * $page_size ; +?> + +album_bottom() ?> + +paginator() ?> diff --git a/themes/3nids_theme/3nids/views/block.html.php b/themes/three_nids/views/block.html.php old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/views/block.html.php rename to themes/three_nids/views/block.html.php diff --git a/themes/three_nids/views/comments.html.php b/themes/three_nids/views/comments.html.php new file mode 100644 index 00000000..01eeadd3 --- /dev/null +++ b/themes/three_nids/views/comments.html.php @@ -0,0 +1,60 @@ + + + + + + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("themeroller/ui.base.css") ?> + css("gallery.common.css") ?> + css("jquery.fancybox.css") ?> + css("screen.css") ?> + css("three_nids.css") ?> + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + script("jquery.easing.js") ?> + script("jquery.fancybox.js") ?> + script("ui.init.js") ?> + head() ?> + + +
    + thumb_img() ?> +
    + id}") ?>" id="g-admin-comment-button" + class="g-button ui-corner-all ui-icon-left ui-state-default right"> + + + +
    + count()): ?> +

    + +

    + + +
    + + diff --git a/themes/3nids_theme/3nids/views/dynamic.html.php b/themes/three_nids/views/dynamic.html.php old mode 100755 new mode 100644 similarity index 87% rename from themes/3nids_theme/3nids/views/dynamic.html.php rename to themes/three_nids/views/dynamic.html.php index 5407c53f..7c0e7131 --- a/themes/3nids_theme/3nids/views/dynamic.html.php +++ b/themes/three_nids/views/dynamic.html.php @@ -14,15 +14,15 @@ - + dynamic_bottom() ?> -pager() ?> +paginator() ?> diff --git a/themes/3nids_theme/3nids/views/exif_dialog.html.php b/themes/three_nids/views/exif_dialog.html.php old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/views/exif_dialog.html.php rename to themes/three_nids/views/exif_dialog.html.php diff --git a/themes/three_nids/views/image_block_block.html.php b/themes/three_nids/views/image_block_block.html.php new file mode 100644 index 00000000..0b56af20 --- /dev/null +++ b/themes/three_nids/views/image_block_block.html.php @@ -0,0 +1,3 @@ + + + diff --git a/themes/3nids_theme/3nids/views/movie_3nids.html.php b/themes/three_nids/views/movie.html.php old mode 100755 new mode 100644 similarity index 50% rename from themes/3nids_theme/3nids/views/movie_3nids.html.php rename to themes/three_nids/views/movie.html.php index d3a18cdd..3ebe0632 --- a/themes/3nids_theme/3nids/views/movie_3nids.html.php +++ b/themes/three_nids/views/movie.html.php @@ -2,66 +2,44 @@ - - + + css("yui/reset-fonts-grids.css") ?> css("superfish/css/superfish.css") ?> css("themeroller/ui.base.css") ?> css("gallery.common.css") ?> - css("jquery.fancybox.css") ?> + css("jquery.fancybox.css") ?> css("screen.css") ?> - css("3nids.css") ?> + css("three_nids.css") ?> script("jquery.js") ?> script("jquery.form.js") ?> script("jquery-ui.js") ?> script("gallery.common.js") ?> script("gallery.ajax.js") ?> script("gallery.dialog.js") ?> script("superfish/js/superfish.js") ?> script("jquery.localscroll.js") ?> - script("jquery.easing.js") ?> + script("jquery.easing.js") ?> script("jquery.fancybox.js") ?> script("ui.init.js") ?> script("flowplayer.js") ?> -head() ?> - - -
    -
    - -file_url(true), "", $attrs) ?> - - - context_menu($item, "#g-movie-id-{$item->id}") ?> - -
    -

    title) ?>

    -
    description)) ?>
    -
    - -
    - - + head() ?> + + +
    +
    + movie_img( + array("class" => "g-movie", "id" => "g-movie-id-{$item->id}", + "style" => "display:block;width:{$item->width}px;height:{$item->height}px")) ?> + context_menu($item, "#g-movie-id-{$item->id}") ?> +
    +

    title) ?>

    +
    description)) ?>
    +
    +
    + + diff --git a/themes/3nids_theme/3nids/views/no_sidebar.html.php b/themes/three_nids/views/no_sidebar.html.php old mode 100755 new mode 100644 similarity index 100% rename from themes/3nids_theme/3nids/views/no_sidebar.html.php rename to themes/three_nids/views/no_sidebar.html.php diff --git a/themes/3nids_theme/3nids/views/page.html.php b/themes/three_nids/views/page.html.php old mode 100755 new mode 100644 similarity index 95% rename from themes/3nids_theme/3nids/views/page.html.php rename to themes/three_nids/views/page.html.php index 9658873e..8a39fbc4 --- a/themes/3nids_theme/3nids/views/page.html.php +++ b/themes/three_nids/views/page.html.php @@ -1,4 +1,10 @@ + + + + + + @@ -28,9 +34,9 @@ css("superfish/css/superfish.css") ?> css("themeroller/ui.base.css") ?> css("gallery.common.css") ?> - css("jquery.fancybox.css") ?> + css("jquery.fancybox.css") ?> css("screen.css") ?> - css("3nids.css") ?> + css("three_nids.css") ?>