[2.0.6] Left and Right IMG tags

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
13
76%
Very Good
2
12%
Good
1
6%
Fair
0
No votes
Poor
1
6%
 
Total votes: 17

User avatar
drumstix42
Registered User
Posts: 1100
Joined: Tue Sep 24, 2002 11:01 pm
Location: NJ
Contact:

Post by drumstix42 » Tue Jan 20, 2004 7:47 pm

Need a phpBB update or mod installed? PM me for any questions and pricing!
HostMonster.com (Unlimited Space, Unlimited Transfer, Unlimited Domains, $6.95/month )

User avatar
drumstix42
Registered User
Posts: 1100
Joined: Tue Sep 24, 2002 11:01 pm
Location: NJ
Contact:

Post by drumstix42 » Tue Jan 20, 2004 7:47 pm

**double post, please delete**
Need a phpBB update or mod installed? PM me for any questions and pricing!
HostMonster.com (Unlimited Space, Unlimited Transfer, Unlimited Domains, $6.95/month )

User avatar
OddDuckCarter
Registered User
Posts: 135
Joined: Wed Mar 06, 2002 12:30 am

Post by OddDuckCarter » Tue Jan 20, 2004 8:46 pm

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

wombat42
Registered User
Posts: 2
Joined: Thu Nov 20, 2003 2:45 am

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

Post by wombat42 » Wed Mar 10, 2004 1:06 am

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?

User avatar
benjaminlwells
Registered User
Posts: 43
Joined: Sun Jan 11, 2004 6:52 pm
Location: PEI Canada
Contact:

Post by benjaminlwells » Thu Mar 11, 2004 1:10 am

I just installed this mod, it's great! I was really glad to find it! Thumbs up!

User avatar
Darth Wong
Registered User
Posts: 2398
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Contact:

Post by Darth Wong » Mon Mar 29, 2004 8:20 am

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
Not a three-foot tall green gnome in real-life: My home page.
My wretched hive of scum and villainy: http://bbs.stardestroyer.net/

agiacosa
Registered User
Posts: 186
Joined: Mon Jan 19, 2004 1:45 pm

Post by agiacosa » Tue Apr 20, 2004 1:54 am

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?

agiacosa
Registered User
Posts: 186
Joined: Mon Jan 19, 2004 1:45 pm

Post by agiacosa » Tue Apr 20, 2004 8:26 pm

anyone?

User avatar
Mav
Former Team Member
Posts: 2261
Joined: Wed May 15, 2002 9:19 am
Location: England
Contact:

Post by Mav » Wed Apr 21, 2004 7:33 am

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/

agiacosa
Registered User
Posts: 186
Joined: Mon Jan 19, 2004 1:45 pm

Post by agiacosa » Wed Apr 21, 2004 2:49 pm

I'm only using subSilver.

User avatar
Mav
Former Team Member
Posts: 2261
Joined: Wed May 15, 2002 9:19 am
Location: England
Contact:

Post by Mav » Thu Apr 22, 2004 6:53 am

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?

agiacosa
Registered User
Posts: 186
Joined: Mon Jan 19, 2004 1:45 pm

Post by agiacosa » Thu Apr 22, 2004 11:11 am

I used Easymod. I'll double check it. It did say everything was successfull.

User avatar
Darth Wong
Registered User
Posts: 2398
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Contact:

Post by Darth Wong » Thu Apr 22, 2004 6:18 pm

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.
Not a three-foot tall green gnome in real-life: My home page.
My wretched hive of scum and villainy: http://bbs.stardestroyer.net/

agiacosa
Registered User
Posts: 186
Joined: Mon Jan 19, 2004 1:45 pm

Post by agiacosa » Thu Apr 22, 2004 6:37 pm

I did install the Multi BBCode mod first using Easy Mod.

silvercloud
Registered User
Posts: 8
Joined: Wed May 26, 2004 6:41 am

Post by silvercloud » Thu Jun 03, 2004 8:04 pm

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

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

Who is online

Users browsing this forum: No registered users and 2 guests