![]() |
I've been working in php for quite some time now, but I admit that I'm a little new to some of the more advanced regular expressions, like vB uses.
Is there any way to have the vB bbcode parser turn this: Code:
[IMG align="left"]http://image.com/image.gif[/IMG] Code:
<img align="left" src="http://image.com/image.gif"> Thanks! |
Just add it as a custom vB code, from the Admin CP.
You'll see an option to use a {param}. Only you won't be able to do this: [img align="left"] but rather this: [img=left] [QUOTE]Originally posted by bigmattyh I'm sure there is -- I regret that I don't yet have the skills to make sense of the 30+ character strings vB uses in preg_replace. |
ok, I'm trying it but without success :(
Check please what I'm doing wrong: Code:
vB code tag: img align Code:
https://vborg.vbsupport.ru/ is replaced with https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/) I have vBulletin 2.2.1. Aggh :( What I'm doing wrong! Thank you very much |
You named the new BBCode img ... where one already exists.
Rename it something else, like img align as shown in Firefly's example above. Alternately, you could just add the align code and memers can just use that.... [align=center][img]www.shinraonline.com [/img ][ /align] |
It should be:
vb code tag img vb code replacement <img src="{param}" align="{option}"> vb code example [img=right]http://www.mysite.com/logo.gif[/img] Hope that helps. Amy |
Mine is working even with using the img tag, but a new tag is probably best as they suggested.
Amy |
No success:
vB Code tag: imgalign vB Code replacement: <img src="{param}" align="{option}"> vB Code example: https://vborg.vbsupport.ru/ Use option: Yes. I think I'm doing what you mean, but it's not running. No hack done in my forum yet. |
Quote:
Please, I know it sould be very easy, but I can't manage it. Thank you very much! |
Should I use any replacement or only add the vbcode? I can't manage it :(
Please, help me to have success with img align |
Any idea?
Thank you! |
DONE!!! It was necessary to set the same name of the vbcode as in the replacement!!! Look I set the name as imgalign but no img!!! So if you set img as name it runs:
Code:
vB Code tag: imgalign |
I haven't tested this but I suppose the greatest flexibility would come from using 'style="{option]' then the world would be your oyster (or something...):
[img=align:left;valign:top;border:12px]image[/img] Or am I wrong? |
All times are GMT. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|