1
0

Fixed quotes probelems and remove | around "modules | exif"

This commit is contained in:
3nids 2009-10-27 14:28:08 +01:00
parent 0aafd218ee
commit d14ad6324c
5 changed files with 50 additions and 21 deletions

View File

@ -165,18 +165,12 @@
function _preload_neighbor_images() {
if ((opts.itemArray.length -1) > opts.itemCurrent) {
var href = opts.itemArray[opts.itemCurrent + 1].href;
if (href.match(imageRegExp)) {
$("<img>").attr("src", href);
}
$("<iframe>").attr("src", href);
}
if (opts.itemCurrent > 0) {
var href = opts.itemArray[opts.itemCurrent -1].href;
if (href.match(imageRegExp)) {
$("<img>").attr("src", href);
}
$("<iframe>").attr("src", href);
}
};
@ -363,22 +357,23 @@
$('#fancy_modules').hide();
$('#fancy_title').hide();
var modules = opts.itemArray[ opts.itemCurrent ].modules;
var modtxt = '|';
var modtxt = '';
var pex = modules.search('exif::');
if (pex != -1){
var exifsrc = modules.substring(pex+6);
var exifsrc = exifsrc.split(';;',1);
modtxt += " <a href=\"" + exifsrc + "\" class=\"modclass\">EXIF</a> |";
modtxt += " <a href=\"" + exifsrc + "\" class=\"modclass\">EXIF</a>";
}
var pco = modules.search('comment::');
if (pco != -1){
if (modtxt != ''){modtxt += ' | ';}
var commentsrc = modules.substring(pco+9);
var commentsrc = commentsrc.split(';;',1);
var commentcount = modules.substring(modules.search('comment_count::')+15);
var commentcount = commentcount.split(';;',1);
modtxt += " <a href=\"" + commentsrc + "\" class=\"iframe modclass\">Comments (" + commentcount + ")</a> |";
modtxt += " <a href=\"" + commentsrc + "\" class=\"iframe modclass\">Comments (" + commentcount + ")</a>";
}
if (modtxt != '|'){
if (modtxt != ''){
$('#fancy_modules div').html(modtxt);
$('#fancy_modules').show();
$(document).ready(function() { $(".modclass").modbox(); });

View File

@ -1 +1 @@
Added adim configuration for item description and image size.
Fixed quotes probelems and remove | around "modules | exif"

View File

@ -0,0 +1,39 @@
<?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;
}
}
?>

View File

@ -91,12 +91,7 @@ var map;
<? //$tagitems = $oneGPS->tagitems(); ?>
<? $html_thumb = "<div id=\"g-map-div-$counter\" class=\"g-map-thumb-link\"></div><div class=\"g-map-thumb-img\"><table class=\"g-map-thumb-table\"><tr>";
$tagitems = ORM::factory("item")
->viewable()
->join("items_tags", "items.id", "items_tags.item_id")
->where("items_tags.tag_id", $oneGPS->tag_id)
->orderby("items.name", "DESC")
->find_all();
$tagitems = tagsmap::tagitems($oneGPS);
foreach ($tagitems as $tagchild){
$html_thumb .= "<td class=\"g-map-thumb-td\"><a href=\"" . $tagchild->url() . "\" onMouseOver=\"ThumbLink('g-map-div-$counter','" . html::purify($tagchild->title) . "')\" onMouseOut=\"ThumbLink('g-map-div-$counter','')\"><img src=\"" . $tagchild->thumb_url() . "\" class=\"gMapThumbnail\"></a></td>";
}

View File

@ -45,9 +45,9 @@ class theme_3nids_Core {
if(count($tags) && $desriptionMode == "tags"){
$description = " || " . implode(", ", $tags);
}elseif($desriptionMode == "item" && $item->description != ""){
$description = " || " . $item->description;
$description = " || " . str_replace("\"","&quot;",$item->description);
}elseif (($desriptionMode == "parent" || $desriptionMode == "item") && $item->parent()->description != ""){
$description = " || " . $item->parent()->description;
$description = " || " . str_replace("\"","&quot;",$item->parent()->description);
}
$rel = "";