Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2008, 07:56 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Permissions Page

I need to create some permissions but I dont want them shown in the usergroup permissions admin page. I'd rather have them shown in a custom admincp page for my product. I've read through kirbys article on permissions but that just adds to the vbulletin usergroup permissions.

I have the admincp pages created already and just need to figure out how to finish this off.

I'm looking to create something like...

"Can use myproduct? Yes/No?"
"Can do something? Yes/No?"
"Can do somethingelse? Yes/No?"

And have that in my custom admincp page only. If I have to have it in both my page and the usergroup settings page then I guewss that may be ok but I'd rather not.


Thanks
Reply With Quote
  #2  
Old 02-09-2008, 09:22 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to use a different group name for the bitfield I think. I haven't done it myself before but I think if you use some other group name like 'thename' then you can access the fields through $vbulletin->bf_thename['somebitfield']. Then cycle through them or w/e you need to.
Reply With Quote
  #3  
Old 02-09-2008, 11:21 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="darkgreen">Thanks I'll test it out on my test site and post back.</font>
Reply With Quote
  #4  
Old 02-17-2008, 07:43 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I got the default user group permissions to show but they are in the user group page of vb. I want to move them to my own admincp page I already have setup.

I just need the backend code for the settings and options to utilize vb's features for these. Doesnt seem necessary to reinvent the wheel, only rotate it.

So instead of having user group permissions appear on the ug page I want it on my page and yet still be accessible via code like ...

$vbulletin->bf_ugp_myproductpermissions['candosomething'])

I have searched the documentation and sites for information but everything is out of date.
Reply With Quote
  #5  
Old 02-17-2008, 08:18 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If they are usergroup settings though, they should be listed under usergroup management. Why are you so adamant that they shouldn't be on the usergroup page, you cause more confusion to the end user by moving around permissions from this page to that page. I would prefer to edit all usergroup settings on the Edit Usergroup page. If you must then you can always duplicate the usergroup permissions for your modification on your own AdminCP page.

I think the "Edit Usergroup" page will drag everything up which is on a "Per Usergroup" basis. You could stick it in the 'misc' group or something like that. You don't need to rotate the wheel...just duplicate the little section of the wheel that you need and stick it on to your page. Although seeing as then you have to engineer all the code to display & process this it seems a bit odd when vB will do it for you! But whatever floats your boat as they say.
Reply With Quote
  #6  
Old 02-17-2008, 11:05 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

True and I did think about the confusion but my product has alot of settings and permissions that I added a specific nav group. I probably will let the ugp take care of those perms but the settings and options would be much better off separated out like vBAdvanced does.

This is the closest I have found on settings/options...
https://vborg.vbsupport.ru/showthread.php?t=116155

Any idea how to generate them? I tried ...

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="myproduct">
    <bitfielddefs>
        <group name="ugp">
            <group name="myproduct_permissions">
                <bitfield name="can_view" group="myproduct_permissions" phrase="myproduct_can_view">1</bitfield>
                <bitfield name="can_play" group="myproduct_permissions" phrase="myproduct_can_play">2</bitfield>
                <bitfield name="can_upload" group="myproduct_permissions" phrase="myproduct_can_upload">4</bitfield>
                <bitfield name="can_edit" group="myproduct_permissions" phrase="myproduct_can_edit">8</bitfield>
            </group>
	</group>
        <group name="myproduct">
            <group name="mysetting1">
                <bitfield name="mysetting1"></bitfield>
	        <datatype>free</datatype>
	        <defaultvalue></defaultvalue>
            </group>
        </group>
    </bitfielddefs>
</bitfields>
And I figure there is more to it then that for the settings/options but that article is old so I dont think its done that way anymore.
Reply With Quote
  #7  
Old 02-18-2008, 07:59 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
And I figure there is more to it then that for the settings/options but that article is old so I dont think its done that way anymore.
You mean board wide settings? or per user settings?

Board wide settings can be added simple by running the AdminCP in Debug mode and entering vBulletin Options, you then need to find the link to add a Settings Group (associate this with your product) then enter the empty settings group you have just created and You should find a link with say "Add Option" or something along those lines.

If its on a per user basis than that article is fine, I think.
Reply With Quote
  #8  
Old 02-18-2008, 03:32 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="darkgreen">Yes, some are going to be system wide settings. Thanks.

Why isnt this info in the documentation?</font>
Reply With Quote
  #9  
Old 02-18-2008, 04:30 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is most likely considered as editing the vBulletin code...therefore you won't receive any official support. So there is no need to stick it in the documentation (from Jeslofts point of view). Plus its pretty obvious (if your in debug mode) that you can add extra options, I discovered just messing around with a test board.
Reply With Quote
  #10  
Old 02-18-2008, 05:08 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I guess that would explain it as I havent ever run debug mode.
Just setup a test board and turned debug on. Doh! Its all there.

Thanks

I take it that I dont specify it as a vb default setting group?
Reply With Quote
Reply


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 07:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06071 seconds
  • Memory Usage 2,264KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete