Merge branch 'master' of git@github.com:gallery/gallery3-contrib
This commit is contained in:
commit
99a4fdfb1d
@ -1,54 +1,54 @@
|
||||
/* 3nids specific */
|
||||
.g-movie {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.g-map-head img {
|
||||
display: block;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.g-map-head a {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.g-comment-thumb{
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.g-fancy-iframe-body{
|
||||
background-color: #333333;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#mod_frame{
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.g-comment-box {
|
||||
border-bottom: 1px solid #555;
|
||||
}
|
||||
|
||||
.g-comment-box:hover{
|
||||
background-color: black;
|
||||
color: #ffffcc;
|
||||
}
|
||||
|
||||
#g-comment-detail {
|
||||
width: 360px;
|
||||
height: 100%;
|
||||
background-color: #333333;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.g-block-content .g-parent-album h4 span {
|
||||
background: transparent url('../images/ico-album.png') no-repeat top left;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
/* 3nids specific */
|
||||
.g-movie {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.g-map-head img {
|
||||
display: block;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.g-map-head a {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.g-comment-thumb{
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.g-fancy-iframe-body{
|
||||
background-color: #333333;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#mod_frame{
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.g-comment-box {
|
||||
border-bottom: 1px solid #555;
|
||||
}
|
||||
|
||||
.g-comment-box:hover{
|
||||
background-color: black;
|
||||
color: #ffffcc;
|
||||
}
|
||||
|
||||
#g-comment-detail {
|
||||
width: 360px;
|
||||
height: 100%;
|
||||
background-color: #333333;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.g-block-content .g-parent-album h4 span {
|
||||
background: transparent url('../images/ico-album.png') no-repeat top left;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
|
1314
themes/3nids_theme/3nids/css/jquery.fancybox.css
vendored
1314
themes/3nids_theme/3nids/css/jquery.fancybox.css
vendored
File diff suppressed because it is too large
Load Diff
@ -1,38 +1,38 @@
|
||||
This is a theme for gallery3.
|
||||
It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher).
|
||||
|
||||
*********
|
||||
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.
|
||||
|
||||
*********
|
||||
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.
|
||||
|
||||
*********
|
||||
Configuration:
|
||||
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.
|
||||
|
||||
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.
|
||||
If you want to remove the prefix in the tag cloud sidebar, wou will have to update in gallery3/modules/tag/helpers/tag.php the popular_tags function:
|
||||
static function popular_tags($count) {
|
||||
return ORM::factory("tag")
|
||||
->orderby("count", "DESC")
|
||||
->notregex("name","map\.")
|
||||
->limit($count)
|
||||
->find_all();
|
||||
}
|
||||
This is a theme for gallery3.
|
||||
It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher).
|
||||
|
||||
*********
|
||||
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.
|
||||
|
||||
*********
|
||||
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.
|
||||
|
||||
*********
|
||||
Configuration:
|
||||
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.
|
||||
|
||||
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.
|
||||
If you want to remove the prefix in the tag cloud sidebar, wou will have to update in gallery3/modules/tag/helpers/tag.php the popular_tags function:
|
||||
static function popular_tags($count) {
|
||||
return ORM::factory("tag")
|
||||
->orderby("count", "DESC")
|
||||
->notregex("name","map\.")
|
||||
->limit($count)
|
||||
->find_all();
|
||||
}
|
||||
|
@ -1,97 +1,97 @@
|
||||
.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;
|
||||
}
|
||||
.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 +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;
|
||||
}
|
||||
}
|
||||
|
||||
<?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,24 +1,24 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
||||
<?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");
|
||||
}
|
||||
}
|
||||
|
@ -1,38 +1,38 @@
|
||||
<?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 Movie_3nids_Controller extends REST_Controller {
|
||||
protected $resource_type = "movie_3nids";
|
||||
|
||||
|
||||
/**
|
||||
* Display comments based on criteria.
|
||||
* @see REST_Controller::_index()
|
||||
*/
|
||||
public function show($item_id) {
|
||||
$item = ORM::factory("item", $item_id);
|
||||
access::required("view", $item);
|
||||
|
||||
$view = new Theme_View("movie_3nids.html", "page");
|
||||
$view->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;
|
||||
}
|
||||
<?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 Movie_3nids_Controller extends REST_Controller {
|
||||
protected $resource_type = "movie_3nids";
|
||||
|
||||
|
||||
/**
|
||||
* Display comments based on criteria.
|
||||
* @see REST_Controller::_index()
|
||||
*/
|
||||
public function show($item_id) {
|
||||
$item = ORM::factory("item", $item_id);
|
||||
access::required("view", $item);
|
||||
|
||||
$view = new Theme_View("movie_3nids.html", "page");
|
||||
$view->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;
|
||||
}
|
||||
}
|
@ -1,43 +1,43 @@
|
||||
<?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 Photo_3nids_Controller extends REST_Controller {
|
||||
protected $resource_type = "photo_3nids";
|
||||
|
||||
|
||||
/**
|
||||
* Display comments based on criteria.
|
||||
* @see REST_Controller::_index()
|
||||
*/
|
||||
public function show($item_id) {
|
||||
$item = ORM::factory("item", $item_id);
|
||||
access::required("view", $item);
|
||||
|
||||
$view = new Theme_View("photo_3nids.html", "page");
|
||||
$view->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;
|
||||
}
|
||||
<?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 Photo_3nids_Controller extends REST_Controller {
|
||||
protected $resource_type = "photo_3nids";
|
||||
|
||||
|
||||
/**
|
||||
* Display comments based on criteria.
|
||||
* @see REST_Controller::_index()
|
||||
*/
|
||||
public function show($item_id) {
|
||||
$item = ORM::factory("item", $item_id);
|
||||
access::required("view", $item);
|
||||
|
||||
$view = new Theme_View("photo_3nids.html", "page");
|
||||
$view->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;
|
||||
}
|
||||
}
|
@ -1,101 +1,101 @@
|
||||
<?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 theme_3nids_Core {
|
||||
|
||||
public function fancylink($item, $viewtype="album", $groupImg = true, $displayComment = true, $parentTitleClass = "h2") {
|
||||
//viewtype = album || dynamic || header
|
||||
$link = "";
|
||||
access::required("view", $item);
|
||||
|
||||
$photo_size = module::get_var("theme_3nids","photo_size");
|
||||
if ($photo_size == "full"){
|
||||
$width = $item->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 .= "<a href=\"" . url::site("photo_3nids/show/{$item->id}") ."/?w=" . $width . "xewx&h=" . $height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $title . $description ."\" name=\"" . $fancymodule . " \">";
|
||||
}else{
|
||||
$link .= "<a href=\"" . url::site("movie_3nids/show/{$item->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 .= "<a href=\"" . $item->url() . "\">";
|
||||
}
|
||||
|
||||
if($viewtype != "header"){
|
||||
$link .= $item->thumb_img(array("class" => "g-thumbnail")) . "</a>";
|
||||
if( $item->is_album() && $viewtype == "album" ){
|
||||
$link .= "<a href=\"" . $item->url() . "?show=" . $item->id . "\"><$parentTitleClass><span></span>" . html::clean($item->title) . "</$parentTitleClass></a>";
|
||||
} elseif ( !($item->is_album()) && $viewtype == "dynamic") {
|
||||
$link .= "<a href=\"" . $item->parent()->url() . "?show=" . $item->id . "\" class=\"g-parent-album\"><$parentTitleClass><span></span>" . html::clean($item->parent()->title) . "</$parentTitleClass></a>";
|
||||
}
|
||||
|
||||
if (($item->is_photo() || $item->is_movie()) && $displayComment==true && module::is_active("comment") && module::is_active("theme_3nids")) {
|
||||
$link .= "<ul class=\"g-metadata\"><li><a href=\"" . url::site("comments_3nids?item_id={$item->id}") ."\" class=\"iframe fancyclass g-hidden\">" . comment_3nids::count($item) . " " . t("comments") . "</a></li></ul>";
|
||||
}
|
||||
}else{
|
||||
$link .= "</a>";
|
||||
}
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
<?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 theme_3nids_Core {
|
||||
|
||||
public function fancylink($item, $viewtype="album", $groupImg = true, $displayComment = true, $parentTitleClass = "h2") {
|
||||
//viewtype = album || dynamic || header
|
||||
$link = "";
|
||||
access::required("view", $item);
|
||||
|
||||
$photo_size = module::get_var("theme_3nids","photo_size");
|
||||
if ($photo_size == "full"){
|
||||
$width = $item->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 .= "<a href=\"" . url::site("photo_3nids/show/{$item->id}") ."/?w=" . $width . "xewx&h=" . $height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $title . $description ."\" name=\"" . $fancymodule . " \">";
|
||||
}else{
|
||||
$link .= "<a href=\"" . url::site("movie_3nids/show/{$item->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 .= "<a href=\"" . $item->url() . "\">";
|
||||
}
|
||||
|
||||
if($viewtype != "header"){
|
||||
$link .= $item->thumb_img(array("class" => "g-thumbnail")) . "</a>";
|
||||
if( $item->is_album() && $viewtype == "album" ){
|
||||
$link .= "<a href=\"" . $item->url() . "?show=" . $item->id . "\"><$parentTitleClass><span></span>" . html::clean($item->title) . "</$parentTitleClass></a>";
|
||||
} elseif ( !($item->is_album()) && $viewtype == "dynamic") {
|
||||
$link .= "<a href=\"" . $item->parent()->url() . "?show=" . $item->id . "\" class=\"g-parent-album\"><$parentTitleClass><span></span>" . html::clean($item->parent()->title) . "</$parentTitleClass></a>";
|
||||
}
|
||||
|
||||
if (($item->is_photo() || $item->is_movie()) && $displayComment==true && module::is_active("comment") && module::is_active("theme_3nids")) {
|
||||
$link .= "<ul class=\"g-metadata\"><li><a href=\"" . url::site("comments_3nids?item_id={$item->id}") ."\" class=\"iframe fancyclass g-hidden\">" . comment_3nids::count($item) . " " . t("comments") . "</a></li></ul>";
|
||||
}
|
||||
}else{
|
||||
$link .= "</a>";
|
||||
}
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -1,26 +1,26 @@
|
||||
<?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 theme_3nids_theme {
|
||||
|
||||
static function credits($theme) {
|
||||
return "<a href=\"http://codex.gallery2.org/Gallery3:Themes:3nids\">3nids theme</a>";
|
||||
}
|
||||
|
||||
}
|
||||
<?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 theme_3nids_theme {
|
||||
|
||||
static function credits($theme) {
|
||||
return "<a href=\"http://codex.gallery2.org/Gallery3:Themes:3nids\">3nids theme</a>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user