4x4 Mecca
06-17-2008, 05:47 PM
Here is a sample of some working code
$find = 'class=\"afterlogo\">';
$replace = '<a href=\"forum/vote.php\" target=\"_blank\" title=\"Vote Today!\" style=\"text-decoration:none\"><img border=\"0\" src=\"1009.gif\"><br>Vote Today!</a>';
$vbulletin->templatecache['header'] = str_replace($find, $find . $replace, $vbulletin->templatecache['header']);
I can't enter conditionals into the teplates though, for example, if I want to enter
<if condition="$userinfo['canvote']"> Vote Today! </if>
I can't enter it. Can I use a plugin to create a template called vote, have the conditionals in that template, then call the template into action through something like $vote ?
How can I accomplish what I'm trying to do?
$find = 'class=\"afterlogo\">';
$replace = '<a href=\"forum/vote.php\" target=\"_blank\" title=\"Vote Today!\" style=\"text-decoration:none\"><img border=\"0\" src=\"1009.gif\"><br>Vote Today!</a>';
$vbulletin->templatecache['header'] = str_replace($find, $find . $replace, $vbulletin->templatecache['header']);
I can't enter conditionals into the teplates though, for example, if I want to enter
<if condition="$userinfo['canvote']"> Vote Today! </if>
I can't enter it. Can I use a plugin to create a template called vote, have the conditionals in that template, then call the template into action through something like $vote ?
How can I accomplish what I'm trying to do?