Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 07-20-2007, 08:42 PM
madhu_nair madhu_nair is offline
 
Join Date: Jul 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Change the Default Forum when you login

Hi,

I am a newbie - Hence I have a lot of questions.

When I log in, it goes to http://www.meracarforum.com/forums/
This is the default "page".

I was wondering if I can set my default "page" to another forum.
http://www.meracarforum.com/forums/f...splay.php?f=44

I want the user to have the ability to select their default forum.
For example the guy who is interested only in placing ads on my forum wants the default forum to be always classifieds.

This way when they login, it goes dorectly to their fav forum. Otherwise they have
to click thru to get to their forum.

So in the context of Vbulletin.org ...
When I log in I want to go directly to
vBulletin.org Forum / Community Discussions / General vBulletin Discussions

I searched on the forums - i could not find anything for this one.

Please advice.

Thanks a ton folks for all teh answers
Reply With Quote
  #2  
Old 07-20-2007, 11:43 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... interesting idea. I think I can write something up that will do this. Give me a little bit.
Reply With Quote
  #3  
Old 07-20-2007, 11:57 PM
madhu_nair madhu_nair is offline
 
Join Date: Jul 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aha ... for once I don't feel like an idiot after reading replies to my stupid questions
Reply With Quote
  #4  
Old 07-21-2007, 02:06 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, here you go. You'll need to add a new User Profile Field through your AdminCP:
  • Single-line text box
  • Leave everything default, except for the following:
    • Max length of user allowed input: change to 5
    • Field Searchable on Members List: change to No
    • Show on Members List: change to No
  • The Display Order and Display Page are really up to you
Be sure to remember the Field ID that's used.

Upload the attached Plugin through the Plugins/Products Menu in the AdminCP. Afterwards, go to Plugin Manager and click on "Redirect Favorite Forum"; this will display the Plugin's PHP Code. You have to change the number in: $fields['field5'] to match your Field ID.
Attached Files
File Type: xml favorite-forum.xml (568 Bytes, 10 views)
Reply With Quote
  #5  
Old 07-21-2007, 05:38 AM
madhu_nair madhu_nair is offline
 
Join Date: Jul 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #6  
Old 08-02-2007, 02:34 PM
LordDB LordDB is offline
 
Join Date: Aug 2006
Location: CoffeeFads.Co.Uk
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Kirk Y, nice mod, m8!

How can I set this log-in redirect page for all my members, as I want them to view elsewhere first?
Reply With Quote
  #7  
Old 08-02-2007, 05:45 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could change the plugin's data (Through the Plugin Manager in the AdminCP) from this:
Code:
if (!($vbulletin->GPC['logintype'] === 'cplogin' OR $vbulletin->GPC['logintype'] === 'modcplogin'))
{
   $fields = $vbulletin->db->query_first("SELECT * FROM userfield WHERE userid =".$vbulletin->userinfo['userid']);

   if ($fields['field5']){
   $vbulletin->url = "forumdisplay.php?f=".$fields['field5']; }
}
To this:
Code:
if (!($vbulletin->GPC['logintype'] === 'cplogin' OR $vbulletin->GPC['logintype'] === 'modcplogin'))
{
   $vbulletin->url = "page.php";
}
Obviously, change page.php to suit your needs.
Reply With Quote
  #8  
Old 08-02-2007, 06:11 PM
LordDB LordDB is offline
 
Join Date: Aug 2006
Location: CoffeeFads.Co.Uk
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Kirk Y, that is just great...works a treat! Thx so much, m8!

Br.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:41 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.03932 seconds
  • Memory Usage 2,233KB
  • Queries Executed 14 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete