vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   VB Login on a Non-VB Page vB3 RC3 (https://vborg.vbsupport.ru/showthread.php?t=61112)

Sai01 01-24-2006 09:23 PM

how do i make this work with vBExternal? they seems to have problems together...

vtx1800 01-24-2006 10:06 PM

Quote:

Originally Posted by ausnrl
Ok im going to need a little help from someone good with PHP. What happens is i tried on 3.5 and its pretty good but what happens is i login it logs in but then on the main page it just comes up with the login will i need to make a new file and redirect that to the logged in page eg indexloggedin.php also i tried logging in and i check the forums it says i have visited in the last 15 minutes but i dont seem to be logged in!

Same problem, I log in, but it always asks to log in.

I checked the vB settings for the cookies, I am using the .domain.com setting. Don't see why it isn't working.

manuka 03-04-2006 01:53 AM

Quote:

Originally Posted by -animal-
the code works great but when i enter my login details, if the page changes to the "thanks for logging in" page and then back to the page that has the login forms. Is there anyway to say get it to not go to the thanks for loggin in page and then rather than just displaying the login boxed display the users avatar who just logged in?

thanks

yes there is - there are other threads about this topic - but basically you need to hack into the vb code and adapt it for use on non-vb pages - it's pretty basic php/html coding.

Fallback 03-15-2006 12:58 PM

Question... with this code:

Quote:

<?php
chdir("forum/");
require('./global.php');
chdir("../);
?>
Say you add that on a non-vb page and your vB forum goes down it will render your non-vb page inaccessible. Is there any way to mod the code to ignore the "global.php" if say your forum database goes down?

UnmodNick 04-23-2006 12:07 AM

I've added this using the mod code that displays the avatar... everything works fine UNTIL I log off, at which point when I try to go to my non vB page displaying the login box or the welcome user info I get:

Code:

Unable to add cookies, header already sent.
File: /xxxx/xxxx/public_html/history/index.php
Line: 2

Any thoughts?

Here is the code I am using:

This is prior to the <html> & <head>:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
chdir("./forums");
include("./global.php"); 
// added this line to include the user functions which
// has the fetch_avatar_url() function
include("./includes/functions_user.php");
chdir("../");
?>

And this is in the body:
Code:

<?
if ($bbuserinfo['userid']!=0) {
    $username=$bbuserinfo['username'];
   

    // i assigned the avatar url to the variable $user_av and check to see if it's empty.
    $user_av = fetch_avatar_url($bbuserinfo['userid']);
    if($user_av!='')
      $user_av="/forums/" . $user_av;  //replace "/forum/" with your virtual path to your forum pages.

    print("<align='center'><span class='sectionheader'>Welcome back, $username!<br>");
   
    //if the avatar url is not empty, display it
    if($user_av!='')
        print("<img src=\"" . $user_av . "\" vspace=4>");
} else {
?>
<form action='/forums/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5password)'>
        <script type='text/javascript' src='/forum/clientscript/vbulletin_md5.js'></script>
       
        <span class="sectionheader">Username:</span>
            <input type='text' class='button' name='vb_login_username' id='navbar_username' size='15' accesskey='u' tabindex='1' value='' onfocus='if (this.value == 'username') this.value = '';' /><br>
           
            <span class="sectionheader">Password:&nbsp;</span>
            <input type='password' class='button' name='vb_login_password' size='15' accesskey='p' tabindex='2' /><br>
            <input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='sectionheader'>Remember Me</span><br>
       
       
       
        <input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' />
        <input type='hidden' name='do' value='login' />
        <input type='hidden' name='forceredirect' value='1' />           
        <input type='hidden' name='vb_login_md5password' />
        </form>
                        <?

}

?>


boxerman 01-16-2008 12:26 PM

will this work on vbulletin 3.6 L2? thanks

James

whitesky_forum 02-18-2008 05:27 PM

Quote:

Originally Posted by boxerman (Post 1422491)
will this work on vbulletin 3.6 L2? thanks

James

I Just got it working for vBulletin? v3.6.8 Patch Level 2. Did the following change

if ($vbulletin->userinfo['userid']!=0) {
$username=$vbulletin->userinfo['username'];

in place of

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];

Still have to make the testing happen. But hope it work ! :)

CEO TaYloR? 08-08-2008 05:17 PM

Ok the logging in works great but when I log in it shows up as I haven't when it takes you back to the main page.

msnhockey 11-17-2008 08:38 AM

i am having the same problem as you are CEO TaYloR

kwchan 01-31-2009 10:52 AM

not working at all for me, i get all kinds of errors


All times are GMT. The time now is 11:19 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.02447 seconds
  • Memory Usage 1,747KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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