CpmFetch + Enlargeit Integration CpmFetch + Enlargeit Integration
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CpmFetch + Enlargeit Integration

Started by PeterLawrence, October 15, 2008, 08:20:22 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

PeterLawrence

I've made an attempt to develop a Java script that uses the Enlargeit java script code, which enlarges thumb images in a similar way as Highslide or Lightbox.

This script seems to work ok however there is the problem with the duplication of data in the image tag.
My question is this...
  .. in CpmFetch is it possible to assign different information to the image title and alt tag?
Since the $option 'alttag' seems to be used for both.


<?php
// Gallery Coppermine script by P.J.Lawrence (October 2008)
// Using... 
// Enlargeit Script (http://enlargeit.timos-welt.de/english/index.php)
// CpmFetch http://cpmfetch.fistfullofcode.com/
//
// Notes..
// Ensure that the variable enl_gifpath in enlargeit.js  points to the correct directory

$CoppermineWebPath '/cpg1418/';  // Web path to Coppermine Gallery
$EnlargeitWebPath '/enlargeit/';       // Web path to Highslide java code
$cpmfetchPath '/Coppermine-Live-Demo_1_5/htdocs/cpg1418/cpmfetch/'// System Path to CPMFetch

if ($_GET['rows']) {
$Rows=$_GET['rows'];
}
else {
$Rows=4;
}
if ($_GET['cols']) {
$Cols=$_GET['cols'];
}
else {
$Cols 4;
}
if ($_GET['album']) {
$Album=$_GET['album'];
}

include  $cpmfetchPath."cpmfetch.php";
echo '<script type="text/javascript" src="',$EnlargeitWebPath,'Source/enlargeit.js"></script>';

echo "<center>"
$objCpm = new cpm($cpmfetchPath."cpmfetch_config.php");
$option = array(
'linkstyle' =>'image" target="_blank" onclick="return false;',
'linktemplate'=> '{{pFilename}}" id="{{pFilename}}',
'imagestyle'  =>'set1" onclick="enlarge(this);',
'alttag' => '{{pFilename}}" id="{{pPid}}" longdesc="'.$CoppermineWebPath.'albums/{{pFilepath}}{{pFilename}}',
'tablestyle' => 'windowbg" width="150" bordercolor="#0099ff" border="5" height="150"',
'cellstyle' => 'windowbg windowbg_hover" valign="middle" align="center');

if ($Album) {
$objCpm->cpm_viewLastAddedMediaFromAlbum($Rows,$Cols,$Album,$option);
}
else {
$objCpm->cpm_viewLastAddedMedia($Rows,$Cols,$option);
}
$objCpm->cpm_close(); 
echo '</center>';
?>



Note I used the images and enlargeit.js from the Example_2_Easy_Nav_Buttons example which is provided with in the enlargeit_v100.zip download file.
This script displays the most recent images from either the gallery or a specific album.
Input parameters are album, rows and cols
i.e thiscript?Album=1&rows=3&cols=3

PeterLawrence

#1
Corrected typo in the above script.

PeterLawrence

I thought I would attach the php script with the enlargeit js code just in case it proves useful to someone.
The script should work OK if placed in the root folder.
If there is a problem you should check the directory paths specified in EnlargeitCoppermineSlideshow.php and
enlargeit.js.

Shane

I want this! I just can't make the enlargeit work on the mouseclick.

Site:  http://philmontforum.com
Gallery:  http://philmontforum.com/cpg - v1.4.19
Gallery is bridged to Joomla 1.0.15 via Mehdi's bridge

I modified the cpmfetch/enlargeit code just a little to fit my needs:


<?php
//
// Gallery Coppermine script by P.J.Lawrence (October 2008)
// Disclaimer: This mod is provided "as is" without express or implied warranty.
//
// Using... 
// Enlargeit Script (http://enlargeit.timos-welt.de/english/index.php)
// CpmFetch http://cpmfetch.fistfullofcode.com/
//
// Notes..
// Ensure that the variable enl_gifpath in enlargeit.js points to the correct directory

$CoppermineWebPath '../cpg/';  // Web path to Coppermine Gallery
$EnlargeitWebPath '../cpg/plugins/enlargeit/include/js/'// Web path to Enlargeit java code
$cpmfetchPath '../cpg/cpmfetch/'// System Path to CPMFetch

if ($_GET['rows']) {
$Rows=$_GET['rows'];
}
else {
$Rows=1;
}
if ($_GET['cols']) {
$Cols=$_GET['cols'];
}
else {
$Cols 3;
}

include  $cpmfetchPath."cpmfetch.php";
echo '<script type="text/javascript" src="',$EnlargeitWebPath,'Source/enlargeit.js"></script>';

echo "<CENTER>"
$objCpm = new cpm($cpmfetchPath."cpmfetch_config.php");
$option = array(
'linkstyle' =>'image" target="_blank" onclick="return false;',
'imagestyle'  =>'set1" onclick="enlarge(this);',
'alttag' => '{{pFilename}}" id="{{pPid}}" longdesc="'.$CoppermineWebPath.'albums/{{pFilepath}}{{pFilename}}',
'tablestyle' => 'windowbg" width="150" bordercolor="#0099ff" border="5" height="150"',
'cellstyle' => 'windowbg windowbg_hover" valign="middle" align="center');


$objCpm->cpm_viewRandomMediaFrom("cat=2,3,4,5,7",$Rows,$Cols,$option);

$objCpm->cpm_close(); 

echo '<a href="'.$CoppermineWebPath.'">| View Gallery |</a>';
echo '</center>';
?>



The cpmfetch part works perfectly - I get the desired 1 row of 3 columns of thumbnails to generate on my site homepage as desired.  If you go to the site, I have three different cpmfetch files generating front page content, so you may have to refresh until you get the correct one to load.  This code will generate a 1 row/3column set with a BLUE border around them (the other two cpm fetch files generate a green border).

I cannot get the enlargeit part to work.  Clicking on the thumbnails does NOTHING.  Any ideas of my mistakes in the code above?  I am a self taught no-nothing coder.  I figure things out by looking at other code...  Thanks for any help!

Shane

My problems were with paths...

The php file that will call the photos and activate the enlargeit script are at www.site.com/cms/images/phpfile.php
My gallery is located at www.site.com/cpg
cpmfetch is located at www.site.com/cpg/cpmfetch

I uploaded the Source folder from PeterLawrence's zip file to www.site.com/cms/images/Source - this folder contains the enlargeit.js script and the other files needed for proper use.

Here is my cpmfetch/enlargeit code:


<?php
//
// Gallery Coppermine script by P.J.Lawrence (October 2008)
// Disclaimer: This mod is provided "as is" without express or implied warranty.
//
// Using... 
// Enlargeit Script (http://enlargeit.timos-welt.de/english/index.php)
// CpmFetch http://cpmfetch.fistfullofcode.com/
//
// Notes..
// Ensure that the variable enl_gifpath in enlargeit.js points to the correct directory

$CoppermineWebPath '../cpg/';  // Web path to Coppermine Gallery
$EnlargeitWebPath '/Source/'// Web path to Enlargeit java code
$cpmfetchPath '../cpg/cpmfetch/'// System Path to CPMFetch

if ($_GET['rows']) {
$Rows=$_GET['rows'];
}
else {
$Rows=1;
}
if ($_GET['cols']) {
$Cols=$_GET['cols'];
}
else {
$Cols 3;
}

include  $cpmfetchPath."cpmfetch.php";
echo '<script type="text/javascript" src="images/Source/enlargeit.js"></script>';

echo "<CENTER>"
$objCpm = new cpm($cpmfetchPath."cpmfetch_config.php");
$option = array(
'linkstyle' =>'image" target="_blank" onclick="return false;',
'imagestyle'  =>'set1" onclick="enlarge(this);',
'alttag' => '{{pFilename}}" id="{{pPid}}" longdesc="'.$CoppermineWebPath.'albums/{{pFilepath}}{{pFilename}}',
'tablestyle' => 'windowbg" width="150" bordercolor="#0099ff" border="5" height="150"',
'cellstyle' => 'windowbg windowbg_hover" valign="middle" align="center');


$objCpm->cpm_viewRandomMediaFrom("cat=2,3,4,5,7",$Rows,$Cols,$option);

$objCpm->cpm_close(); 

echo '<a href="'.$CoppermineWebPath.'">| View Gallery |</a>';
echo '</center>';
?>



Here is my enlargeit.js code:


/*  This comment MUST stay intact for legal use, so don't remove it.
    EnlargeIt! v1.1b7 - (c) 2008 Timo Sack - http://enlargeit.timos-welt.de
    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 3 of the License, or
    (at your option) any later version. See LICENSE.TXT for details. */

// modify these
var enl_gifpath='/cms/images/Source/files/';   // path to graphics (png)
var enl_brdsize=25;           // border thickness
var enl_brdcolor='#ffffff';   // border color
var enl_brdround=1;           // use rounded borders (Mozilla/Safari only)
var enl_maxstep=10;           // ani steps (10-30)
var enl_speed=6;              // time between steps
var enl_ani=5;                // 0=no,1=fade,2=glide,3=bumpglide,4=smoothglide,5=expglide
var enl_shadow=1;             // shadow under border (0/1)
var enl_shadowsize=1;         // size of shadow right/bottom (0-5)
var enl_shadowintens=16;      // shadow intensity (10-30)
var enl_dark=2;               // darken screen (0=off/1=on/2=keep dark when nav)
var enl_darkprct=70;          // how dark the screen should be (0-100)
var enl_darksteps=1;          // how long darkening should take (1-20)
var enl_center=1;             // center enlarged pic on screen (0/1)
var enl_drgdrop=1;            // enable drag&drop for pics (0/1)
var enl_preload=1;            // preload next/prev pic in grouped sets (0/1)
var enl_titlebar=0;           // show pic title bar (0/1)
var enl_keynav=1;             // navigation with arrow keys (0/1)
var enl_wheelnav=1;           // navigation with mouse wheel (0/1)
var enl_titletxtcol='#808080';// color of title bar text
var enl_ajaxcolor='#dddddd';  // background color for AJAX
var enl_btnact='bact.png';    // active buttons
var enl_btninact='binact.png';// inactive buttons
var enl_minuscur='minus.cur'; // mouse cursor of enlarged image
var enl_usecounter=0;         // hidden call of counter page (0/1)
var enl_counterurl='';        // base URL of counter page

// don't modify next line
var enl_buttonurl = new Array(),enl_buttontxt = new Array(),enl_buttonoff = new Array();

// define your buttons here
enl_buttonurl[0] = 'max';
enl_buttontxt[0] = 'Show full size';
enl_buttonoff[0] = -84;
enl_buttonurl[1] = 'prev';
enl_buttontxt[1] = 'Previous [left arrow]';
enl_buttonoff[1] = -126;
enl_buttonurl[2] = 'next';
enl_buttontxt[2] = 'Next [right arrow]';
enl_buttonoff[2] = -147;
enl_buttonurl[3] = 'close';
enl_buttontxt[3] = 'Close [Esc]';
enl_buttonoff[3] = -105;

// stuff to leave alone
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('m 1u=1l 5C(),G=1l 5C();m 3d,H,1j=0,2L=0;m 7a=h.5h;m 1P=h.69&&!h.5h;m 4z=5S.7Y.4p("7A")+1;m 3E=E,2y=E;m u,2g=0,4P=0;m P,U,2a,2c,L=\'\';m 2p=0,2o=0,O=84,2G=0;m 1z=E,2l=E,2D=0;c 4h(){9(!2p){2p=1;9(4z)1Q=0;9(18.21)1h=1;m f=0;3a(f<18.21){9(18[f]==\'4Y\')4P=1;f++}1z=E;9(n.3V){1z=1l 3V();9(3b)2l=1l 3V()}g 9(n.1O){14{1z=1l 1O("4N.2U");9(3b)2l=1l 1O("4N.2U")}11(13){14{1z=1l 1O("4E.2U");9(3b)2l=1l 1O("4E.2U")}11(13){}}}9(1h){2n(1r+67);3d=1u[1j];2n(1r+4C)}S=28(\'S\');S.e.1b=8a;2e=1l 5R();2e.1K=1r+\'83.7X\';2e.e.5L=\'5J\';2e.e.7K=\'5I\';2e.e.7F=\'4n\';S.1E(2e);1n=28(\'5D\');1n.1w=\'7s\';1n.e.3f=5p;9(4t){1n.e.4e=i+\'r\';1n.e.4b=i+\'r\'}9(1Y){2j=28(\'57\');9(4z)2j.e.2T=\'1U(\'+1r+\'6W.6S)\';g{2j.e.3f=\'4n\';1J(2j,6P);9(4t){2j.e.4e=34(i+1)+\'r\';2j.e.4b=34(i+1)+\'r\'}}}9(2i){w=28(\'w\');w.e.3f=\'4n\';w.e.1b=6M;4S(47);3c(w)}9(6F){h.6D=5m;h.6u=1e}2p=2}}c 3P(1x){m 2E=0;9(!1x)1x=n.29;9(1x.4I){2E=1x.4I}g 9(1x.4G){2E=-1x.4G}9(L!=\'\'&&(L.3K(/1D/)==-1)){9(2E>0)3t(L);9(2E<0)3x(L)}9(1x.5X)1x.5X();1x.8B=E;B E}c 3c(k){9(8p){9(n.66)k.66(\'8j\',3P,E);g k.8f=3P}}c o(k,63,5Z,4y,5Y){k.e.N=63+\'r\';k.e.1g=5Z+\'r\';9(4y){k.e.M=4y+\'r\';k.e.T=5Y+\'r\'}}c 5m(3w){9(L!=\'\'&&(L.3K(/1D/)==-1)){3w=3w||n.29;5U=3w.86;5P(5U){1H 39:3t(L);1t;1H 37:3x(L);1t;1H 27:1W(L);1t}}}c 1J(k,3o){k.e.5K=3o/Z;k.e.7N=3o/Z;k.e.7J="7H(5K="+3o+")"}c d(b){B h.69(b)}c 2n(3n){1j+=1;1u[1j]=1l 5R();9(3n.3m(0,5)!=\'1D::\')1u[1j].1K=3n;g 1u[1j].1K=3n.3g(\'::\')[1]}c W(k){k.e.3k=\'5y\'}c 12(k){k.e.3k=\'5v\'}c 28(5u){22=h.3l("24");12(22);22.l=5u;22.e.2k=\'2M\';o(22,-1N,0,0,0);h.s.1E(22);B 22}c 3v(){9(F n.5i!=\'1k\'){P=n.5i-10;U=n.3C}g 9(F h.1Z!=\'1k\'&&F h.1Z.3D!=\'1k\'&&h.1Z.3D!=0){P=h.1Z.3D;U=h.1Z.5d}g{P=h.2X(\'s\')[0].3D;U=h.2X(\'s\')[0].5d}2c=n.7e||h.1Z.5a||h.s.5a||0;2a=n.79||h.1Z.59||h.s.59||0}c 47(){9(2L){w=d(\'w\');o(w,0,0,0,0);3v();9(n.3C&&n.49)2f=(n.3C+n.49>U)?n.3C+n.49:U;g 2f=(h.s.54>h.s.48)?h.s.54:h.s.48;2f=(U>2f)?U:2f;o(w,0,0,h.s.6Z,2f)}}c 2W(t){m 1B={1g:0,N:0,M:0,T:0};9(!t)B 1B;g 9(F t==\'6R\')t=d(t);9(F t!=\'36\')B 1B;9(F t.52!=\'1k\'){1B.T=t.48;1B.M=t.4Z;1B.N=t.1g=0;3a(t&&t.4X!=\'4W\'){1B.1g+=A(t.52);1B.N+=A(t.6O);t=t.6N}}B 1B}c 2x(16){9(2i){w=d(\'w\');9(2L==0){1J(w,0);2L=1;W(w);47();9(16)38(44-1);g 38(0)}}}c 38(2v){9(L==\'\')2z;g{w=d(\'w\');2v++;1J(w,6L/44*2v);9(2v<44)j(\'38(\'+2v+\')\',4)}}c 2z(){9(2i&&!2D){w=d(\'w\');12(w);o(w,-1N,0,0,0);2L=0}}c 3R(2w){m K;9(1Q==3)K=((-1*q.6A(2w-0.2))+0.6x)*3.5;g 9(1Q==4)K=(q.6v(1.5*q.4O+2w*q.4O)+1)/2;g 9(1Q==5)K=q.5t(2w,q.5t(2,2));g K=2w;B K}c 2C(b){L=b;8=d(b);8.1y=4M;8.4L=4K;2o=0;9(F 1S!=\'1k\')2u=1S;9(6m){4r=33(b);9(4r){32=4r.J(\'1C\');j(\'2n("\'+32+\'")\',30)}3L=3r(b);9(3L){32=3L.J(\'1C\');j(\'2n("\'+32+\'")\',30)}}}c 3q(k){k.1y=1e;k.2R=1e;k.4L=1e}c 5M(3J){m 3I=n.3y;9(F n.3y!=\'c\'){n.3y=3J}g{n.3y=c(){9(3I){3I()}3J()}}}c 4S(3G){m 4w=n.3A;9(F n.3A!=\'c\')n.3A=3G;g{n.3A=c(){3G();9(4w){j(\'"+4w+"\',25)}}}}c 2Q(k){S=d(\'S\');V=2W(k);o(S,V.N+V.M/2-17,V.1g+V.T/2-17);W(S)}c 2t(){S=d(\'S\');12(S);o(S,-1N,0)}c 3r(b){19=d(d(b).X);9(19.1o){m 1f=h.s.2X(\'6a\');m 16=0;4B(m f=1f.21;f>=0;f--){9((16==1)&&(1f[f].1o==19.1o)&&!1f[f].X){16=2;2r=1f[f]}9(19==1f[f])16=1}9(16==2&&!2r.2b&&19.1o!=\'4A\'&&19.1o!=\'65\')B 2r;g B 1e}}c 33(b){19=d(d(b).X);9(19.1o){m 1f=h.s.2X(\'6a\');m 16=0;4B(m f=0;f<1f.21;f++){9((16==1)&&(1f[f].1o==19.1o)&&!1f[f].X){16=2;2r=1f[f]}9(19==1f[f])16=1}9(16==2&&!2r.2b&&19.1o!=\'4A\'&&19.1o!=\'65\')B 2r;g B 1e}}c 64(62,61){2O=h.3l("a");2O.l=62;14{2O.e.2N=\'4x\'}11(13){}3B(2O.e){T=H+\'r\';M=H+\'r\';8e=\'8d\';2T=\'1U(\'+1r+4C+\')\';8c=\'3z-8b\';89=61+\'r 2d\';88=\'87\';5W=\'N\';5V=\'N\'}B 2O}c 5T(b){9(1h){8=d(b);Y=d(8.X);1c=28(b+\'2K\');1c.e.5Q=\'85\';2J=A(8.z)-18.21*(H+3);9(2J>Z&&8.5O!=\'\'){2I=h.3l(\'24\');3B(2I.e){2k=\'82\';5W=\'N\';5V=\'N\';81=\'5N\';7Z=\'2d\';7W=\'7V,7U,7T-7S\';7R=\'7Q\';4s=7P;7O=\'7M\';7L=\'7I\'}2F=8.5O;9(2F.21>q.C(2J*0.1))2F=2F.7G(0,q.C(2J*0.1)-2)+\'...\';2I.2m=2F;2I.e.M=2J+\'r\';1c.1E(2I)}m f=0;3a(f<18.21){9(18[f]==\'5H\'&&33(b)==1e){f++;4q}g 9(18[f]==\'5G\'&&3r(b)==1e){f++;4q}g 9(((18[f]==\'5F\')||(18[f]==\'5E\'))&&(Y.J(\'1C\').3K(/4o.+/)==-1)){f++;4q}G[f]=64(b+f,7E[f]);G[f].7D=7C[f];G[f].4m=b;G[f].4l=18[f];9(18[f].3m(0,5)==\'7B:\'){G[f].1y=c(){5A(23)}}g{5P(18[f]){1H\'4Y\':G[f].1y=c(){1W(b)};1t;1H\'5F\':G[f].1y=c(){5z(b)};1t;1H\'5E\':m 4k=\'7z.7y?5x=\'+8.1w;G[f].2R=c(){n.4i(4k+\'&5B=1\',\'7x\',\'7w=5s,7v=3z,7u=3z,7t=5s,M=7r,T=7q\');23.3h;B E};G[f].7p=4k+\'&7n;5B=1\';1t;1H\'7m\':G[f].1y=c(){5r(b)};1t;1H\'5G\':G[f].1y=c(){3x(b)};1t;1H\'5H\':G[f].1y=c(){3t(b)};1t;5q:G[f].1y=c(){5o(23)};1t}}G[f].7l=c(){5n(23)};G[f].7k=c(){5l(23)};1c.1E(G[f]);f++}8.5k=1c.4Z}}c 5z(b){8=d(b);Y=d(8.X);Y.5j(\'1C\',Y.J(\'1C\').4v(/4o/,\'\'));Y.5j(\'7j\',Y.J(\'1C\').4v(/4o/,\'\'));2G=1;j(\'1W("\'+b+\'")\',10)}c 3t(b){9(L!=\'\'){2q=33(b);9(2q){9(2i==2)2D=1;1W(b);2A(2q)}}}c 3x(b){9(L!=\'\'){2q=3r(b);9(2q){9(2i==2)2D=1;1W(b);2A(2q)}}}c 5r(b){8=d(b);d(b+\'1p\').2m=\'\';W(8)}c 4d(8,5g){1n=d(8.l+\'1p\');1n.2m=\'\';2Q(1n);12(8);14{1z.4i(\'5f\',5g,1F);1z.7i=c(){9(1z.7h==4){2t();5e=1z.7f;5c=8.v-2;5b=8.z-2;2S=\'<24 e="M:\'+5b+\'r;T:\'+5c+\'r;7d:7c;4a-4s:#7b;4a-M:5J;4a-e:5I;78-4s:\'+77+\';1X-N:\'+i+\'r;1X-76:\'+i+\'r;1X-75:\'+i+\'r;1X-1g:\';2S+=(i<H+4)?34(H+4):i;2S+=\'r;">\'+5e+\'</24>\';d(b+\'1p\').2m=2S}};1z.56(1e)}11(13){2t();d(b+\'1p\').2m="<5N><55/><55/><p e=\'74-73:72;\'>71 6Y 53 6X"}}c 46(b){9(3b){8=d(b);1i=6V;9(8.J(\'1w\'))1i+=8.J(\'1w\');14{2l.4i(\'5f\',1i,1F);2l.56(1e)}11(13){}}}c 5o(k){8=d(k.4m);b=8.l;1i=k.4l;9(8.J(\'1w\'))1i+=8.J(\'1w\');1i+=(1i.4p("?")<0)?"?8="+b:"&8="+b;4d(8,1i)}c 5A(k){8=d(k.4m);b=8.l;2Q(8);1i=k.4l.3m(5);9(8.J(\'1w\'))1i+=8.J(\'1w\');n.6U=1i.4v(/5x=/,\'6T=-\')}c 6Q(k){42=k.1w;b=42.3g("8=")[1];9(b.4p("&"))b=b.3g("&")[0];8=d(b);4d(8,42)}c 5n(k){k.e.2T=\'1U(\'+1r+67+\')\'}c 5l(k){k.e.2T=\'1U(\'+1r+4C+\')\'}c 2h(b){9(1h){1c=d(b+\'2K\');8=d(b);1s=A(8.e.N)+8.z-8.5k+5;D=(1h&&i<H+4)?A(8.e.1g)-(H+4):A(8.e.1g)-i;o(1c,1s,D);1c.e.1b=O+1;W(1c)}}c 51(b){9(1h){1c=d(b+\'2K\');12(1c);o(1c,-1N,0)}}c 3Z(b){8=d(b);31=d(b+"2Z");1T=d(b+"2Y");1q=8.z+3Y+i*2+2;9(1h&&i<H+4){Q=8.v+3Y+i*2+6+H-i;D=8.I-i-1-(H+4)+i}g{Q=8.v+3Y+i*2+2;D=8.I-i-1}o(31,8.R-i-1,D,1q,Q);31.e.1b=O-2;W(31);o(1T,8.R-i-2,D-1,1q+2,Q+2);1T.e.1b=O-2;W(1T)}c 3X(b){3W=d(b+"2Z");41=d(b+"2Y");12(3W);o(3W,-1N,0);12(41);o(41,-1N,0)}c 2H(b){8=d(b);1I=d(b+"1p");3c(1I);9(1h&&i<H+4){Q=8.v+i+H+4;D=8.I-i-(H+4)+i}g{Q=8.v+i*2;D=8.I-i}o(1I,8.R-i,D);3B(1I.e){M=34(8.z+i*2)+\'r\';T=Q+\'r\';3k=\'5y\';1b=O-1}9(1Y)j(\'3Z("\'+b+\'")\',10)}c 4V(b){1n=d(b+"1p");12(1n);o(1n,-1N,0);9(1Y)3X(b)}c 4U(t){9(3E&&4T){1s=1P?43+t.35-3U:43+29.35-3U;D=1P?3T+t.2V-3S:3T+29.2V-3S;o(u,1s,D);9(1h&&i<H+4)o(d(u.l+"1p"),1s-i,D-(H+4));g o(d(u.l+"1p"),1s-i,D-i);2h(u.l);2g++;9(2g>3)2y=1F;B E}}c 4M(t){u=1P?t.6K:29.6J;m 4R=1P?"6I":"4W";2y=E;3a(u.4X!=4R&&!u.v){u=1P?u.58:u.6H}3E=1F;O+=3;1A=u.l;9(1h)d(1A+\'2K\').e.1b=O+1;u.e.1b=O;9(1Y)3X(1A);d(1A+"1p").e.1b=O-1;43=A(u.e.N+0);3T=A(u.e.1g+0);3U=1P?t.35:29.35;3S=1P?t.2V:29.2V;2g=0;u.6G=4U;B E}c 4K(){u.I=A(u.e.1g);u.R=A(u.e.N);1A=u.l;9(1Y)3Z(1A);3q(u);3E=E;9(2y==1F){2H(1A);2h(1A);2y=E;j(\'2C("\'+1A+\'")\',Z)}g 1W(1A)}c 2A(8){9(!2p)4h();9(2p==1)B E;9(2o)B E;2o=1;8.2b=1;9(F 1S!=\'1k\')2u=0;m 2B=8.J(\'1C\');9(2B.3m(0,5)==\'1D::\'){9(F 4c!=\'1k\')4c(8);g{2o=0;8.2b=0;4Q("6E 7g 6C 6B! 6z 53 6y 3e (1D 6w)")}}g{2n(2B);b=8.J(\'l\');9(!2G)j(\'46("\'+b+\'")\',5);2G=0;j(\'4f("\'+b+\'")\',10)}}c 4f(b){8=d(b);S=d("S");9(!1u[1j].7o){2Q(8);W(S);14{8.3h()}11(13){}j(\'4f("\'+b+\'")\',70)}g{O+=3;2t();1M=8.3j(1F);o(1M,-1N,0);3B(1M){l=8.l+"6t";e.3k=\'5v\';e.2k=\'2M\';e.5L=\'2d\';e.6s=\'2d\';e.1X=\'2d\';e.5Q=\'2d\'}1M.X=8.l;6r=A(1u[1j].M);6q=A(1u[1j].T);h.s.1E(1M);4g=d("5D");1I=4g.3j(1F);1I.l=b+"6p";1I.e.1b=O-1;9(1Y){3Q=d("57");4j=3Q.3j(1F);4j.l=1M.l+"2Z";1T=3Q.3j(1F);1T.l=1M.l+"2Y";h.s.1E(4j);h.s.1E(1T)}h.s.1E(1I);14{8.3h()}11(13){}j(\'5w("\'+1M.l+\'")\',10)}}c 5w(b){O+=3;3v();9(F 3d!=\'1k\')H=A(3d.T);h.6o=c(){B E};8=d(b);3c(8);Y=d(8.X);14{Y.3h()}11(13){}3q(8);3q(Y);3i=8.J(\'1C\');V=2W(Y);8.e.1b=O;8.26=V.1g;8.1m=V.N;9((F 4J==\'6n\')&&(d(8.X).1o=="4A")){8.1V=A(V.T/(1+4J))}g{8.1V=V.T}8.1v=V.M;9(8.1v+8.1m>P-20)8.1m=P-8.1v-20;8.z=A(1u[1j].M);8.v=A(1u[1j].T);9(8.z>P-Z){8.v=q.C(8.v*(P-Z)/8.z);8.z=P-Z}9(8.v>U-80){8.z=q.C(8.z*(U-80)/8.v);8.v=U-80}8.R=q.C(8.1m-(8.z-8.1v)/2);8.I=q.C(8.26-(8.v-8.1V)/2);9(!6l){9(8.R<(50+2a))8.R=50+2a;9(8.I<(40+2c))8.I=40+2c;9(8.R+8.z>P+2a-50)8.R=P+2a-50-8.z;9(8.I+8.v>U+2c-40)8.I=U+2c-40-8.v}g{8.R=q.C(P/2+2a-8.z/2);8.I=q.C(U/2+2c-8.v/2)}8.y=0;8.6k=8.1K;5T(b);9(4T){14{8.e.2N=\'1U(\'+1r+3O+\'),6j\'}11(13){}}g{14{8.e.2N=\'1U(\'+1r+3O+\'),4x\'}11(13){}}9(1Q==1){j(\'3N("\'+b+\'")\',50)}g 9(!1Q){j(\'4H("\'+b+\'")\',50)}g{j(\'3M("\'+b+\'")\',50)}}c 3M(b){8=d(b);8.y++;9(8.y==1G){o(8,8.R,8.I,8.z,8.v);8.y=0;j(\'2H("\'+b+\'")\',1L);j(\'2x()\',1L*7);j(\'2C("\'+b+\'")\',1L*3);j(\'2h("\'+b+\'")\',1L*2)}g{9(8.y==1){8.1K=3i;8.e.2k=\'2M\';W(8);12(d(8.X))}m K=3R(8.y/1G);1q=q.C(K*(8.z-8.1v)+8.1v);Q=q.C(K*(8.v-8.1V)+8.1V);D=q.C(8.26+(8.I-8.26)*K);1s=q.C(8.1m+(8.R-8.1m)*K);9(1q<0)1q=0;9(Q<0)Q=0;o(8,1s,D,1q,Q);j(\'3M("\'+b+\'")\',1L)}}c 4H(b){8=d(b);o(8,8.R,8.I,8.z,8.v);8.1K=3i;8.e.2k=\'2M\';W(8);8.y=0;2H(b);2h(b);j(\'2C("\'+b+\'")\',30);j(\'2x()\',Z)}c 3N(b){4g=d(b+"1p");8=d(b);8.y++;9(8.y==1){o(8,8.R,8.I,8.z,8.v);1J(8,0);8.1K=3i;8.e.2k=\'2M\';W(8)}9(8.y==1G){1J(8,Z);8.y=0;2H(b);2h(b);j(\'2C("\'+b+\'")\',30);j(\'2x()\',Z)}g{1J(8,8.y/1G*Z);j(\'3N("\'+b+\'")\',1L)}}c 3p(b){8=d(b);Y=d(8.X);9(1h)h.s.1R(d(b+"2K"));h.s.1R(d(b+"1p"));9(1Y){h.s.1R(d(b+"2Z"));h.s.1R(d(b+"2Y"))}Y.1y=c(){2A(23)};h.s.1R(8);9(F 1S!=\'1k\')2u=1S;9(2G==1){2A(Y)}}c 4F(b){12(d(b));j(\'3p("\'+b+\'")\',10)}c 1W(b){L=\'\';9(F 1S!=\'1k\')2u=0;8=d(b);W(8);d(8.X).2b=1e;8.e.2N=\'5q\';4V(b);9(1h)51(b);9(2i)2z();2D=0;V=2W(d(8.X));8.26=V.1g;8.1m=V.N;9(8.1v+8.1m>P-20)8.1m=P-8.1v-20;9(!1Q)j(\'4F("\'+b+\'")\',20);g 9(1Q==1)j(\'45("\'+b+\'")\',20);g j(\'4u("\'+b+\'")\',20)}c 45(b){8=d(b);2g=0;8.y++;9(8.y==1G){8.y=0;12(8);j(\'3p("\'+b+\'")\',Z)}g{1J(8,(1-8.y/1G)*Z);j(\'45("\'+b+\'")\',1L)}}c 4u(b){8=d(b);2g=0;8.y++;9(8.y==1G){12(8);8.y=0;W(d(8.X));j(\'3p("\'+b+\'")\',Z)}g{m K=3R((1G-8.y)/1G);1q=q.C(K*(8.z-8.1v)+8.1v);Q=q.C(K*(8.v-8.1V)+8.1V);D=q.C(8.26+(8.I-8.26)*K);1s=q.C(8.1m+(8.R-8.1m)*K);9(1q<0)1q=0;9(Q<0)Q=0;o(8,1s,D,1q,Q);j(\'4u("\'+b+\'")\',1L)}}5M(4h);c 4c(8){2Q(8);m 2B=8.J(\'1C\');m 3u,3s=0;14{3u=1l 1O("4D.4D.6");3s=1}11(13){}14{3u=5S.6i["6h 6g"];9(3u)3s=1}11(13){}1a=2B.3g(\'::\');9(3s){9(F 1S!=\'1k\')2u=1S;1d=28(8.l+\'1D\');14{1d.e.2N=\'1U(\'+1r+3O+\'),4x\'}11(13){}1d.e.3f=5p;O+=3;1d.e.1b=O;m 2P=(n.1O)?\' l="\'+8.l+\'3H" 6f="6e:6d-6c-6b-8g-8y" 8x="\'+1a[1]+\'"\':\'\';2P+=\' M="\'+1a[2]+\'" T="\'+1a[3]+\'"><8w 1w="8v" 8u="\'+1a[1]+\'">\';2P+=\'<68 l="\'+8.l+\'8t\'+\'" 1K="\'+1a[1]+\'" 8s="8r/x-8q-3e" M="\'+1a[2]+\'" T="\'+1a[3]+\'"></68></36>\';9(n.1O){3F=h.3l("24");3F.l=8.l+\'3H\';1d.1E(3F);3F.8o=\'<36 e="1X:\'+i*2+\'r;" \'+2P;1d.2R=c(){2z();d(8.l).2b=0;m 2s=d(8.l+\'3H\');4B(m f 8n 2s){9(F 2s[f]=="c"){2s[f]=1e}};2s.58.1R(2s);h.s.1R(d(8.l+\'1D\'))}}g{1d.2m=\'<24 e="1X:\'+i*2+\'r;"><36 \'+2P+\'</24>\';1d.2R=c(){2z();d(8.l).2b=0;h.s.1R(d(8.l+\'1D\'))}}9(4t){1d.e.4e=i+\'r\';1d.e.4b=i+\'r\'}W(1d);3v();o(1d,q.C(P/2-A(1a[2])/2-i*2),q.C(U/2-A(1a[3])/2-i*2),A(1a[2])+i*4,A(1a[3])+i*4);2t(8);L=8.l+\'1D\';b=8.J(\'l\');j(\'46("\'+b+\'")\',15);j(\'2x(1)\',60)}g{2t(8);4Q("8m, 23 8l a 3e 8k 8i 8z 8h 3z 3e 8A 8C!")}2o=0}',62,535,'||||||||enl_img|if||enl_imgid|function|enl_geto|style|enl_i|else|document|enl_brdsize|setTimeout|enl_obj|id|var|window|enl_setpos||Math|px|body|enl_el|enl_drgelem|newh|enl_drk||steps|neww|parseInt|return|round|enl_tmpt|false|typeof|enl_button|enl_btnheight|newt|getAttribute|enl_factor|enl_infront|width|left|enl_zcnt|enl_brwsx|enl_tmph|newl|enl_ldr|height|enl_brwsy|enl_r|enl_visible|orig|enl_orig|100||catch|enl_hide|enl_err|try||enl_flag||enl_buttonurl|enl_oripic|enl_swfparts|zIndex|enl_btns|enl_swfdiv|null|enl_allElm|top|enl_titlebar|enl_geturl|enl_prldcnt|undefined|new|oldl|enl_brdm|className|brd|enl_tmpw|enl_gifpath|enl_tmpl|break|enl_prldimg|oldw|name|enl_wheelevent|onmousedown|enl_request|enl_drgid|enl_values|longdesc|swf|appendChild|true|enl_maxstep|case|enl_brdclone|enl_setopa|src|enl_speed|enl_clone|5000|ActiveXObject|enl_nn6|enl_ani|removeChild|realcopyspeed|enl_shdclone2|url|oldh|enl_shrink|margin|enl_shadow|documentElement||length|enl_div|this|div||oldt||enl_mkdiv|event|enl_scrollx|isenlarged|enl_scrolly|0px|enl_ldrgif|enl_darkh|enl_mvcnt|enl_showbtn|enl_dark|enl_shdm|position|enl_request2|innerHTML|enl_preloadit|enl_inprogress|enl_firstcall|enl_nextPic|enl_nextObj|enl_makenull|enl_ajaxldrhide|copyspeed|enl_darkenstep|enl_facthelp|enl_darken|enl_hasmvd|enl_nodark|enlarge|enl_getlongdesc|enl_makedraggable|enl_keepblack|enl_wheeldelta|enl_gettitle|enl_inmax|enl_mkborder|enl_title|enl_maxwidth|btns|enl_darkened|absolute|cursor|enl_tempbtn|enl_swfsrc|enl_ajaxload|onclick|enl_tmphtml|backgroundImage|XMLHTTP|clientY|enl_coord|getElementsByTagName|shd2|shd1||enl_shdclone1|enl_pictoget|enl_getnext|eval|clientX|object||enl_fadedark||while|enl_usecounter|enl_wheelenable|enl_butact|flash|backgroundColor|split|blur|enl_fullimg|cloneNode|visibility|createElement|slice|enl_picpath|enl_opval|enl_enable|enl_noevents|enl_getprev|enl_flashthere|enl_next|enl_checkflash|enl_getbrwsxy|enl_keyevent|enl_prev|onload|no|onresize|with|innerHeight|clientWidth|enl_drgmode|enl_swfinnerdiv|enl_resfunc|swfinner|enl_oldonload|enl_func|search|enl_prevpic|enl_doglidein|enl_dofadein|enl_minuscur|enl_wheel|enl_shddiv|enl_calcfact|enl_y|enl_ty|enl_x|XMLHttpRequest|enl_shd1|enl_delshadow|enl_shadowsize|enl_dropshadow||enl_shd2|enl_link|enl_tx|enl_darksteps|enl_dofadeout|enl_count|enl_resize|offsetHeight|scrollMaxY|border|khtmlBorderRadius|enl_flash|enl_ajax|MozBorderRadius|enl_chckready|enl_brddiv|enl_init|open|enl_shdclone|enl_maxmeurl|ajaxurl|whichpic|black|normal_|indexOf|continue|enl_nextpic|color|enl_brdround|enl_doglideout|replace|enl_oldonresize|pointer|enl_w|enl_konq|imgflowimg|for|enl_btninact|ShockwaveFlash|Microsoft|enl_noaniremove|detail|enl_donoani|wheelDelta|cpgif_conf_reflection_p|enl_enddrag|onmouseup|enl_buttonpress|Msxml2|PI|enl_closebtn|alert|topenl_el|enl_addResize|enl_drgdrop|enl_mousemv|enl_delborder|BODY|tagName|close|offsetWidth||enl_hidebtn|offsetTop|not|scrollHeight|br|send|enl_shd|parentNode|scrollLeft|scrollTop|enl_divw|enl_divh|clientHeight|enl_answer|GET|enl_url|all|innerWidth|setAttribute|btnw|enl_btnmout|enl_keynavi|enl_btnmover|enl_btnajax|enl_brdcolor|default|enl_btnpicture|yes|pow|enl_divname|hidden|enl_doenlarge|pid|visible|enl_max|enl_gotosite|fullsize|Array|enl_brd|maxpop|max|prev|next|solid|1px|opacity|borderWidth|enl_addLoad|center|alt|switch|padding|Image|navigator|enl_mktitlebar|enl_key|cssFloat|styleFloat|preventDefault|enl_h|enl_posy||enl_offset|enl_id|enl_posx|enl_makebtn|sliderimg|addEventListener|enl_btnact|embed|getElementById|img|11cf|AE6D|D27CDB6E|clsid|classid|Flash|Shockwave|plugins|move|thumbpic|enl_center|enl_preload|number|onselectstart|clonebrd|enl_fullheight|enl_fullwidth|outlineWidth|clone|onkeydown|sin|files|98|support|does|cos|EnlargeIt|of|onkeyup|This|enl_keynav|onmousemove|parentElement|HTML|srcElement|target|enl_darkprct|9670|offsetParent|offsetLeft|enl_shadowintens|enl_ajaxfollow|string|png|pos|location|enl_counterurl|1pix|work|did|scrollWidth||AJAX|12px|size|font|right|bottom|enl_ajaxcolor|background|pageXOffset|enl_ie|666677|auto|overflow|pageYOffset|responseText|version|readyState|onreadystatechange|longDesc|onmouseout|onmouseover|pic|amp|complete|href|650|900|ajax|resizable|status|toolbar|scrollbars|Max|php|displayimage|onqueror|site|enl_buttontxt|title|enl_buttonoff|borderColor|substring|alpha|bold|filter|borderStyle|fontWeight|nowrap|MozOpacity|whiteSpace|enl_titletxtcol|10pt|fontSize|serif|sans|Helvetica|Arial|fontFamily|gif|appName|paddingTop||textAlign|relative|loader|9700|2px|keyCode|block|display|backgroundPosition|9999|repeat|backgroundRepeat|3px|marginRight|onmousewheel|96B8|have|and|DOMMouseScroll|file|is|Sorry|in|outerHTML|enl_wheelnav|shockwave|application|type|swfinneremb|value|movie|param|data|444553540000|you|plugin|returnValue|installed'.split('|'),0,{}))


