Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2004, 09:41 AM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Style Permissions

I wanna make it so that certain styles can only be used by members of a certain group. Any suggestions?
Reply With Quote
  #2  
Old 08-06-2004, 10:31 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noonespecial
I wanna make it so that certain styles can only be used by members of a certain group. Any suggestions?
What do you want to do exactly?

Do you want to restrict access altogether or do you only want to restrict the options shown on the select menu in the usercp?
If you only restrict access to the select menu, users can still see styles by adding &styleid=x to the URL... but it's less complicated as far as I know
Reply With Quote
  #3  
Old 08-06-2004, 10:36 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could try something like this:

in global.php, find:
Code:
	// style specified in user profile
	$styleid = $bbuserinfo['styleid'];
REPLACE WITH:

PHP Code:
    if ($bbuserinfo['styleid'] == AND $bbuserinfo['usergroupid'] != Y)
    {
        
$styleid $vboptions['styleid'];
    }
    else
    {
    
// style specified in user profile
    
$styleid $bbuserinfo['styleid'];
    } 
replace X with the styleid and Y with the usergroup that's allowed to view that style.
(untested)
Reply With Quote
  #4  
Old 01-03-2005, 01:44 PM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F
You could try something like this:

in global.php, find:
Code:
	// style specified in user profile
	$styleid = $bbuserinfo['styleid'];
REPLACE WITH:

PHP Code:
    if ($bbuserinfo['styleid'] == AND $bbuserinfo['usergroupid'] != Y)
    {
        
$styleid $vboptions['styleid'];
    }
    else
    {
    
// style specified in user profile
    
$styleid $bbuserinfo['styleid'];
    } 
replace X with the styleid and Y with the usergroup that's allowed to view that style.
(untested)
I'll give that a try. Basically, I have 6 or 7 styles right now, and I want to add a new style that doesn't include advertisements and allow users to purchase that style.
Reply With Quote
  #5  
Old 01-03-2005, 01:57 PM
infazteam infazteam is offline
 
Join Date: Oct 2004
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kodlar biras karışık sanki ?
Reply With Quote
  #6  
Old 01-03-2005, 11:09 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you could look at it from another angle and edit the templates. putting in a conditional to display the ads if the usergroup is not the ad-free usergroup might be easier also that would mean that your paying users wouldn't be limited to just one style to gain their benifits.
Reply With Quote
  #7  
Old 01-04-2005, 10:19 AM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Carnage-
you could look at it from another angle and edit the templates. putting in a conditional to display the ads if the usergroup is not the ad-free usergroup might be easier also that would mean that your paying users wouldn't be limited to just one style to gain their benifits.
that's a great idea! could you help me with what the conditional would look like?
Reply With Quote
  #8  
Old 01-04-2005, 12:04 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="$bbuserinfo['usergroupid'] != X">Code to display ads</if>
change X to the usergroup id of the group that dosn't display ads you can add multiple groups by doing:

Code:
<if condition="$bbuserinfo['usergroupid'] != X && $bbuserinfo['usergroupid'] != Y">Code to display ads</if>
you can also specify users not to display ads to as well by using $bbuserinfo['userid'] != X
Reply With Quote
  #9  
Old 01-05-2005, 04:44 AM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Carnage-
Code:
<if condition="$bbuserinfo['usergroupid'] != X">Code to display ads</if>
change X to the usergroup id of the group that dosn't display ads you can add multiple groups by doing:

Code:
<if condition="$bbuserinfo['usergroupid'] != X && $bbuserinfo['usergroupid'] != Y">Code to display ads</if>
you can also specify users not to display ads to as well by using $bbuserinfo['userid'] != X
beautiful, im going to put it into work asap .. hopefully we can generate a litle revenue
Reply With Quote
  #10  
Old 03-05-2005, 02:00 PM
warpeditor warpeditor is offline
 
Join Date: Nov 2001
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F
You could try something like this:

in global.php, find:
Code:
	// style specified in user profile
	$styleid = $bbuserinfo['styleid'];
REPLACE WITH:

PHP Code:
    if ($bbuserinfo['styleid'] == AND $bbuserinfo['usergroupid'] != Y)
    {
        
$styleid $vboptions['styleid'];
    }
    else
    {
    
// style specified in user profile
    
$styleid $bbuserinfo['styleid'];
    } 
replace X with the styleid and Y with the usergroup that's allowed to view that style.
(untested)
I got a parse error with this code. All I want to do is give moderators 1 more style to choose. Any ideas?
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 04:27 AM.


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.04942 seconds
  • Memory Usage 2,274KB
  • 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
  • (7)bbcode_code
  • (3)bbcode_php
  • (5)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
  • (2)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