Lytebox Attachment Mod

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Lytebox Attachment Mod

Post by Stoker »

Title: Lytebox Attachment Mod
Version: 1.0.0
Author: Stoker
Description: The Lytebox Attachment Mod for phpbb3 makes attached images open in a nice popup layer. Large images fits screen (resized) superfast with the lytebox script.
There is only 3 file edits per style and one folder to upload - very easy to install.
Demo: The script homepage, you can see how nice the images is viewed in a layer.
http://www.dolem.com/lytebox/
Attached file:
lytebox.zip
Download, unzip and upload the lytebox folder to the root of your forum
(41.07 KiB) Downloaded 710 times

Install instructions
The same edits goes for all styles.

Open styles/your_style/template/overall_header.html
Find:

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
After add:

Code: Select all

<script type="text/javascript" language="javascript" src="{ROOT_PATH}lytebox/lytebox.js"></script>
Find:

Code: Select all

<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
After add:

Code: Select all

<link rel="stylesheet" href="{ROOT_PATH}lytebox/lytebox.css" type="text/css" media="screen" />
Open styles/your_style/template/attachment.html
Find:

Code: Select all

<!-- IF _file.S_THUMBNAIL -->
			<a href="{_file.U_DOWNLOAD_LINK}">
Inline find:

Code: Select all

<a href="{_file.U_DOWNLOAD_LINK}"
Inline add:

Code: Select all

 rel="lytebox"
Then it will look like this:

Code: Select all

<a href="{_file.U_DOWNLOAD_LINK}" rel="lytebox">
Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Lytebox Attachment Mod

Post by Terr0r »

can I install this on my forum if I install the hsimg bbcode from cisco his site

or must I unistall the hsimg bbcode and then install this snippet because this snippet looks very much better
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Lytebox Attachment Mod

Post by Stoker »

This is for attachments. Its not a bbcode.
Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Lytebox Attachment Mod

Post by Terr0r »

okay I understand that but if I upload now a big image in a attachment then see you the image in the HSMG open

my question is actually if I do this then see I this for attachment images in the litebox
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Lytebox Attachment Mod

Post by Stoker »

Once again. This is an Attachment Mod which means that it works on attached images were a thumbnail is created.
If you have any other mod working like this, then you will have to uninstall it first.
Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Lytebox Attachment Mod

Post by Terr0r »

how can I set this part of code

Code: Select all

    <a href="{_file.U_DOWNLOAD_LINK}" rel="lytebox">
in this part of code ?

Code: Select all

<div class="highslide-gallery"><a href="{_file.U_DOWNLOAD_LINK}/{_file.DOWNLOAD_NAME}" class="highslide" onclick="return hs.expand(this)"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a><div class="highslide-caption">{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</div></div>
I have try this but that is not working

Code: Select all

<div class="highslide-gallery"><a href="{_file.U_DOWNLOAD_LINK}" rel="lytebox"/{_file.DOWNLOAD_NAME}" class="highslide" onclick="return hs.expand(this)"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a><div class="highslide-caption">{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</div></div>
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Lytebox Attachment Mod

Post by Stoker »

You cant have both the highslide and the lytebox installed.
Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Lytebox Attachment Mod

Post by Terr0r »

okay thanks stoker
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
Post Reply