Merge commit 'gallery3-contrib/master'
This commit is contained in:
parent
6d40148ae1
commit
53c75cbc99
1346
themes/3nids/3nids/css/jquery.fancybox.css
vendored
1346
themes/3nids/3nids/css/jquery.fancybox.css
vendored
File diff suppressed because it is too large
Load Diff
@ -1,205 +1,205 @@
|
|||||||
/*
|
/*
|
||||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||||
*
|
*
|
||||||
* Uses the built in easing capabilities added In jQuery 1.1
|
* Uses the built in easing capabilities added In jQuery 1.1
|
||||||
* to offer multiple easing options
|
* to offer multiple easing options
|
||||||
*
|
*
|
||||||
* TERMS OF USE - jQuery Easing
|
* TERMS OF USE - jQuery Easing
|
||||||
*
|
*
|
||||||
* Open source under the BSD License.
|
* Open source under the BSD License.
|
||||||
*
|
*
|
||||||
* Copyright © 2008 George McGinley Smith
|
* Copyright © 2008 George McGinley Smith
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* Redistributions of source code must retain the above copyright notice, this list of
|
* Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
* 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.
|
* 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
|
* 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
|
* 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
|
* 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,
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
* 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||||
|
|
||||||
jQuery.extend( jQuery.easing,
|
jQuery.extend( jQuery.easing,
|
||||||
{
|
{
|
||||||
def: 'easeOutQuad',
|
def: 'easeOutQuad',
|
||||||
swing: function (x, t, b, c, d) {
|
swing: function (x, t, b, c, d) {
|
||||||
//alert(jQuery.easing.default);
|
//alert(jQuery.easing.default);
|
||||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||||
},
|
},
|
||||||
easeInQuad: function (x, t, b, c, d) {
|
easeInQuad: function (x, t, b, c, d) {
|
||||||
return c*(t/=d)*t + b;
|
return c*(t/=d)*t + b;
|
||||||
},
|
},
|
||||||
easeOutQuad: function (x, t, b, c, d) {
|
easeOutQuad: function (x, t, b, c, d) {
|
||||||
return -c *(t/=d)*(t-2) + b;
|
return -c *(t/=d)*(t-2) + b;
|
||||||
},
|
},
|
||||||
easeInOutQuad: function (x, t, b, c, d) {
|
easeInOutQuad: function (x, t, b, c, d) {
|
||||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||||
},
|
},
|
||||||
easeInCubic: function (x, t, b, c, d) {
|
easeInCubic: function (x, t, b, c, d) {
|
||||||
return c*(t/=d)*t*t + b;
|
return c*(t/=d)*t*t + b;
|
||||||
},
|
},
|
||||||
easeOutCubic: function (x, t, b, c, d) {
|
easeOutCubic: function (x, t, b, c, d) {
|
||||||
return c*((t=t/d-1)*t*t + 1) + b;
|
return c*((t=t/d-1)*t*t + 1) + b;
|
||||||
},
|
},
|
||||||
easeInOutCubic: function (x, t, b, c, d) {
|
easeInOutCubic: function (x, t, b, c, d) {
|
||||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||||
return c/2*((t-=2)*t*t + 2) + b;
|
return c/2*((t-=2)*t*t + 2) + b;
|
||||||
},
|
},
|
||||||
easeInQuart: function (x, t, b, c, d) {
|
easeInQuart: function (x, t, b, c, d) {
|
||||||
return c*(t/=d)*t*t*t + b;
|
return c*(t/=d)*t*t*t + b;
|
||||||
},
|
},
|
||||||
easeOutQuart: function (x, t, b, c, d) {
|
easeOutQuart: function (x, t, b, c, d) {
|
||||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||||
},
|
},
|
||||||
easeInOutQuart: function (x, t, b, c, d) {
|
easeInOutQuart: function (x, t, b, c, d) {
|
||||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||||
},
|
},
|
||||||
easeInQuint: function (x, t, b, c, d) {
|
easeInQuint: function (x, t, b, c, d) {
|
||||||
return c*(t/=d)*t*t*t*t + b;
|
return c*(t/=d)*t*t*t*t + b;
|
||||||
},
|
},
|
||||||
easeOutQuint: function (x, t, b, c, d) {
|
easeOutQuint: function (x, t, b, c, d) {
|
||||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||||
},
|
},
|
||||||
easeInOutQuint: function (x, t, b, c, d) {
|
easeInOutQuint: function (x, t, b, c, d) {
|
||||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
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;
|
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||||
},
|
},
|
||||||
easeInSine: function (x, t, b, c, d) {
|
easeInSine: function (x, t, b, c, d) {
|
||||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||||
},
|
},
|
||||||
easeOutSine: function (x, t, b, c, d) {
|
easeOutSine: function (x, t, b, c, d) {
|
||||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||||
},
|
},
|
||||||
easeInOutSine: function (x, t, b, c, d) {
|
easeInOutSine: function (x, t, b, c, d) {
|
||||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||||
},
|
},
|
||||||
easeInExpo: function (x, t, b, c, d) {
|
easeInExpo: function (x, t, b, c, d) {
|
||||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||||
},
|
},
|
||||||
easeOutExpo: function (x, t, b, c, d) {
|
easeOutExpo: function (x, t, b, c, d) {
|
||||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||||
},
|
},
|
||||||
easeInOutExpo: function (x, t, b, c, d) {
|
easeInOutExpo: function (x, t, b, c, d) {
|
||||||
if (t==0) return b;
|
if (t==0) return b;
|
||||||
if (t==d) return b+c;
|
if (t==d) return b+c;
|
||||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
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;
|
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||||
},
|
},
|
||||||
easeInCirc: function (x, t, b, c, d) {
|
easeInCirc: function (x, t, b, c, d) {
|
||||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||||
},
|
},
|
||||||
easeOutCirc: function (x, t, b, c, d) {
|
easeOutCirc: function (x, t, b, c, d) {
|
||||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||||
},
|
},
|
||||||
easeInOutCirc: function (x, t, b, c, d) {
|
easeInOutCirc: function (x, t, b, c, d) {
|
||||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
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;
|
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||||
},
|
},
|
||||||
easeInElastic: function (x, t, b, c, d) {
|
easeInElastic: function (x, t, b, c, d) {
|
||||||
var s=1.70158;var p=0;var a=c;
|
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 (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; }
|
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
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;
|
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) {
|
easeOutElastic: function (x, t, b, c, d) {
|
||||||
var s=1.70158;var p=0;var a=c;
|
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 (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; }
|
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
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;
|
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) {
|
easeInOutElastic: function (x, t, b, c, d) {
|
||||||
var s=1.70158;var p=0;var a=c;
|
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 (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; }
|
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
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;
|
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;
|
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) {
|
easeInBack: function (x, t, b, c, d, s) {
|
||||||
if (s == undefined) s = 1.70158;
|
if (s == undefined) s = 1.70158;
|
||||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||||
},
|
},
|
||||||
easeOutBack: function (x, t, b, c, d, s) {
|
easeOutBack: function (x, t, b, c, d, s) {
|
||||||
if (s == undefined) s = 1.70158;
|
if (s == undefined) s = 1.70158;
|
||||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||||
},
|
},
|
||||||
easeInOutBack: function (x, t, b, c, d, s) {
|
easeInOutBack: function (x, t, b, c, d, s) {
|
||||||
if (s == undefined) s = 1.70158;
|
if (s == undefined) s = 1.70158;
|
||||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
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;
|
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||||
},
|
},
|
||||||
easeInBounce: function (x, t, b, c, d) {
|
easeInBounce: function (x, t, b, c, d) {
|
||||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||||
},
|
},
|
||||||
easeOutBounce: function (x, t, b, c, d) {
|
easeOutBounce: function (x, t, b, c, d) {
|
||||||
if ((t/=d) < (1/2.75)) {
|
if ((t/=d) < (1/2.75)) {
|
||||||
return c*(7.5625*t*t) + b;
|
return c*(7.5625*t*t) + b;
|
||||||
} else if (t < (2/2.75)) {
|
} else if (t < (2/2.75)) {
|
||||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||||
} else if (t < (2.5/2.75)) {
|
} else if (t < (2.5/2.75)) {
|
||||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||||
} else {
|
} else {
|
||||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
easeInOutBounce: function (x, t, b, c, d) {
|
easeInOutBounce: function (x, t, b, c, d) {
|
||||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
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;
|
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* TERMS OF USE - EASING EQUATIONS
|
* TERMS OF USE - EASING EQUATIONS
|
||||||
*
|
*
|
||||||
* Open source under the BSD License.
|
* Open source under the BSD License.
|
||||||
*
|
*
|
||||||
* Copyright © 2001 Robert Penner
|
* Copyright © 2001 Robert Penner
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* Redistributions of source code must retain the above copyright notice, this list of
|
* Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
* 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.
|
* 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
|
* 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
|
* 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
|
* 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,
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
* 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
@ -1,33 +1,33 @@
|
|||||||
This is a theme for gallery3.
|
This is a theme for gallery3.
|
||||||
It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher).
|
It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher).
|
||||||
|
|
||||||
*********
|
*********
|
||||||
Demo @ http://gallery.3nids.ch
|
Demo @ http://gallery.3nids.ch
|
||||||
|
|
||||||
*********
|
*********
|
||||||
Requirements:
|
Requirements:
|
||||||
- Gallery 3 last experimental version @ http://github.com/gallery/gallery3
|
- Gallery 3 last experimental version @ http://github.com/gallery/gallery3
|
||||||
- Tag module activated (if want to use tagsmap)
|
- Tag module activated (if want to use tagsmap)
|
||||||
- Comment and Comments for 3nids themes modules activated (if you want to use comments)
|
- Comment and Comments for 3nids themes modules activated (if you want to use comments)
|
||||||
|
|
||||||
*********
|
*********
|
||||||
Installation:
|
Installation:
|
||||||
|
|
||||||
1. Copy the theme folder (3nids) into gallery3/themes directory.
|
1. Copy the theme folder (3nids) into gallery3/themes directory.
|
||||||
2. Copy lib folder into gallery3 directory (it changes the themeroller).
|
2. Copy lib folder into gallery3 directory (it changes the themeroller).
|
||||||
3. Copy modules folder into gallery3 directory. It includes tagsmap module.
|
3. Copy modules folder into gallery3 directory. It includes tagsmap module.
|
||||||
|
|
||||||
*********
|
*********
|
||||||
Use:
|
Use:
|
||||||
This theme displays full size images. So be carefull to upload not too large images!
|
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.
|
The theme uses the tagsmap module which has been enhanced.
|
||||||
|
|
||||||
If you want to separate geotag from others, name those with the "map." prefix., the "map." prefix will not be displayed on the map.
|
If you want to separate geotag from others, name those with the "map." prefix., the "map." prefix will not be displayed on the map.
|
||||||
If you want to remove the prefix in the tag cloud sidebar, wou will have to update in gallery3/modules/tag/helpers/tag.php the popular_tags function:
|
If you want to remove the prefix in the tag cloud sidebar, wou will have to update in gallery3/modules/tag/helpers/tag.php the popular_tags function:
|
||||||
static function popular_tags($count) {
|
static function popular_tags($count) {
|
||||||
return ORM::factory("tag")
|
return ORM::factory("tag")
|
||||||
->orderby("count", "DESC")
|
->orderby("count", "DESC")
|
||||||
->notregex("name","map\.")
|
->notregex("name","map\.")
|
||||||
->limit($count)
|
->limit($count)
|
||||||
->find_all();
|
->find_all();
|
||||||
}
|
}
|
||||||
|
@ -1,192 +1,192 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.");
|
<?php defined("SYSPATH") or die("No direct script access.");
|
||||||
/**
|
/**
|
||||||
* Gallery - a web based photo album viewer and editor
|
* Gallery - a web based photo album viewer and editor
|
||||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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
|
* the Free Software Foundation; either version 2 of the License, or (at
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
class Comments_3nids_Controller extends REST_Controller {
|
class Comments_3nids_Controller extends REST_Controller {
|
||||||
protected $resource_type = "comment";
|
protected $resource_type = "comment";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display comments based on criteria.
|
* Display comments based on criteria.
|
||||||
* @see REST_Controller::_index()
|
* @see REST_Controller::_index()
|
||||||
*/
|
*/
|
||||||
public function _index() {
|
public function _index() {
|
||||||
$item_id = $this->input->get('item_id');
|
$item_id = $this->input->get('item_id');
|
||||||
$item = ORM::factory("item", $item_id);
|
$item = ORM::factory("item", $item_id);
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
|
|
||||||
$comments = ORM::factory("comment")
|
$comments = ORM::factory("comment")
|
||||||
->where("item_id", $item->id)
|
->where("item_id", $item->id)
|
||||||
->where("state", "published")
|
->where("state", "published")
|
||||||
->orderby("created", "ASC")
|
->orderby("created", "ASC")
|
||||||
->find_all();
|
->find_all();
|
||||||
|
|
||||||
switch (rest::output_format()) {
|
switch (rest::output_format()) {
|
||||||
case "json":
|
case "json":
|
||||||
foreach ($comments as $comment) {
|
foreach ($comments as $comment) {
|
||||||
$data[] = array(
|
$data[] = array(
|
||||||
"id" => $comment->id,
|
"id" => $comment->id,
|
||||||
"author_name" => html::clean($comment->author_name()),
|
"author_name" => html::clean($comment->author_name()),
|
||||||
"created" => $comment->created,
|
"created" => $comment->created,
|
||||||
"text" => nl2br(html::purify($comment->text)));
|
"text" => nl2br(html::purify($comment->text)));
|
||||||
}
|
}
|
||||||
print json_encode($data);
|
print json_encode($data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "html":
|
case "html":
|
||||||
$view = new Theme_View("comments.html", "page");
|
$view = new Theme_View("comments.html", "page");
|
||||||
$view->comments = $comments;
|
$view->comments = $comments;
|
||||||
$view->item_id = $item_id;
|
$view->item_id = $item_id;
|
||||||
$view->thumb = $item->thumb_url();
|
$view->thumb = $item->thumb_url();
|
||||||
print $view;
|
print $view;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new comment to the collection.
|
* Add a new comment to the collection.
|
||||||
* @see REST_Controller::_create($resource)
|
* @see REST_Controller::_create($resource)
|
||||||
*/
|
*/
|
||||||
public function _create($comment) {
|
public function _create($comment) {
|
||||||
$item = ORM::factory("item", $this->input->post("item_id"));
|
$item = ORM::factory("item", $this->input->post("item_id"));
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
|
|
||||||
$form = comment_3nids::get_add_form($item);
|
$form = comment_3nids::get_add_form($item);
|
||||||
$valid = $form->validate();
|
$valid = $form->validate();
|
||||||
if ($valid) {
|
if ($valid) {
|
||||||
if (user::active()->guest && !$form->add_comment->inputs["name"]->value) {
|
if (user::active()->guest && !$form->add_comment->inputs["name"]->value) {
|
||||||
$form->add_comment->inputs["name"]->add_error("missing", 1);
|
$form->add_comment->inputs["name"]->add_error("missing", 1);
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$form->add_comment->text->value) {
|
if (!$form->add_comment->text->value) {
|
||||||
$form->add_comment->text->add_error("missing", 1);
|
$form->add_comment->text->add_error("missing", 1);
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($valid) {
|
if ($valid) {
|
||||||
$comment = comment::create(
|
$comment = comment::create(
|
||||||
$item, user::active(),
|
$item, user::active(),
|
||||||
$form->add_comment->text->value,
|
$form->add_comment->text->value,
|
||||||
$form->add_comment->inputs["name"]->value,
|
$form->add_comment->inputs["name"]->value,
|
||||||
$form->add_comment->email->value,
|
$form->add_comment->email->value,
|
||||||
$form->add_comment->url->value);
|
$form->add_comment->url->value);
|
||||||
|
|
||||||
$active = user::active();
|
$active = user::active();
|
||||||
if ($active->guest) {
|
if ($active->guest) {
|
||||||
$form->add_comment->inputs["name"]->value("");
|
$form->add_comment->inputs["name"]->value("");
|
||||||
$form->add_comment->email->value("");
|
$form->add_comment->email->value("");
|
||||||
$form->add_comment->url->value("");
|
$form->add_comment->url->value("");
|
||||||
} else {
|
} else {
|
||||||
$form->add_comment->inputs["name"]->value($active->full_name);
|
$form->add_comment->inputs["name"]->value($active->full_name);
|
||||||
$form->add_comment->email->value($active->email);
|
$form->add_comment->email->value($active->email);
|
||||||
$form->add_comment->url->value($active->url);
|
$form->add_comment->url->value($active->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
url::redirect(url::site("comments_3nids?item_id=".$item->id));
|
url::redirect(url::site("comments_3nids?item_id=".$item->id));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Display an existing comment.
|
* Display an existing comment.
|
||||||
* @todo Set proper Content-Type in a central place (REST_Controller::dispatch?).
|
* @todo Set proper Content-Type in a central place (REST_Controller::dispatch?).
|
||||||
* @see REST_Controller::_show($resource)
|
* @see REST_Controller::_show($resource)
|
||||||
*/
|
*/
|
||||||
public function _show($comment) {
|
public function _show($comment) {
|
||||||
$item = ORM::factory("item", $comment->item_id);
|
$item = ORM::factory("item", $comment->item_id);
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
if ($comment->state != "published") {
|
if ($comment->state != "published") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rest::output_format() == "json") {
|
if (rest::output_format() == "json") {
|
||||||
print json_encode(
|
print json_encode(
|
||||||
array("result" => "success",
|
array("result" => "success",
|
||||||
"data" => array(
|
"data" => array(
|
||||||
"id" => $comment->id,
|
"id" => $comment->id,
|
||||||
"author_name" => html::clean($comment->author_name()),
|
"author_name" => html::clean($comment->author_name()),
|
||||||
"created" => $comment->created,
|
"created" => $comment->created,
|
||||||
"text" => nl2br(html::purify($comment->text)))));
|
"text" => nl2br(html::purify($comment->text)))));
|
||||||
} else {
|
} else {
|
||||||
$view = new Theme_View("comment.html", "fragment");
|
$view = new Theme_View("comment.html", "fragment");
|
||||||
$view->comment = $comment;
|
$view->comment = $comment;
|
||||||
print $view;
|
print $view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change an existing comment.
|
* Change an existing comment.
|
||||||
* @see REST_Controller::_update($resource)
|
* @see REST_Controller::_update($resource)
|
||||||
*/
|
*/
|
||||||
public function _update($comment) {
|
public function _update($comment) {
|
||||||
$item = ORM::factory("item", $comment->item_id);
|
$item = ORM::factory("item", $comment->item_id);
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
access::required("edit", $item);
|
access::required("edit", $item);
|
||||||
|
|
||||||
$form = comment_3nids::get_edit_form($comment);
|
$form = comment_3nids::get_edit_form($comment);
|
||||||
if ($form->validate()) {
|
if ($form->validate()) {
|
||||||
$comment->guest_name = $form->edit_comment->inputs["name"]->value;
|
$comment->guest_name = $form->edit_comment->inputs["name"]->value;
|
||||||
$comment->guest_email = $form->edit_comment->email->value;
|
$comment->guest_email = $form->edit_comment->email->value;
|
||||||
$comment->url = $form->edit_comment->url->value;
|
$comment->url = $form->edit_comment->url->value;
|
||||||
$comment->text = $form->edit_comment->text->value;
|
$comment->text = $form->edit_comment->text->value;
|
||||||
$comment->save();
|
$comment->save();
|
||||||
|
|
||||||
print json_encode(
|
print json_encode(
|
||||||
array("result" => "success",
|
array("result" => "success",
|
||||||
"resource" => url::site("comments/{$comment->id}")));
|
"resource" => url::site("comments/{$comment->id}")));
|
||||||
} else {
|
} else {
|
||||||
print json_encode(
|
print json_encode(
|
||||||
array("result" => "error",
|
array("result" => "error",
|
||||||
"html" => $form->__toString()));
|
"html" => $form->__toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete existing comment.
|
* Delete existing comment.
|
||||||
* @see REST_Controller::_delete($resource)
|
* @see REST_Controller::_delete($resource)
|
||||||
*/
|
*/
|
||||||
public function _delete($comment) {
|
public function _delete($comment) {
|
||||||
$item = ORM::factory("item", $comment->item_id);
|
$item = ORM::factory("item", $comment->item_id);
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
access::required("edit", $item);
|
access::required("edit", $item);
|
||||||
|
|
||||||
$comment->delete();
|
$comment->delete();
|
||||||
print json_encode(array("result" => "success"));
|
print json_encode(array("result" => "success"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Present a form for adding a new comment to this item or editing an existing comment.
|
* Present a form for adding a new comment to this item or editing an existing comment.
|
||||||
* @see REST_Controller::form_add($resource)
|
* @see REST_Controller::form_add($resource)
|
||||||
*/
|
*/
|
||||||
public function _form_add($item_id) {
|
public function _form_add($item_id) {
|
||||||
$item = ORM::factory("item", $item_id);
|
$item = ORM::factory("item", $item_id);
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
|
|
||||||
print comment_3nids::get_add_form($item);
|
print comment_3nids::get_add_form($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Present a form for editing an existing comment.
|
* Present a form for editing an existing comment.
|
||||||
* @see REST_Controller::form_edit($resource)
|
* @see REST_Controller::form_edit($resource)
|
||||||
*/
|
*/
|
||||||
public function _form_edit($comment) {
|
public function _form_edit($comment) {
|
||||||
if (!user::active()->admin) {
|
if (!user::active()->admin) {
|
||||||
access::forbidden();
|
access::forbidden();
|
||||||
}
|
}
|
||||||
print comment_3nids::get_edit_form($comment);
|
print comment_3nids::get_edit_form($comment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,128 +1,128 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.");
|
<?php defined("SYSPATH") or die("No direct script access.");
|
||||||
/**
|
/**
|
||||||
* Gallery - a web based photo album viewer and editor
|
* Gallery - a web based photo album viewer and editor
|
||||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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
|
* the Free Software Foundation; either version 2 of the License, or (at
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the API for handling comments.
|
* This is the API for handling comments.
|
||||||
*
|
*
|
||||||
* Note: by design, this class does not do any permission checking.
|
* Note: by design, this class does not do any permission checking.
|
||||||
*/
|
*/
|
||||||
class comment_3nids_Core {
|
class comment_3nids_Core {
|
||||||
|
|
||||||
public function count($item) {
|
public function count($item) {
|
||||||
access::required("view", $item);
|
access::required("view", $item);
|
||||||
|
|
||||||
$comments = ORM::factory("comment")
|
$comments = ORM::factory("comment")
|
||||||
->where("item_id", $item->id)
|
->where("item_id", $item->id)
|
||||||
->where("state", "published")
|
->where("state", "published")
|
||||||
->orderby("created", "DESC")
|
->orderby("created", "DESC")
|
||||||
->find_all();
|
->find_all();
|
||||||
|
|
||||||
return $comments->count();
|
return $comments->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new comment.
|
* Create a new comment.
|
||||||
* @param Item_MOdel $item the parent item
|
* @param Item_MOdel $item the parent item
|
||||||
* @param User_Model $author the author User_Model
|
* @param User_Model $author the author User_Model
|
||||||
* @param string $text comment body
|
* @param string $text comment body
|
||||||
* @param string $guest_name guest's name (if the author is a guest user, default empty)
|
* @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_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)
|
* @param string $guest_url guest's url (if the author is a guest user, default empty)
|
||||||
* @return Comment_Model
|
* @return Comment_Model
|
||||||
*/
|
*/
|
||||||
static function create($item, $author, $text, $guest_name=null,
|
static function create($item, $author, $text, $guest_name=null,
|
||||||
$guest_email=null, $guest_url=null) {
|
$guest_email=null, $guest_url=null) {
|
||||||
$comment = ORM::factory("comment");
|
$comment = ORM::factory("comment");
|
||||||
$comment->author_id = $author->id;
|
$comment->author_id = $author->id;
|
||||||
$comment->guest_email = $guest_email;
|
$comment->guest_email = $guest_email;
|
||||||
$comment->guest_name = $guest_name;
|
$comment->guest_name = $guest_name;
|
||||||
$comment->guest_url = $guest_url;
|
$comment->guest_url = $guest_url;
|
||||||
$comment->item_id = $item->id;
|
$comment->item_id = $item->id;
|
||||||
$comment->text = $text;
|
$comment->text = $text;
|
||||||
$comment->state = "published";
|
$comment->state = "published";
|
||||||
|
|
||||||
// These values are useful for spam fighting, so save them with the comment.
|
// These values are useful for spam fighting, so save them with the comment.
|
||||||
$input = Input::instance();
|
$input = Input::instance();
|
||||||
$comment->server_http_accept = substr($input->server("HTTP_ACCEPT"), 0, 128);
|
$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_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_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_accept_language = substr($input->server("HTTP_ACCEPT_LANGUAGE"), 0, 64);
|
||||||
$comment->server_http_connection = substr($input->server("HTTP_CONNECTION"), 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_host = substr($input->server("HTTP_HOST"), 0, 64);
|
||||||
$comment->server_http_referer = substr($input->server("HTTP_REFERER"), 0, 255);
|
$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_http_user_agent = substr($input->server("HTTP_USER_AGENT"), 0, 128);
|
||||||
$comment->server_query_string = substr($input->server("QUERY_STRING"), 0, 64);
|
$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_addr = substr($input->server("REMOTE_ADDR"), 0, 32);
|
||||||
$comment->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64);
|
$comment->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64);
|
||||||
$comment->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16);
|
$comment->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16);
|
||||||
$comment->save();
|
$comment->save();
|
||||||
|
|
||||||
return $comment;
|
return $comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function get_add_form($item) {
|
static function get_add_form($item) {
|
||||||
$form = new Forge("comments_3nids?item_id=".$item->id, "", "post", array("id" => "gAddCommentForm"));
|
$form = new Forge("comments_3nids?item_id=".$item->id, "", "post", array("id" => "gAddCommentForm"));
|
||||||
$group = $form->group("add_comment")->label(t("Add comment"));
|
$group = $form->group("add_comment")->label(t("Add comment"));
|
||||||
$group->input("name") ->label(t("Name")) ->id("gAuthor");
|
$group->input("name") ->label(t("Name")) ->id("gAuthor");
|
||||||
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
|
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
|
||||||
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
|
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
|
||||||
$group->textarea("text")->label(t("Comment")) ->id("gText");
|
$group->textarea("text")->label(t("Comment")) ->id("gText");
|
||||||
$group->hidden("item_id")->value($item->id);
|
$group->hidden("item_id")->value($item->id);
|
||||||
module::event("comment_add_form", $form);
|
module::event("comment_add_form", $form);
|
||||||
$group->submit("")->value(t("Add")) ->class("gButtonLink ui-corner-all ui-icon-left ui-state-default");
|
$group->submit("")->value(t("Add")) ->class("gButtonLink ui-corner-all ui-icon-left ui-state-default");
|
||||||
|
|
||||||
$active = user::active();
|
$active = user::active();
|
||||||
if (!$active->guest) {
|
if (!$active->guest) {
|
||||||
$group->inputs["name"]->value($active->full_name)->disabled("disabled");
|
$group->inputs["name"]->value($active->full_name)->disabled("disabled");
|
||||||
$group->email->value($active->email)->disabled("disabled");
|
$group->email->value($active->email)->disabled("disabled");
|
||||||
$group->url->value($active->url)->disabled("disabled");
|
$group->url->value($active->url)->disabled("disabled");
|
||||||
} else {
|
} else {
|
||||||
$group->inputs["name"]->error_messages("missing", t("You must provide a name"));
|
$group->inputs["name"]->error_messages("missing", t("You must provide a name"));
|
||||||
}
|
}
|
||||||
$group->text->error_messages("missing", t("You must provide a comment"));
|
$group->text->error_messages("missing", t("You must provide a comment"));
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function get_edit_form($comment) {
|
static function get_edit_form($comment) {
|
||||||
$form = new Forge("comments/{$comment->id}?_method=put", "", "post",
|
$form = new Forge("comments/{$comment->id}?_method=put", "", "post",
|
||||||
array("id" => "gEditCommentForm"));
|
array("id" => "gEditCommentForm"));
|
||||||
$group = $form->group("edit_comment")->label(t("Edit comment"));
|
$group = $form->group("edit_comment")->label(t("Edit comment"));
|
||||||
$group->input("name") ->label(t("Author")) ->id("gAuthor");
|
$group->input("name") ->label(t("Author")) ->id("gAuthor");
|
||||||
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
|
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
|
||||||
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
|
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
|
||||||
$group->textarea("text")->label(t("Comment")) ->id("gText");
|
$group->textarea("text")->label(t("Comment")) ->id("gText");
|
||||||
$group->submit("")->value(t("Edit"));
|
$group->submit("")->value(t("Edit"));
|
||||||
|
|
||||||
$group->text = $comment->text;
|
$group->text = $comment->text;
|
||||||
$author = $comment->author();
|
$author = $comment->author();
|
||||||
if ($author->guest) {
|
if ($author->guest) {
|
||||||
$group->inputs["name"]->value = $comment->guest_name;
|
$group->inputs["name"]->value = $comment->guest_name;
|
||||||
$group->email = $comment->guest_email;
|
$group->email = $comment->guest_email;
|
||||||
$group->url = $comment->guest_url;
|
$group->url = $comment->guest_url;
|
||||||
} else {
|
} else {
|
||||||
$group->inputs["name"]->value($author->full_name)->disabled("disabled");
|
$group->inputs["name"]->value($author->full_name)->disabled("disabled");
|
||||||
$group->email->value($author->email)->disabled("disabled");
|
$group->email->value($author->email)->disabled("disabled");
|
||||||
$group->url->value($author->url)->disabled("disabled");
|
$group->url->value($author->url)->disabled("disabled");
|
||||||
}
|
}
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,96 +1,96 @@
|
|||||||
.tooltip{
|
.tooltip{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
background-color: #777;
|
background-color: #777;
|
||||||
color: #ffffcc;
|
color: #ffffcc;
|
||||||
border: 1px solid #f9db01;
|
border: 1px solid #f9db01;
|
||||||
font: bold 13px "Trebuchet MS", Verdana, Arial, sans-serif;
|
font: bold 13px "Trebuchet MS", Verdana, Arial, sans-serif;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
-moz-border-radius: 10px;
|
-moz-border-radius: 10px;
|
||||||
-moz-opacity: .87;
|
-moz-opacity: .87;
|
||||||
filter:alpha(opacity=87);
|
filter:alpha(opacity=87);
|
||||||
opacity:.87;
|
opacity:.87;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gMapThumbTable{
|
.gMapThumbTable{
|
||||||
width:200px;
|
width:200px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #FFFFCC;
|
color: #FFFFCC;
|
||||||
}
|
}
|
||||||
.gMapThumbImg{
|
.gMapThumbImg{
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
height:125px;
|
height:125px;
|
||||||
}
|
}
|
||||||
.gMapThumbLink{
|
.gMapThumbLink{
|
||||||
height: 15px;
|
height: 15px;
|
||||||
}
|
}
|
||||||
.gMapThumbTd{
|
.gMapThumbTd{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.gMapThumbnail{
|
.gMapThumbnail{
|
||||||
height: 80px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
#gmInfo{
|
#gmInfo{
|
||||||
width: 230px;
|
width: 230px;
|
||||||
}
|
}
|
||||||
#gmInfo_contents{
|
#gmInfo_contents{
|
||||||
background: #3d3d3d;
|
background: #3d3d3d;
|
||||||
}
|
}
|
||||||
#gmInfo_contents div{
|
#gmInfo_contents div{
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
#gmInfo_tl{
|
#gmInfo_tl{
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
background: url('../images/gmInfo_tl.png') top left no-repeat transparent;
|
background: url('../images/gmInfo_tl.png') top left no-repeat transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_t{
|
#gmInfo_t{
|
||||||
background: url('../images/gmInfo_t.png') top left repeat-x transparent;
|
background: url('../images/gmInfo_t.png') top left repeat-x transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_tr{
|
#gmInfo_tr{
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
background: url('../images/gmInfo_tr.png') top left no-repeat transparent;
|
background: url('../images/gmInfo_tr.png') top left no-repeat transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_l{
|
#gmInfo_l{
|
||||||
width: 14px;
|
width: 14px;
|
||||||
background: url('../images/gmInfo_l.png') top left repeat-y transparent;
|
background: url('../images/gmInfo_l.png') top left repeat-y transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_r{
|
#gmInfo_r{
|
||||||
width: 14px;
|
width: 14px;
|
||||||
background: url('../images/gmInfo_r.png') top right repeat-y transparent;
|
background: url('../images/gmInfo_r.png') top right repeat-y transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_bl{
|
#gmInfo_bl{
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
background: url('../images/gmInfo_bl.png') top left no-repeat transparent;
|
background: url('../images/gmInfo_bl.png') top left no-repeat transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_b{
|
#gmInfo_b{
|
||||||
background: url('../images/gmInfo_b.png') top left repeat-x transparent;
|
background: url('../images/gmInfo_b.png') top left repeat-x transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_br{
|
#gmInfo_br{
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
background: url('../images/gmInfo_br.png') top left no-repeat transparent;
|
background: url('../images/gmInfo_br.png') top left no-repeat transparent;
|
||||||
}
|
}
|
||||||
#gmInfo_close{
|
#gmInfo_close{
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
background: url('../images/gmInfo_close.png') top left no-repeat transparent;
|
background: url('../images/gmInfo_close.png') top left no-repeat transparent;
|
||||||
margin: -10px 0 0 10px;
|
margin: -10px 0 0 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
#gmInfo_beak{
|
#gmInfo_beak{
|
||||||
width: 27px;
|
width: 27px;
|
||||||
height: 33px;
|
height: 33px;
|
||||||
background: url('../images/gmInfo_beak.png') top left no-repeat transparent;
|
background: url('../images/gmInfo_beak.png') top left no-repeat transparent;
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.");
|
<?php defined("SYSPATH") or die("No direct script access.");
|
||||||
/**
|
/**
|
||||||
* Gallery - a web based photo album viewer and editor
|
* Gallery - a web based photo album viewer and editor
|
||||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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
|
* the Free Software Foundation; either version 2 of the License, or (at
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
class tagsmap_theme {
|
class tagsmap_theme {
|
||||||
static function head($theme) {
|
static function head($theme) {
|
||||||
$theme->css("tagsmap.css");
|
$theme->css("tagsmap.css");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user