Page 1 of 2

PrettyPhoto on [img] tags

Posted: 29 May 2011, 17:46
by neuropass
Hi stoker,

I was wondering if it would be possible to integrate your mod to work on tags in topics.

Thanks

Re: PrettyPhoto on [img] tags

Posted: 29 May 2011, 20:27
by Stoker
The only wau I can think of.

Open includes/bbcode.php
Find:

Code: Select all

'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
Replace with:

Code: Select all

'img'		=> '<a href="$1" rel="prettyPhoto"><img src="$1" alt="' . $user->lang['IMAGE'] . '" style="max-width:200px; max-height:100px;" />',

Re: PrettyPhoto on [img] tags

Posted: 04 Jun 2011, 12:02
by Ashley.S.
I agree it would be nice to see it on images. I asked for it to be added to the ReImg Image Resizer but the author wasn't too keen on it :(

I'll have to try it your way Stoker :)

Re: PrettyPhoto on [img] tags

Posted: 04 Jun 2011, 14:20
by neuropass
the code above works. the only things is that if you have text between two images it will automatically wrap them as a images and make the text linked to the images posted.

Re: PrettyPhoto on [img] tags

Posted: 04 Jun 2011, 15:54
by Ashley.S.
neuropass wrote:the code above works. the only things is that if you have text between two images it will automatically wrap them as a images and make the text linked to the images posted.
hmm OK then :( I'll have to see if I can work out a proper way to get it integrated into ReImg Image Resizer mod

Re: PrettyPhoto on [img] tags

Posted: 10 Jun 2011, 06:58
by plasmino
my fix

Code: Select all

'img'      => '<a href="$1" rel="prettyPhoto"><img src="$1" alt="' . $user->lang['IMAGE'] . '" style="max-width:400px; max-height:200px;" /></a>',
test

http://www.ciricadoforum.it/forum/viewt ... 59&t=17715

Re: PrettyPhoto on [img] tags

Posted: 11 Jun 2011, 02:38
by neuropass
hum I don't see any prettyPhoto mod working on the link you posted... :?

Re: PrettyPhoto on [img] tags

Posted: 11 Jun 2011, 11:05
by plasmino
neuropass wrote:
hum I don't see any prettyPhoto mod working on the link you posted... :?
I have correct :roll:

Re: PrettyPhoto on [img] tags

Posted: 12 Jun 2011, 15:22
by Dragosvr92
Stoker wrote:The only wau I can think of.

Open includes/bbcode.php
Find:

Code: Select all

'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
Replace with:

Code: Select all

'img'		=> '<a href="$1" rel="prettyPhoto"><img src="$1" alt="' . $user->lang['IMAGE'] . '" style="max-width:200px; max-height:100px;" />',
I have tried to do that on Lightbox. But it made problems with the normal images... For example signature images etc :)

Re: PrettyPhoto on [img] tags

Posted: 12 Jun 2011, 17:12
by juango
that is because it replaces the img tag, ANYWHERE you use it on your forum!