vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Restrict Style to Usergroup (https://vborg.vbsupport.ru/showthread.php?t=95910)

Andreas 09-08-2005 10:00 PM

Restrict Style to Usergroup
 
1 Attachment(s)
Restrict Style to Usergroup(s)

Description
This Hack allows you to restrict styles to certain usergroups.

Details
1 Product XML (4 Plugins, 1 Phrase).

Screenshot (from the 3.0 Version; very similar): https://vborg.vbsupport.ru/attachmen...chmentid=26703

History
1.0.0
Initial Version

1.0.1
Slight Bugfix regarding secondary Usergroups not working properly

1.0.2
Converted to a Product; no more file edits necessary

1.0.3
Fixed a Bug that caused this Hack to not work at all ;)

1.0.4
Compatibility Update for vBulletin 4.1.11+

Compatibility
This Add-on is compatible with vBulletin 3.5.X, 3.6.X, 3.7.X, 3.8.X, 4.0.X, 4.1.X and 4.2.0

Attention: This Hack does not work with Show Users using Style in Style Chooser

Boofo 09-09-2005 05:32 AM

Good job! Apparently you found hooks that would work, huh? ;)

Andreas 09-09-2005 05:38 AM

Not really ... there are no Hooks to display the Controls (Usergroups Selector).
But the really important Hooks (Data-Saving) are there, for the GUI Stuff I use a dirty Trick ;)

Boofo 09-09-2005 05:40 AM

Whatever works, right? ;)

RoryF 09-09-2005 02:12 PM

Grand job :).

I get an error though when i edit the settings.

PHP Code:

Database error in vBulletin 3.5.0 Release Candidate 3:

Invalid SQL:
SELECT allowedusergroups FROM style WHERE styleid 2;

MySQL Error  Unknown column 'allowedusergroups' in 'field list'
Error Number 1054
Date         
FridaySeptember 9th 2005 11:10:52 AM
Script       
http://*************/forum/admincp/template.php?s=&group=&do=editstyle&dostyleid=2
Referrer     http://*************/forum/admincp/template.php?do=modify&group=&expandset=2
IP Address   : ************
Username     Rory
Classname    
vB_Database 


Snake 09-09-2005 03:36 PM

Screenshots please?

RoryF 09-09-2005 03:46 PM

Screenshot is already in the post ;). It's just a link.

Screenshot URL is here => https://vborg.vbsupport.ru/attachmen...chmentid=26703

Andreas 09-09-2005 04:14 PM

Quote:

Originally Posted by RoryF
Grand job :).

I get an error though when i edit the settings.

Doh! I forgot the Install Code ^.^

Redownload the ZIP and import the new XML or

[sql]ALTER TABLE style ADD allowedusergroups VARCHAR(250) NOT NULL DEFAULT ''[/sql]

Snake 09-09-2005 04:45 PM

Whoops my bad. Thanks for the hack.

Oblivion Knight 09-11-2005 04:50 PM

So if no usergroups are selected and the style is active; the style can be used by all usergroups. Correct?


All times are GMT. The time now is 08:45 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.01115 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete