####################################################################################################################################################
## MOD Title: LightBox Hack for phpBB2 (Lightbox Implementation)
## MOD Author: DavidiQ <http://phpbb.davidiq.com>
## MOD Discription: This hack allows users to upload images using LightBox with Attachment Mod.
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files to edit: (3)
##         attach_mod/displaying.php
##         templates/subSilver/overall_header.tpl
##         templates/subSilver/viewtopic_attach_body.tpl
##
## Included Files: (15)
##         templates/images
##         templates/lightbox.css
##         templates/lightbox.js
##         templates/effects.js
##         templates/prototype.js
##         templates/scriptaculous
##
####################################################################################################################################################
## Authors Notes;
##
## This installation instructions was provided by DavidIQ http://phpbb.davidiq.com and is designed for use with phpBB2 version .19+. 
## 
## I have made only some adjustment <http://cscoroner.com> to this to make it a bit simpler to install and use.
##
## You must have Attachment Mod installed prior to installing this.
##
## This will also work with Wicher's <http://www.detecties.com/modforum Edit Attachments [2.0.21]mod.>
##
## For website design and addtional features go to http://www.huddletogether.com/projects/lightbox2.
##
## This hack will display uploaded images in a thumbnail (You need to have thumbnails creation turned on for this to work) then once clicked, the
## image will grow to it's original size with a fading backround.
####################################################################################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
####################################################################################################################################################
#
#-----[ Copy ]------------------------------
#
copy mods/Lightbox_phpBB2/images/templates/images
copy mods/lightbox_phpbb2/templates/lightbox.css
copy mods/lightbox_phpbb2/templates/lightbox.js
copy mods/lightbox_phpBB2/templates/effects.js
copy mods/lightbox/phpBB2/templates/prototype.js
copy mods/lightbox_phpBB2/templates/scriptaculous
#
# ----[ 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 ]----------------------------
#

<td colspan="2" align="center"><br /><a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank"><img src="{postrow.attach.cat_thumb_images.IMG_THUMB_SRC}" alt="{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}" border="0" /></a><br /><br /></td>

#
#-----[Inline find]-----------------------
#

<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank">

#
# ----[Inline REPLACE WITH ]--------------
#

<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" rel="lightbox">

#
#EoM
