Page 2 of 6

Posted: Tue Jan 20, 2004 7:47 pm
by drumstix42

Posted: Tue Jan 20, 2004 7:47 pm
by drumstix42
**double post, please delete**

Posted: Tue Jan 20, 2004 8:46 pm
by OddDuckCarter
Hello. I have some additions to this mod. First up, when using align=left or align=right, if the image is bigger than the text, the users signature will also be aligned on the image, instead of below it. You can fix this by:

Code: Select all

# 
#-----[ OPEN ]---------------------------------
# 
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]---------------------------------
# 
<td colspan="2"><span class="postbody">{postrow.MESSAGE}

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
<br clear="all" />

#
#-----[ SAVE/CLOSE FILES ]---------------------------------
#
# EoM
Additionally, if you wish to have padding around your the image (so the text doesn't touch the image):

Code: Select all

# 
#-----[ OPEN ]---------------------------------
# 
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]---------------------------------
# 
<!-- BEGIN left --><img src="{URL}" border="0" align="left"

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
 hspace="10" vspace="5"

#
#-----[ FIND ]---------------------------------
# 
<!-- BEGIN right --><img src="{URL}" border="0" align="right"

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
 hspace="10" vspace="5"

#
#-----[ SAVE/CLOSE FILES ]---------------------------------
#
# EoM

From left=/right= to img= (conversion)

Posted: Wed Mar 10, 2004 1:06 am
by wombat42
A really "thick" question here.

I believe a previous iteration of this mod used left= and right= tags to align the pictures. And it works well.

With the shift to img=left and img=right how do I find and update every bit of post text to convert to the new way of doing this? What would the SQL be for this or alternatively does someone have a php bit of code they could pass on to achieve this?

On a related matter does anyone know if image alignment will be a feature of the next phpbb release? If so, is it likely to follow the same format as this mod?

Posted: Thu Mar 11, 2004 1:10 am
by benjaminlwells
I just installed this mod, it's great! I was really glad to find it! Thumbs up!

Posted: Mon Mar 29, 2004 8:20 am
by Darth Wong
This is a great mod, but it is not compliant with the changes made in version 2.0.8 to improve security. In order to fix it, you have to go into includes/bbcode.php and find the section that looks like this:

Code: Select all

// LEFT-RIGHT-start
$text = preg_replace("#\[img=left\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'[img=left:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
$text = preg_replace("#\[img=right\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'[img=right:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
// LEFT-RIGHT-end
and then replace it with one that looks like this:

Code: Select all

// LEFT-RIGHT-start
$text = preg_replace("#\[img=left\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img=left:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
$text = preg_replace("#\[img=right\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img=right:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
// LEFT-RIGHT-end

Posted: Tue Apr 20, 2004 1:54 am
by agiacosa
This mod is not working for me. It doesn't show the image. When I check the image property by right clicking the red X, I get this:

http://www.aquaticplantcentral.com/forum/{URL}

What could be wrong?

Posted: Tue Apr 20, 2004 8:26 pm
by agiacosa
anyone?

Posted: Wed Apr 21, 2004 7:33 am
by Mav
agiacosa wrote: This mod is not working for me. It doesn't show the image. When I check the image property by right clicking the red X, I get this:

http://www.aquaticplantcentral.com/forum/{URL}

What could be wrong?

make sure that you've made the edits in bbcode.tpl to every theme you're using, not just the copy in templates/subSilver/

Posted: Wed Apr 21, 2004 2:49 pm
by agiacosa
I'm only using subSilver.

Posted: Thu Apr 22, 2004 6:53 am
by Mav
agiacosa wrote: I'm only using subSilver.

ok. have you double checked that you've made all of the edits in the install file and uploaded all of the edited files to your webserver?

Posted: Thu Apr 22, 2004 11:11 am
by agiacosa
I used Easymod. I'll double check it. It did say everything was successfull.

Posted: Thu Apr 22, 2004 6:18 pm
by Darth Wong
agiacosa wrote: I used Easymod. I'll double check it. It did say everything was successfull.

If you use EasyMOD, then you have to install the Multi-BBCode mod before you install the left-right IMG tag mod.

Posted: Thu Apr 22, 2004 6:37 pm
by agiacosa
I did install the Multi BBCode mod first using Easy Mod.

Posted: Thu Jun 03, 2004 8:04 pm
by silvercloud
Anyone know how to keep the old method working too? I like to have both wrap and non-wrapped option. There is also no centre option? It could just be my board, but I'm having serious problems with trying to fix the issue of wrappage.

http://ww2thegame.vcs-online.com