ThickBox 4 coppermine
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine
Author Message
Klas
Newbie


Joined: Apr 27, 2004
Posts: 37
Location: Oldenburg/Germany

PostPost subject: ThickBox 4 coppermine
Posted: Fri Jan 11, 2008 1:31 pm
Reply with quote

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:
Code:
*{padding: 0; margin: 0;}
replace with
Code:
/* *{padding: 0; margin: 0;} */

find:
Code:
.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
replace with
Code:
.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:
Code:
		if (isset($image_size['reduced'])) {
after add:
Code:
			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:
Code:
				$pic_html = '<a href="'.getlink("&amp;file=displayimagepopup&amp;pid=$pid&amp;fullsize=1",true,true).'" target="' . uniqid(rand()) . "\" onclick=\"imgpop('".getlink("&amp;file=displayimagepopup&amp;pid=$pid&amp;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
Code:
				$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:
Code:
		if (isset($image_size['reduced'])) {
replace with
Code:
		if (1) {

_________________
Klas
.
My mice Terri & Tracy

Klas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
dadki
Heavy poster


Joined: Dec 17, 2007
Posts: 158

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Jan 11, 2008 2:39 pm
Reply with quote

nothing happens :S

dadki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
xp/2.0.1/5.0.45/4.4.7/9.2
Back to top
View user's profile
Klas
Newbie


Joined: Apr 27, 2004
Posts: 37
Location: Oldenburg/Germany

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Jan 11, 2008 3:00 pm
Reply with quote

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

_________________
Klas
.
My mice Terri & Tracy

Klas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
dadki
Heavy poster


Joined: Dec 17, 2007
Posts: 158

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Jan 11, 2008 3:02 pm
Reply with quote

Klas wrote:

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


dadki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
xp/2.0.1/5.0.45/4.4.7/9.2
Back to top
View user's profile
Klas
Newbie


Joined: Apr 27, 2004
Posts: 37
Location: Oldenburg/Germany

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Jan 11, 2008 3:12 pm
Reply with quote

Hmm, ok. I put all the files (including a modified displayimage.php from 9.2 rc2) in the zip below.
_________________
Klas
.
My mice Terri & Tracy

Klas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
dadki
Heavy poster


Joined: Dec 17, 2007
Posts: 158

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Jan 11, 2008 3:16 pm
Reply with quote

Thx man it works now

dadki's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
xp/2.0.1/5.0.45/4.4.7/9.2
Back to top
View user's profile
jzky
Supporter


Joined: Jun 25, 2004
Posts: 220
Location: Norway - Harstad

PostPost subject: Re: ThickBox 4 coppermine
Posted: Sat Jan 12, 2008 10:28 pm
Reply with quote

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 WinkMy home town

jzky's 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
Back to top
View user's profile Visit poster's website
Klas
Newbie


Joined: Apr 27, 2004
Posts: 37
Location: Oldenburg/Germany

PostPost subject: Re: ThickBox 4 coppermine
Posted: Sun Jan 13, 2008 1:11 pm
Reply with quote

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

_________________
Klas
.
My mice Terri & Tracy

Klas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
jzky
Supporter


Joined: Jun 25, 2004
Posts: 220
Location: Norway - Harstad

PostPost subject: Re: ThickBox 4 coppermine
Posted: Sun Jan 13, 2008 9:24 pm
Reply with quote

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 WinkMy home town

jzky's 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
Back to top
View user's profile Visit poster's website
jzky
Supporter


Joined: Jun 25, 2004
Posts: 220
Location: Norway - Harstad

PostPost subject: Re: ThickBox 4 coppermine
Posted: Sun Jan 13, 2008 10:53 pm
Reply with quote

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 WinkMy home town

jzky's 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
Back to top
View user's profile Visit poster's website
Dylert
Nice poster


Joined: May 02, 2007
Posts: 109
Location: Norway

PostPost subject: Re: ThickBox 4 coppermine
Posted: Wed Aug 11, 2010 7:27 pm
Reply with quote

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

Dylert's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.13-standard / 4.3.11 / Dragonfly 9.2.1
Back to top
View user's profile Visit poster's website
Klas
Newbie


Joined: Apr 27, 2004
Posts: 37
Location: Oldenburg/Germany

PostPost subject: Re: ThickBox 4 coppermine
Posted: Thu Aug 12, 2010 11:23 am
Reply with quote

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...at=0&pos=2
download: www.terralights.de/ter...id=13.html

_________________
Klas
.
My mice Terri & Tracy

Klas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Dylert
Nice poster


Joined: May 02, 2007
Posts: 109
Location: Norway

PostPost subject: Re: ThickBox 4 coppermine
Posted: Thu Aug 12, 2010 8:34 pm
Reply with quote

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

Dylert's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.13-standard / 4.3.11 / Dragonfly 9.2.1
Back to top
View user's profile Visit poster's website
Klas
Newbie


Joined: Apr 27, 2004
Posts: 37
Location: Oldenburg/Germany

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Aug 13, 2010 6:06 am
Reply with quote

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

Code:
$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
Code:
$CONFIG['lytebox'] = 1; 
if you replace it with
Code:
$CONFIG['lytebox'] = 0; 
the option 'lytebox' will not be shown in the dropdown.


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

_________________
Klas
.
My mice Terri & Tracy

Klas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Dylert
Nice poster


Joined: May 02, 2007
Posts: 109
Location: Norway

PostPost subject: Re: ThickBox 4 coppermine
Posted: Fri Aug 13, 2010 5:28 pm
Reply with quote

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

Dylert's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.13-standard / 4.3.11 / Dragonfly 9.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 2.4213 seconds with 16 DB Queries in 0.237 seconds
Memory Usage: 3.04 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy