PDA

View Full Version : Lightbox 2


IGGY
05-10-2006, 06:24 AM
Step 1

Download this plugin:

http://www.subdreamer.org/forum/index.php?showtopic=942

Step 2

OPEN

plugins/p17_image_gallery/imagegallery.php

FIND (719)

**********echo '<a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p17_sectionid=' . $image['sectionid'] . '&p17_imageid=' . $image['imageid']) . '"><img ' . $thumbnail_img_class . ' title="' . $image['title'] . '" alt="' . $image['title'] . '" src="' . $sdurl . 'plugins/p17_image_gallery/images/tb_'.$image['filename'].'" /></a>';


REPLACE WITH

**********echo '<a href="' . $sdurl . 'plugins/p17_image_gallery/images/'.$image['filename'].'" title="' . $image['title'] . '" rel="lightbox[' . $image['sectionid'] . ']"><img ' . $thumbnail_img_class . ' title="' . $image['title'] . '" alt="' . $image['title'] . '" src="' . $sdurl . 'plugins/p17_image_gallery/images/tb_'.$image['filename'].'" /></a>';


Now in order for this to work correctly you must have these settings in the image gallery settings:

"Popup Window" --> "No"

"Create MidSize Images" --> "No"

Also by adding the p127 plugin you can use lightbox on everything.

Some things to note:

The title of the image is visible and are grouped by section ID so that you can go forward and backward without leaving lightbox.

Enjoy!

Rain
05-10-2006, 04:10 PM
this is simply incredible.

william
05-10-2006, 09:13 PM
I would really like to use this, but I think you have a problem with your site logins....first login in to your site is a difficult find and second once logged in it still says I have to register to download???

IGGY
05-10-2006, 10:22 PM
I don't see why everyone is having probems. I check the site myself, and even created a new user account and everything works fine.

1. You have to register and activate your account.
2. You can login by clicking "Login" from any page in subdreamer, and by clicking "Menu" in the forum.
It looks like this: "Login Latest News Bookmark Me Listen to Music"
3. If your having issues logging in, you have entered your username or password incorrectly. Pressing "Login" again will show you the details.


William, what is your user name?

william
05-10-2006, 11:49 PM
something must have happened on your site...because my user name was william....well I reregistered using the same name...oh well. -I got it...

HOWEVER I am confused about your 'step2 ' instructions
I did a search for
'plugins/p17_image_gallery/images/tb_'.$image['filename'][/b]
due to searching for the entire string didn't pan out....so there was only 1 instance of this line and I was certain this is the section of the file that needs to be alter...UNTILL I looked closer...mine doesn't say what yours does mine says
echo &#39;<td style="padding-bottom: 7px;">&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/tb_&#39;.&#036;image[&#39;filename&#39;].&#39; (&#39; . RewriteLink(&#39;index.php?categoryid=&#39; . &#036;categoryid . &#39;&p17_sectionid=&#39; . &#036;image[&#39;sectionid&#39;] . &#39;&p17_imageid=&#39; . &#036;image[&#39;imageid&#39;]) . &#39;)[/b]

How should this be modified?

IGGY
05-11-2006, 02:48 AM
Which line of code is that?

BTW, this hack is for 2.3 beta.

72dpi
05-11-2006, 03:13 AM
Find:
if(&#036;settings[&#39;Popup Window&#39;])

A few lines down you will have:
<a href="&#39; . RewriteLink(&#39;index.php?categoryid=&#39;

This is the line that needs to be replaced.

It definately works.
perhaps you can email Iggy or me your document, and we can help u.

Rain
05-12-2006, 12:28 PM
there is a chance to enable comments during lightbox show ?

IGGY
05-12-2006, 05:23 PM
There is a version of lightbox that can load external pages and not just images. I&#39;ll mess with this and try to have this version instead of the popup.

Rain
05-15-2006, 06:26 PM
this is compatible with final 2.3 ?

IGGY
05-15-2006, 07:48 PM
Yes I did some small code changes, nothing major.

Demo:
http://home.iggycorp.com/pix/p17_sectionid/1

william
05-15-2006, 07:52 PM
That explains why I could not find the correct code to use this hack...grrr oh well 2.3 is popping up any now now right? :P

IGGY
05-15-2006, 07:58 PM
It&#39;s already out&#33;

HeavyEddie
05-15-2006, 09:53 PM
OK, I would like to use this to display medium sized images and have an option to open the full image in a seperate window. Any plans on doing this?

BTW... this is a great setup&#33; As a control freak, it kind of bugs me to have the image larger than the screen :)

IGGY
05-15-2006, 11:09 PM
There are verions of light box that allow you to do this. Making the necessary changes wouldn&#39;t be that hard.

william
05-16-2006, 01:53 AM
LOL, yea I checked after responding and have upgraded my test site...so far so good&#33; :D, now to play with this tweak...thanks&#33;

HeavyEddie
05-16-2006, 02:18 AM
I won&#39;t have time to get into it for a little while... but if someone else doesn&#39;t, I will see what I can do.

I hope I don&#39;t sound ungrateful IGGY... I&#39;m using this already and love it :)

william
05-16-2006, 11:55 PM
Well I have followed all your directions and even have the plug-in installed, but my site responds by opening the image completely in the same window, instead of that cool feature it should do....what may I be missing?

and yes its on 2.3 now

Nevermind...figured out part of my problem...I thought I uploaded the core files, but got interupted....man how can I screw around and have fun with this stuff at work, just not fair :P Anyway my new problem is that I click on Plugins in the ACP and it doesn&#39;t load correctly...time to submitt a ticket I guess...

HeavyEddie
05-17-2006, 12:41 AM
Well, if you change your one line of code to this, it will use medium sized images. I basically added an md_ before the filename. Make sure you turn on the option to create mid sized images.

echo &#39;&#60;a href=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/md_&#39;.&#036;image&#91;&#39;filename&#39;&#93;.&#39;&#34; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; rel=&#34;lightbox&#91;&#39; . &#036;image&#91;&#39;sectionid&#39;&#93; . &#39;&#93;&#34;&#62;&#60;img &#39; . &#036;thumbnail_img_class . &#39; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; src=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/tb_&#39;.&#036;image&#91;&#39;filename&#39;&#93;.&#39;&#34; /&#62;&#60;/a&#62;&#39;;

jennec
05-17-2006, 10:32 AM
Just a quick update for those on Subdreamer 2.3 Final with the new image gallery. This update allows you to have med size showing in the normal SD interface, and the full image there after in light box. Plus it also allows the full image in lightbox should you wish to turn med size images off.

Change the following code on:

Line 605:
********echo &#39;&#60;a href=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/&#39; . &#036;image&#91;&#39;filename&#39;&#93; . &#39;&#34; target=&#34;_blank&#34;&#62;&#60;img &#39; . &#036;midsize_img_class . &#39; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; src=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/md_&#39; . &#036;image&#91;&#39;filename&#39;&#93; . &#39;&#34; width=&#34;&#39; . &#036;width . &#39;&#34; height=&#34;&#39; . &#036;height . &#39;&#34; /&#62;&#60;/a&#62;&#39;;

With
********echo &#39;&#60;a href=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/&#39; . &#036;image&#91;&#39;filename&#39;&#93; . &#39;&#34; rel=&#34;lightbox&#34; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34;&#62;&#60;img &#39; . &#036;midsize_img_class . &#39; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; src=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/md_&#39; . &#036;image&#91;&#39;filename&#39;&#93; . &#39;&#34; width=&#34;&#39; . &#036;width . &#39;&#34; height=&#34;&#39; . &#036;height . &#39;&#34; /&#62;&#60;/a&#62;&#39;;

and Line 715
**********echo &#34;&#60;a href=&#39;&#39; onclick=&#092;&#34;window.open&#40;&#39;&#34; . &#036;sdurl . &#34;plugins/p17_image_gallery/popup.php?categoryid=&#34; . &#036;categoryid . &#34;&p17_sectionid=&#34; . &#036;image&#91;&#39;sectionid&#39;&#93; . &#34;&p17_imageid=&#34; . &#036;image&#91;&#39;imageid&#39;&#93; . &#34;&#39;, &#39;&#39;, &#39;width=&#34; . &#40;&#036;sizew+100&#41; . &#34;,height=&#34; . &#40;&#036;sizeh+300&#41; . &#34;,directories=no,location=no,menubar=no,scrollbars =yes,status=no,toolbar=no,resizable=yes&#39;&#41;;return false&#092;&#34; target=&#092;&#34;_blank&#092;&#34;&#62;&#60;img &#34; . &#036;thumbnail_img_class . &#34; title=&#092;&#34;&#34; . &#036;image&#91;&#39;title&#39;&#93; . &#34;&#092;&#34; alt=&#092;&#34;&#34; . &#036;image&#91;&#39;title&#39;&#93; . &#34;&#092;&#34; src=&#092;&#34;&#34; . &#036;sdurl . &#34;plugins/p17_image_gallery/images/tb_&#34;.&#036;image&#91;&#39;filename&#39;&#93;.&#34;&#092;&#34; /&#62;&#60;/a&#62;&#34;;

With
**********echo &#39;&#60;a href=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/&#39;.&#036;image&#91;&#39;filename&#39;&#93;.&#39;&#34; rel=&#34;lightbox&#34; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34;&#62;&#60;img &#39; . &#036;thumbnail_img_class . &#39; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; src=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/tb_&#39;.&#036;image&#91;&#39;filename&#39;&#93;.&#39;&#34; /&#62;&#60;/a&#62;&#39;;

72dpi
05-20-2006, 03:00 AM
Love it, Love it, Love it

I told The creator of Lightbox to checkout Subdreamer.org community. Hopefully he will pop in one day.

This is what keeps us going, veryone working to a better cause, and helpiong each other.

I&#39;ve said it before, and say it again. You guys (and girls) all rock.

great dev ppl&#33;

Zacman
05-22-2006, 11:57 PM
me like this its cool ^_^

shanhard
05-25-2006, 04:17 PM
Yer, Kudos Iggy for porting this one across to SD. Since I added it to my site (only yesterday) I have had several ppl contact me and say how cool it is.

Thanks for taking the time&#33;

Bharrabhaz
06-26-2006, 09:46 AM
Not works with 2.3.2 version :(

IGGY
06-26-2006, 04:40 PM
What&#39;s not working?

Bharrabhaz
06-26-2006, 05:49 PM
<div class='quotetop'>QUOTE(IGGY &#064; Jun 26 2006, 11&#58;40 AM) 7196</div>
What&#39;s not working?
[/b]

I insert the javascript code in the skins, installed the core plugin and changed the gallery code in photogallery.php.

Not works&#33;

IGGY
06-26-2006, 05:55 PM
Can you provide a link to where the problem is or a better description?

Is there just a link to the image? I just need to know more about the problem than "It doesn&#39;t work" :)

jennec
06-27-2006, 08:38 AM
<div class='quotetop'>QUOTE(IGGY &#064; Jun 26 2006, 05&#58;55 PM) 7203</div>
Can you provide a link to where the problem is or a better description?

Is there just a link to the image? I just need to know more about the problem than "It doesn&#39;t work" :)
[/b]

Bharrabhaz might be refering to my code contribution a couple of posts back. I have not had time since the code updates were made to the Image Gallery in SD 2.3.2 to check weather my contribution still works. Is suspect it doesn&#39;t. May need a small adjustment.

I that correct Bharrabhaz?

Bharrabhaz
06-27-2006, 03:53 PM
<div class='quotetop'>QUOTE(jennec &#064; Jun 27 2006, 03&#58;38 AM) 7238</div>
Bharrabhaz might be refering to my code contribution a couple of posts back. I have not had time since the code updates were made to the Image Gallery in SD 2.3.2 to check weather my contribution still works. Is suspect it doesn&#39;t. May need a small adjustment.

I that correct Bharrabhaz?
[/b]

Yeah, its correct buddy. To me, ths Lightbox feature its only applicable in subdreamer gallery, fast & user friendly, help to economize many clicks...hehehe
I loved the last version with was working. But now, with 2.3.2 version, the gallery hack not works...
Please, fix it more fastest possible. This will be default in subdreamer ;)

IGGY
06-27-2006, 07:01 PM
Ok, I will look into this and see how to get it to work again.

RandomNinjaAtk
06-27-2006, 09:56 PM
I got lightbox core 2 to work with the original directions that iggy included&#33; (first post of this thread&#33;)

Using cms 2.3.2&#33;

The onlything I had to modify was that the code to be found on 719 doesn&#39;t exists its further down now&#33;

I found it by using dreamweavers searching and copying the code in to find, which it found and then used the new code for replacing. It worked Like a charm&#33;


Loving this iggy&#33; :)

Bharrabhaz
06-28-2006, 03:21 PM
Yeah, RandomNinjaAtk &#33;&#33;&#33; Works like a breeze &#33;&#33;&#33;&#33;

abcohen
06-28-2006, 05:41 PM
can you guys tell us the new line #?

IGGY
06-28-2006, 10:27 PM
Yeah please. Thanks for taking a look at it&#33;

blowndeadline
07-25-2006, 10:29 PM
Just downloaded the plug in, need some directions on how to implement it.
Thanks

IGGY
07-25-2006, 10:34 PM
What do you need help with?

Did you read the driections in the settings page of the plugin?

abcohen
07-31-2006, 09:44 PM
there is gotta be a way to program it up sooo you could use midsize images then have those link to the larger size images... (goign to play with this on the SD.org Stock Images)

ok due to the limitations of lightbox 2 (you cant relink 1 image to another image)
but with Lightbox Gone Wild (http://particletree.com/features/lightbox-gone-wild/) you can

http://codylindley.com/Webdev/274/thickbox-12
Thickbox looks pretty cool and it autohids those pesky IE dropdown bugs (when you select an lightbox in IE with a dropdown (that stays on top)

abcohen
07-31-2006, 10:43 PM
Sooo I have a little hack to post for this guy now...
in imagegallery.php (version 2.3.5)
I think its line 752
echo &#39;&#60;a href=&#34;&#39; . RewriteLink&#40;&#39;index.php?categoryid=&#39; . &#036;categoryid . &#39;&p17_sectionid=&#39; . &#036;image&#91;&#39;sectionid&#39;&#93; . &#39;&p17_imageid=&#39; . &#036;image&#91;&#39;imageid&#39;&#93;&#41; . &#39;&#34;&#62;&#60;img &#39; . &#036;thumbnail_img_class . &#39; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; src=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/tb_&#39;.&#036;image&#91;&#39;filename&#39;&#93;.&#39;&#34; /&#62;&#60;/a&#62;&#39;;


change too....
**********echo &#39;&#60;a href=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/md_&#39; . &#036;image&#91;&#39;filename&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; rel=&#34;lightbox&#91;page&#93;&#34; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#60;br /&#62;&#39; . &#036;image&#91;&#39;viewcount&#39;&#93; . &#39; &#39; . &#036;p17_language&#91;&#39;views&#39;&#93; . &#39;&#60;br /&#62;&#39; . nl2br&#40;&#036;image&#91;&#39;description&#39;&#93;&#41; . &#39;&#60;br /&#62;&#39; . &#036;p17_language&#91;&#39;submitted_by&#39;&#93; . &#39; &#39; . &#036;image&#91;&#39;author&#39;&#93; . &#39;&#60;br /&#62;High-Res&#58; &lt;a href=&quot;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/&#39; . &#036;image&#91;&#39;filename&#39;&#93; . &#39;&quot; rel=&quot;lightbox&quot;**target=&quot;_blank&quot;&gt;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&lt;/a&gt;&#34;&#62;&#60;img &#39; . &#036;thumbnail_img_class . &#39; title=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; alt=&#34;&#39; . &#036;image&#91;&#39;title&#39;&#93; . &#39;&#34; src=&#34;&#39; . &#036;sdurl . &#39;plugins/p17_image_gallery/images/tb_&#39;.&#036;image&#91;&#39;filename&#39;&#93;.&#39;&#34; /&#62;&#60;/a&#62;&#39;;


this will give you the same display that we have on http://www.subdreamer.org/Stock_Images

Edit: For the Stock Images I&#39;ve removed the extra tags since we dont use them... And I&#39;ll have to create a special php image script so It&#39;ll be able to keep adding view counts... but for now I&#39;m going to remove most of this hack and just leave the access to the high-res image code on SD.org till I create the page - but maybe this will help someone...

IGGY
08-01-2006, 05:06 PM
That&#39;s really sweet abcohen&#33;

I might just steal that bit and add it to the plugin if you don&#39;t mind ;)

abcohen
08-01-2006, 06:07 PM
your welcome to it... I know if I created all the If statements above that line so when you get to title area for the picture it&#39;ll show up with the options from photo gallery :)

although I think later I&#39;m working on sometype of php page that will allow you to call an image though lightbox and add the count to the views :) stay tuned...

ravemag
08-03-2006, 10:45 AM
This is really great stuff... but I can&#39;t get it working in 2.3.5

Is there is short description/manual on how to implement this in the latest gallery of Subdreamer?
Is there also a version available that lays the image over a flash file?

Thanks&#33;

jennec
08-03-2006, 11:47 AM
<div class='quotetop'>QUOTE(ravemag &#064; Aug 3 2006, 10&#58;45 AM) 8619</div>
This is really great stuff... but I can&#39;t get it working in 2.3.5

Is there is short description/manual on how to implement this in the latest gallery of Subdreamer?
Is there also a version available that lays the image over a flash file?

Thanks&#33;
[/b]

I applied this 2.3.5 without any problems at all just using the process that abcohen posted. Make sure you have uploaded all the files in Binary mode. Perhaps the image.php file did not upload or something

ravemag
08-03-2006, 01:52 PM
Well.. it&#39;s working with new images added to the gallery.. but not with the ones that were already there..

jennec
08-03-2006, 02:00 PM
<div class='quotetop'>QUOTE(ravemag &#064; Aug 3 2006, 01&#58;52 PM) 8628</div>
Well.. it&#39;s working with new images added to the gallery.. but not with the ones that were already there..
[/b]


Strange. It works with both new and old on my test site. But having re-read the first post in this thread it may be something to do with the midsize images being turned off. I have mine turned on but pop-ups off.

Did you upload the existing images with Mid-Sized Images turned off? If so perhaps re-uploading them if Mid-Size images are now turned on will help.

valdet
08-03-2006, 06:00 PM
this is a great feature for image gallery thanks a lot guys.

abcohen
08-03-2006, 09:46 PM
the code i posted works with midsize = on and popup=off just and fyi for people trying to paste in my hack :)

daemon
12-15-2006, 05:37 AM
Any updates on getting lightbox to work? I tried a couple of the last hacks but couldn't get any to work probably due to the latest subdreamer version changes.

Ideally what I want is the normal thumbnails showing, click one and you see the midsize image with the comments below, then if you click the midsize you get the fullsize image in the lightbox.

danielm
07-04-2007, 06:52 PM
Yes! I've got it working (also in the last Subdreamer-version)! Thanks for the line of code, abcohen.

But here's the next problem: since photos open up in the lightbox, the user has no longer the possibility to comment the photo or read the comments.
Does anyone have the code to establish this?

Syrus XL
07-16-2007, 08:42 PM
I installed Lightbox Core on SD 2.4.2.1 and there's no admin settings, or doesn't it work with this version?

Any help would be appreciated before I make adjustments to my Image Gallery.

falc
07-17-2007, 03:46 PM
i would like to know too... please ^^

danielm
07-17-2007, 04:01 PM
I don't know were your problems are: just follow the latest inscructions here in this thread and smile :-)
I also got it working with SD 2.4.2.1

Darth.Hunter
09-01-2007, 07:46 PM
I've altered abcohen's code to do enable the following: Have a midsize image, where people can view and write comments, and by clicking on it, open the fullsize image in Lightbox.

Tested on Subdreamer 2.4.3.1

Open imagegallery.php and exchange the line 727
echo '<a href="' . $sdurl . 'plugins/p17_image_gallery/images/' . $image['filename'] . '" target="_blank"><img ' . $midsize_img_class . ' title="' . $image['title'] . '" alt="' . $image['title'] . '" src="' . $sdurl . 'plugins/p17_image_gallery/images/md_' . $image['filename'] . '" width="' . $width . '" height="' . $height . '" /></a>';
by the following:
echo '<a href="' . $sdurl . 'plugins/p17_image_gallery/images/' . $image['filename'] . '" alt="' . $image['title'] . '" rel="lightbox[page]" title="' . $image['title'] . '<br />' . $image['viewcount'] . ' ' . $p17_language['views'] . '<br />' . nl2br($image['description']) . '<br />' . $p17_language['submitted_by'] . ' ' . $image['author'] . '<br /> "><img ' . $thumbnail_img_class . ' title="' . $image['title'] . '" alt="' . $image['title'] . '" src="' . $sdurl . 'plugins/p17_image_gallery/images/md_'.$image['filename'].'" /></a>';

Works as shown here: http://machineshop.invision-games.com/gallery/p17_sectionid/1

falc
03-13-2008, 11:01 PM
someone knows how to put lightbox in subdreamer 2.5.2????

RandomNinjaAtk
03-13-2008, 11:34 PM
I will have an update for lightbox versions on OHare Portal, with the use of easy modder for the image gallery

As soon as Subdreamer 2.5+, development slows down.

william
04-08-2008, 02:13 AM
This question is for anyone who runs a WAMP or XAMP server using SubDreamer and this plugin.

Is there any other module that needs to be loaded in the apace config file for this to function?

I have followed the instructions to a T and dotted the i's as well, from the very well written instructions by Iggy in the plugin interface. However this plugin fails to work as did the original v1 on a WAMP or XAMP server.

So if you run a WAMP or XAMP server with this plugin I would love to hear from you if you have this working.

Thanks.

RandomNinjaAtk
04-08-2008, 02:29 AM
XAMP server works fine with easy modder plugin over @ http://www.ohareportal.com

Couldn't really tell you though if this one does, but easy modder does similar things.