Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 06-10-2005, 09:23 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Group Permissions

Thanks for the nice work. So far the info is coming fast and it's been a big help, but we're stuck in a holding pattern on this one...

Many of us need to convert group permissions from init.php to the /include/xml/bitfield_vbulletin.xml file as best I can tell.

That shows us the new option in the control panel form when we add a new <bitfield>, however submitting the form with the new option checked has no effect on the DB field.

Can we get a heads up as to if we're going in the right direction and what may be necessary next?

Regards
Reply With Quote
  #2  
Old 06-10-2005, 04:07 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just posted a HowTo here.
Reply With Quote
  #3  
Old 06-10-2005, 05:49 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a bunch, I can read it with my coffee.
Reply With Quote
  #4  
Old 06-10-2005, 05:49 PM
loneranger loneranger is offline
 
Join Date: Dec 2004
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi i have followed your tutorial and managed to set permissions when i call
PHP Code:
if($permissions['imghost'] & $vbulletin->bf_ugp_genericpermissions['can_upload_img']){
echo 
"welcome admin";
}else{
print_no_permission();

but as an admin i still don't have access is there something i am doing wrong??
Reply With Quote
  #5  
Old 06-10-2005, 06:31 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your code is wrong, assuming you added a bitfield can_upload_img:

PHP Code:
if($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['can_upload_img']){
echo 
"welcome admin";
}else{
print_no_permission();

Anyway, it's not a good idea to user standard bitfields for custom permissions, as you will run into problems sooner or later if you do so.
Reply With Quote
  #6  
Old 06-10-2005, 06:53 PM
loneranger loneranger is offline
 
Join Date: Dec 2004
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have got them under a group called imghost not under generic permissions where am i going wrong please
Reply With Quote
  #7  
Old 06-10-2005, 07:21 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post your XML-File
Reply With Quote
  #8  
Old 06-11-2005, 10:37 AM
loneranger loneranger is offline
 
Join Date: Dec 2004
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<bitfields product="vbulletin">
    <bitfielddefs>
        <group name="ugp">
            <group name="imghost">
                <bitfield name="canupload" group="imghost"  phrase="can_upload_img" install="">1</bitfield>
                <bitfield name="canadmin" group="imghost"  phrase="can_admin_img" install="">2</bitfield>
                <bitfield intperm="true" name="imghostset" group="imghost"  phrase="max_file_size">100</bitfield>
            </group>
if i do permissions['imghost'] it will return true i think i need to work out the value and settings myself if this is right can some1 give me an example?
Reply With Quote
  #9  
Old 06-11-2005, 11:42 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
if ($permissions['imghost'] & $vbulletin->bf_ugp['imghost']['canupload'])
{
  echo 
"Upload Permission set";
}
else
{
  echo 
"Upload Permission not set;

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:48 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
  • Page Generation 0.04422 seconds
  • Memory Usage 2,239KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete