vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - Redirect after Login (https://vborg.vbsupport.ru/showthread.php?t=156992)

ragtek 01-20-2008 11:38 AM

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

Tomo123 01-20-2008 01:48 PM

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

ragtek 01-20-2008 01:51 PM

your welcome:)

inciarco 01-20-2008 02:48 PM

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

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

My Best Regards!! ;)

:)

ragtek 01-20-2008 02:51 PM

hi
are you using version 1.3???
There it is for me working.Have you made a comma separated list of all usergroupid's ??

inciarco 01-20-2008 03:33 PM

Quote:

Originally Posted by ragtek (Post 1425182)
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 (Post 1425179)
One Bug: Only Works when ONE Usergroup is Specified, otherwise don't Work!! :confused: :(

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

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!! ;)

:)

ragtek 01-20-2008 03:46 PM

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^^

ragtek 01-20-2008 04:30 PM

thx 4 your help
i've updated it

inciarco 01-20-2008 08:32 PM

Quote:

Originally Posted by ragtek (Post 1425257)
thx 4 your help
i've updated it

You're Very Welcome, I'm Glad To Help!! :up:

My Best Regards To You!! ;)

:)

marcossalazar 01-22-2008 03:34 PM

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

Marcos


All times are GMT. The time now is 10:11 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.01181 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete