The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Here is an example I found from something I did for vb 3 a while back:
Code:
$find_fh = 'accesskey=\"c\" />$vbphrase[remember_me]</label>'; $replace_fh = 'accesskey=\"c\" checked=\"checked\" /> $vbphrase[remember_me]</label>'; $vbulletin->templatecache['navbar'] = str_replace($find_fh, $replace_fh, $vbulletin->templatecache['navbar']); And another one: Code:
$find = '<strong>" . construct_phrase("$vbphrase[welcome_x_link_y]", "" . $GLOBALS[\'vbulletin\']->userinfo[\'username\'] . "", "member.php?" . $GLOBALS[\'vbulletin\']->session->vars[\'sessionurl\'] . "u=" . $GLOBALS[\'vbulletin\']->userinfo[\'userid\'] . "") . "</strong><br />'; $replace = '<strong>" . construct_phrase("$vbphrase[ung_greeting]", "$vbphrase[ung_line]", "member.php?" . $GLOBALS[\'vbulletin\']->session->vars[\'sessionurl\'] . "u=" . $GLOBALS[\'vbulletin\']->userinfo[\'userid\'] . "", "$vbphrase[realname]", "$vbphrase[ung_punctuation]") . "</strong><br />'; $vbulletin->templatecache['navbar'] = str_replace($find, $replace, $vbulletin->templatecache['navbar']); Since I don't have vb 3 anymore, I can't look in the db and help you guys figure it out, sorry. |
#12
|
||||
|
||||
From the database itself the exact code is:
Code:
".(($show['edit_profile']) ? (" <li class=\"thead\"><a href=\"moderator.php?" . $GLOBALS['vbulletin']->session->vars['sessionurl'] . "do=useroptions&u=$userinfo[userid]\">$vbphrase[edit_user_profile]</a></li> ") : (""))." Maybe this is a bug in the template code... if you look at the double quote following the ? it's not escaped, but every other double quote in that situation is... Code:
<a href=\"moderator.php?" |
#13
|
||||
|
||||
Try this:
Code:
$find = '".(($show[\'edit_profile\']) ? (" <li class=\"thead\"><a href=\"moderator.php?" . $GLOBALS[\'vbulletin\']->session->vars[\'sessionurl\'] . "do=useroptions&u=$userinfo[userid]\">$vbphrase[edit_user_profile]</a></li> ") : (""))."'; |
#14
|
||||
|
||||
I got this working, kind of... saw we didn't need anything after the ? anyway so this code will add "xxxx" to the link...
Code:
$find= '<li class=\"thead\"><a href=\"moderator.php'; $vbulletin->templatecache['MEMBERINFO'] = str_replace($find, "xxxx" . $find, $vbulletin->templatecache['MEMBERINFO']); |
#15
|
||||
|
||||
Did you try the code I gave you above a a test?
|
#16
|
||||
|
||||
Quote:
Code:
$find= '$vbphrase[edit_user_profile]</a></li>'; $vbulletin->templatecache['MEMBERINFO'] = str_replace($find, $find . fetch_template(djs_delete_link), $vbulletin->templatecache['MEMBERINFO']); So, that's how many names I've got to put into the Contributors field? --------------- Added [DATE]1293169854[/DATE] at [TIME]1293169854[/TIME] --------------- I did try that, too, with no luck. But I also read that line breaks can cause a problem. Also, when I did the manual template edit, the ") : (""))." wrapped my line of code, I presume because it was included in the show edit profile <if> condition. |
#17
|
||||
|
||||
I need no such official recognition... but I would really like an answer why a question mark killed str_replace in that instance... I tried 20 things probably and nothing was working.
|
#18
|
|||
|
|||
Ditto here - I don't expect anyone to give me credit on any mod just for helping with a question.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|