Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Restrict style to Usergroup Details »»
Restrict style to Usergroup
Version: 0.3, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 06-01-2005 Last Update: 06-26-2005 Installs: 22
DB Changes
Code Changes  
No support by the author.

Description
This hack allows you to restrict the usage of styles to certain usergroups.

Hack Details
Files to Edit = 4
Queries to Run = 1
Difficulty = Medium

History
0.1 Initial Version
0.2 Fixed a typo in the query, thanks to nexialys
0.3 Fixed a Bug which caused Problems with Primary Usergroups

Developed and tested with 3.0.7, but should work with all 3.0.x-Versions.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-25-2005, 11:50 AM
between worlds between worlds is offline
 
Join Date: Nov 2004
Location: Scotland
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great. Thank you.
Reply With Quote
  #33  
Old 06-25-2005, 05:21 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ive checked the box for the admins to view and it removed it from the drop down.

when i select a box for any usergroup to be able to use the style, i loose it in the drop down, but if i have it activated for all to see, the style shows in the drop down.
Reply With Quote
  #34  
Old 06-27-2005, 09:30 AM
nighteyes's Avatar
nighteyes nighteyes is offline
 
Join Date: Oct 2001
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same problem here. Once I've selected the style, it completely vanishes from the drop-down menu..... even if I change to a different style.... it doesn't re-appear and I can't re-select it from the menu.

OK edit. This appears to only take into consideration secondary usergroups. I create a styles usergroup and anyone who is in this as secondary can see the additional styles in the dropdrown menus.
Reply With Quote
  #35  
Old 06-27-2005, 09:38 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange. Does work just fine for me and I cannot reproduce the problem.

@nighteyes
Which Version do you use?
If you don't mind, pease send me a PM with an ACP and FTP account for your site so I can take a look at what is going wrong.
Reply With Quote
  #36  
Old 06-27-2005, 09:44 AM
nighteyes's Avatar
nighteyes nighteyes is offline
 
Join Date: Oct 2001
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See above edit Kirby. Is this the way it's supposed to work?
Reply With Quote
  #37  
Old 06-27-2005, 09:48 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, but there was a bug in the instructions.

PHP Code:
$ugarray array_merge(array($bbuserinfo['userid']), explode(','$bbuserinfo['membergroupids'])); 
should have been
PHP Code:
$ugarray array_merge(array($bbuserinfo['usergroupid']), explode(','$bbuserinfo['membergroupids'])); 
instead.
Does it also work with primary usergroups when you change this?
Reply With Quote
  #38  
Old 06-27-2005, 10:29 AM
nighteyes's Avatar
nighteyes nighteyes is offline
 
Join Date: Oct 2001
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep that fixes the problem. Thanks for posting a fix so quickly.
Reply With Quote
  #39  
Old 06-27-2005, 01:23 PM
87accordlxi 87accordlxi is offline
 
Join Date: Aug 2002
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This may be a dumb question, but what does editing global.php do? When I edited it, it kept giving me parse errors so I reverted to a saved backup of the file. The hack still works.
Reply With Quote
  #40  
Old 06-27-2005, 01:27 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Without the global.php edit Users can still use any Style (that has User Select = Yes).
If you get parse errors, you did not make the edit correctly - check again.
Reply With Quote
  #41  
Old 06-27-2005, 01:38 PM
87accordlxi 87accordlxi is offline
 
Join Date: Aug 2002
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see. They cannot select a restricted style from the dropdown menu, but they can still type the direct url of the board with that style and see it. Like http://www.mysite.com/index.php?s=&styleid=10 if Style #10 was restricted.

This is the parse error I keep getting. The edits for global.php are not very hard and i've tried it 4 or 5 times and still keep getting the error.

Quote:
Parse error: parse error, unexpected '=' in /home2/geez/public_html/global.php on line 283
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 05:18 AM.


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.10431 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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