Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
logout link on extranal page solved now
tanshah
Join Date: Nov 2006
Posts: 4

 

Show Printable Version Email this Page Subscription
tanshah tanshah is offline 12-09-2006, 10:00 PM

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
Reply With Quote
  #2  
Old 12-11-2006, 10:16 PM
Kungfu Kungfu is offline
 
Join Date: Dec 2005
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 12-13-2006, 03:42 AM
tanshah tanshah is offline
 
Join Date: Nov 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

$vbulletin->userinfo['userid'] and
$vbulletin->userinfo['username'];
..???
Reply With Quote
  #4  
Old 12-19-2006, 02:06 AM
Kungfu Kungfu is offline
 
Join Date: Dec 2005
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tanshah View Post
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.
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 05:57 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.03443 seconds
  • Memory Usage 2,224KB
  • Queries Executed 17 (?)
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)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete