Restructure the 3nids theme into a more standard layout. Delete the
tagsmap module with the expectation that any changes/additions will be merged into the existing tagsmap module.
@ -1,5 +1,5 @@
|
||||
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
|
||||
@ -7,15 +7,14 @@ 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.
|
||||
- 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.
|
||||
2. Copy the tagsmap module into the gallery3/modules folder.
|
||||
3. Activate tagsmap module and 3nids theme.
|
||||
|
||||
*********
|
||||
Configuration:
|
||||
@ -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.
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 989 B |
Before Width: | Height: | Size: 768 B After Width: | Height: | Size: 768 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 960 B After Width: | Height: | Size: 960 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@ -1 +0,0 @@
|
||||
Admin config for item title
|
@ -1,238 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class Admin_TagsMap_Controller extends Admin_Controller {
|
||||
public function index() {
|
||||
// Generate a new admin page.
|
||||
$view = new Admin_View("admin.html");
|
||||
$view->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");
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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_Controller extends Controller {
|
||||
public function googlemap($fullsize) {
|
||||
// Display all tags with GPS coordinates on a google map.
|
||||
|
||||
// Generate a list of GPS coordinates.
|
||||
$tagsGPS = ORM::factory("tags_gps")->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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
@ -1,39 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is the API for handling comments.
|
||||
*
|
||||
* Note: by design, this class does not do any permission checking.
|
||||
*/
|
||||
class tagsmap_Core {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,43 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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_event_Core {
|
||||
static function module_change($changes) {
|
||||
// See if the Tags module is installed,
|
||||
// tell the user to install it if it isn't.
|
||||
if (!module::is_active("tag") || in_array("tag", $changes->deactivate)) {
|
||||
site_status::warning(
|
||||
t("The TagsMap module requires the Tags module. " .
|
||||
"<a href=\"%url\">Activate the Tags module now</a>",
|
||||
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")));
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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_installer {
|
||||
static function install() {
|
||||
// Create a table to store GPS data in.
|
||||
$db = Database::instance();
|
||||
$db->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");
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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");
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB |