The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Search and str_replace
I was just wondring can {vb:raw navbits.breadcrumb} be search and replace by using the code below?
PHP Code:
Thanks . |
#2
|
||||
|
||||
Is this in a plugin?
Try this code I got from one of Lynne's mods. Code:
$find = '{vb:raw navbits.breadcrumb}'; $replace = "Joe Blogs". PHP_EOL; $output = str_replace($find,$replace.$find, $output); |
#3
|
||||
|
||||
No. You need to do search and replace on something that is 'real', not some variable that needs to be parsed.
edit: ". PHP_EOL" just gives a line break in the source code - php End Of Line. |
#4
|
||||
|
||||
OK ... Is there any way I can add "{vb:raw my_text}" to the very top of footer template ... as the 1st line in footer template is "{vb:raw ad_location.ad_footer_start}".
. |
#5
|
||||
|
||||
Put it in the ad_footer_start template.
|
#6
|
||||
|
||||
Quote:
Yes it is a plugin. I need to add "{vb:raw my_text}" on top of my footer template via plugin. --------------- Added [DATE]1259787239[/DATE] at [TIME]1259787239[/TIME] --------------- "{vb:raw my_text}" has another template in it so this is not going to work. |
#7
|
||||
|
||||
Ok re-ordered to place it just below
Code:
{vb:raw ad_location.ad_footer_start} {vb:raw ad_location.global_above_footer} Code:
<div class="footercontainer"> Code:
$find = '<div class="footercontainer">'; $replace = "{vb:raw my_text}". PHP_EOL; $output = str_replace($find,$replace.$find, $output); |
#8
|
||||
|
||||
I am making a product to release here and I want the users to just install and use ... no template modifications if possible.
If the template modification is needed I will just ask them to add "{vb:raw my_text}" on top of the footer template. It saves me writing plugins loads of plugins. Thanks for your help. . |
#9
|
||||
|
||||
Quote:
Code:
$find = '<div class="footercontainer">'; $replace = "{vb:raw my_text}". PHP_EOL; $output = str_replace($find,$replace.$find, $output); |
#10
|
||||
|
||||
Yes it works I did try this before but thats the 3rd line in footer template. When you put ads in ad_location templates .. it screws the layout specially if the ads are wide.
. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|