I am trying to write a plug in the reads a Single-Selection Menu from the profile fields. I have a scrolling marquee on my forumhome template and want to allow users to disable it. I am using the forumhome_complete hook and the plug in looks like this:
PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1">
<title>User Forumhome Template Selection</title>
<hookname>forumhome_complete</hookname>
<phpcode><![CDATA[global $vbulletin;
if ($vbulletin->userinfo['field15'] == 'View Announcement Marquee')
$this->templatename = 'FORUMHOME';
else if ($vbulletin->userinfo['field15'] == 'Do NOT View Announcement Marquee')
$this->templatename = 'FORUMHOME2';]]></phpcode>
</plugin>
</plugins>
I coppied my forumhome template and made a custom template named forumhome2 that does nto contain the marquee.
Can some one tell me where I went wrong?