jQLightbox

Started by slinouille, January 29, 2009, 01:15:28 AM

Previous topic - Next topic

slinouille

Link to Mod


jQLightbox v0.5.1
By Slinouille


Introduction
The mod adds a real lightbox feature to all images in your forum.
jQLightbox mod uses:
- jQuery javascript library : http://jquery.com/ - v1.2.6
- jQuery prettyPhoto pluggin from http://www.no-margin-for-errors.com/projects/prettyPhoto/. - 2.2.7

Features
o Activation in admin control panel
o Nice lightbox effect
o Multiple images are displayed as a gallery
o Automatic image resize to fit the user's screen
o No conflict with other javascript libraries you could use
o Admin can parameter autoresize, padding on each side of picture, opacity, animation speed and a theme.

Installation
Simply install the package to install this modification on the SMF Default Core theme.
Manual edits will be required for other themes.

Note: If you want to use also AttachmentInMessage mod, please install "jQLightbox pluggin for AIM" mod after

This mod is compatible with SMF 2.0 Beta 4 Public and above only.

Support
Please use the modification thread for support with this modification.

Translations are welcome :-)

Changelog
0.5.1 - 22th March 2009
o Source code correction (IE uncompliance)

0.5.0 - 22th March 2009
o Compatibility with other javascripts library tested (needed if using other SMF mods such as nneonneo's AJAX ShoutBox)

0.4.0 - 16th February 2009
o Correction of resizing functionality
o Some minor code optimization

0.3.0 - 16th February 2009
o 3 themes are available for lightbox
o Correcting undefined index errors in "Errors log"

0.2.0 - 29th January 2009
o Add some possible customizations of lightbox through admin panel

0.1.0 - 24th January 2009
o Initial release
Visit VAG-Technique.fr
Take a look to my mods

Minare

Nice mod bro , thanks



Turkish language trans :



<file name="$languagedir/Modifications.turkish.php">
<operation>
<search position="end" />
<add><![CDATA[
//Begin mod jQLightbox
$txt['enable_jqlightbox_mod']='[jQLightbox]  jQLightbox'u Etkinleştir.';
//End mod Glossary
]]></add>
</operation>
</file>
<file name="$languagedir/Help.turkish.php">
<operation>
<search position="end" />
<add><![CDATA[
// The start of the language strings
$helptxt['enable_jqlightbox_mod'] = 'jQLightbox modunu açabilir ya da kapatabilirsiniz.';
]]></add>
</operation>
</file>



Apllicmz

Nice Work
good mod
translate Portuguese
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
//Begin mod jQLightbox translate candidosa2
$txt['enable_jqlightbox_mod']='[jQLightbox] Activar jQLightbox no seu fórum.';
//End mod Glossary
            ]]></add>
        </operation>
    </file>



<file name="$languagedir/Help.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// The start of the language strings Suporte smfpt.net
$helptxt['enable_jqlightbox_mod'] = 'Aqui você pode activar e desativar o mod jQLightbox.';
]]></add>
        </operation>
    </file>   




exxocet

 I ported this mod to SMF 1.1.7 and everything work smooth. Just one question:
- is there any chance to make the mod to follow URL of the linked images? Links like [.URL=http://www.example.com][.IMG]http://www.image.jpg[./IMG][./URL] are not followed, but teh mod keeps loading, trying to open the URL like an image.
If this is not possible, a good feature it will be as the localhost images to be excepted from this mod, and just remotely host images (imageshack and all the others) to be lightboxed normally. This way you can use localhost pictures for linked images to follow the URL. IS there any chance, any code modification I can do?

Thank you very much.

slinouille

#5
Thank you for your comments  :)

I've just uploaded v0.2 that permits to customize some aspects of the lightbox.

@joomlamz  and Minare : I'll need a little more translations ... is it possible for you?  :P

@exxocet : hum perhaps have I not understand but this mod should only "lightbox" images put in attachment of the message. So that no url should be possible on those attachments ... Am I wrong?
Can you transmit the SMF1.X version so that I can integrate it to the mod if you want (with you name of contributor of course  ;) )

