vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Change the Default Forum when you login (https://vborg.vbsupport.ru/showthread.php?t=152879)

madhu_nair 07-20-2007 08:42 PM

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 :)

Kirk Y 07-20-2007 11:43 PM

Hmm... interesting idea. I think I can write something up that will do this. Give me a little bit.

madhu_nair 07-20-2007 11:57 PM

Aha ... for once I don't feel like an idiot after reading replies to my stupid questions :)

Kirk Y 07-21-2007 02:06 AM

1 Attachment(s)
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.

madhu_nair 07-21-2007 05:38 AM

Thanks!

LordDB 08-02-2007 02:34 PM

@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?

Kirk Y 08-02-2007 05:45 PM

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.

LordDB 08-02-2007 06:11 PM

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

Br.


All times are GMT. The time now is 02:45 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.01204 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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