1
0

Added 3nids theme

This commit is contained in:
3nids 2009-09-23 08:43:11 +02:00
parent 7574c96946
commit 6382eadceb
104 changed files with 6470 additions and 0 deletions

View File

@ -0,0 +1,37 @@
/**
* Fix display in IE 6, 7
*/
#gBanner,
.gBreadcrumbs,
#gAlbumGrid,
#gPager,
#gViewMenu {
zoom: 1;
}
#gBanner {
z-index: 2;
}
input.submit {
clear: none !important;
display: inline !important;
}
#gAddTagForm input.textbox {
width: 110px;
}
#gDialog a.gCancel {
display: inline-block !important;
float: none !important;
}
.gPager .txtright {
width: 29%;
}
.gPager .ui-icon-right {
width: 60px;
}

673
themes/3nids/3nids/css/jquery.fancybox.css vendored Executable file
View File

@ -0,0 +1,673 @@
html, body {
height: 100%;
}
div#fancy_overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
display: none;
z-index: 30;
}
* html div#fancy_overlay {
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}
div#fancy_wrap {
text-align: middle;
}
div#fancy_loading {
position: absolute;
height: 40px;
width: 40px;
cursor: pointer;
display: none;
overflow: hidden;
background: transparent;
z-index: 100;
}
div#fancy_loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background: transparent url('../images/fancy_progress.png') no-repeat;
}
div#fancy_loading_overlay {
position: absolute;
background-color: #FFF;
z-index: 30;
}
div#fancy_loading_icon {
position: absolute;
background: url('../images/fancy_loading.gif') no-repeat;
z-index: 35;
width: 16px;
height: 16px;
}
div#fancy_outer {
position: absolute;
top: 0;
left: 0;
z-index: 90;
padding: 18px 18px 20px 0px;
margin: 0;
overflow: hidden;
background: transparent;
display: none;
}
div#fancy_inner {
position: relative;
width:100%;
height:100%;
border: 1px solid #BBB;
background: #FFF;
}
div#fancy_content {
margin: 0;
z-index: 100;
position: absolute;
}
div#fancy_div {
background: #000;
color: #FFF;
height: 100%;
width: 100%;
z-index: 100;
}
img#fancy_img {
position: absolute;
top: 0;
left: 0;
border:0;
padding: 0;
margin: 0;
z-index: 100;
width: 100%;
height: 100%;
}
div#fancy_close {
position: absolute;
top: -12px;
right: -15px;
height: 30px;
width: 30px;
background: url('../images/fancy_closebox.png') top left no-repeat;
cursor: pointer;
z-index: 181;
display: none;
}
#fancy_frame {
position: relative;
width: 100%;
height: 100%;
display: none;
}
#fancy_ajax {
width: 100%;
height: 100%;
overflow: auto;
}
a#fancy_left, a#fancy_right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
z-index: 111;
display: none;
background-image: url(data:image/gif;base64,AAAA);
outline: none;
}
a#fancy_left {
left: 0px;
}
a#fancy_right {
right: 0px;
}
span.fancy_ico {
position: absolute;
top: 50%;
margin-top: -15px;
width: 30px;
height: 30px;
z-index: 112;
cursor: pointer;
display: block;
}
span#fancy_left_ico {
left: -9999px;
background: transparent url('../images/fancy_left.png') no-repeat;
}
span#fancy_right_ico {
right: -9999px;
background: transparent url('../images/fancy_right.png') no-repeat;
}
a#fancy_left:hover {
visibility: visible;
}
a#fancy_right:hover {
visibility: visible;
}
a#fancy_left:hover span {
left: 20px;
}
a#fancy_right:hover span {
right: 20px;
}
.fancy_bigIframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
}
div#fancy_bg {
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
z-index: 70;
border: 0;
padding: 0;
margin: 0;
}
div.fancy_bg {
position: absolute;
display: block;
z-index: 70;
border: 0;
padding: 0;
margin: 0;
}
div.fancy_bg_n {
top: -18px;
width: 100%;
height: 18px;
background: transparent url('../images/fancy_shadow_n.png') repeat-x;
}
div.fancy_bg_ne {
top: -18px;
right: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_ne.png') no-repeat;
}
div.fancy_bg_e {
right: -13px;
height: 100%;
width: 13px;
background: transparent url('../images/fancy_shadow_e.png') repeat-y;
}
div.fancy_bg_se {
bottom: -18px;
right: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_se.png') no-repeat;
}
div.fancy_bg_s {
bottom: -18px;
width: 100%;
height: 18px;
background: transparent url('../images/fancy_shadow_s.png') repeat-x;
}
div.fancy_bg_sw {
bottom: -18px;
left: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_sw.png') no-repeat;
}
div.fancy_bg_w {
left: -13px;
height: 100%;
width: 13px;
background: transparent url('../images/fancy_shadow_w.png') repeat-y;
}
div.fancy_bg_nw {
top: -18px;
left: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_nw.png') no-repeat;
}
div#fancy_title {
position: absolute;
bottom: -20px;
left: 0;
z-index: 100;
display: none;
}
div#fancy_title div {
color: #FFF;
font: bold 10px Arial;
padding-bottom: 3px;
}
div#fancy_title table {
margin: 0 auto;
}
div#fancy_title table td {
padding: 0;
vertical-align: middle;
}
td#fancy_title_left {
height: 32px;
width: 15px;
background: transparent url('../images/fancy_title_left.png') repeat-x;
}
td#fancy_title_main {
height: 32px;
background: transparent url('../images/fancy_title_main.png') repeat-x;
}
td#fancy_title_right {
height: 32px;
width: 15px;
background: transparent url('../images/fancy_title_right.png') repeat-x;
}
div#fancy_modules {
position: absolute;
bottom: -20px;
right: 0px;
z-index: 100;
display: none;
}
div#fancy_modules div {
color: #FFF;
font: bold 10px Arial;
padding-bottom: 3px;
}
div#fancy_modules table {
margin: 0 auto;
}
div#fancy_modules table td {
padding: 0;
vertical-align: middle;
}
td#fancy_modules_left {
border-color: #333333;
height: 32px;
width: 15px;
background: transparent url('../images/fancy_title_left.png') repeat-x;
}
td#fancy_modules_main {
border-color: #333333;
height: 32px;
background: transparent url('../images/fancy_title_main.png') repeat-x;
}
td#fancy_modules_right {
border-color: #333333;
height: 32px;
width: 15px;
background: transparent url('../images/fancy_title_right.png') repeat-x;
}
/* ************************************************* */
/* ************************************************* */
/* ************************************************* */
/* ************************************************* */
div#mod_overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
display: none;
z-index: 1030;
}
* html div#mod_overlay {
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}
div#mod_wrap {
text-align: middle;
}
div#mod_loading {
position: absolute;
height: 40px;
width: 40px;
cursor: pointer;
display: none;
overflow: hidden;
background: transparent;
z-index: 10100;
}
div#mod_loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background: transparent url('../images/fancy_progress.png') no-repeat;
}
div#mod_loading_overlay {
position: absolute;
background-color: #FFF;
z-index: 1030;
}
div#mod_loading_icon {
position: absolute;
background: url('../images/fancy_loading.gif') no-repeat;
z-index: 1035;
width: 16px;
height: 16px;
}
div#mod_outer {
position: absolute;
top: 0;
left: 0;
z-index: 1090;
padding: 18px 18px 20px 0px;
margin: 0;
overflow: hidden;
background: transparent;
display: none;
}
div#mod_inner {
position: relative;
width:100%;
height:100%;
border: 1px solid #BBB;
background: #FFF;
}
div#mod_content {
margin: 0;
z-index: 10100;
position: absolute;
}
div#mod_div {
background: #000;
color: #FFF;
height: 100%;
width: 100%;
z-index: 10100;
}
img#mod_img {
position: absolute;
top: 0;
left: 0;
border:0;
padding: 0;
margin: 0;
z-index: 10100;
width: 100%;
height: 100%;
}
div#mod_close {
position: absolute;
top: -12px;
right: -15px;
height: 30px;
width: 30px;
background: url('../images/fancy_closebox.png') top left no-repeat;
cursor: pointer;
z-index: 10181;
display: none;
}
#mod_frame {
position: relative;
width: 100%;
height: 100%;
display: none;
}
#mod_ajax {
width: 100%;
height: 100%;
overflow: auto;
}
a#mod_left, a#mod_right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
z-index: 10111;
display: none;
background-image: url(data:image/gif;base64,AAAA);
outline: none;
}
a#mod_left {
left: 0px;
}
a#mod_right {
right: 0px;
}
span.mod_ico {
position: absolute;
top: 50%;
margin-top: -15px;
width: 30px;
height: 30px;
z-index: 10112;
cursor: pointer;
display: block;
}
span#mod_left_ico {
left: -9999px;
background: transparent url('../images/fancy_left.png') no-repeat;
}
span#mod_right_ico {
right: -9999px;
background: transparent url('../images/fancy_right.png') no-repeat;
}
a#mod_left:hover {
visibility: visible;
}
a#mod_right:hover {
visibility: visible;
}
a#mod_left:hover span {
left: 20px;
}
a#mod_right:hover span {
right: 20px;
}
.mod_bigIframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
}
div#mod_bg {
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
z-index: 1070;
border: 0;
padding: 0;
margin: 0;
}
div.mod_bg {
position: absolute;
display: block;
z-index: 1070;
border: 0;
padding: 0;
margin: 0;
}
div.mod_bg_n {
top: -18px;
width: 100%;
height: 18px;
background: transparent url('../images/fancy_shadow_n.png') repeat-x;
}
div.mod_bg_ne {
top: -18px;
right: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_ne.png') no-repeat;
}
div.mod_bg_e {
right: -13px;
height: 100%;
width: 13px;
background: transparent url('../images/fancy_shadow_e.png') repeat-y;
}
div.mod_bg_se {
bottom: -18px;
right: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_se.png') no-repeat;
}
div.mod_bg_s {
bottom: -18px;
width: 100%;
height: 18px;
background: transparent url('../images/fancy_shadow_s.png') repeat-x;
}
div.mod_bg_sw {
bottom: -18px;
left: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_sw.png') no-repeat;
}
div.mod_bg_w {
left: -13px;
height: 100%;
width: 13px;
background: transparent url('../images/fancy_shadow_w.png') repeat-y;
}
div.mod_bg_nw {
top: -18px;
left: -13px;
width: 13px;
height: 18px;
background: transparent url('../images/fancy_shadow_nw.png') no-repeat;
}
div#mod_title {
position: absolute;
bottom: -20px;
left: 0;
z-index: 10100;
display: none;
}
div#mod_title div {
color: #FFF;
font: bold 10px Arial;
padding-bottom: 3px;
}
div#mod_title table {
margin: 0 auto;
}
div#mod_title table td {
padding: 0;
vertical-align: middle;
}
td#mod_title_left {
height: 32px;
width: 15px;
background: transparent url('../images/fancy_title_left.png') repeat-x;
}
td#mod_title_main {
height: 32px;
background: transparent url('../images/fancy_title_main.png') repeat-x;
}
td#mod_title_right {
height: 32px;
width: 15px;
background: transparent url('../images/fancy_title_right.png') repeat-x;
}

1167
themes/3nids/3nids/css/screen.css Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

BIN
themes/3nids/3nids/images/map.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,205 @@
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
//alert(jQuery.easing.default);
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});
/*
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

1104
themes/3nids/3nids/js/jquery.fancybox.js vendored Executable file

File diff suppressed because it is too large Load Diff

139
themes/3nids/3nids/js/ui.init.js Executable file
View File

@ -0,0 +1,139 @@
/**
* Initialize jQuery UI and Gallery Plugin elements
*/
var short_forms = new Array(
"#gQuickSearchForm",
"#gAddTagForm",
"#gSearchForm"
);
$(document).ready(function() {
$(".fancyclass").fancybox();
// Initialize Superfish menus
$("ul.gMenu").addClass("sf-menu");
$('ul.sf-menu').superfish({
delay: 500,
animation: {
opacity:'show',
height:'show'
},
speed: 'fast'
});
$("#gSiteMenu").css("display", "block");
// Initialize status message effects
$("#gMessage li").gallery_show_message();
// Initialize dialogs
$("#gLoginLink").addClass("gDialogLink");
$(".gDialogLink").gallery_dialog();
// Initialize view menu
if ($("#gViewMenu").length) {
$("#gViewMenu ul").removeClass("gMenu").removeClass("sf-menu");
$("#gViewMenu a").addClass("ui-icon");
}
// Initialize short forms
for (var i in short_forms) {
short_form_init(short_forms[i]);
$(short_forms[i]).addClass("gShortForm");
}
$(".gShortForm input[type=text]").addClass("ui-corner-left");
$(".gShortForm input[type=submit]").addClass("ui-state-default ui-corner-right");
// Apply jQuery UI button css to submit inputs
$("input[type=submit]:not(.gShortForm input)").addClass("ui-state-default ui-corner-all");
// Apply styles and icon classes to gContextMenu
if ($(".gContextMenu").length) {
$(".gContextMenu li").addClass("ui-state-default");
$(".gContextMenu a").addClass("gButtonLink ui-icon-left");
$(".gContextMenu a").prepend("<span class=\"ui-icon\"></span>");
$(".gContextMenu a span").each(function() {
var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString();
$(this).addClass(iconClass);
});
}
// Album view only
if ($("#gAlbumGrid").length) {
// Vertical align thumbnails/metadata in album grid
$(".gItem").gallery_valign();
// Initialize context menus
$(".gItem").hover(
function(){
// Insert invisible placeholder to hold the item's position in the grid
var placeHolder = $(this).clone();
$(placeHolder).attr("id", "gPlaceHolder");
$(placeHolder).css("visibility", "hidden");
$(this).after($(placeHolder));
// Style and position the item
$(this).addClass("gHoverItem");
var position = $(this).position();
$(this).css("position", "absolute");
$(this).css("top", position.top);
$(this).css("left", position.left);
$(this).css("z-index", "1000");
// Initialize the contextual menu
$(this).gallery_context_menu();
// Set height based on height of descendents
var title = $(this).find("h2");
var meta = $(this).find(".gMetadata");
var context_label = $(this).find(".gContextMenu li:first");
var item_ht = $(this).height();
var title_ht = $(title).gallery_height();
var meta_ht = $(meta).gallery_height();
var context_label_ht = $(context_label).gallery_height();
$(this).height(item_ht + title_ht + meta_ht + context_label_ht);
$(".fancyclass").fancybox();
},
function() {
// Reset item height, position, and z-index
if ($(this).next().height()) {
var sib_height = $(this).next().height();
} else {
var sib_height = $(this).prev().height();
}
if ($.browser.msie && $.browser.version >= 8) {
sib_height = sib_height + 1;
}
$(this).css("height", sib_height);
$(this).css("position", "relative");
$(this).css("top", null);
$(this).css("left", null);
$(this).css("z-index", 1);
// Remove the placeholder and hover class from the item
$("#gPlaceHolder").remove();
$(this).removeClass("gHoverItem");
$(".fancyclass").fancybox();
}
);
}
// Photo/Item item view
if ($("#gItem").length) {
// Ensure the resized image fits within its container
$("#gItem").gallery_fit_photo();
// Initialize context menus
var resize = $("#gItem").gallery_get_photo();
$(resize).hover(function(){
$(this).gallery_context_menu();
});
// Add scroll effect for links to named anchors
$.localScroll({
queue: true,
duration: 1000,
hash: true
});
}
// Initialize button hover effect
$.fn.gallery_hover_init();
});

6
themes/3nids/3nids/theme.info Executable file
View File

@ -0,0 +1,6 @@
name = "3nids theme"
description = "Default theme modified using jquery lightbox slideshow."
version = 1
author = "3nids"
site = 1
admin = 0

BIN
themes/3nids/3nids/thumbnail.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

View File

@ -0,0 +1,70 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? // @todo Set hover on AlbumGrid list items for guest users ?>
<div id="gInfo">
<?= $theme->album_top() ?>
<h1><?= html::purify($item->title) ?></h1>
<div class="gDescription"><?= nl2br(html::purify($item->description)) ?></div>
</div>
<? $children_all = $item->viewable()->children();
$theme->pagination = new Pagination();
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
<ul id="gAlbumGrid">
<? if (count($children)): ?>
<? for($i=0;$i<$children_offset;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>"></a>
<? endif ?>
<? endfor ?>
<? foreach ($children as $i => $child): ?>
<? $item_class = "gPhoto"; ?>
<? if ($child->is_album()): ?>
<? $item_class = "gAlbum"; ?>
<? endif ?>
<li id="gItemId-<?= $child->id ?>" class="gItem <?= $item_class ?>">
<?= $theme->thumb_top($child) ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>">
<?= $child->thumb_img(array("class" => "gThumbnail")) ?></a>
<? if ($user->admin): ?>
<br><a href="<?=$child->url()?>">view/edit</a>
<? endif ?>
<? else: ?>
<a href="<?= $child->url() ?>">
<?= $child->thumb_img(array("class" => "gThumbnail")) ?>
<h2><span></span><?= html::clean($child->title) ?></h2>
</a>
<? endif ?>
<?= $theme->thumb_bottom($child) ?>
<?= $theme->context_menu($child, "#gItemId-{$child->id} .gThumbnail") ?>
</li>
<? endforeach ?>
<? for($i=$children_offset+$page_size;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>"></a>
<? endif ?>
<? endfor ?>
<? else: ?>
<? if ($user->admin || access::can("add", $item)): ?>
<? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?>
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"gDialogLink\""))) ?></li>
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
<? endif; ?>
</ul>
<?= $theme->album_bottom() ?>
<?= $theme->pager() ?>

View File

@ -0,0 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if ($anchor): ?>
<a name="<?= $anchor ?>"></a>
<? endif ?>
<div id="<?= $css_id ?>" class="gBlock">
<h2><?= $title ?></h2>
<div class="gBlockContent">
<?= $content ?>
</div>
</div>

View File

@ -0,0 +1,56 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?php defined("SYSPATH") or die("No direct script access.") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<?= $theme->css("yui/reset-fonts-grids.css") ?>
<?= $theme->css("superfish/css/superfish.css") ?>
<?= $theme->css("themeroller/ui.base.css") ?>
<?= $theme->css("screen.css") ?>
<?= $theme->script("jquery.js") ?>
<?= $theme->script("jquery.form.js") ?>
<?= $theme->script("jquery-ui.js") ?>
<?= $theme->script("gallery.common.js") ?>
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
<script type="text/javascript">
var MSG_CANCEL = <?= t('Cancel')->for_js() ?>;
</script>
<?= $theme->script("gallery.ajax.js") ?>
<?= $theme->script("gallery.dialog.js") ?>
<?= $theme->script("gallery.form.js") ?>
<?= $theme->script("superfish/js/superfish.js") ?>
<?= $theme->script("jquery.localscroll.js") ?>
<?= $theme->script("jquery.easing.js") ?>
<?= $theme->script("jquery.fancybox.js") ?>
<?= $theme->script("ui.init.js") ?>
<?= $theme->head() ?>
</head>
<body class="modcontent">
<a href="<?= url::site("form/add/comments_3nids/{$item_id}") ?>" id="gAddCommentButton"
class="gButtonLink ui-corner-all ui-icon-left ui-state-default right">
<span class="ui-icon ui-icon-comment"></span>
<?= t("Add a comment") ?>
</a>
<div id="gCommentDetail">
<? if (!$comments->count()): ?>
<p id="gNoCommentsYet">
<?= t("No comments yet.") ?>
</p>
<? endif ?>
<ul>
<? foreach ($comments as $comment): ?>
<li id="gComment-<?= $comment->id ?>" class="gCommentBox">
<?= t('%date, <b>%name</b>: ',
array("date" => date(module::get_var("gallery", "date_time_format", "Y-M-d H:i:s"), $comment->created),
"name" => html::clean($comment->author_name()))); ?>
<div class="gComment">
<?= nl2br(html::purify($comment->text)) ?>
</div>
</li>
<? endforeach ?>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="gAlbumHeader">
<div id="gAlbumHeaderButtons">
<?= $theme->dynamic_top() ?>
</div>
<h1><?= html::clean($title) ?></h1>
</div>
<? $children_all = $tag->items();
$theme->pagination = new Pagination();
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
<ul id="gAlbumGrid">
<? for($i=0;$i<$children_offset;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>"></a>
<? endif ?>
<? endfor ?>
<? foreach ($children as $i => $child): ?>
<!--<li class="gItem <?= $child->is_album() ? "gAlbum" : "" ?>">!-->
<li id="gItemId-<?= $child->id ?>" class="gItem gAlbum">
<?= $theme->thumb_top($child) ?>
<? if (!($child->is_album())): ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>">
<? else: ?>
<a href="<?= $child->url() ?>">
<? endif ?>
<img id="gPhotoId-<?= $child->id ?>" class="gThumbnail"
alt="photo" src="<?= $child->thumb_url() ?>"
width="<?= $child->thumb_width ?>"
height="<?= $child->thumb_height ?>" />
</a>
<a href="<?= $child->parent()->url() ?>?show=<?= $child->id?>"><h2><span></span><?= $child->parent()->title ?></h2></a>
<? if ($user->admin): ?>
<a href="<?=$child->url()?>">view</a>
<? endif ?>
<? else: ?>
<a href="<?= $child->url() ?>">
<img id="gPhotoId-<?= $child->id ?>" class="gThumbnail"
alt="photo" src="<?= $child->thumb_url() ?>"
width="<?= $child->thumb_width ?>"
height="<?= $child->thumb_height ?>" />
<h2><span></span><?= html::clean($child->title) ?></h2>
</a>
<? endif ?>
<?= $theme->thumb_bottom($child) ?>
<?= $theme->context_menu($child, "#gItemId-{$child->id} .gThumbnail") ?>
</li>
<? endforeach ?>
<? for($i=$children_offset+$page_size;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>"></a>
<? endif ?>
<? endfor ?>
</ul>
<?= $theme->dynamic_bottom() ?>
<?= $theme->pager() ?>

View File

@ -0,0 +1,44 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#gExifData { width: 100%; height: 100%; }
.gOdd {background-color: #484848; color: #e8e8e8; height:35px; padding:5px; font-family:arial; font-size: 10px;}
.gEven {background-color: #333333; color: #e8e8e8; height:35px; padding:5px; font-family:arial; font-size: 10px;}
.gExifInfoTable { width: 100%; height: 100%; background-color: #e8e8e8; border-spacing: 1px; text-align: left;}
</style>
</head>
<body>
<div id="gExifData">
<center>
<table class="gExifInfoTable">
<tbody>
<? for ($i = 0; $i < count($details); $i++): ?>
<tr>
<td class="gEven">
<?= $details[$i]["caption"] ?>
</td>
<td class="gOdd">
<?= html::clean($details[$i]["value"]) ?>
</td>
<? if (!empty($details[++$i])): ?>
<td class="gEven">
<?= $details[$i]["caption"] ?>
</td>
<td class="gOdd">
<?= html::clean($details[$i]["value"]) ?>
</td>
<? else: ?>
<td class="gEven"></td><td class="gOdd"></td>
<? endif ?>
</tr>
<? endfor ?>
</tbody>
</table>
</center>
</div>
</body>
</html>

View File

@ -0,0 +1,16 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$item->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$item->id}") . ";;comment_count::" . comment_3nids::count($item) . ";;" ;} ?>
<div class="gImageBlock">
<a href="<?= $item->file_url() ?>" class="fancyclass" title="<?= $item->parent()->title ?>, <?=$item->parent()->description?>" name="<?=$fancymodule?>">
<?= $item->thumb_img(array("class" => "gThumbnail")) ?>
</a>
<div class="gParentAlbum">
<a href="<?= $item->parent()->url() ?>?show=<?= $item->id?>"><h4><span></span><?= $item->parent()->title ?></h4></a>
</div>
</div>

View File

@ -0,0 +1,37 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="gItem">
<?= $theme->photo_top() ?>
<? /*
<ul class="gPager">
<li>
<? if ($previous_item): ?>
<a href="<?= $previous_item->url() ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a>
<? else: ?>
<a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a>
<? endif; ?>
</li>
<li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li>
<li class="txtright">
<? if ($next_item): ?>
<a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a>
<? else: ?>
<a class="gButtonLink ui-icon-right ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a>
<? endif ?>
</li>
</ul>
*/ ?>
<?= $item->movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?>
<div id="gInfo">
<h1><?= html::purify($item->title) ?></h1>
<div><?= nl2br(html::purify($item->description)) ?></div>
</div>
<?= $theme->context_menu($item, "#gMovieId-{$item->id}") ?>
</div>

View File

@ -0,0 +1,171 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>
<? if ($page_title): ?>
<?= $page_title ?>
<? else: ?>
<? if ($theme->item()): ?>
<? if ($theme->item()->is_album()): ?>
<?= t("Gallery :: %album_title", array("album_title" => $theme->item()->title)) ?>
<? elseif ($theme->item()->is_photo()): ?>
<?= t("Gallery :: %photo_title", array("photo_title" => $theme->item()->title)) ?>
<? else: ?>
<?= t("Gallery :: %movie_title", array("movie_title" => $theme->item()->title)) ?>
<? endif ?>
<? elseif ($theme->tag()): ?>
<?= t("Gallery Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?>
<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
<?= t("Gallery") ?>
<? endif ?>
<? endif ?>
</title>
<link rel="shortcut icon" href="<?= url::file("lib/images/favicon.ico") ?>" type="image/x-icon" />
<?= $theme->css("yui/reset-fonts-grids.css") ?>
<?= $theme->css("superfish/css/superfish.css") ?>
<?= $theme->css("themeroller/ui.base.css") ?>
<?= $theme->css("screen.css") ?>
<?= $theme->css("jquery.fancybox.css") ?>
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
<? if ($theme->page_type == 'album'): ?>
<? if ($thumb_proportion != 1): ?>
<? $new_width = $thumb_proportion * 180 ?>
<? $new_height = $thumb_proportion * 180 ?>
<style type="text/css">
#gContent #gAlbumGrid .gItem {
width: <?= $new_width ?>px;
height: <?= $new_height ?>px;
/* <?= $thumb_proportion ?> */
}
</style>
<? endif ?>
<? endif ?>
<?= $theme->script("jquery.js") ?>
<?= $theme->script("jquery.form.js") ?>
<?= $theme->script("jquery-ui.js") ?>
<?= $theme->script("gallery.common.js") ?>
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
<script type="text/javascript">
var MSG_CANCEL = <?= t('Cancel')->for_js() ?>;
</script>
<?= $theme->script("gallery.ajax.js") ?>
<?= $theme->script("gallery.dialog.js") ?>
<?= $theme->script("gallery.form.js") ?>
<?= $theme->script("superfish/js/superfish.js") ?>
<?= $theme->script("jquery.localscroll.js") ?>
<?= $theme->script("jquery.easing.js") ?>
<?= $theme->script("jquery.fancybox.js") ?>
<?= $theme->script("ui.init.js") ?>
<? /* These are page specific, but if we put them before $theme->head() they get combined */ ?>
<? if ($theme->page_type == "photo"): ?>
<?= $theme->script("jquery.scrollTo.js") ?>
<?= $theme->script("gallery.show_full_size.js") ?>
<? elseif ($theme->page_type == "movie"): ?>
<?= $theme->script("flowplayer.js") ?>
<? endif ?>
<?= $theme->head() ?>
</head>
<body <?= $theme->body_attributes() ?>>
<?= $theme->page_top() ?>
<div id="doc4" class="yui-t5 gView">
<?= $theme->site_status() ?>
<div id="gHeader">
<div id="gBanner">
<?= $theme->header_top() ?>
<? if ($header_text = module::get_var("gallery", "header_text")): ?>
<?= $header_text ?>
<? else: ?>
<a id="gLogo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>">
<img src="<?= url::file("lib/images/logo.png") ?>" />
</a>
<? endif ?>
<div id="gSiteMenu">
<? if ($user->admin): ?>
<?= $theme->site_menu() ?>
<? endif ?>
</div>
<?= $theme->header_bottom() ?>
</div>
<? if (!empty($parents)): ?>
<ul class="gBreadcrumbs">
<? foreach ($parents as $parent): ?>
<li>
<!-- Adding ?show=<id> causes Gallery3 to display the page
containing that photo. For now, we just do it for
the immediate parent so that when you go back up a
level you're on the right page. -->
<a href="<?= $parent->url($parent == $theme->item()->parent() ?
"show={$theme->item()->id}" : null) ?>">
<?= html::purify($parent->title) ?>
</a>
</li>
<? endforeach ?>
<li class="active"><?= html::purify($theme->item()->title) ?></li>
</ul>
<? elseif ($theme->tag()): ?>
<ul class="gBreadcrumbs">
<li>
<a href="<?= url::site() ?>">
<?= t("Gallery") ?>
</a>
</li>
<li class="active"><?= html::purify($theme->tag()->name) ?></li>
</ul>
<? else: ?>
<ul class="gBreadcrumbs">
<li>
<a href="<?= url::site() ?>">
<?= t("Gallery") ?>
</a>
</li>
</ul>
<? endif ?>
<? if (module::is_active("tagsmap")): ?>
<ul class="gHeadMap">
<a href="<?= url::site("tagsmap/googlemap") ?>"><img src="<?= $theme->url("images/map.png") ?>"></a>
</ul>
<? endif ?>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div id="gContent" class="yui-g">
<?= $theme->messages() ?>
<?= $content ?>
</div>
</div>
</div>
<div id="gSidebar" class="yui-b">
<? if ($theme->page_type != "login"): ?>
<?= new View("sidebar.html") ?>
<? endif ?>
</div>
</div>
<div id="gFooter">
<?= $theme->footer() ?>
<? if ($footer_text = module::get_var("gallery", "footer_text")): ?>
<?= $footer_text ?>
<? endif ?>
<? if (module::get_var("gallery", "show_credits")): ?>
<ul id="gCredits">
<?= $theme->credits() ?>
</ul>
<? endif ?>
</div>
</div>
<?= $theme->page_bottom() ?>
</body>
</html>

View File

@ -0,0 +1,43 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? // See http://docs.kohanaphp.com/libraries/pagination ?>
<ul class="gPager">
<? /* @todo This message isn't easily localizable */
$from_to_msg = t2("%current_page / %total_pages",
"%current_page / %total_pages",
$total_items,
array("total_pages" => $total_pages,
"current_page" => $current_page)) ?>
<li>
<? if ($first_page): ?>
<a href="<?= str_replace('{page}', 1, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-first"></span><?= t("first") ?></a>
<? else: ?>
<a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-seek-first"></span><?= t("first") ?></a>
<? endif ?>
<? if ($previous_page): ?>
<a href="<?= str_replace('{page}', $previous_page, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a>
<? else: ?>
<a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a>
<? endif ?>
</li>
<li class="gInfo"><?= $from_to_msg ?></li>
<li class="txtright">
<? if ($next_page): ?>
<a href="<?= str_replace('{page}', $next_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a>
<? else: ?>
<a class="gButtonLink ui-state-disabled ui-icon-right ui-corner-all">
<span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a>
<? endif ?>
<? if ($last_page): ?>
<a href="<?= str_replace('{page}', $last_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-end"></span><?= t("last") ?></a>
<? else: ?>
<a class="gButtonLink ui-state-disabled ui-icon-right ui-corner-all">
<span class="ui-icon ui-icon-seek-end"></span><?= t("last") ?></a>
<? endif ?>
</li>
</ul>

View File

@ -0,0 +1,57 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if (access::can("view_full", $theme->item())): ?>
<!-- Use javascript to show the full size as an overlay on the current page -->
<script>
$(document).ready(function() {
$(".gFullSizeLink").click(function() {
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>");
return false;
});
});
</script>
<? endif ?>
<div id="gItem">
<?= $theme->photo_top() ?>
<ul class="gPager">
<li>
<? if ($previous_item): ?>
<a href="<?= $previous_item->url() ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a>
<? else: ?>
<a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a>
<? endif; ?>
</li>
<li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li>
<li class="txtright">
<? if ($next_item): ?>
<a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a>
<? else: ?>
<a class="gButtonLink ui-icon-right ui-state-disabled ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a>
<? endif ?>
</li>
</ul>
<div id="gPhoto">
<?= $theme->resize_top($item) ?>
<? if (access::can("view_full", $item)): ?>
<a href="<?= $item->file_url() ?>" class="gFullSizeLink" title="<?= t("View full size")->for_html_attr() ?>">
<? endif ?>
<?= $item->resize_img(array("id" => "gPhotoId-{$item->id}", "class" => "gResize")) ?>
<? if (access::can("view_full", $item)): ?>
</a>
<? endif ?>
<?= $theme->resize_bottom($item) ?>
<?= $theme->context_menu($item, "#gPhotoId-{$item->id}") ?>
</div>
<div id="gInfo">
<h1><?= html::purify($item->title) ?></h1>
<div><?= nl2br(html::purify($item->description)) ?></div>
</div>
</div>

View File

@ -0,0 +1,75 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? // @todo Set hover on AlbumGrid list items ?>
<? list($children_count_true, $children_all) = search::search($q,1000,0);
$theme->pagination = new Pagination();
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count_true,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
<div id="gSearchResults">
<h2><?= t("Results for <b>%term</b>", array("term" => $q)) ?></h2>
<? if (count($items)): ?>
<ul id="gAlbumGrid">
<? for($i=0;$i<$children_offset;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>"></a>
<? endif ?>
<? endfor ?>
<? foreach ($items as $item): ?>
<li id="gItemId-<?= $item->id ?>" class="gItem gAlbum">
<?= $theme->thumb_top($item) ?>
<? if (!($item->is_album())): ?>
<? if ($item->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$item->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$item->id}") . ";;comment_count::" . comment_3nids::count($item) . ";;" ;} ?>
<a href="<?=$item->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $item->parent()->title ?>, <?=$item->parent()->description?>" name="<?=$fancymodule ?>">
<? else: ?>
<a href="<?= $item->url() ?>">
<? endif ?>
<img id="gPhotoId-<?= $item->id ?>" class="gThumbnail"
alt="photo" src="<?= $item->thumb_url() ?>"
width="<?= $item->thumb_width ?>"
height="<?= $item->thumb_height ?>" />
</a>
<a href="<?= $item->parent()->url() ?>?show=<?= $item->id?>"><h2><span></span><?= $item->parent()->title ?></h2></a>
<? if ($user->admin): ?>
<a href="<?=$item->url()?>">view</a>
<? endif ?>
<? else: ?>
<a href="<?= $item->url() ?>">
<img id="gPhotoId-<?= $item->id ?>" class="gThumbnail"
alt="photo" src="<?= $item->thumb_url() ?>"
width="<?= $item->thumb_width ?>"
height="<?= $item->thumb_height ?>" />
<h2><span></span><?= html::clean($item->title) ?></h2>
</a>
<? endif ?>
<?= $theme->thumb_bottom($item) ?>
<?= $theme->context_menu($item, "#gItemId-{$item->id} .gThumbnail") ?>
</li>
<? endforeach ?>
<? for($i=$children_offset+$page_size;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$child->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("comment_3nids")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$child->id}") . ";;comment_count::" . comment_3nids::count($child) . ";;" ;} ?>
<a href="<?=$child->file_url()?>" rel="fancygroup" class="fancyclass" title="<?= $child->parent()->title ?>, <?=$child->parent()->description?>" name="<?=$fancymodule ?>"></a>
<? endif ?>
<? endfor ?>
</ul>
<?= $theme->pager() ?>
<? else: ?>
<p>
<?= t("No results found for <b>%term</b>", array("term" => $q)) ?>
</p>
<? endif; ?>
</div>

View File

@ -0,0 +1,16 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= $theme->sidebar_top() ?>
<div class="gToolbar">
<div id="gViewMenu" class="gButtonSet">
<? if ($page_type == "album"):?>
<?= $theme->album_menu() ?>
<? elseif ($page_type == "photo") : ?>
<?= $theme->photo_menu() ?>
<? elseif ($page_type == "tag") : ?>
<?= $theme->tag_menu() ?>
<? endif ?>
</div>
</div>
<?= $theme->sidebar_blocks() ?>
<?= $theme->sidebar_bottom() ?>

34
themes/3nids/README Executable file
View File

@ -0,0 +1,34 @@
This is a theme for gallery3.
It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher).
This theme has been made by someone who do not really master php, so things are not coded very well.
It has been modified from default theme for my own purpose only so some modules may not be usable for the moment.
*********
Demo @ http://gallery.3nids.ch
*********
Requirements:
- Gallery 3 last experimental version @ http://github.com/gallery/gallery3
- Tag module activated (if want to use tagsmap)
- Comment and Comments for 3nids themes modules activated (if you want to use comments)
*********
Installation:
1. Copy the theme folder (3nids) into gallery3/themes directory.
2. Copy lib folder into gallery3 directory (it changes the themeroller).
3. Copy modules folder into gallery3 directory.
It includes tagsmap module and some modifications into gallery and tag modules.
For tag and gallery module, some readme files briefly discribe what has been modified.
The tagsmap module and the comments for 3nids theme need to be activated in the admin page.
*********
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. If you want to separate geotag from others, name those with the "map." prefix. Hence, they will not be shown in the tag cloud sidebare (the "map." prefix will not be displayed on the map).
*********
Upgrade:
if you upgrade your gallery, the core modifications will be erased, so you will have to modify these again. readme files will help you.
However, the theme will still work but the geotag distinction will not be made anymore and some small modifications like ordering tags items by date.

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -0,0 +1,406 @@
/*
* jQuery UI CSS Framework
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&bgColorDefault=333333&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=484848&bgTextureHeader=01_flat.png&bgImgOpacityHeader=100&borderColorHeader=e8e8e8&fcHeader=e8e8e8&iconColorHeader=f9bd01&bgColorContent=333333&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=e8e8e8&fcContent=e8e8e8&iconColorContent=f9db01&bgColorDefault=333333&bgTextureDefault=01_flat.png&bgImgOpacityDefault=100&borderColorDefault=f9db01&fcDefault=FFFFCC&iconColorDefault=f9db01&bgColorHover=000000&bgTextureHover=01_flat.png&bgImgOpacityHover=100&borderColorHover=f9db01&fcHover=e8e8e8&iconColorHover=f9db01&bgColorActive=333333&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=100&borderColorActive=e8e8e8&fcActive=e8e8e8&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=333333&fcHighlight=333333&iconColorHighlight=333333&bgColorError=b30000&bgTextureError=01_flat.png&bgImgOpacityError=100&borderColorError=f9db01&fcError=f9db01&iconColorError=f9db01&bgColorOverlay=484848&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=100&bgColorShadow=333333&bgTextureShadow=01_flat.png&bgImgOpacityShadow=100&opacityShadow=50&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #e8e8e8; background: #333333 url(images/ui-bg_flat_100_333333_40x100.png) 50% 50% repeat-x; color: #e8e8e8; }
.ui-widget-content a { color: #e8e8e8; }
.ui-widget-header { border: 1px solid #e8e8e8; background: #484848 url(images/ui-bg_flat_100_484848_40x100.png) 50% 50% repeat-x; color: #e8e8e8; font-weight: bold; }
.ui-widget-header a { color: #e8e8e8; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #f9db01; background: #333333 url(images/ui-bg_flat_100_333333_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #FFFFCC; outline: none; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #FFFFCC; text-decoration: none; outline: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #f9db01; background: #000000 url(images/ui-bg_flat_100_000000_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #e8e8e8; outline: none; }
.ui-state-hover a, .ui-state-hover a:hover { color: #e8e8e8; text-decoration: none; outline: none; }
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #e8e8e8; background: #333333 url(images/ui-bg_highlight-hard_100_333333_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #e8e8e8; outline: none; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #e8e8e8; outline: none; text-decoration: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #333333; background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x; color: #333333; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #333333; }
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #f9db01; background: #b30000 url(images/ui-bg_flat_100_b30000_40x100.png) 50% 50% repeat-x; color: #f9db01; }
.ui-state-error a, .ui-widget-content .ui-state-error a { color: #f9db01; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #f9db01; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_f9db01_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_f9db01_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_f9db01_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_f9db01_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_f9db01_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; }
.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; }
/* Overlays */
.ui-widget-overlay { background: #484848 url(images/ui-bg_flat_0_484848_40x100.png) 50% 50% repeat-x; opacity: 100;filter:Alpha(Opacity=100); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #333333 url(images/ui-bg_flat_100_333333_40x100.png) 50% 50% repeat-x; opacity: .50;filter:Alpha(Opacity=50); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion
----------------------------------*/
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
----------------------------------*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/* Dialog
----------------------------------*/
.ui-dialog { position: relative; padding: .2em; width: 300px; }
.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/* Progressbar
----------------------------------*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
----------------------------------*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
----------------------------------*/
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
----------------------------------*/
.ui-tabs { padding: .2em; zoom: 1; }
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }

View File

@ -0,0 +1,191 @@
<?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 Comments_3nids_Controller extends REST_Controller {
protected $resource_type = "comment";
/**
* Display comments based on criteria.
* @see REST_Controller::_index()
*/
public function _index() {
$item_id = $this->input->get('item_id');
$item = ORM::factory("item", $item_id);
access::required("view", $item);
$comments = ORM::factory("comment")
->where("item_id", $item->id)
->where("state", "published")
->orderby("created", "ASC")
->find_all();
switch (rest::output_format()) {
case "json":
foreach ($comments as $comment) {
$data[] = array(
"id" => $comment->id,
"author_name" => html::clean($comment->author_name()),
"created" => $comment->created,
"text" => nl2br(html::purify($comment->text)));
}
print json_encode($data);
break;
case "html":
$view = new Theme_View("comments.html", "page");
$view->comments = $comments;
$view->item_id = $item_id;
print $view;
break;
}
}
/**
* Add a new comment to the collection.
* @see REST_Controller::_create($resource)
*/
public function _create($comment) {
$item = ORM::factory("item", $this->input->post("item_id"));
access::required("view", $item);
$form = comment_3nids::get_add_form($item);
$valid = $form->validate();
if ($valid) {
if (user::active()->guest && !$form->add_comment->inputs["name"]->value) {
$form->add_comment->inputs["name"]->add_error("missing", 1);
$valid = false;
}
if (!$form->add_comment->text->value) {
$form->add_comment->text->add_error("missing", 1);
$valid = false;
}
}
if ($valid) {
$comment = comment::create(
$item, user::active(),
$form->add_comment->text->value,
$form->add_comment->inputs["name"]->value,
$form->add_comment->email->value,
$form->add_comment->url->value);
$active = user::active();
if ($active->guest) {
$form->add_comment->inputs["name"]->value("");
$form->add_comment->email->value("");
$form->add_comment->url->value("");
} else {
$form->add_comment->inputs["name"]->value($active->full_name);
$form->add_comment->email->value($active->email);
$form->add_comment->url->value($active->url);
}
}
url::redirect(url::site("comments_3nids?item_id=".$item->id));
}
/**
* Display an existing comment.
* @todo Set proper Content-Type in a central place (REST_Controller::dispatch?).
* @see REST_Controller::_show($resource)
*/
public function _show($comment) {
$item = ORM::factory("item", $comment->item_id);
access::required("view", $item);
if ($comment->state != "published") {
return;
}
if (rest::output_format() == "json") {
print json_encode(
array("result" => "success",
"data" => array(
"id" => $comment->id,
"author_name" => html::clean($comment->author_name()),
"created" => $comment->created,
"text" => nl2br(html::purify($comment->text)))));
} else {
$view = new Theme_View("comment.html", "fragment");
$view->comment = $comment;
print $view;
}
}
/**
* Change an existing comment.
* @see REST_Controller::_update($resource)
*/
public function _update($comment) {
$item = ORM::factory("item", $comment->item_id);
access::required("view", $item);
access::required("edit", $item);
$form = comment_3nids::get_edit_form($comment);
if ($form->validate()) {
$comment->guest_name = $form->edit_comment->inputs["name"]->value;
$comment->guest_email = $form->edit_comment->email->value;
$comment->url = $form->edit_comment->url->value;
$comment->text = $form->edit_comment->text->value;
$comment->save();
print json_encode(
array("result" => "success",
"resource" => url::site("comments/{$comment->id}")));
} else {
print json_encode(
array("result" => "error",
"html" => $form->__toString()));
}
}
/**
* Delete existing comment.
* @see REST_Controller::_delete($resource)
*/
public function _delete($comment) {
$item = ORM::factory("item", $comment->item_id);
access::required("view", $item);
access::required("edit", $item);
$comment->delete();
print json_encode(array("result" => "success"));
}
/**
* Present a form for adding a new comment to this item or editing an existing comment.
* @see REST_Controller::form_add($resource)
*/
public function _form_add($item_id) {
$item = ORM::factory("item", $item_id);
access::required("view", $item);
print comment_3nids::get_add_form($item);
}
/**
* Present a form for editing an existing comment.
* @see REST_Controller::form_edit($resource)
*/
public function _form_edit($comment) {
if (!user::active()->admin) {
access::forbidden();
}
print comment_3nids::get_edit_form($comment);
}
}

View File

@ -0,0 +1,128 @@
<?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 comment_3nids_Core {
public function count($item) {
access::required("view", $item);
$comments = ORM::factory("comment")
->where("item_id", $item->id)
->where("state", "published")
->orderby("created", "DESC")
->find_all();
return $comments->count();
}
/**
* Create a new comment.
* @param Item_MOdel $item the parent item
* @param User_Model $author the author User_Model
* @param string $text comment body
* @param string $guest_name guest's name (if the author is a guest user, default empty)
* @param string $guest_email guest's email (if the author is a guest user, default empty)
* @param string $guest_url guest's url (if the author is a guest user, default empty)
* @return Comment_Model
*/
static function create($item, $author, $text, $guest_name=null,
$guest_email=null, $guest_url=null) {
$comment = ORM::factory("comment");
$comment->author_id = $author->id;
$comment->guest_email = $guest_email;
$comment->guest_name = $guest_name;
$comment->guest_url = $guest_url;
$comment->item_id = $item->id;
$comment->text = $text;
$comment->state = "published";
// These values are useful for spam fighting, so save them with the comment.
$input = Input::instance();
$comment->server_http_accept = substr($input->server("HTTP_ACCEPT"), 0, 128);
$comment->server_http_accept_charset = substr($input->server("HTTP_ACCEPT_CHARSET"), 0, 64);
$comment->server_http_accept_encoding = substr($input->server("HTTP_ACCEPT_ENCODING"), 0, 64);
$comment->server_http_accept_language = substr($input->server("HTTP_ACCEPT_LANGUAGE"), 0, 64);
$comment->server_http_connection = substr($input->server("HTTP_CONNECTION"), 0, 64);
$comment->server_http_host = substr($input->server("HTTP_HOST"), 0, 64);
$comment->server_http_referer = substr($input->server("HTTP_REFERER"), 0, 255);
$comment->server_http_user_agent = substr($input->server("HTTP_USER_AGENT"), 0, 128);
$comment->server_query_string = substr($input->server("QUERY_STRING"), 0, 64);
$comment->server_remote_addr = substr($input->server("REMOTE_ADDR"), 0, 32);
$comment->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64);
$comment->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16);
$comment->save();
return $comment;
}
static function get_add_form($item) {
$form = new Forge("comments_3nids?item_id=".$item->id, "", "post", array("id" => "gAddCommentForm"));
$group = $form->group("add_comment")->label(t("Add comment"));
$group->input("name") ->label(t("Name")) ->id("gAuthor");
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
$group->textarea("text")->label(t("Comment")) ->id("gText");
$group->hidden("item_id")->value($item->id);
module::event("comment_add_form", $form);
$group->submit("")->value(t("Add")) ->class("gButtonLink ui-corner-all ui-icon-left ui-state-default");
$active = user::active();
if (!$active->guest) {
$group->inputs["name"]->value($active->full_name)->disabled("disabled");
$group->email->value($active->email)->disabled("disabled");
$group->url->value($active->url)->disabled("disabled");
} else {
$group->inputs["name"]->error_messages("missing", t("You must provide a name"));
}
$group->text->error_messages("missing", t("You must provide a comment"));
return $form;
}
static function get_edit_form($comment) {
$form = new Forge("comments/{$comment->id}?_method=put", "", "post",
array("id" => "gEditCommentForm"));
$group = $form->group("edit_comment")->label(t("Edit comment"));
$group->input("name") ->label(t("Author")) ->id("gAuthor");
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
$group->textarea("text")->label(t("Comment")) ->id("gText");
$group->submit("")->value(t("Edit"));
$group->text = $comment->text;
$author = $comment->author();
if ($author->guest) {
$group->inputs["name"]->value = $comment->guest_name;
$group->email = $comment->guest_email;
$group->url = $comment->guest_url;
} else {
$group->inputs["name"]->value($author->full_name)->disabled("disabled");
$group->email->value($author->email)->disabled("disabled");
$group->url->value($author->url)->disabled("disabled");
}
return $form;
}
}

View File

@ -0,0 +1,3 @@
name = "Comments for 3nids theme"
description = "Allows the use of comments within 3nids theme"
version = 1

View File

@ -0,0 +1,5 @@
Do not display tags beginning with "map." into tag cloud sidebar
static function popular_tags($count) {
->notregex("name","map\.")

View File

@ -0,0 +1,150 @@
<?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 tag_Core {
/**
* Associate a tag with an item. Create the tag if it doesn't already exist.
*
* @todo Write test.
*
* @param Item_Model $item an item
* @param string $tag_name a tag name
* @return Tag_Model
* @throws Exception("@todo {$tag_name} WAS_NOT_ADDED_TO {$item->id}")
*/
static function add($item, $tag_name) {
if (empty($tag_name)) {
throw new exception("@todo MISSING_TAG_NAME");
}
$tag = ORM::factory("tag")->where("name", $tag_name)->find();
if (!$tag->loaded) {
$tag->name = $tag_name;
$tag->count = 0;
$tag->save();
}
if (!$tag->has($item)) {
if (!$tag->add($item, $tag)) {
throw new Exception("@todo {$tag->name} WAS_NOT_ADDED_TO {$item->id}");
}
$tag->count++;
$tag->save();
}
return $tag;
}
/**
* Return the N most popular tags.
*
* @return ORM_Iterator of Tag_Model in descending tag count order
*/
static function popular_tags($count) {
return ORM::factory("tag")
->orderby("count", "DESC")
->notregex("name","map\.")
->limit($count)
->find_all();
}
/**
* Return a rendering of the cloud for the N most popular tags.
*
* @param integer $count the number of tags
* @return View
*/
static function cloud($count) {
$tags = tag::popular_tags($count)->as_array();
if ($tags) {
$cloud = new View("tag_cloud.html");
$cloud->max_count = $tags[0]->count;
usort($tags, array("tag_theme", "sort_by_name"));
$cloud->tags = $tags;
return $cloud;
}
}
/**
* Return all the tags for a given item.
* @return array
*/
static function item_tags($item) {
$tags = array();
foreach (Database::instance()
->select("name")
->from("tags")
->join("items_tags", "tags.id", "items_tags.tag_id", "left")
->where("items_tags.item_id", $item->id)
->get() as $row) {
$tags[] = $row->name;
}
return $tags;
}
static function get_add_form($item) {
$form = new Forge("tags", "", "post", array("id" => "gAddTagForm"));
$label = $item->is_album() ?
t("Add tag to album") :
($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie"));
$group = $form->group("add_tag")->label("Add Tag");
$group->input("name")->label($label)->rules("required");
$group->hidden("item_id")->value($item->id);
$group->submit("")->value(t("Add Tag"));
return $form;
}
static function get_rename_form($tag) {
$form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRenameTagForm"));
$group = $form->group("rename_tag")->label(t("Rename Tag"));
$group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]");
$group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name"));
$group->submit("")->value(t("Save"));
return $form;
}
static function get_delete_form($tag) {
$form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDeleteTagForm"));
$group = $form->group("delete_tag")
->label(t("Really delete tag %tag_name?", array("tag_name" => $tag->name)));
$group->submit("")->value(t("Delete Tag"));
return $form;
}
/**
* Delete all tags associated with an item
*/
static function clear_all($item) {
$db = Database::instance();
$db->query("UPDATE {tags} SET `count` = `count` - 1 WHERE `count` > 0 " .
"AND `id` IN (SELECT `tag_id` from {items_tags} WHERE `item_id` = $item->id)");
$db->delete("items_tags", array("item_id" => "$item->id"));
}
/**
* Get rid of any tags that have no associated items.
*/
static function compact() {
// @todo There's a potential race condition here which we can solve by adding a lock around
// this and all the cases where we create/update tags. I'm loathe to do that since it's an
// extremely rare case.
Database::instance() ->delete("tags", array("count" => 0));
}
}

View File

@ -0,0 +1,3 @@
order tag items by date
$model->orderby("items.captured", "DESC");
http://gallery.menalto.com/node/90247

View File

@ -0,0 +1,106 @@
<?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 Tag_Model extends ORM {
protected $has_and_belongs_to_many = array("items");
/**
* Return all viewable items associated with this tag.
* @param integer $limit number of rows to limit result to
* @param integer $offset offset in result to start returning rows from
* @param string $type the type of item (album, photo)
* @return ORM_Iterator
*/
public function items($limit=null, $offset=0, $type=null) {
$model = ORM::factory("item")
->viewable()
->join("items_tags", "items.id", "items_tags.item_id")
->where("items_tags.tag_id", $this->id);
if ($type) {
$model->where("items.type", $type);
}
$model->orderby("items.captured", "DESC");
return $model->find_all($limit, $offset);
}
/**
* Return the count of all viewable items associated with this tag.
* @param string $type the type of item (album, photo)
* @return integer
*/
public function items_count($type=null) {
$model = ORM::factory("item")
->viewable()
->join("items_tags", "items.id", "items_tags.item_id")
->where("items_tags.tag_id", $this->id);
if ($type) {
$model->where("items.type", $type);
}
return $model->count_all();
}
/**
* Overload ORM::save() to trigger an item_related_update event for all items that are related
* to this tag. Since items can be added or removed as part of the save, we need to trigger an
* event for the union of all related items before and after the save.
*/
public function save() {
$db = Database::instance();
$related_item_ids = array();
foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) {
$related_item_ids[$row->item_id] = 1;
}
$result = parent::save();
foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) {
$related_item_ids[$row->item_id] = 1;
}
if ($related_item_ids) {
foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) {
module::event("item_related_update", $item);
}
}
return $result;
}
/**
* Overload ORM::delete() to trigger an item_related_update event for all items that are
* related to this tag.
*/
public function delete() {
$related_item_ids = array();
$db = Database::Instance();
foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) {
$related_item_ids[$row->item_id] = 1;
}
$result = parent::delete();
if ($related_item_ids) {
foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) {
module::event("item_related_update", $item);
}
}
return $result;
}
}

View File

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

View File

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

View File

@ -0,0 +1,96 @@
.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;
}
.gMapThumbTable{
width:200px;
height: 80px;
font-size: 0.9em;
font-style: normal;
color: #FFFFCC;
}
.gMapThumbImg{
overflow:auto;
position: relative;
height:125px;
}
.gMapThumbLink{
height: 15px;
}
.gMapThumbTd{
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;
}

View File

@ -0,0 +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 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")));
}
}

View File

@ -0,0 +1,48 @@
<?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`))
ENGINE=InnoDB 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");
}
}

View File

@ -0,0 +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");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

View File

@ -0,0 +1,610 @@
/*
* ExtInfoWindow Class, v1.0
* Copyright (c) 2007, Joe Monahan (http://www.seejoecode.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This class lets you add an info window to the map which mimics GInfoWindow
* and allows for users to skin it via CSS. Additionally it has options to
* pull in HTML content from an ajax request, triggered when a user clicks on
* the associated marker.
*/
/**
* Creates a new ExtInfoWindow that will initialize by reading styles from css
*
* @constructor
* @param {GMarker} marker The marker associated with the info window
* @param {String} windowId The DOM Id we will use to reference the info window
* @param {String} html The HTML contents
* @param {Object} opt_opts A contianer for optional arguments:
* {String} ajaxUrl The Url to hit on the server to request some contents
* {Number} paddingX The padding size in pixels that the info window will leave on
* the left and right sides of the map when panning is involved.
* {Number} paddingY The padding size in pixels that the info window will leave on
* the top and bottom sides of the map when panning is involved.
* {Number} beakOffset The repositioning offset for when aligning the beak element.
* This is used to make sure the beak lines up correcting if the
* info window styling containers a border.
*/
function ExtInfoWindow(marker, windowId, html, opt_opts) {
this.html_ = html;
this.marker_ = marker;
this.infoWindowId_ = windowId;
this.options_ = opt_opts == null ? {} : opt_opts;
this.ajaxUrl_ = this.options_.ajaxUrl == null ? null : this.options_.ajaxUrl;
this.callback_ = this.options_.ajaxCallback == null ? null : this.options_.ajaxCallback;
this.borderSize_ = this.options_.beakOffset == null ? 0 : this.options_.beakOffset;
this.paddingX_ = this.options_.paddingX == null ? 0 + this.borderSize_ : this.options_.paddingX + this.borderSize_;
this.paddingY_ = this.options_.paddingY == null ? 0 + this.borderSize_ : this.options_.paddingY + this.borderSize_;
this.map_ = null;
this.container_ = document.createElement('div');
this.container_.style.position = 'relative';
this.container_.style.display = 'none';
this.contentDiv_ = document.createElement('div');
this.contentDiv_.id = this.infoWindowId_ + '_contents';
this.contentDiv_.innerHTML = this.html_;
this.contentDiv_.style.display = 'block';
this.contentDiv_.style.visibility = 'hidden';
this.wrapperDiv_ = document.createElement('div');
};
//use the GOverlay class
ExtInfoWindow.prototype = new GOverlay();
/**
* Called by GMap2's addOverlay method. Creates the wrapping div for our info window and adds
* it to the relevant map pane. Also binds mousedown event to a private function so that they
* are not passed to the underlying map. Finally, performs ajax request if set up to use ajax
* in the constructor.
* @param {GMap2} map The map that has had this extInfoWindow is added to it.
*/
ExtInfoWindow.prototype.initialize = function(map) {
this.map_ = map;
this.defaultStyles = {
containerWidth: this.map_.getSize().width / 2,
borderSize: 1
};
this.wrapperParts = {
tl:{t:0, l:0, w:0, h:0, domElement: null},
t:{t:0, l:0, w:0, h:0, domElement: null},
tr:{t:0, l:0, w:0, h:0, domElement: null},
l:{t:0, l:0, w:0, h:0, domElement: null},
r:{t:0, l:0, w:0, h:0, domElement: null},
bl:{t:0, l:0, w:0, h:0, domElement: null},
b:{t:0, l:0, w:0, h:0, domElement: null},
br:{t:0, l:0, w:0, h:0, domElement: null},
beak:{t:0, l:0, w:0, h:0, domElement: null},
close:{t:0, l:0, w:0, h:0, domElement: null}
};
for (var i in this.wrapperParts ) {
var tempElement = document.createElement('div');
tempElement.id = this.infoWindowId_ + '_' + i;
tempElement.style.visibility = 'hidden';
document.body.appendChild(tempElement);
tempElement = document.getElementById(this.infoWindowId_ + '_' + i);
var tempWrapperPart = eval('this.wrapperParts.' + i);
tempWrapperPart.w = parseInt(this.getStyle_(tempElement, 'width'));
tempWrapperPart.h = parseInt(this.getStyle_(tempElement, 'height'));
document.body.removeChild(tempElement);
}
for (var i in this.wrapperParts) {
if (i == 'close' ) {
//first append the content so the close button is layered above it
this.wrapperDiv_.appendChild(this.contentDiv_);
}
var wrapperPartsDiv = null;
if (this.wrapperParts[i].domElement == null) {
wrapperPartsDiv = document.createElement('div');
this.wrapperDiv_.appendChild(wrapperPartsDiv);
} else {
wrapperPartsDiv = this.wrapperParts[i].domElement;
}
wrapperPartsDiv.id = this.infoWindowId_ + '_' + i;
wrapperPartsDiv.style.position = 'absolute';
wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px';
wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px';
wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px';
wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px';
this.wrapperParts[i].domElement = wrapperPartsDiv;
}
this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_);
this.container_.id = this.infoWindowId_;
var containerWidth = this.getStyle_(document.getElementById(this.infoWindowId_), 'width');
this.container_.style.width = (containerWidth == null ? this.defaultStyles.containerWidth : containerWidth);
this.map_.getContainer().appendChild(this.contentDiv_);
this.contentWidth = this.getDimensions_(this.container_).width;
this.contentDiv_.style.width = this.contentWidth + 'px';
this.contentDiv_.style.position = 'absolute';
this.container_.appendChild(this.wrapperDiv_);
GEvent.bindDom(this.container_, 'mousedown', this,this.onClick_);
GEvent.bindDom(this.container_, 'dblclick', this,this.onClick_);
GEvent.bindDom(this.container_, 'DOMMouseScroll', this, this.onClick_);
GEvent.trigger(this.map_, 'extinfowindowopen');
if (this.ajaxUrl_ != null ) {
this.ajaxRequest_(this.ajaxUrl_);
}
};
/**
* Private function to steal mouse click events to prevent it from returning to the map.
* Without this links in the ExtInfoWindow would not work, and you could click to zoom or drag
* the map behind it.
* @private
* @param {MouseEvent} e The mouse event caught by this function
*/
ExtInfoWindow.prototype.onClick_ = function(e) {
if(navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) {
window.event.cancelBubble = true;
window.event.returnValue = false;
} else {
//e.preventDefault();
e.stopPropagation();
}
};
/**
* Remove the extInfoWindow container from the map pane.
*/
ExtInfoWindow.prototype.remove = function() {
if (this.map_.getExtInfoWindow() != null) {
GEvent.trigger(this.map_, 'extinfowindowbeforeclose');
GEvent.clearInstanceListeners(this.container_);
if (this.container_.outerHTML) {
this.container_.outerHTML = ''; //prevent pseudo-leak in IE
}
if (this.container_.parentNode) {
this.container_.parentNode.removeChild(this.container_);
}
this.container_ = null;
GEvent.trigger(this.map_, 'extinfowindowclose');
this.map_.setExtInfoWindow_(null);
}
};
/**
* Return a copy of this overlay, for the parent Map to duplicate itself in full. This
* is part of the Overlay interface and is used, for example, to copy everything in the
* main view into the mini-map.
* @return {GOverlay}
*/
ExtInfoWindow.prototype.copy = function() {
return new ExtInfoWindow(this.marker_, this.infoWindowId_, this.html_, this.options_);
};
/**
* Draw extInfoWindow and wrapping decorators onto the map. Resize and reposition
* the map as necessary.
* @param {Boolean} force Will be true when pixel coordinates need to be recomputed.
*/
ExtInfoWindow.prototype.redraw = function(force) {
if (!force || this.container_ == null) return;
//set the content section's height, needed so browser font resizing does not affect the window's dimensions
var contentHeight = this.contentDiv_.offsetHeight;
this.contentDiv_.style.height = contentHeight + 'px';
//reposition contents depending on wrapper parts.
//this is necessary for content that is pulled in via ajax
this.contentDiv_.style.left = this.wrapperParts.l.w + 'px';
this.contentDiv_.style.top = this.wrapperParts.tl.h + 'px';
this.contentDiv_.style.visibility = 'visible';
//Finish configuring wrapper parts that were not set in initialization
this.wrapperParts.tl.t = 0;
this.wrapperParts.tl.l = 0;
this.wrapperParts.t.l = this.wrapperParts.tl.w;
this.wrapperParts.t.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.tl.w - this.wrapperParts.tr.w;
this.wrapperParts.t.h = this.wrapperParts.tl.h;
this.wrapperParts.tr.l = this.wrapperParts.t.w + this.wrapperParts.tl.w;
this.wrapperParts.l.t = this.wrapperParts.tl.h;
this.wrapperParts.l.h = contentHeight;
this.wrapperParts.r.l = this.contentWidth + this.wrapperParts.l.w;
this.wrapperParts.r.t = this.wrapperParts.tr.h;
this.wrapperParts.r.h = contentHeight;
this.wrapperParts.bl.t = contentHeight + this.wrapperParts.tl.h;
this.wrapperParts.b.l = this.wrapperParts.bl.w;
this.wrapperParts.b.t = contentHeight + this.wrapperParts.tl.h;
this.wrapperParts.b.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.bl.w - this.wrapperParts.br.w;
this.wrapperParts.b.h = this.wrapperParts.bl.h;
this.wrapperParts.br.l = this.wrapperParts.b.w + this.wrapperParts.bl.w;
this.wrapperParts.br.t = contentHeight + this.wrapperParts.tr.h;
this.wrapperParts.close.l = this.wrapperParts.tr.l +this.wrapperParts.tr.w - this.wrapperParts.close.w - this.borderSize_;
this.wrapperParts.close.t = this.borderSize_;
this.wrapperParts.beak.l = this.borderSize_ + (this.contentWidth / 2) - (this.wrapperParts.beak.w / 2);
this.wrapperParts.beak.t = this.wrapperParts.bl.t + this.wrapperParts.bl.h - this.borderSize_;
//create the decoration wrapper DOM objects
//append the styled info window to the container
for (var i in this.wrapperParts) {
if (i == 'close' ) {
//first append the content so the close button is layered above it
this.wrapperDiv_.insertBefore(this.contentDiv_, this.wrapperParts[i].domElement);
}
var wrapperPartsDiv = null;
if (this.wrapperParts[i].domElement == null) {
wrapperPartsDiv = document.createElement('div');
this.wrapperDiv_.appendChild(wrapperPartsDiv);
} else {
wrapperPartsDiv = this.wrapperParts[i].domElement;
}
wrapperPartsDiv.id = this.infoWindowId_ + '_' + i;
wrapperPartsDiv.style.position='absolute';
wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px';
wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px';
wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px';
wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px';
this.wrapperParts[i].domElement = wrapperPartsDiv;
}
//add event handler for the close box
var currentMarker = this.marker_;
var thisMap = this.map_;
GEvent.addDomListener(this.wrapperParts.close.domElement, 'click',
function() {
thisMap.closeExtInfoWindow();
}
);
//position the container on the map, over the marker
var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint());
this.container_.style.position = 'absolute';
var markerIcon = this.marker_.getIcon();
this.container_.style.left = (pixelLocation.x
- (this.contentWidth / 2)
- markerIcon.iconAnchor.x
+ markerIcon.infoWindowAnchor.x
) + 'px';
this.container_.style.top = (pixelLocation.y
- this.wrapperParts.bl.h
- contentHeight
- this.wrapperParts.tl.h
- this.wrapperParts.beak.h
- markerIcon.iconAnchor.y
+ markerIcon.infoWindowAnchor.y
+ this.borderSize_
) + 'px';
this.container_.style.display = 'block';
if(this.map_.getExtInfoWindow() != null) {
this.repositionMap_();
}
};
/**
* Determine the dimensions of the contents to recalculate and reposition the
* wrapping decorator elements accordingly.
*/
ExtInfoWindow.prototype.resize = function(){
//Create temporary DOM node for new contents to get new height
//This is done because if you manipulate this.contentDiv_ directly it causes visual errors in IE6
var tempElement = this.contentDiv_.cloneNode(true);
tempElement.id = this.infoWindowId_ + '_tempContents';
tempElement.style.visibility = 'hidden';
tempElement.style.height = 'auto';
document.body.appendChild(tempElement);
tempElement = document.getElementById(this.infoWindowId_ + '_tempContents');
var contentHeight = tempElement.offsetHeight;
document.body.removeChild(tempElement);
//Set the new height to eliminate visual defects that can be caused by font resizing in browser
this.contentDiv_.style.height = contentHeight + 'px';
var contentWidth = this.contentDiv_.offsetWidth;
var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint());
var oldWindowHeight = this.wrapperParts.t.domElement.offsetHeight + this.wrapperParts.l.domElement.offsetHeight + this.wrapperParts.b.domElement.offsetHeight;
var oldWindowPosTop = this.wrapperParts.t.domElement.offsetTop;
//resize info window to look correct for new height
this.wrapperParts.l.domElement.style.height = contentHeight + 'px';
this.wrapperParts.r.domElement.style.height = contentHeight + 'px';
var newPosTop = this.wrapperParts.b.domElement.offsetTop - contentHeight;
this.wrapperParts.l.domElement.style.top = newPosTop + 'px';
this.wrapperParts.r.domElement.style.top = newPosTop + 'px';
this.contentDiv_.style.top = newPosTop + 'px';
windowTHeight = parseInt(this.wrapperParts.t.domElement.style.height);
newPosTop -= windowTHeight;
this.wrapperParts.close.domElement.style.top = newPosTop + this.borderSize_ + 'px';
this.wrapperParts.tl.domElement.style.top = newPosTop + 'px';
this.wrapperParts.t.domElement.style.top = newPosTop + 'px';
this.wrapperParts.tr.domElement.style.top = newPosTop + 'px';
this.repositionMap_();
};
/**
* Check to see if the displayed extInfoWindow is positioned off the viewable
* map region and by how much. Use that information to pan the map so that
* the extInfoWindow is completely displayed.
* @private
*/
ExtInfoWindow.prototype.repositionMap_ = function(){
//pan if necessary so it shows on the screen
var mapNE = this.map_.fromLatLngToDivPixel(
this.map_.getBounds().getNorthEast()
);
var mapSW = this.map_.fromLatLngToDivPixel(
this.map_.getBounds().getSouthWest()
);
var markerPosition = this.map_.fromLatLngToDivPixel(
this.marker_.getPoint()
);
var panX = 0;
var panY = 0;
var paddingX = this.paddingX_;
var paddingY = this.paddingY_;
var infoWindowAnchor = this.marker_.getIcon().infoWindowAnchor;
var iconAnchor = this.marker_.getIcon().iconAnchor;
//test top of screen
var windowT = this.wrapperParts.t.domElement;
var windowL = this.wrapperParts.l.domElement;
var windowB = this.wrapperParts.b.domElement;
var windowR = this.wrapperParts.r.domElement;
var windowBeak = this.wrapperParts.beak.domElement;
var offsetTop = markerPosition.y - ( -infoWindowAnchor.y + iconAnchor.y + this.getDimensions_(windowBeak).height + this.getDimensions_(windowB).height + this.getDimensions_(windowL).height + this.getDimensions_(windowT).height + this.paddingY_);
if (offsetTop < mapNE.y) {
panY = mapNE.y - offsetTop;
} else {
//test bottom of screen
var offsetBottom = markerPosition.y + this.paddingY_;
if (offsetBottom >= mapSW.y) {
panY = -(offsetBottom - mapSW.y);
}
}
//test right of screen
var offsetRight = Math.round(markerPosition.x + this.getDimensions_(this.container_).width/2 + this.getDimensions_(windowR).width + this.paddingX_ + infoWindowAnchor.x - iconAnchor.x);
if (offsetRight > mapNE.x) {
panX = -( offsetRight - mapNE.x);
} else {
//test left of screen
var offsetLeft = - (Math.round( (this.getDimensions_(this.container_).width/2 - this.marker_.getIcon().iconSize.width/2) + this.getDimensions_(windowL).width + this.borderSize_ + this.paddingX_) - markerPosition.x - infoWindowAnchor.x + iconAnchor.x);
if( offsetLeft < mapSW.x) {
panX = mapSW.x - offsetLeft;
}
}
if (panX != 0 || panY != 0 && this.map_.getExtInfoWindow() != null ) {
this.map_.panBy(new GSize(panX,panY));
}
};
/**
* Private function that handles performing an ajax request to the server. The response
* information is assumed to be HTML and is placed inside this extInfoWindow's contents region.
* Last, check to see if the height has changed, and resize the extInfoWindow accordingly.
* @private
* @param {String} url The Url of where to make the ajax request on the server
*/
ExtInfoWindow.prototype.ajaxRequest_ = function(url){
var thisMap = this.map_;
var thisCallback = this.callback_;
GDownloadUrl(url, function(response, status){
var infoWindow = document.getElementById(thisMap.getExtInfoWindow().infoWindowId_ + '_contents');
if (response == null || status == -1 ) {
infoWindow.innerHTML = '<span class="error">ERROR: The Ajax request failed to get HTML content from "' + url + '"</span>';
} else {
infoWindow.innerHTML = response;
}
if (thisCallback != null ) {
thisCallback();
}
thisMap.getExtInfoWindow().resize();
GEvent.trigger(thisMap, 'extinfowindowupdate');
});
};
/**
* Private function derived from Prototype.js to get a given element's
* height and width
* @private
* @param {Object} element The DOM element that will have height and
* width will be calculated for it.
* @return {Object} Object with keys: width, height
*/
ExtInfoWindow.prototype.getDimensions_ = function(element) {
var display = this.getStyle_(element, 'display');
if (display != 'none' && display != null) { // Safari bug
return {width: element.offsetWidth, height: element.offsetHeight};
}
// All *Width and *Height properties give 0 on elements with display none,
// so enable the element temporarily
var els = element.style;
var originalVisibility = els.visibility;
var originalPosition = els.position;
var originalDisplay = els.display;
els.visibility = 'hidden';
els.position = 'absolute';
els.display = 'block';
var originalWidth = element.clientWidth;
var originalHeight = element.clientHeight;
els.display = originalDisplay;
els.position = originalPosition;
els.visibility = originalVisibility;
return {width: originalWidth, height: originalHeight};
};
/**
* Private function derived from Prototype.js to get a given element's
* value that is associated with the passed style
* @private
* @param {Object} element The DOM element that will be checked.
* @param {String} style The style name that will be have it's value returned.
* @return {Object}
*/
ExtInfoWindow.prototype.getStyle_ = function(element, style) {
var found = false;
style = this.camelize_(style);
var value = element.style[style];
if (!value) {
if (document.defaultView && document.defaultView.getComputedStyle) {
var css = document.defaultView.getComputedStyle(element, null);
value = css ? css[style] : null;
} else if (element.currentStyle) {
value = element.currentStyle[style];
}
}
if((value == 'auto') && (style == 'width' || style == 'height') && (this.getStyle_(element, 'display') != 'none')) {
if( style == 'width' ) {
value = element.offsetWidth;
}else {
value = element.offsetHeight;
}
}
return (value == 'auto') ? null : value;
};
/**
* Private function pulled from Prototype.js that will change a hyphened
* style name into camel case.
* @private
* @param {String} element The string that will be parsed and made into camel case
* @return {String}
*/
ExtInfoWindow.prototype.camelize_ = function(element) {
var parts = element.split('-'), len = parts.length;
if (len == 1) return parts[0];
var camelized = element.charAt(0) == '-'
? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
: parts[0];
for (var i = 1; i < len; i++) {
camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
}
return camelized;
};
GMap.prototype.ExtInfoWindowInstance_ = null;
GMap.prototype.ClickListener_ = null;
GMap.prototype.InfoWindowListener_ = null;
/**
* Creates a new instance of ExtInfoWindow for the GMarker. Register the newly created
* instance with the map, ensuring only one window is open at a time. If this is the first
* ExtInfoWindow ever opened, add event listeners to the map to close the ExtInfoWindow on
* zoom and click, to mimic the default GInfoWindow behavior.
*
* @param {GMap} map The GMap2 object where the ExtInfoWindow will open
* @param {String} cssId The id we will use to reference the info window
* @param {String} html The HTML contents
* @param {Object} opt_opts A contianer for optional arguments:
* {String} ajaxUrl The Url to hit on the server to request some contents
* {Number} paddingX The padding size in pixels that the info window will leave on
* the left and right sides of the map when panning is involved.
* {Number} paddingX The padding size in pixels that the info window will leave on
* the top and bottom sides of the map when panning is involved.
* {Number} beakOffset The repositioning offset for when aligning the beak element.
* This is used to make sure the beak lines up correcting if the
* info window styling containers a border.
*/
GMarker.prototype.openExtInfoWindow = function(map, cssId, html, opt_opts) {
if (map == null) {
throw 'Error in GMarker.openExtInfoWindow: map cannot be null';
return false;
}
if (cssId == null || cssId == '') {
throw 'Error in GMarker.openExtInfoWindow: must specify a cssId';
return false;
}
map.closeInfoWindow();
if (map.getExtInfoWindow() != null) {
map.closeExtInfoWindow();
}
if (map.getExtInfoWindow() == null) {
map.setExtInfoWindow_( new ExtInfoWindow(
this,
cssId,
html,
opt_opts
) );
if (map.ClickListener_ == null) {
//listen for map click, close ExtInfoWindow if open
map.ClickListener_ = GEvent.addListener(map, 'click',
function(event) {
if( !event && map.getExtInfoWindow() != null ){
map.closeExtInfoWindow();
}
}
);
}
if (map.InfoWindowListener_ == null) {
//listen for default info window open, close ExtInfoWindow if open
map.InfoWindowListener_ = GEvent.addListener(map, 'infowindowopen',
function(event) {
if (map.getExtInfoWindow() != null) {
map.closeExtInfoWindow();
}
}
);
}
map.addOverlay(map.getExtInfoWindow());
}
};
/**
* Remove the ExtInfoWindow instance
* @param {GMap2} map The map where the GMarker and ExtInfoWindow exist
*/
GMarker.prototype.closeExtInfoWindow = function(map) {
if( map.getExtInfWindow() != null ){
map.closeExtInfoWindow();
}
};
/**
* Get the ExtInfoWindow instance from the map
*/
GMap2.prototype.getExtInfoWindow = function(){
return this.ExtInfoWindowInstance_;
};
/**
* Set the ExtInfoWindow instance for the map
* @private
*/
GMap2.prototype.setExtInfoWindow_ = function( extInfoWindow ){
this.ExtInfoWindowInstance_ = extInfoWindow;
}
/**
* Remove the ExtInfoWindow from the map
*/
GMap2.prototype.closeExtInfoWindow = function(){
if( this.getExtInfoWindow() != null ){
this.ExtInfoWindowInstance_.remove();
}
};

View File

@ -0,0 +1,21 @@
<?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 Tags_GPS_Model extends ORM {
}

View File

@ -0,0 +1,3 @@
name = TagsMap
description = Assign GPS coordinates to existing tags and display them on a map.
version = 1

Some files were not shown because too many files have changed in this diff Show More