I still have a little bit of cleanup to do as far as css stuff goes.  I'd like to include the "information" button that the newer enlargeit.js script by Timos uses.  With that button, users can go directly to the intermediate image page for the photo they are viewing.  I won't be picky though.  I've been looking for this for a while, and now it works.

Thanks!

PeterLawrence

I've just spotted a couple of possible security issues in my original code.
Therefore, I would recommend changing the following lines..

$Rows=$_GET['rows'];

to...

$Rows=(int) $_GET['rows'];


...and...

$Cols=$_GET['cols'];

to...

$Cols=(int) $_GET['cols'];


..and..

$Album=$_GET['album'];

to...

$Album=(int) $_GET['album'];


Drahus

Hi,
it would be perfect , if you will modify the older script above to allow integration of new version of EnlargeIt ( v. 2.15 http://forum.coppermine-gallery.net/index.php/topic,53290.msg259147.html#msg259147 new features/buttons - comments, e-card, download,...).

I was trying it for a couple of evenings with no success.  ???

Photographer

PeterLawrence

I didn't know there was a version 2 out.
When I check the EnlargeIt website  I can only find a 1.1 beta.
The 1.1 beta version supports many buttons and options...
see http://enlargeit.timos-welt.de/forum/viewtopic.php?t=94&highlight=beta
Are you sure the v2.15 does not apply to the coppermine mod in question.

Drahus

Quote from: PeterLawrence on May 11, 2009, 11:20:13 PM
I didn't know there was a version 2 out.
Are you sure the v2.15 does not apply to the coppermine mod in question.

Yes, it does. Is it something different?
Probably it is completely different, but I want to know if it`s not possible to have buttons for comments and voting in this EnlargeIt for CPMfetch.
Photographer