Lightbox Implementation

Since Opentools.de has now gone away I've created this forum to house FAQs and support for this mod in phpBB2.

Moderator: Experts

DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Lightbox Implementation

Post 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)
Attachments
lightbox2.02.zip
Lightbox files
(69.44 KiB) Downloaded 1339 times
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post 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 :)
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post 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.
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post 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
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post 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.
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post by Coroner »

Here comes the dumbest question yet. How do I turn the thumb nails creation on?

Please let me know!

Thanks
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post by DavidIQ »

The option is under Special Categories.
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post 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?
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post 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... ;-)
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post 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
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post by DavidIQ »

Can you set it so I can upload images on that forum using the test account?
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post 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.
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post 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?
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post by DavidIQ »

I'm not able to post images with the test account.
Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm

Post 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!
Locked