I wonder why the "INSTALL" bit never works correctly. If I install such xml, all settings are initially off, regardless of install value.
|
thanks Andreas for this nice custom usergroup permission howto...
i used to make my usergroup permissions with a plugin in the hook 'admin_usergroup_edit', but i needed 1 column in 'usergroup' table for each permission :( (too bad for lots of new perms) but now this xml really rocks :) |
EDIT: Got it fixed
|
how do you check for INT Permissions?
|
So can you just do:
HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?> PHP Code:
|
I couldn't get it to work so I made my own function in the hook "global_start".
I kept everything else the same but removed "can_administer". I had to use this query to add the field to the "administrator" table. PHP Code:
I put this in global_start PHP Code:
PHP Code:
|
Very helpfull topic. Could you please extend it a bit saying me how I can set a default value per bitfield (for all usergroups) ?
I've the following code in bitfield_vbmates.xml Code:
<?xml version="1.0" encoding="ISO-8859-1"?> Code:
if(!$permissions['vbmates'] & $vbulletin->bf_ugp['vbmates']['canadd']){ 1.- I changed bitfield_vbmates.xml after the first product installation 2.- I've also trying to use in this file: <group name="vbmates_permissions"> but no chance. Ok, I found it. It needed one couple of parenthesis more. Instead of: if(!$permissions['vbmates'] & $vbulletin->bf_ugp['vbmates']['canadd']) should be ... if(!($permissions['vbmates'] & $vbulletin->bf_ugp['vbmates']['canadd'])) |
Hi, can you help me a bit in this problem?
My bitfield_get_direct_links.xml: HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?> PHP Code:
PHP Code:
Can you help me? Thank you very much! PS: Sorry for my bad English |
I have some problems with an int bitfield.
<bitfield intperm="true" name="myhackintset" group="my_hack_permissions" phrase="myhack_int_desc"></bitfield> Its baiscally like this one, only difference is it installs to all usergroups, including custom usergroups. Well my problem is this, i want to check if a person is in two usergroups, but one of the usergroups bitfield is set to 0. Example, Registered usergroup setting is 0, but Custom usergroup setting is 1. Instead of taking the 1 as the value, i need the 0. Anyway to do this? Hope thats clear. |
Hello.
How to change a custom bitfield_xx.xml parameter via vB Options? For example, as I add new usergroups, I want to update the 'install' or 'ignore' param (e.g. comma-separated value) via ACP vs. editing the file. Is that possible e.g. putting an ACP variable in the xml file? Thanks in advance. Update: Using a variable in the 'xml' file is not necessary but vB requires code revisions in order to update bitfield 'usergroups' via ACP vs. modifying 'bitfield_xx.xml' file. It may be better to work with the 'ignoregroups' feature in usergroups.php combined with vBulletin Options' User Profile Options instead of the 'install' parameter of the 'xml' file since 'ignoregroups' works in v.3.6.3 after installation whereas, it seems that the 'install' parameter of <bitfields> is only recognized during new installations. |
Very useful info, thanks. I have permissions working properly for different usergroups within my hack, but I haven't been able to figure out how to put usergroup ids that have a certain setting into a string for use as a conditional query. For instance...
I have a y/n bitfield usergroup permission set up as: $permissions['myhackperms'] & $vbulletin->bf_ugp_myhackperms['canfoo'] and I want to run a query on which users have bitfield 'canfoo' set to yes? regardless of what usergroup they're in. PHP Code:
I know the query to get the usergroupids is wrong, it's due to me not knowing how to decode the bitfield, is there a function already written which vb uses to do these kinds of things? If so can someone point it out please? |
figured it out, nevermind :)
|
How would I call a permission in a template?
|
thanks, but how can I make my own permission for admin pages?
I mean to use: if (!can_administer('XXXXXXXXXX')) { print_cp_no_permission(); } XXXXXXXXXX = my permission and then I can edit the permission from: admincp/adminpermissions.php?do=modify |
Quote:
|
Apologies if this has already been asked and answered, but I need to adjust some permissions (upon product install) per usergroup so that some usergroups don't have access to certain features while others do. What would be the query for changing the permissions after the bitfield has been updated?
|
ok the only question i have for this, is how do you check the permissions of a usergroup a certain user is in?
|
I just want to say that this help is awesome! Thanks to you for creating it!
Just remember that the bit number needs to be in the XML or it will not save! Took me like ten minutes to realize that.... of course I am a noob! |
So is there any way to create custom forum permissions without having to worry about future vBulletin bits?
|
Is this article still valid with 3.8.4? I'd rather know that before just jumping right into editing my database.
|
How do I call an integer setting?
I have <bitfield intperm="true" name="tunez_votes" group="tunez_perm" phrase="tunez_votes"></bitfield> And I have the value set to 1 in the usergroup permissions page. But I can't seem to call it, any ideas? |
Thank you for this article. It helps me a lot with a mod that I will be creating soon.
|
Does this work with 3.8.7, because it's not saving the value...
|
Can this documentation be used with vb4? Is this still valid??
|
I've used it in vB4 and haven't found any issues or errors. If your doing something sensitive I would wait for a definitive answer though.
|
Is there a vB4 version of this article?
|
please update it to vb4
|
All times are GMT. The time now is 11:26 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|