2009-09-09 18:50:04 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.");
|
|
|
|
/**
|
|
|
|
* Gallery - a web based photo album viewer and editor
|
2011-01-22 07:12:44 +00:00
|
|
|
* Copyright (C) 2000-2011 Bharat Mediratta
|
2009-09-09 18:50:04 +00:00
|
|
|
*
|
|
|
|
* 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_theme_Core {
|
|
|
|
static function thumb_info($theme, $item) {
|
|
|
|
$results = "";
|
|
|
|
if ($item->view_count) {
|
|
|
|
$results .= "<li>";
|
|
|
|
$results .= t("Views: %view_count", array("view_count" => $item->view_count));
|
|
|
|
$results .= "</li>";
|
|
|
|
}
|
|
|
|
|
2011-01-28 15:53:57 +00:00
|
|
|
// rWatcher Edit: Display Tags on Thumbnails
|
2009-09-09 18:50:04 +00:00
|
|
|
if (module::is_active("tag")) {
|
2009-12-24 09:47:00 +00:00
|
|
|
$tags = ORM::factory("tag")
|
2009-09-09 18:50:04 +00:00
|
|
|
->join("items_tags", "tags.id", "items_tags.tag_id")
|
2009-12-23 05:31:03 +00:00
|
|
|
->where("items_tags.item_id", "=", $item->id)
|
2009-09-09 18:50:04 +00:00
|
|
|
->find_all();
|
2009-12-24 09:47:00 +00:00
|
|
|
if (count($tags) > 0) {
|
2009-09-09 18:50:04 +00:00
|
|
|
$results .= "<li>";
|
|
|
|
$results .= t("Tags:") . " ";
|
2009-12-24 09:47:00 +00:00
|
|
|
$anchors = array();
|
|
|
|
foreach ($tags as $tag) {
|
2010-01-21 01:49:23 +00:00
|
|
|
$anchors[] = "<a href=" . $tag->url() . ">" . html::clean($tag->name) . "</a>";
|
2009-09-09 18:50:04 +00:00
|
|
|
}
|
2009-12-24 09:47:00 +00:00
|
|
|
$results .= join(", ", $anchors) . "</li>";
|
2009-09-09 18:50:04 +00:00
|
|
|
}
|
|
|
|
}
|
2009-10-14 23:28:38 +00:00
|
|
|
// rWatcher End Edit
|
2009-09-09 18:50:04 +00:00
|
|
|
|
|
|
|
if ($item->owner) {
|
|
|
|
$results .= "<li>";
|
|
|
|
if ($item->owner->url) {
|
2009-10-14 23:28:38 +00:00
|
|
|
$results .= t("By: <a href=\"%owner_url\">%owner_name</a>",
|
|
|
|
array("owner_name" => $item->owner->display_name(),
|
|
|
|
"owner_url" => $item->owner->url));
|
2009-09-09 18:50:04 +00:00
|
|
|
} else {
|
2009-10-14 23:28:38 +00:00
|
|
|
$results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name()));
|
2009-09-09 18:50:04 +00:00
|
|
|
}
|
|
|
|
$results .= "</li>";
|
|
|
|
}
|
|
|
|
return $results;
|
|
|
|
}
|
|
|
|
}
|