SliN
Visit VAG-Technique.fr
Take a look to my mods

Minare

Quote from: slinouille on January 30, 2009, 03:04:43 AM


@joomlamz  and Minare : I'll need a little more translations ... is it possible for you?  :P

SliN


No dude, this one tired me enough, it was too long  :P

Marcus Forsberg

Swedish translation:


//Begin mod jQLightbox
$txt['enable_jqlightbox_mod']='[jQLightbox] Aktivera jQLightbox i ditt forum.';
$txt['jqlightbox_animationSpeed']='[jQLightbox] Definiera animationens fart.';
$txt['jqlightbox_padding']='[jQLightbox] Definiera padding i pixlar (mellan 0 och 99).';
$txt['jqlightbox_opacity']='[jQLightbox] Definiera genomskinlighet i %.';
$txt['jqlightbox_allowresize']='[jQLightbox] Förminska bilder för att anpassa dem för användarens skärmstorlek.';
$txt['jqlightbox_slow'] = 'sakta';
$txt['jqlightbox_normal'] = 'normal';
$txt['jqlightbox_fast'] = 'snabb';
//End mod Glossary

Sudhakar Arjunan

A Good mod slinouille.

Will this work only with attachments only on that topic.

Could we access the pics taken from vbgamer45's SMF Gallery mod.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

slinouille

@Nas: thank you for that translation  ;)

@A.SK: what do you mean by ?
QuoteCould we access the pics taken from vbgamer45's SMF Gallery mod.

Is it that you put in your message pics coming from your SMF Gallery mod using [.img] tag ?
Visit VAG-Technique.fr
Take a look to my mods

w0lfman

Installing on defaul theme and get the following message...

QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

slinouille

Quote from: w0lfman on February 03, 2009, 06:38:19 PM
Installing on defaul theme and get the following message...

QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
You have tried to install this mod on a version of SMF that is not supported ;)
Visit VAG-Technique.fr
Take a look to my mods

exxocet

Ported to SMF 1.1.x. Install/uninstall via admin panel:


aishaweb

So, does this only work with attached images?

What about hotlinked images from photobucket, xs.to, imageshack etc?

mashby

I installed this on a test forum (SMF 2.0 RC1) and it worked like a charm. I checked the Error Log and found this repeated for each page I've been to:
8: Undefined index: jqlightbox_allowresize
File: ***/Sources/Load.php
Line: 1491


Line 1491 is:
if ( $modSettings['jqlightbox_allowresize'] == 0) $jqlightbox_allowresize = 'true';

While not a serious error, it is generating an error (that I realize isn't a big deal but will flood the error log). Anyone else having/seeing this?

Only other mod I have installed is Global Headers/Footers.
Always be a little kinder than necessary.
- James M. Barrie

mashby

OK...I took a look at the smf_settings table and didn't see an entry for jqlightbox_allowresize. So, i went back to the Settings page and changed Yes to No and clicked Save...then changed No to Yes and clicked Save again. No more errors! I'm guessing it's a minor thing with the Yes/No option or something.

I've been tinkering with jquery for a few months now. Very cool package and nice to see a mod using it.
Always be a little kinder than necessary.
- James M. Barrie

slinouille

@mashby: thank you for this ... i didn't saw this error (I only recently dicovered the error log) ... so I'll do an update correctig this undefined option when unused.
Visit VAG-Technique.fr
Take a look to my mods

aishaweb

Quote from: aishaweb on February 09, 2009, 07:57:40 AM
So, does this only work with attached images?

What about hotlinked images from photobucket, xs.to, imageshack etc?


slinouille

Quote from: aishaweb on February 09, 2009, 07:57:40 AM
So, does this only work with attached images?

What about hotlinked images from photobucket, xs.to, imageshack etc?
Sorry aishaweb, I didn't saw you post. Actually it only works with [.img] bbcode but perhaps could I see if it is feasable with hotlinked images ...
Visit VAG-Technique.fr
Take a look to my mods

aishaweb


Advertisement: