Dragonfly CMS v9 ⇒ Coppermine ⇒ ThickBox 4 coppermine ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & BlocksCoppermine

ThickBox 4 coppermine Reply to topic


Download from
www.jquery.com/demo/thickbox/
the following:

loadingAnimation.gif
macFFBgHack.png
jquery-latest.pack.js
thickbox-compressed.js
thickbox.css

Edit thickbox.css
find:
*{padding: 0; margin: 0;}
replace with
/* *{padding: 0; margin: 0;} */

find:
.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
replace with
.TB_overlayMacFFBGHack {background: url(../../../images/macFFBgHack.png) repeat;}


Copy to your server:
loadingAnimation.gif and macFFBgHack.png to images/
jquery-latest.pack.js and thickbox-compressed.js to includes/javascript/
thickbox.css to themes/(yourtheme)/style(

Edit modules/coppermine/displayimage.php (make a backup first!)
find:
if (isset($image_size['reduced'])) {
after add:
global $modheader,$CPG_SESS; $modheader .= '<script type="text/javascript" language="javascript" src="includes/javascript/jquery-latest.pack.js"></script>'."\n" .'<script type="text/javascript" language="javascript" src="includes/javascript/thickbox-compressed.js"></script>'."\n" .'<link rel="stylesheet" href="themes/'.$CPG_SESS['theme'].'/style/thickbox.css" type="text/css" media="screen" />'."\n";

find:
$pic_html = '<a href="'.getlink("&file=displayimagepopup&pid=$pid&fullsize=1",true,true).'" target="' . uniqid(rand()) . "\" onclick=\"imgpop('".getlink("&file=displayimagepopup&pid=$pid&fullsize=1",true,true)."','" . uniqid(rand()) . "','resizable=yes,scrollbars=yes,width=$winsizeX,height=$winsizeY,left=0,top=0');return false\">"; //toolbar=yes,status=yes,
replace with
$pic_html = '<a class="thickbox" href="'.get_pic_url($CURRENT_PIC_DATA, 'fullsize').'" target="blank">';

To show smaller images in the ThickBox
find in displayimage.php:
if (isset($image_size['reduced'])) {
replace with
if (1) {

Klas
.
My mice Terri & Tracy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


nothing happens :S

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
xp/2.0.1/5.0.45/4.4.7/9.2


?
Test it here:
www.terralights.de/ter...=2963.html

Klas
.
My mice Terri & Tracy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Klas wrote
?
Test it here:
www.terralights.de/ter...=2963.html


yes it works on your i made all things like u wrote there and upload on my server in correct places but i can´t see changes Sad

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
xp/2.0.1/5.0.45/4.4.7/9.2


Hmm, ok. I put all the files (including a modified displayimage.php from 9.2 rc2) in the zip below.
Attachment: thickbox lite.zip
Description
Filename thickbox lite.zip
Filesize 32.98 KiB
Downloaded 171 Time(s)
You are not allowed to view/download this attachment

Klas
.
My mice Terri & Tracy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thx man it works now

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
xp/2.0.1/5.0.45/4.4.7/9.2


Thnx for the tutorial Very Happy Now it just needs some tweaks to have a back and forward button for a gallery... and a slideshow button Very Happy

And it only (?) works with LEO activated..

www.jzky.net a Dragonfly site. cms.jzky.net < test site. - Pardon my bad englsih Wink
My home town

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / Apache / PHP Version 5.2.0 /MySQL Version 4.1.21-standard / CMS Version 9.1.1


jzky wrote
Now it just needs some tweaks to have a back and forward button for a gallery... and a slideshow button Very Happy
Wink
www.terralights.de/ter...id=13.html
And it only (?) works with LEO activated..
No, you don't need to activate LEO.

Klas
.
My mice Terri & Tracy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I had to activate LEO, with out it just opened the picture in a new browser window.
Not shure if it have something to do with some hack I had to do with coppermine to not check for GD lib.

www.jzky.net a Dragonfly site. cms.jzky.net < test site. - Pardon my bad englsih Wink
My home town

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / Apache / PHP Version 5.2.0 /MySQL Version 4.1.21-standard / CMS Version 9.1.1


Seems like I cant get lytebox to work, just shows the loading image see it in action

thickbox does work Smile

www.jzky.net a Dragonfly site. cms.jzky.net < test site. - Pardon my bad englsih Wink
My home town

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / Apache / PHP Version 5.2.0 /MySQL Version 4.1.21-standard / CMS Version 9.1.1


Is it possible to set lytebox or thickbox as default? Now "Normal" is default.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.34 / 4.1.13-standard / 4.3.11 / Dragonfly 9.2.1


Hi Dylert,
I think you mean the "Thickbox and lytebox" hack from my homepage. If so, I have updated it. In displayimage.php you can now set thickbox/lytebox/normal to default.
There is also a new config value "alwaysauto" - I do not know if that makes sense, but I had the idea and could not resist Wink
test: test.terralights.de/in...&pos=2
download: www.terralights.de/ter...id=13.html

Klas
.
My mice Terri & Tracy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Ok, thank you Klas, but how do I set lytebox to default in displayimages.php??

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.34 / 4.1.13-standard / 4.3.11 / Dragonfly 9.2.1


You need to edit displayimages.php.
Open the file in an editor, at line 77 you find

$CONFIG['lb_display'] = 'thickbox'; // thickbox,lytebox,normal
replace 'thickbox' with 'lytebox'.
All behind // is a comment and need not to be changed.

The other settings are on/off settings, for example
$CONFIG['lytebox'] = 1;
if you replace it with
$CONFIG['lytebox'] = 0; the option 'lytebox' will not be shown in the dropdown.


At line 603 you find
$info['Effekt'] = 'Wie soll das Bild dargestellt werden: '.lb_change();
You can change the text to something you like, for example
$info['Effect'] = 'How to show the image: '.lb_change();

Klas
.
My mice Terri & Tracy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thanks a lot, Klas! It worked out well! 😄

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.34 / 4.1.13-standard / 4.3.11 / Dragonfly 9.2.1

All times are UTC


Jump to: