vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   logout link on extranal page solved now (https://vborg.vbsupport.ru/showthread.php?t=133634)

tanshah 12-09-2006 10:00 PM

logout link on extranal page solved now
 
I have reading lot about the suggested solution to make a link for logout on extranl pages but most of the guys was compaling that solution offer is not working i have worked on that and few hours re search i got the solution which i want to share to help others here is detail

require_once('path/global.php');
require_once('path/includes/functions_login.php');
$hh=$vbulletin->userinfo['logouthash'];
$url1="
<ahref= \"http://url/forum/login.php?$session[sessionurl]do=logout&amp;logouthash=".$hh."\">logut out</a>";
after that you can put link any where you want in your code
if its php then
just <? echo $url1?>

and you are done

Kungfu 12-11-2006 10:16 PM

basically what i have as well
Code:

global $me,$bbuserinfo,$vbulletin;
if ($me)
        {
                echo "Logged in as <a href=\"/forum/usercp.php\">".$me."</a> - (<a href=\"/forum/login.php?do=logout&logouthash=".$bbuserinfo['logouthash']."\">Logout</a>)";
        }
else
        {
        echo "
        <form action=\"/forum/login.php\" method=\"post\">
        You are not logged in, 
        Username: <input type=\"text\" name=\"vb_login_username\" id=\"navbar_username\" size=\"10\" accesskey=\"u\" tabindex=\"1\" value=\"User Name\" onfocus=\"if (this.value == 'User Name') this.value = '';\" />
        Password: <input type=\"password\" name=\"vb_login_password\" size=\"10\" accesskey=\"p\" tabindex=\"2\" />
        <input type=\"submit\" class=\"button\" value=\"Login\" tabindex=\"4\" title=\"Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself.\" accesskey=\"s\" />
        or <a href=\"/forum/register.php\"><u>Register</u></a>   
          <input type=\"hidden\" name=\"s\" value=\"\" />
                <input type=\"hidden\" name=\"do\" value=\"login\" />
                <input type=\"hidden\" name=\"cookieuser\" value=\"1\" />
                <input type=\"hidden\" name=\"forceredirect\" value=\"1\" />                       
                <input type=\"hidden\" name=\"vb_login_md5password\" />
                </form>";
        }

where $me and bbuserinfo is from a shellscript i have
i couldnt get global to work but
require_once('/home/virtuser/diablo2.com/public_html/forum/includes/init.php');
works fine when including a file for userinfo, just wont have bbcode quotes.

$bbuserinfo = &$vbulletin->userinfo;
and
$me = ($bbuserinfo['userid'] ? $bbuserinfo['username'] : '');

this is in php obviously.

Thats the jist of it.

tanshah 12-13-2006 03:42 AM

instead of using
$bbuserinfo['userid'] or
$bbuserinfo['username']
why you dont use

$vbulletin->userinfo['userid'] and
$vbulletin->userinfo['username'];
..???

Kungfu 12-19-2006 02:06 AM

Quote:

Originally Posted by tanshah (Post 1137538)
instead of using
$bbuserinfo['userid'] or
$bbuserinfo['username']
why you dont use

$vbulletin->userinfo['userid'] and
$vbulletin->userinfo['username'];
..???

what do you mean? it is that. if you read what i wrote i said

$bbuserinfo = &$vbulletin->userinfo;

i use it in other areas, obviously you dont have to do that. but i just assigned that whole thing to one variable instead of doing that every time.


All times are GMT. The time now is 08:50 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.01105 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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