I created a file named "bitfield_marqueesystem.xml" and i put this code:
PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="marqueesystem">
<bitfielddefs>
<group name="ugp">
<group name="marqueepermissions">
<bitfield name="canviewmarquee" group="marquee_permission" phrase="can_view_marquee" install="2,3,4,5,6,7">1></bitfield>
</group>
</group>
</bitfielddefs>
</bitfields>
Then I put this in my mod file:
PHP Code:
<code version="1.0">
<installcode>
<![CDATA[ $vbulletin->db->hide_errors();
$vbulletin->db->query_write("ALTER TABLE usergroup ADD marqueepermissions INT UNSIGNED NOT NULL DEFAULT 0;");
$vbulletin->db->show_errors();
]]>
</installcode>
<uninstallcode>
<![CDATA[ $vbulletin->db->hide_errors();
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup DROP marqueepermissions");
$vbulletin->db->show_errors();
]]>
</uninstallcode>
</code>
</codes>
PHP Code:
<plugin active="1" executionorder="5">
<title>Usergroup Permission</title>
<hookname>global_start</hookname>
<phpcode>
<![CDATA[ if ($vbulletin->bf_ugp_marqueepermissions['canviewmarquee'] == 'yes')
{
eval('print_output("' . fetch_template('marquee_text) . '");');
}
]]>
</phpcode>
</plugin>
Are they correct?
Quote:
you don't use $vbulletin->userinfo or $vbulletin->options[gcm_ug] in templates. It would be $bbuserinfo and $vboptions[gcm_ug]
|
Thanks, I changed all "$vbulletin->options" to "$vboptions"