The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
im trying to do something along the lines of (again not the code I'm actually using)
HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
so in the end i can replace a tag across multiple templates. so think of it this way since instead of head, everything on here says body. i want to add an onload event to all body tags, in every template, without having to say every template. so we do something like this for every template there is a body tag: Code:
$find = '<body>'; $replace = '<body onload="myFunction()">'; $vbulletin->templatecache['FORUMHOME'] = str_replace($find,$replace,$vbulletin->templatecache['FORUMHOME']); $vbulletin->templatecache['showthread'] = str_replace($find,$replace,$vbulletin->templatecache['showthread']); etc... this would be an example of it, but this doesnt work: Code:
$find = '<body>'; $replace = '<body onload="myFunction()">'; $find = str_replace($find, $replace, $find); |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|