Thunderbird8
01-31-2011, 06:02 AM
I've been attempting to create a custom permission area in the usergroup section for a music player profile addon that I'm working on for the board I run. To prevent people from just throwing any old song on their profile, I have a bitfield for permissions set up. But the problem is, it is not being recognized. Looking at the bitfield guide, I can't find any mistakes in my stuff.
Bitfield file (named bitfield_musicplayer.xml)
<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="musicplayer">
<bitfielddefs>
<group name="ugp">
<group name="musicplayerpermissions">
<bitfield name="canrequest" group="musicplayerpermissions" phrase="can_request_song">1</bitfield>
<bitfield name="canchangeown" group="musicplayerpermissions" phrase="can_change_own_song">2</bitfield>
<bitfield name="songmod" group="musicplayerpermissions" phrase="can_moderate_songs">4</bitfield>
</group>
</group
</bitfielddefs>
</bitfields>
Product export section containing the phrases
<phrasetype name="Permissions" fieldname="cppermission">
<phrase name="can_change_own_song" date="1296460640" username="Thunderbird" version="1.0"><![CDATA[Can Change Own Song]]></phrase>
<phrase name="can_moderate_songs" date="1296460682" username="Thunderbird" version="1.0"><![CDATA[Can Approve/Deny Song Requests]]></phrase>
<phrase name="can_request_song" date="1296460669" username="Thunderbird" version="1.0"><![CDATA[Can Request Profile Song]]></phrase>
<phrase name="musicplayerpermissions" date="1296460706" username="Thunderbird" version="1.0"><![CDATA[Profile Music Player Permissions]]></phrase>
</phrasetype>
(The product name is musicplayer)
From the database structure dump
`musicplayerpermissions` int(10) unsigned NOT NULL DEFAULT '0'
Looking into the bitfield datastore, no field for musicplayer appears.
Anyone able to find the problem I can't?
Bitfield file (named bitfield_musicplayer.xml)
<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="musicplayer">
<bitfielddefs>
<group name="ugp">
<group name="musicplayerpermissions">
<bitfield name="canrequest" group="musicplayerpermissions" phrase="can_request_song">1</bitfield>
<bitfield name="canchangeown" group="musicplayerpermissions" phrase="can_change_own_song">2</bitfield>
<bitfield name="songmod" group="musicplayerpermissions" phrase="can_moderate_songs">4</bitfield>
</group>
</group
</bitfielddefs>
</bitfields>
Product export section containing the phrases
<phrasetype name="Permissions" fieldname="cppermission">
<phrase name="can_change_own_song" date="1296460640" username="Thunderbird" version="1.0"><![CDATA[Can Change Own Song]]></phrase>
<phrase name="can_moderate_songs" date="1296460682" username="Thunderbird" version="1.0"><![CDATA[Can Approve/Deny Song Requests]]></phrase>
<phrase name="can_request_song" date="1296460669" username="Thunderbird" version="1.0"><![CDATA[Can Request Profile Song]]></phrase>
<phrase name="musicplayerpermissions" date="1296460706" username="Thunderbird" version="1.0"><![CDATA[Profile Music Player Permissions]]></phrase>
</phrasetype>
(The product name is musicplayer)
From the database structure dump
`musicplayerpermissions` int(10) unsigned NOT NULL DEFAULT '0'
Looking into the bitfield datastore, no field for musicplayer appears.
Anyone able to find the problem I can't?