PrettyPhoto on [img] tags

Download and support for PhpBB3 Prettyphoto Attachment Mod
User avatar
neuropass
BBCoder IV
BBCoder IV
Posts: 173
Joined: 11 Apr 2010, 00:33

PrettyPhoto on [img] tags

Post by neuropass »

Hi stoker,

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

Thanks
Modd it up! TweakScene ;-) Support us! || Follow us ||

Image
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Re: PrettyPhoto on [img] tags

Post 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;" />',
Board rules! No PM support
User avatar
Ashley.S.
BBCoder II
BBCoder II
Posts: 36
Joined: 05 Mar 2010, 10:24
Location: Falmouth, Cornwall, UK

Re: PrettyPhoto on [img] tags

Post 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 :)
Regards,
-Ashley.S. [ Pluto Hosting Managing Director & ProphpBB Moderator ]
User avatar
neuropass
BBCoder IV
BBCoder IV
Posts: 173
Joined: 11 Apr 2010, 00:33

Re: PrettyPhoto on [img] tags

Post 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.
Modd it up! TweakScene ;-) Support us! || Follow us ||

Image
User avatar
Ashley.S.
BBCoder II
BBCoder II
Posts: 36
Joined: 05 Mar 2010, 10:24
Location: Falmouth, Cornwall, UK

Re: PrettyPhoto on [img] tags

Post 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
Regards,
-Ashley.S. [ Pluto Hosting Managing Director & ProphpBB Moderator ]
plasmino
BBCoder II
BBCoder II
Posts: 14
Joined: 27 Mar 2010, 08:36

Re: PrettyPhoto on [img] tags

Post 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
User avatar
neuropass
BBCoder IV
BBCoder IV
Posts: 173
Joined: 11 Apr 2010, 00:33

Re: PrettyPhoto on [img] tags

Post by neuropass »

hum I don't see any prettyPhoto mod working on the link you posted... :?
Modd it up! TweakScene ;-) Support us! || Follow us ||

Image
plasmino
BBCoder II
BBCoder II
Posts: 14
Joined: 27 Mar 2010, 08:36

Re: PrettyPhoto on [img] tags

Post by plasmino »

neuropass wrote:
hum I don't see any prettyPhoto mod working on the link you posted... :?
I have correct :roll:
User avatar
Dragosvr92
BBCoder II
BBCoder II
Posts: 21
Joined: 28 May 2011, 14:53
BBCodes: 4
Favourite MOD: Please Wait
Location: Romania

Re: PrettyPhoto on [img] tags

Post 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 :)
juango
BBCoder II
BBCoder II
Posts: 34
Joined: 30 May 2011, 18:44

Re: PrettyPhoto on [img] tags

Post by juango »

that is because it replaces the img tag, ANYWHERE you use it on your forum!