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 02-13-2007, 10:13 PM
Sam1985's Avatar
Sam1985 Sam1985 is offline
 
Join Date: Feb 2007
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Redirect users from forumhome based on profile field values. Ex. female=female forums

Redirect users from forumhome based on their profile field values. Ones such as male/female so that male would be directed to the mens fitness section thread/custom page and female= female fitness thread/custom page.

This would be great for us who want to customize our forums and make it organized and to the point instead of throwing everyone to domin.com/index.php or the same forumhome.
Reply With Quote
  #2  
Old 02-14-2007, 12:50 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try making a new plugin in forumhome_start

Put this in it:
PHP Code:
if($vbulletin->userinfo['usergroupid'] == 'x'){
    
header("location:http://yoururlhere");

Replace what's necessary and you should be set.
Reply With Quote
  #3  
Old 02-14-2007, 03:10 AM
Sam1985's Avatar
Sam1985 Sam1985 is offline
 
Join Date: Feb 2007
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gio~logist View Post
Try making a new plugin in forumhome_start

Put this in it:
PHP Code:
if($vbulletin->userinfo['usergroupid'] == 'x'){
    
header("location:http://yoururlhere");

Replace what's necessary and you should be set.
Thank you much for your reply.
Please excuse me for being a noob, but here is where I am lost
Code:
userinfo['usergroupid'] == 'x'){
Suppose the member is a female and I want to redirect her to www.domain.com/forum/somepage/orsomeforum
what would the code look like?

and also suppose the member want to browse the other sections forum>>fitness>>male
if she wishes to. I am scared that by going to forum it will not allow them to enter and will redirect them. Is this the case?

Thank You
Reply With Quote
  #4  
Old 02-14-2007, 03:15 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That code only affects the forum main page.

Here's the code for the profile field.

New plugin in forumhome_start
PHP Code:
if($vbulletin->userinfo['fieldx'] == 'male'){
    
header("location:http://yoururlhere");

Replace the x in "fieldx" with the field id of the field in which asks what gender the person is. You can find this id by editing the field via admincp.
Reply With Quote
  #5  
Old 02-14-2007, 03:33 AM
Sam1985's Avatar
Sam1985 Sam1985 is offline
 
Join Date: Feb 2007
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much!!! works like a charm.

Just one more thing to ask you gio~logist.
How do I make it so that it only occurs once during login.
Because right now If i have general discussion on the forum home it will redirect them back as soon as they enter forum home.

would this be possible to do just once or somewhere so that once they login first thing they get redirected to is their primary forums, but they can go back to forum home and the redirect will should not work again.

Thanks
Reply With Quote
  #6  
Old 02-14-2007, 03:35 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm. The only way i can think of doing that will require a new query and table in the database. I can't think of any simple way to do that off the top.
Reply With Quote
  #7  
Old 02-14-2007, 03:46 AM
Sam1985's Avatar
Sam1985 Sam1985 is offline
 
Join Date: Feb 2007
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gio~logist View Post
Hm. The only way i can think of doing that will require a new query and table in the database. I can't think of any simple way to do that off the top.
I see. That's what we are really after. Will that take a lot of time or will be difficult?
Thank you for getting us here though. If you have time to help us do that, we will be forever thankful for your help. That will get us up and running.
If you do not have time, that's ok. I guess we can work with what you have posted.

Thanks again:up:
Reply With Quote
  #8  
Old 02-14-2007, 04:17 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea, it may be to much for now. However, if i have a sec i will let you know.
Reply With Quote
  #9  
Old 02-14-2007, 05:24 AM
Sam1985's Avatar
Sam1985 Sam1985 is offline
 
Join Date: Feb 2007
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gio~logist View Post
Yea, it may be to much for now. However, if i have a sec i will let you know.
Great. You're the best. Whenever you get a chance. We are looking to get the site up in the next few weeks.

I have actually posted for help here and on TAZ forums.

You were very helpful and fast.
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 11:49 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.04243 seconds
  • Memory Usage 2,250KB
  • Queries Executed 11 (?)
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
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete