The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Another Str_Replace Question (vB4 & vB3)
Hi everyone, I saw the other thread answered by Kh99 and Scanu..
I am working on a project, my plan is to build a Product, for example Bookmark-Buttons that I wanna add in POSTBIT and POSTBIT LEGACY! I have to the buttons "On top of the Signature" or simply replace the "Signature Start"! So far I have made this done with the help of a few friends for vB 3.8. And thanks to Scanu for his contribution and help the other day. Now I wanna publish my Products for vB4.x also! And I have 2 simple questions.. First my replacement code: (for vB3.8) worked perfect: Code:
$replace = '$template_hook[postbit_signature_start]'; $vbulletin->templatecache['postbit'] = str_replace($replace,$replace.fetch_template('MYCODE'),$vbulletin->templatecache['postbit']); $vbulletin->templatecache['postbit_legacy'] = str_replace($replace,$replace.fetch_template('MYCODE'),$vbulletin->templatecache['postbit_legacy']); Question 1: I have only made a few modifications, but dont know about the vb 4.x system yet. Now what should I change in my replacement code, to make the code fit on vBulletin 4.x! Obviously my vB3.8 code didnt work on vb 4.x Here is the line where I wanna start my replacement in vB 4.x Postbit and Postbit Legacy: Code:
{vb:raw template_hook.postbit_signature_start} I have followed the other thread, where kh99 replied with: Code:
$myput = '<!-- message area -->'; $replace = '\'; $final_rendered .= \'' . $myinput . substr(fetch_template('new_posting_newthread'), 19) . ' $final_rendered .= \''; $vbulletin->templatecache['newthread'] = str_replace($myput,$replace,$vbulletin->templatecache['newthread']); I can see that this is 1 Template Change. How to do 2 changes in 2 different Templates, using 1 xml product. As you can see I have to replace Postbit and Postbit legacy... So I really hope I can get an exact same code or explanation for vB 4.x! Thank you very much in advance, |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|