Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Redirect after Login Details »»
Redirect after Login
Version: 1.31, by ragtek ragtek is offline
Developer Last Online: Feb 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 09-03-2007 Last Update: 01-19-2008 Installs: 64
Re-useable Code Translations  
No support by the author.

This is Part II of this Add-ON.

Its the same, just after the Login Process.

That means it redirects you to a site you entered in the acp after the login
Changehistory
1.1 => a little bug after login in acp was repaired
1.2 =>
  • added adminhelp
  • little bugfix (modcontrolpanel redirect)
1.3 =>
  • Usergroupcheck built in => this means, you can select now usergroups which should be redirected
  • redirectpage/redirectmessage is now optional
    you can enable or disable it
1.31 =>
  • Bugfix , thx to inciarco
German translation can be found here: http://www.vbulletin-germany.org/showthread.php?t=1454

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-20-2008, 11:38 AM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi
your idee with usergroups sounds realy good!
i'll try to implement it

also i wanna thank you for this snippet*g*
PHP Code:
OR $vbulletin->GPC['logintype'] === 'modcplogin' 
i've totaly forgotten on the modcp

thx
Reply With Quote
  #33  
Old 01-20-2008, 01:48 PM
Tomo123 Tomo123 is offline
 
Join Date: Jan 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well it's been less than 24 hours since i installed this mod and I got to say it's awesome. When ever anyone logs on I have them redirected to a page where it shows all the recent threads and posts (vBISpy - AJAX real-time feed of new posts/threads ). The few members I have think it's awsome too. Thanks for this
Reply With Quote
  #34  
Old 01-20-2008, 01:51 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

your welcome
Reply With Quote
  #35  
Old 01-20-2008, 02:48 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One Bug: Only Works when ONE Usergroup is Specified, otherwise don't Work!!

I Think Your Should Use Other Code to user more than One Usergroup!!

My Best Regards!!

Reply With Quote
  #36  
Old 01-20-2008, 02:51 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi
are you using version 1.3???
There it is for me working.Have you made a comma separated list of all usergroupid's ??
Reply With Quote
  #37  
Old 01-20-2008, 03:33 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ragtek View Post
hi
are you using version 1.3???
There it is for me working.Have you made a comma separated list of all usergroupid's ??
I'm Using the New Update (1.3), and I have vB 3.6.7 PL1; but I've Found the Answer of that Problem for You:

Quote:
Originally Posted by inciarco View Post
One Bug: Only Works when ONE Usergroup is Specified, otherwise don't Work!!

I Think Your Should Use Other Code to user more than One Usergroup!!

My Best Regards!!

I Found the Answer by looking to Similar Mods that Use a List of Member Groups to set the Permissions via Plugin and/or via PHP File:

You need to use the Code explode in the Following way to Extract and Use all the Usergroups Separated by ",":

The New Correct Code for Plugin "redirect after login" should be:

Code:
if (!($vbulletin->GPC['logintype'] === 'cplogin' OR $vbulletin->GPC['logintype'] === 'modcplogin'))
{
	if (is_member_of($vbulletin->userinfo, explode(',',$vbulletin->options['login_groups'])))
	{

		$vbulletin->url = $vbulletin->options['loginredirect'] . $vbulletin->session->vars['sessionurl_q'];
		if ($vbulletin->options['login_showredirect'] == 1)
		{
			eval(print_standard_redirect('redirect_login', true, true));
		}
		else
		{
			standard_redirect();
		}
	}
}
Notice that I Replaced

Code:
$vbulletin->options['login_groups']
with

Code:
 explode(',',$vbulletin->options['login_groups'])
I tested it and It Works Now OK with that Small Change!! :up:

My Best Regards!!

Reply With Quote
  #38  
Old 01-20-2008, 03:46 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hm
very strange
i don't understand this
the is_member_of is built this way:
PHP Code:
// #############################################################################
/**
* Works out if a user is a member of the specified usergroup(s)
*
* This function can be overloaded to test multiple usergroups: is_member_of($user, 1, 3, 4, 6...)
*
* @param    array        User info array - must contain userid, usergroupid and membergroupids fields
* @param    integer    Usergroup ID to test
* @param boolean    Pull result from cache
*
* @return    boolean
*/
function is_member_of(&$userinfo$usergroupid$cache true
as 2 parameter it gets many integers ( all the usergroupid's)
when i now have in my option: 2,3,4 it should look like this:
PHP Code:
if (is_member_of($vbulletin->userinfo2,3,4))
    { 
and this should be ok :/
very strange
i think i have to check this part one more time
thx for your help
i opened a thread because i think its a important point^^
Reply With Quote
  #39  
Old 01-20-2008, 04:30 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx 4 your help
i've updated it
Reply With Quote
  #40  
Old 01-20-2008, 08:32 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ragtek View Post
thx 4 your help
i've updated it
You're Very Welcome, I'm Glad To Help!! :up:

My Best Regards To You!!

Reply With Quote
  #41  
Old 01-22-2008, 03:34 PM
marcossalazar marcossalazar is offline
 
Join Date: Feb 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is one of the best mods out there. Thanks for continuing to support it!

Marcos
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 12:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11634 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete