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)

Styles P 08-04-2005 05:08 PM

Anyone? When people who don't have an avatar are logged in, it displays a broken image. Is there anything I can do to fix that? How can I tell the script to just display a link to edit their avatar, or possibly even a default avatar image?

Gutspiller 08-07-2005 03:54 AM

This doesn't seem to work in FireFox.

keymistress 08-16-2005 03:34 AM

sorry fixed the problem...

miguel.simoes 08-17-2005 02:50 PM

Well, I think I'm a winner... I have both erros:

- array_keys()
- $db is not an object

So, what can be done to correct this issue?

face0fdie 10-07-2005 07:05 PM

sorry it dont show me welcome back
How can if fix this problem

all my code is :
Quote:

<?
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="/forum/" . $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='forum/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5pa ssword)'>
<script type='text/javascript' src='forum/clientscript/vbulletin_md5.js'></script>
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<table cellpadding="0" cellspacing="0" width="159" height="56">
<!-- MSTableType="layout" -->
<tr>
<td valign="top">Username</td>
<td valign="top" colspan="2" height="17">
<input name='vb_login_username' id='navbar_username' onfocus='if (this.value == 'username') this.value = '';' size="15" style="float: right; border: 1px solid #E4E4E4; background-color: #FAFAFA"></td>
</tr>
<tr>
<td valign="bottom">Password</td>
<td valign="bottom" colspan="2" height="18">
<input name='vb_login_password' type='password' size="15" style="float: right; border: 1px solid #E4E4E4; background-color: #FAFAFA">
<input type='hidden' name='do' value='login' />
<input type='hidden' name='forceredirect' value='1' />
<input type='hidden' name='vb_login_md5password' />
</td>
</tr>
<tr>
<td valign="middle" colspan="2">
<a href="http://forum.irvirus.com/login.php?do=lostpw">
forgot Password ?</a></td>
<td valign="bottom" height="21">
<input type="submit" value="Enter" name="B1" style="float: right; font-family: Tahoma; font-size: 8pt; color: #999999; border: 1px solid #E4E4E4; background-color: #F0F0F0"></td>
</tr>
<tr>
<td width="62"></td>
<td width="35"></td>
<td height="1" width="62"></td>
<?

}

?>

Tefra 11-22-2005 07:13 AM

can anyone provide his working script ? it doesn't show "welcome user"

Dark Riku 11-22-2005 08:49 PM

This is fix for the < problem... script was written wrong, i dont no if this has been posted because i dont feel ike reading this all...

This:
PHP Code:

<?php
  chdir
("forum/");
require(
'./global.php');  
chdir("../"); 
?>

Instead of
PHP Code:

<?php
  chdir
("forum/");
require(
'./global.php');  
chdir("../); 
?>


UManiac 12-15-2005 11:53 PM

Do I need to load the entire gloabl.php file? or is there any specific secion of it that makes this work?

Thanks in advance

kopfnick 12-22-2005 10:45 AM

I am using this code as it seems to be the easiest way to integrate a login throughout our entire site.

I have a seemingly small problem though which is driving me nutz: The whole menu with login-thingy is inside php file which i include. In the non-forum pages, i of course also include the global.php, which i don?t inside the forum.

Outside the forum everything works exactly as it should.

As soon as you enter the forum, the variable (userid) seems to be empty and the if clause of course doesn?t work anymore...

Site can be found here: http://www.hiphop.at/start

The include inside the forum is put there through the plugin-system, see also here: http://www.vbulletin.com/forum/showp...32&postcount=1

Any help would be gratly appreciated...
Greets,
kopfnick

ausnrl 01-23-2006 08:35 PM

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!

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 02:25 PM.

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.06411 seconds
  • Memory Usage 1,796KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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