The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How to use the "$replace" to replace 6 lines?
Hi everyone. I was making one of my mods to a product last night, called PostBubble, which showes the post in postbit and legacy inside a Bubble or Box, and after many hours I managed to make it, but found out that my code is only replacing 1 line! I had to ask to remove my thread again, I have only learned replacing from 1 line, to replace. And the code that I have to replace, has 6 Rows / Lines!
And even I replace that 1 line, the code appears twice in my postbit Below you see the lines that I have to replace: Code:
<!-- message --> <div id="post_message_$post[postid]"> $ad_location[ad_showthread_firstpost_start] $post[message] </div> <!-- / message --> And I am trying to wrap 6 lines with DIVs , so it looks like this: Code:
<div class="red"> <!-- message --> <div id="post_message_$post[postid]"> $ad_location[ad_showthread_firstpost_start] $post[message] </div> <!-- / message --> </div> Code:
$replace = '<!-- message -->'; $vbulletin->templatecache['postbit'] = str_replace($replace,$replace.fetch_template('MYCODEHERE'),$vbulletin->templatecache['postbit']); $vbulletin->templatecache['postbit_legacy'] = str_replace($replace,$replace.fetch_template('MYCODEHERE'),$vbulletin->templatecache['postbit_legacy']); THANK YOU VERY MUCH IF YOU COULD HELP ME OUT WITH THIS! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|