The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am creating a Custom Product for vBulletin (my first time) and i am picking up the format etc. from this site slowly.
Now, i am stuck on Bitfield xml file. i have created a bitfield_product.xml file. vBulletin is picking up this file and showing the options, and its working nicely. Following is my BitField file Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <bitfields product="_vbhostreview"> <bitfielddefs> <group name="ugp"> <group name="vbhr_permission"> <bitfield name="vbhr_canapprovehost" group="vbhr_permission" phrase="vbhr_canapprovehost" install="5,6">1</bitfield> <bitfield name="vbhr_candeletehost" group="vbhr_permission" phrase="vbhr_candeletehost" install="5,6">1</bitfield> </group> </group> </bitfielddefs> </bitfields> Code:
<installcode> $db->query(" ALTER TABLE " . TABLE_PREFIX ."usergroup ADD vbhr_permission INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL " ); if (is_newer_version('3.5.1', $vbulletin->options['templateversion'])) { // Rebuild Bitfields // Do this for vBulletin < 3.5.1 *ONLY*; later versions rebuild // automatically and calling the builder in install code causes // the bitfields NOT to be rebuild correctly require_once(DIR . '/includes/class_bitfield_builder.php'); vB_Bitfield_Builder::save($db); build_forum_permissions(); } ]]></installcode> <uninstallcode><![CDATA[ $db->query(" ALTER TABLE " . TABLE_PREFIX ."usergroup drop column vbhr_permission" ); if (is_newer_version('3.5.1', $vbulletin->options['templateversion'])) { // Rebuild Bitfields // Do this for vBulletin < 3.5.1 *ONLY*; later versions rebuild // automatically and calling the builder in install code causes // the bitfields NOT to be rebuild correctly require_once(DIR . '/includes/class_bitfield_builder.php'); vB_Bitfield_Builder::save($db); build_forum_permissions(); } ]]></uninstallcode> 1) How do i make the default value to Yes (right now its making it No) 2) I see there are some HELP files with other settings (? beside each setting). How can i provide help for my custom permissions?? Thanks in advance. I changed one line, not sure if its correct way to do it, buts it seems to be working i changed $db->query("ALTER TABLE " . TABLE_PREFIX ."usergroup ADD vbhr_permission INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL "); TO $db->query("ALTER TABLE " . TABLE_PREFIX ."usergroup ADD vbhr_permission INT( 10 ) UNSIGNED DEFAULT '3' NOT NULL "); Having default value of 3, it turns Both options on. But, then if i change some options later on, it doesn't seem to work? ANyone Please?? or give me a link to some tutorial |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|