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 05-12-2005, 08:44 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Subscriptions - Styles

Hello all,

If this is not a mod for this, please let me know how I can do it myself. I am not very well experienced with vB's templating system.

What I need to do is when a user is added to the usergroup "Sub" (they will automatically be added once they purchase a subscription), to have a few styles only available to them. This means that it will be under their profile options page for this design. If they have not paid, this theme is completely invisible to them.
Reply With Quote
  #2  
Old 05-12-2005, 09:34 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The best thing I can suggest is editing the [high]construct_style_options[/high] function found in [high]/includes/functions.php[/high]

You can state some conditions for if a user is in a certain usergroup or not whether to display it or not - Its a hardcoded way of doing it...

Another way would be to create an additional setting for a style, to say whether it is a public or premium style - Then edit the same function as above to check whether it is a premium style, and whether the user is a subscribed user or not...

Both would require a bit of work but I suppose I could come up with something

Satan
Reply With Quote
  #3  
Old 05-12-2005, 11:52 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the quick reply. Could you give me close to exact directions? I'm very new at this .
Reply With Quote
  #4  
Old 05-13-2005, 09:12 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to create a hack based off this for you, but have run into a little difficulty - I should have something later today

Satan
Reply With Quote
  #5  
Old 05-14-2005, 06:38 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you . Post whenever you can!
Reply With Quote
  #6  
Old 05-25-2005, 11:56 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know or can help please?
Reply With Quote
  #7  
Old 05-30-2005, 07:53 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well a little update . I did figure it out somewhat, but I am stuck now.

I'm doing this in the header (since it won't display anything else).

Code:
<if condition="$bbuserinfo['usergroupid'] == 9">

Allowed
<else />

CONFUSED
</else>
</if>
The first part works, in the else statement I want to make it so it changes their user perference of the skin back to the default so they can't use the skin. How can I do that?
Reply With Quote
  #8  
Old 05-30-2005, 08:05 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The way you are going about it won't prevent users from setting their styles to ones restricted for certain user groups. All they have to do to get around it is to set the style in their url.

If you truly want to do this right, you need to add a field to the style database that includes which usergroups may use that style.

Then you need to set up a way to store that info and change the style dropdowns to only include authorized styles.

Finally, you need to change the code (it used to be in global.php) that sets a user's style to ensure that a user isn't using a style they shouldn't.

And before you ask, I honestly don't have time to do it for you. I wrote a version for VB2 but never ported it over.
Reply With Quote
  #9  
Old 05-30-2005, 08:19 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you amykhar . I obviosuly don't have skills to do all of that. The way I was going to do would work expect for the way you said it with the URL. I don't mind if they see it for a few minutes as long as they can't use it.

Could you explain to me how to go about it that way or an easier way?
Reply With Quote
  #10  
Old 05-31-2005, 08:20 PM
N2activeWeb N2activeWeb is offline
 
Join Date: Mar 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know how to do it the simple way?
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 01:25 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.04276 seconds
  • Memory Usage 2,250KB
  • 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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete