Page 1 of 4

Lightbox Implementation

Posted: Thu Jan 18, 2007 12:24 pm
by DavidIQ
If you want to do this:
viewtopic.php?t=52
(click on the attached image on there for a surprise)
Then you just have to make these few changes:

Code: Select all

#
# ----[ OPEN ]----
#
attach_mod/displaying.php

#
# ----[ FIND ]----
#
               'IMG_SRC'            => append_sid($phpbb_root_path . 'download.' . $phpEx . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),

#
# ----[ REPLACE WITH ]----
#
               'IMG_SRC'            => $filename,

#
# ----[ OPEN ]----
#
templates/subSilver/overall_header.tpl

#
# ----[ FIND ]----
#
<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->


#
# ----[ AFTER, ADD ]----
#
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> 

#
# ----[ OPEN ]----
#
templates/subSilver/viewtopic_attach_body.tpl

#
# ----[ FIND ]----
#
   <tr>
      <td width="15%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.L_DOWNLOADED_VIEWED}:</span></td>
      <td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.L_DOWNLOAD_COUNT}</span></td>
   </tr>

#
# ----[ REPLACE WITH ]----
#
<!--
   <tr>
      <td width="15%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.L_DOWNLOADED_VIEWED}:</span></td>
      <td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.L_DOWNLOAD_COUNT}</span></td>
   </tr>
-->

#
# ----[ FIND ]----
#
<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank">

#
# ----[ REPLACE WITH ]----
#
<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" rel="lightbox">
-->
And of course the easy part...download the attached zip file, unzip, and upload to your forum's root folder. Very cool effect indeed 8)

Posted: Wed Jan 31, 2007 9:28 pm
by Coroner
Hey David! Need your help again bud.

Love this one but after working all day I can't get it to fly.

Here's a dumb question: After downloading the zip and opening it, do I open each file move everything into my main phpbb2 file or the current template style i'm using?

Do I need to remove Edit Attachments Mod in order for this to work or can they work together?

Lastly, how can I remove all those lines so what I attach a picture it doesn't look so much like a download?

Please help me out. I really want this one to fly and I feel soooooo close.

Thanks once again for all your efforts and support.

ps: try to remember nascar0u81@aol.com. Thats my other email address :)

Posted: Wed Jan 31, 2007 11:07 pm
by DavidIQ
Actually don't change ANYTHING in the zip file. Upload the contents of the zip file to your forum's folder keeping the files in the directories they are at and that should be it if you did everything else.

Posted: Wed Jan 31, 2007 11:24 pm
by Coroner
Still no go? Could it be the Edit Attachments Mod?

Please take a look.

http://cscoroner.com/phpBB2/index.php

id= Test
pw= 123456

There's a test thread

Getting really fustrating at this point.

Thanks

Posted: Wed Jan 31, 2007 11:31 pm
by DavidIQ
I'm going to have to add a bit of a disclaimer to this. You need to have thumbnails creation turned on for this to work. Any images uploaded after that should use the lightbox stuff.

Posted: Wed Jan 31, 2007 11:48 pm
by Coroner
Here comes the dumbest question yet. How do I turn the thumb nails creation on?

Please let me know!

Thanks

Posted: Wed Jan 31, 2007 11:50 pm
by DavidIQ
The option is under Special Categories.

Posted: Thu Feb 01, 2007 12:16 am
by Coroner
Sorry to be such a pest but that didn't work either?

I uploaded a new pic using attachment mod and on the edit attachment mod button shows up?

Any other ideas? Other wise I guess I'm going to have to kill edit attachment mod?

Posted: Thu Feb 01, 2007 12:23 am
by DavidIQ
Let me guess...you didn't change the Minimum Thumbnail Filesize to something lower than 12000 and you uploaded a file that's probably 5000... ;-)

Posted: Thu Feb 01, 2007 12:29 am
by Coroner
DavidIQ wrote:Let me guess...you didn't change the Minimum Thumbnail Filesize to something lower than 12000 and you uploaded a file that's probably 5000... ;-)
It's 12000?

Maximum Image Dimensions = 0

Image Link Dimensions =0

Size file 2.785

Posted: Thu Feb 01, 2007 12:35 am
by DavidIQ
Can you set it so I can upload images on that forum using the test account?

Posted: Thu Feb 01, 2007 12:36 am
by DavidIQ
Coroner wrote:
DavidIQ wrote:Let me guess...you didn't change the Minimum Thumbnail Filesize to something lower than 12000 and you uploaded a file that's probably 5000... ;-)
It's 12000?

Maximum Image Dimensions = 0

Image Link Dimensions =0

Size file 2.785
No no...the Minimum Thumbnail Filesize setting is under Special Categories as well.

Posted: Thu Feb 01, 2007 12:54 am
by Coroner
Here's what I have:

Display Images Inlined = yes
Create Thumbnail = yes
Minimum Thumbnail Filesize = 50
Make use of GD2 Extension = no
Imagick Program (Complete Path) = blank
Maximum Image Dimensions = 0x0
Image Link Dimensions = 0x0

Not sure what to look for at this point?

Posted: Thu Feb 01, 2007 1:01 am
by DavidIQ
I'm not able to post images with the test account.

Posted: Thu Feb 01, 2007 8:24 am
by Coroner
Very sorry!

It still continues to not create thumbnails?

I pm'd you and account that you can check the acp with.

Thanks!