ChiNa
08-21-2012, 02:20 PM
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:
$replace = '$template_hook[postbit_signature_start]';
$vbulletin->templatecache['postbit'] = str_replace($replace,$replace.fetch_template('MYCO DE'),$vbulletin->templatecache['postbit']);
$vbulletin->templatecache['postbit_legacy'] = str_replace($replace,$replace.fetch_template('MYCO DE'),$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:
{vb:raw template_hook.postbit_signature_start}
I have followed the other thread, where kh99 replied with:
$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,
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:
$replace = '$template_hook[postbit_signature_start]';
$vbulletin->templatecache['postbit'] = str_replace($replace,$replace.fetch_template('MYCO DE'),$vbulletin->templatecache['postbit']);
$vbulletin->templatecache['postbit_legacy'] = str_replace($replace,$replace.fetch_template('MYCO DE'),$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:
{vb:raw template_hook.postbit_signature_start}
I have followed the other thread, where kh99 replied with:
$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,