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

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

Lightbox Implementation

Post by DavidIQ » Thu Jan 18, 2007 12:24 pm

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 884 times

Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm
Contact:

Post by Coroner » Wed Jan 31, 2007 9:28 pm

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 :)

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

Post by DavidIQ » Wed Jan 31, 2007 11:07 pm

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
Contact:

Post by Coroner » Wed Jan 31, 2007 11:24 pm

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

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

Post by DavidIQ » Wed Jan 31, 2007 11:31 pm

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
Contact:

Post by Coroner » Wed Jan 31, 2007 11:48 pm

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

Please let me know!

Thanks

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

Post by DavidIQ » Wed Jan 31, 2007 11:50 pm

The option is under Special Categories.

Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm
Contact:

Post by Coroner » Thu Feb 01, 2007 12:16 am

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?

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

Post by DavidIQ » Thu Feb 01, 2007 12:23 am

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
Contact:

Post by Coroner » Thu Feb 01, 2007 12:29 am

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

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

Post by DavidIQ » Thu Feb 01, 2007 12:35 am

Can you set it so I can upload images on that forum using the test account?

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

Post by DavidIQ » Thu Feb 01, 2007 12:36 am

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
Contact:

Post by Coroner » Thu Feb 01, 2007 12:54 am

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?

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

Post by DavidIQ » Thu Feb 01, 2007 1:01 am

I'm not able to post images with the test account.

Coroner
Posts: 30
Joined: Wed Jan 31, 2007 9:20 pm
Contact:

Post by Coroner » Thu Feb 01, 2007 8:24 am

Very sorry!

It still continues to not create thumbnails?

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

Thanks!

Locked

Who is online

Users browsing this forum: No registered users and 1 guest