vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Redirect users from forumhome based on profile field values. Ex. female=female forums (https://vborg.vbsupport.ru/showthread.php?t=139348)

Sam1985 02-13-2007 10:13 PM

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.

Gio~Logist 02-14-2007 12:50 AM

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.

Sam1985 02-14-2007 03:10 AM

Quote:

Originally Posted by gio~logist (Post 1181960)
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:)

Gio~Logist 02-14-2007 03:15 AM

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.

Sam1985 02-14-2007 03:33 AM

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

Gio~Logist 02-14-2007 03:35 AM

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.

Sam1985 02-14-2007 03:46 AM

Quote:

Originally Posted by gio~logist (Post 1182051)
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:

Gio~Logist 02-14-2007 04:17 AM

Yea, it may be to much for now. However, if i have a sec i will let you know.

Sam1985 02-14-2007 05:24 AM

Quote:

Originally Posted by gio~logist (Post 1182068)
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.:cool:


All times are GMT. The time now is 08:19 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.01085 seconds
  • Memory Usage 1,737KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete