Merge branch 'master' of git@github.com:gallery/gallery3-contrib into talmdal
This commit is contained in:
commit
d0b40f7bf5
@ -1,3 +1,3 @@
|
|||||||
name = MetaDescription
|
name = "MetaDescription"
|
||||||
description = Automatically generates and inserts KEYWORD and DESCRIPTION meta tags into any theme.
|
description = "Automatically generates and inserts KEYWORD and DESCRIPTION meta tags into any theme."
|
||||||
version = 1
|
version = 1
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
name = NoBots
|
name = "NoBots"
|
||||||
description = Block web crawlers from indexing your Gallery.
|
description = "Block web crawlers from indexing your Gallery."
|
||||||
version = 1
|
version = 1
|
||||||
|
59
modules/rwinfo/helpers/rwinfo_block.php
Normal file
59
modules/rwinfo/helpers/rwinfo_block.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?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 rwinfo_block_Core {
|
||||||
|
static function get_site_list() {
|
||||||
|
return array("metadata" => t("Metadata"));
|
||||||
|
}
|
||||||
|
|
||||||
|
static function get($block_id, $theme) {
|
||||||
|
$block = "";
|
||||||
|
switch ($block_id) {
|
||||||
|
case "metadata":
|
||||||
|
if ($theme->item()) {
|
||||||
|
// rWatcher Edit: Don't display on root album.
|
||||||
|
if ($theme->item->id == 1) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
// End rWatcher Edit
|
||||||
|
|
||||||
|
$block = new Block();
|
||||||
|
$block->css_id = "g-metadata";
|
||||||
|
|
||||||
|
// rWatcher Edit: Add Movie Info Option
|
||||||
|
//$block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info");
|
||||||
|
$block_title = "";
|
||||||
|
if ($theme->item->is_album()) {
|
||||||
|
$block_title = t("Album Info");
|
||||||
|
} else if ($theme->item->is_movie()) {
|
||||||
|
$block_title = t("Movie Info");
|
||||||
|
} else {
|
||||||
|
$block_title = t("Photo Info");
|
||||||
|
}
|
||||||
|
$block->title = $block_title;
|
||||||
|
// End rWatcher Edit
|
||||||
|
|
||||||
|
// rWatcher Edit: File Name change.
|
||||||
|
$block->content = new View("rwinfo_block.html");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $block;
|
||||||
|
}
|
||||||
|
}
|
@ -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 rwinfo_installer {
|
|
||||||
static function install() {
|
|
||||||
module::set_version("rwinfo", 1);
|
|
||||||
}
|
|
||||||
}
|
|
@ -18,28 +18,6 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
class rwinfo_theme_Core {
|
class rwinfo_theme_Core {
|
||||||
static function sidebar_blocks($theme) {
|
|
||||||
if ($theme->item()) {
|
|
||||||
if ($theme->item->id == 1) {
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
$block = new Block();
|
|
||||||
$block->css_id = "g-metadata";
|
|
||||||
$block_title = "";
|
|
||||||
if ($theme->item->is_album()) {
|
|
||||||
$block_title = t("Album Info");
|
|
||||||
} else if ($theme->item->is_movie()) {
|
|
||||||
$block_title = t("Movie Info");
|
|
||||||
} else {
|
|
||||||
$block_title = t("Photo Info");
|
|
||||||
}
|
|
||||||
$block->title = $block_title;
|
|
||||||
$block->content = new View("rwinfo_block.html");
|
|
||||||
return $block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static function thumb_info($theme, $item) {
|
static function thumb_info($theme, $item) {
|
||||||
$results = "";
|
$results = "";
|
||||||
if ($item->view_count) {
|
if ($item->view_count) {
|
||||||
@ -48,6 +26,7 @@ class rwinfo_theme_Core {
|
|||||||
$results .= "</li>";
|
$results .= "</li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rWatcher Edit: Display Tags
|
||||||
if (module::is_active("tag")) {
|
if (module::is_active("tag")) {
|
||||||
$tagsItem = ORM::factory("tag")
|
$tagsItem = ORM::factory("tag")
|
||||||
->join("items_tags", "tags.id", "items_tags.tag_id")
|
->join("items_tags", "tags.id", "items_tags.tag_id")
|
||||||
@ -66,13 +45,16 @@ class rwinfo_theme_Core {
|
|||||||
$results .= "</li>";
|
$results .= "</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// rWatcher End Edit
|
||||||
|
|
||||||
if ($item->owner) {
|
if ($item->owner) {
|
||||||
$results .= "<li>";
|
$results .= "<li>";
|
||||||
if ($item->owner->url) {
|
if ($item->owner->url) {
|
||||||
$results .= t("By: %owner_name", array("owner_name" => "<a href=\"{$item->owner->url}\">{$item->owner->full_name}</a>"));
|
$results .= t("By: <a href=\"%owner_url\">%owner_name</a>",
|
||||||
|
array("owner_name" => $item->owner->display_name(),
|
||||||
|
"owner_url" => $item->owner->url));
|
||||||
} else {
|
} else {
|
||||||
$results .= t("By: %owner_name", array("owner_name" => "{$item->owner->full_name}"));
|
$results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name()));
|
||||||
}
|
}
|
||||||
$results .= "</li>";
|
$results .= "</li>";
|
||||||
}
|
}
|
||||||
|
@ -9,27 +9,27 @@
|
|||||||
<?= html::clean($item->owner->display_name()) ?>
|
<?= html::clean($item->owner->display_name()) ?>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
</li>
|
</li>
|
||||||
|
<? endif ?>
|
||||||
|
|
||||||
<? if ($item->is_album()): ?>
|
<? if ($item->is_album()): ?>
|
||||||
<li>
|
<li>
|
||||||
<strong class="caption"><?= t("Date:") ?></strong>
|
<strong class="caption"><?= t("Date:") ?></strong>
|
||||||
<?= date("F j, Y", $item->created)?>
|
<?= date("F j, Y", $item->created)?>
|
||||||
</li>
|
</li>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
<? if ($item->captured): ?>
|
||||||
|
<li>
|
||||||
|
<strong class="caption"><?= t("Date:") ?></strong>
|
||||||
|
<?= date("F j, Y h:i:s a", $item->captured)?>
|
||||||
|
</li>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
|
||||||
|
|
||||||
<? if (!$item->is_album()): ?>
|
<? if (!$item->is_album()): ?>
|
||||||
<li>
|
<li>
|
||||||
<strong class="caption"><?= t("File name:") ?></strong>
|
<strong class="caption"><?= t("File name:") ?></strong>
|
||||||
<?= html::clean($item->name) ?>
|
<?= html::clean($item->name) ?>
|
||||||
</li>
|
</li>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if ($item->captured): ?>
|
|
||||||
<li>
|
|
||||||
<strong class="caption"><?= t("Date:") ?></strong>
|
|
||||||
<?= date("F j, Y h:i:s a", $item->captured)?>
|
|
||||||
</li>
|
|
||||||
<? endif ?>
|
|
||||||
|
|
||||||
<? if (module::is_active("tag")): ?>
|
<? if (module::is_active("tag")): ?>
|
||||||
<?
|
<?
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
name = TagFaces
|
name = "TagFaces"
|
||||||
description = Assign tags and notes to a region of a photo.
|
description = "Assign tags and notes to a region of a photo."
|
||||||
version = 2
|
version = 2
|
||||||
|
@ -111,7 +111,7 @@ class Admin_TagsMap_Controller extends Admin_Controller {
|
|||||||
private function _get_tagsgpsedit_form($tag_id) {
|
private function _get_tagsgpsedit_form($tag_id) {
|
||||||
// Make a new form for editing GPS data associated with a tag ($tag_id).
|
// Make a new form for editing GPS data associated with a tag ($tag_id).
|
||||||
$form = new Forge("admin/tagsmap/savegps", "", "post",
|
$form = new Forge("admin/tagsmap/savegps", "", "post",
|
||||||
array("id" => "g-tags-mapAdminForm"));
|
array("id" => "g-tags-map-admin-form"));
|
||||||
|
|
||||||
// Add a few input boxes for GPS and Description
|
// Add a few input boxes for GPS and Description
|
||||||
$tagsgps_group = $form->group("TagsMapGPS");
|
$tagsgps_group = $form->group("TagsMapGPS");
|
||||||
@ -181,7 +181,7 @@ class Admin_TagsMap_Controller extends Admin_Controller {
|
|||||||
private function _get_googlemaps_form() {
|
private function _get_googlemaps_form() {
|
||||||
// Make a new form for inputing information associated with google maps.
|
// Make a new form for inputing information associated with google maps.
|
||||||
$form = new Forge("admin/tagsmap/savemapprefs", "", "post",
|
$form = new Forge("admin/tagsmap/savemapprefs", "", "post",
|
||||||
array("id" => "g-tags-mapAdminForm"));
|
array("id" => "g-tags-map-admin-form"));
|
||||||
|
|
||||||
// Input box for the Maps API Key
|
// Input box for the Maps API Key
|
||||||
$googlemap_group = $form->group("GoogleMapsKey");
|
$googlemap_group = $form->group("GoogleMapsKey");
|
||||||
|
@ -41,7 +41,8 @@ class TagsMap_Controller extends Controller {
|
|||||||
|
|
||||||
print $view;
|
print $view;
|
||||||
} else {
|
} else {
|
||||||
$template = new Theme_View("page.html", "Contact");
|
$template = new Theme_View("page.html", "TagsMap");
|
||||||
|
$template->page_title = t("Gallery :: Map");
|
||||||
$template->content = new View("tagsmap_googlemap.html");
|
$template->content = new View("tagsmap_googlemap.html");
|
||||||
|
|
||||||
// Load in module preferences.
|
// Load in module preferences.
|
||||||
|
@ -40,4 +40,28 @@ class tagsmap_event_Core {
|
|||||||
->label(t("TagsMap Settings"))
|
->label(t("TagsMap Settings"))
|
||||||
->url(url::site("admin/tagsmap")));
|
->url(url::site("admin/tagsmap")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function photo_menu($menu, $theme) {
|
||||||
|
$menu->append(Menu::factory("link")
|
||||||
|
->id("tagsmap")
|
||||||
|
->label(t("View Map"))
|
||||||
|
->url(url::site("tagsmap/googlemap/"))
|
||||||
|
->css_id("g-tagsmap-link"));
|
||||||
|
}
|
||||||
|
|
||||||
|
static function movie_menu($menu, $theme) {
|
||||||
|
$menu->append(Menu::factory("link")
|
||||||
|
->id("tagsmap")
|
||||||
|
->label(t("View Map"))
|
||||||
|
->url(url::site("tagsmap/googlemap/"))
|
||||||
|
->css_id("g-tagsmap-link"));
|
||||||
|
}
|
||||||
|
|
||||||
|
static function album_menu($menu, $theme) {
|
||||||
|
$menu->append(Menu::factory("link")
|
||||||
|
->id("tagsmap")
|
||||||
|
->label(t("View Map"))
|
||||||
|
->url(url::site("tagsmap/googlemap/"))
|
||||||
|
->css_id("g-tagsmap-link"));
|
||||||
|
}
|
||||||
}
|
}
|
@ -43,5 +43,6 @@ class tagsmap_installer {
|
|||||||
// Delete the GPS table before uninstalling.
|
// Delete the GPS table before uninstalling.
|
||||||
$db = Database::instance();
|
$db = Database::instance();
|
||||||
$db->query("DROP TABLE IF EXISTS {tags_gpses};");
|
$db->query("DROP TABLE IF EXISTS {tags_gpses};");
|
||||||
|
module::delete("tagsmap");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,20 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
class tagsmap_theme_Core {
|
class tagsmap_theme_Core {
|
||||||
|
|
||||||
static function sidebar_blocks($theme) {
|
static function head($theme) {
|
||||||
// Display a link to the map in the Gallery sidebar
|
$theme->css("tagsmap_menu.css");
|
||||||
|
|
||||||
// Make sure the current page belongs to an item.
|
|
||||||
if (!$theme->item()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a new block to display the link in.
|
|
||||||
$block = new Block();
|
|
||||||
$block->css_id = "g-tags-map";
|
|
||||||
$block->title = t("Map:");
|
|
||||||
$block->content = new View("tagsmap_block.html");
|
|
||||||
|
|
||||||
return $block;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
name = TagsMap
|
name = "TagsMap"
|
||||||
description = Assign GPS coordinates to existing tags and display them on a map.
|
description = "Assign GPS coordinates to existing tags and display them on a map."
|
||||||
version = 1
|
version = 1
|
@ -1,5 +1,5 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
<div id="g-tags-mapDeleteAdmin">
|
<div id="g-tags-map-delete-admin">
|
||||||
<h2> <?= t("Delete GPS Data For Tag ") . $tag_name . "?" ?> </h2>
|
<h2> <?= t("Delete GPS Data For Tag ") . $tag_name . "?" ?> </h2>
|
||||||
<?= t("Are you sure you wish to delete all GPS data associated with this tag?") ?> <br/><br/>
|
<?= t("Are you sure you wish to delete all GPS data associated with this tag?") ?> <br/><br/>
|
||||||
<a href="<?= url::site("admin/tagsmap/delete_gps/" . $tag_id) ?>">Delete</a>
|
<a href="<?= url::site("admin/tagsmap/delete_gps/" . $tag_id) ?>">Delete</a>
|
||||||
|
@ -1,6 +1,58 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
<div id="g-tags-mapEditAdmin">
|
<div id="g-tags-map-edit-admin">
|
||||||
<h2> <?= t("Edit GPS Data for Tag ") . $tag_name ?> </h2>
|
<h2> <?= t("Edit GPS Data for Tag ") . $tag_name ?> </h2>
|
||||||
|
<div ID="map" STYLE="width: 800px; height: 400px"></div>
|
||||||
|
<div id="g-tags-map-instructions"><?=t("Double-Click on the map to create a new marker."); ?><br />
|
||||||
|
<?=t("Drag and drop the marker to move it to a new location."); ?><br />
|
||||||
|
</div>
|
||||||
<?= $tagsmapedit_form ?>
|
<?= $tagsmapedit_form ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="http://www.google.com/jsapi?key=<?= module::get_var("tagsmap", "googlemap_api_key") ?>" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
google.load("maps", "2.160");
|
||||||
|
var lat = document.getElementById("gps_latitude").value;
|
||||||
|
var lon = document.getElementById("gps_longitude").value;
|
||||||
|
|
||||||
|
var map;
|
||||||
|
|
||||||
|
function Gload() {
|
||||||
|
if (GBrowserIsCompatible()) {
|
||||||
|
map = new GMap2(document.getElementById("map"));
|
||||||
|
map.addMapType(G_PHYSICAL_MAP);
|
||||||
|
map.setMapType(G_PHYSICAL_MAP);
|
||||||
|
map.enableScrollWheelZoom();
|
||||||
|
map.setCenter(new GLatLng(<?=module::get_var("tagsmap", "googlemap_latitude"); ?>, <?=module::get_var("tagsmap", "googlemap_longitude"); ?>));
|
||||||
|
map.setZoom(<?=module::get_var("tagsmap", "googlemap_zoom"); ?>);
|
||||||
|
map.addControl(new GSmallMapControl()); // affiche le curseur de zoom
|
||||||
|
map.addControl(new GMapTypeControl()); // affiche le curseur de déplacement
|
||||||
|
map.addControl(new GScaleControl()); // affiche lechelle
|
||||||
|
|
||||||
|
GEvent.addListener(map,"dblclick",function(overlay, latlng) {
|
||||||
|
document.getElementById("gps_longitude").value = latlng.x;
|
||||||
|
document.getElementById("gps_latitude").value = latlng.y;
|
||||||
|
var markeri = new GMarker(latlng, {draggable: true});
|
||||||
|
map.addOverlay(markeri);
|
||||||
|
GEvent.addListener(markeri, "dragend", function(point){
|
||||||
|
document.getElementById("gps_longitude").value = point.x;
|
||||||
|
document.getElementById("gps_latitude").value = point.y;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lon != '' && lat != ''){
|
||||||
|
var point = new GLatLng(lat,lon);
|
||||||
|
map.setCenter(point, 8);
|
||||||
|
var marker = new GMarker(point, {draggable: true});
|
||||||
|
map.addOverlay(marker);
|
||||||
|
GEvent.addListener(marker, "dragend", function(point){
|
||||||
|
document.getElementById("gps_longitude").value = point.x;
|
||||||
|
document.getElementById("gps_latitude").value = point.y;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
google.setOnLoadCallback(Gload);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
||||||
<ul id="g-tags-map">
|
|
||||||
<li>
|
|
||||||
<a href="<?= url::site("tagsmap/googlemap") ?>">
|
|
||||||
<?= t("Show Map") ?></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
@ -3,7 +3,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
<title>Gallery: Map</title>
|
<title><?= t("Gallery :: Map") ?></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
@ -20,6 +20,7 @@
|
|||||||
map.addMapType(G_SATELLITE_3D_MAP);
|
map.addMapType(G_SATELLITE_3D_MAP);
|
||||||
var mapControl = new GMapTypeControl();
|
var mapControl = new GMapTypeControl();
|
||||||
map.addControl(mapControl);
|
map.addControl(mapControl);
|
||||||
|
map.enableScrollWheelZoom();
|
||||||
|
|
||||||
// Set map defaults.
|
// Set map defaults.
|
||||||
map.setCenter(new GLatLng(<?=$google_map_latitude ?>,
|
map.setCenter(new GLatLng(<?=$google_map_latitude ?>,
|
||||||
|
Reference in New Issue
Block a user