Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2006, 01:57 AM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Pulling age from Vbulletin Profiles

I have Vbulletin and RealChat integrated. I have the profile information from Vbulletin displayed for the chat room. There is one problem though. I can't get the age from Vbulletin to display in the chat room. Can anyone tell me how to do that? Here is the code I am using to display the information. Everything works good, except the age.

<param name="nick" value="<?php echo $vbulletin->userinfo[username];?>">
<param name="embedded" value="yes">
<param name="channel" value="room name">
<param name="pLabel1" value="Gender:">
<param name="pValue1" value="<?php echo $vbulletin->userinfo[field14];?>">
<param name="pLabel2" value="Age:">
<param name="pValue2" value="<?php echo $vbulletin->userinfo[age];?>">
<param name="pLabel3" value="Location:">
<param name="pValue3" value="<?php echo $vbulletin->userinfo[field2];?>">
<param name="pLabel4" value="">
<param name="pValue4" value="">
<param name="pLabel5" value="">
<param name="pValue5" value="">
<param name="pLabel6" value="">
<param name="pValue6" value="">
<param name="pLabel7" value="">
<param name="pValue7" value="">
<param name="pLabel8" value="">
<param name="pValue8" value="">

Thanks!

Jaime
Reply With Quote
  #2  
Old 02-04-2006, 02:56 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the age of a user is not a stored value in db, it is caculated depending on user's age, of course. Here is what vb staffs calculate in the file member.php:

PHP Code:
// BIRTHDAY
// Set birthday fields right here!
if ($userinfo['birthday'] AND $userinfo['showbirthday'] > 0)
{
    
$bday explode('-'$userinfo['birthday']);

    
$year vbdate('Y'TIMENOWfalsefalse);
    
$month vbdate('n'TIMENOWfalsefalse);
    
$day vbdate('j'TIMENOWfalsefalse);
    if (
$year $bday[2] AND $bday[2] != '0000')
    {
        
$userinfo['age'] = $year $bday[2];
        if (
$month $bday[0] OR ($month == $bday[0] AND $day $bday[1]))
        {
            
$userinfo['age']--;
        }

        if (
$userinfo['age'] > 101)
        {    
// why can't we have 102 year old forum users?
            
$show['age'] = false;
        }
        else
        {
            
$show['age'] = true;
            
$show['extrainfo'] = true;
        }
    }

    if (
$userinfo['showbirthday'] == 2)
    {
        if (
$year $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000')
        {
            require_once(
DIR '/includes/functions_misc.php');
            
$vbulletin->options['calformat1'] = mktimefix($vbulletin->options['calformat1'], $bday[2]);
            if (
$bday[2] >= 1970)
            {
                
$yearpass $bday[2];
            }
            else
            {
                
// day of the week patterns repeat every 28 years, so
                // find the first year >= 1970 that has this pattern
                
$yearpass $bday[2] + 28 ceil((1970 $bday[2]) / 28);
            }
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat1'], mktime(000$bday[0], $bday[1], $yearpass), falsetruefalse);
        }
        else
        {
            
// lets send a valid year as some PHP3 don't like year to be 0
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat2'], mktime(000$bday[0], $bday[1], 1992), falsetruefalse);
        }
        if (
$userinfo['birthday'] == '')
        {
            if (
$bday[2] == '0000')
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]";
            }
            else
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]-$bday[2]";
            }
        }
        
$show['extrainfo'] = true;
        
$show['birthday'] = true;
    }
    else
    {
        
$show['birthday'] = false;
    }

use that for your reference. the line is 467 in file member.php of vb3.5.3.
Reply With Quote
  #3  
Old 02-04-2006, 03:25 AM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by deathemperor
the age of a user is not a stored value in db, it is caculated depending on user's age, of course. Here is what vb staffs calculate in the file member.php:

PHP Code:
// BIRTHDAY
// Set birthday fields right here!
if ($userinfo['birthday'] AND $userinfo['showbirthday'] > 0)
{
    
$bday explode('-'$userinfo['birthday']);

    
$year vbdate('Y'TIMENOWfalsefalse);
    
$month vbdate('n'TIMENOWfalsefalse);
    
$day vbdate('j'TIMENOWfalsefalse);
    if (
$year $bday[2] AND $bday[2] != '0000')
    {
        
$userinfo['age'] = $year $bday[2];
        if (
$month $bday[0] OR ($month == $bday[0] AND $day $bday[1]))
        {
            
$userinfo['age']--;
        }

        if (
$userinfo['age'] > 101)
        {    
// why can't we have 102 year old forum users?
            
$show['age'] = false;
        }
        else
        {
            
$show['age'] = true;
            
$show['extrainfo'] = true;
        }
    }

    if (
$userinfo['showbirthday'] == 2)
    {
        if (
$year $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000')
        {
            require_once(
DIR '/includes/functions_misc.php');
            
$vbulletin->options['calformat1'] = mktimefix($vbulletin->options['calformat1'], $bday[2]);
            if (
$bday[2] >= 1970)
            {
                
$yearpass $bday[2];
            }
            else
            {
                
// day of the week patterns repeat every 28 years, so
                // find the first year >= 1970 that has this pattern
                
$yearpass $bday[2] + 28 ceil((1970 $bday[2]) / 28);
            }
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat1'], mktime(000$bday[0], $bday[1], $yearpass), falsetruefalse);
        }
        else
        {
            
// lets send a valid year as some PHP3 don't like year to be 0
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat2'], mktime(000$bday[0], $bday[1], 1992), falsetruefalse);
        }
        if (
$userinfo['birthday'] == '')
        {
            if (
$bday[2] == '0000')
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]";
            }
            else
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]-$bday[2]";
            }
        }
        
$show['extrainfo'] = true;
        
$show['birthday'] = true;
    }
    else
    {
        
$show['birthday'] = false;
    }

use that for your reference. the line is 467 in file member.php of vb3.5.3.
Would that code work putting it on a php page? How would you put it on the page?
Reply With Quote
  #4  
Old 02-04-2006, 03:35 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought you know PHP, that code is php so you can put in a php page. if you can use the $vbulletin->userinfo[username] then I belive that code will work and give you $userinfo['age'], then use that for the member age. try this code:

PHP Code:
$userinfo['birthday'] = $vbulletin->userinfo['birthday'];
$userinfo['showbirthday'] = $vbulletin->userinfo['showbirthday'];
// BIRTHDAY
// Set birthday fields right here!
if ($userinfo['birthday'] AND $userinfo['showbirthday'] > 0)
{
    
$bday explode('-'$userinfo['birthday']);

    
$year vbdate('Y'TIMENOWfalsefalse);
    
$month vbdate('n'TIMENOWfalsefalse);
    
$day vbdate('j'TIMENOWfalsefalse);
    if (
$year $bday[2] AND $bday[2] != '0000')
    {
        
$userinfo['age'] = $year $bday[2];
        if (
$month $bday[0] OR ($month == $bday[0] AND $day $bday[1]))
        {
            
$userinfo['age']--;
        }

        if (
$userinfo['age'] > 101)
        {    
// why can't we have 102 year old forum users?
            
$show['age'] = false;
        }
        else
        {
            
$show['age'] = true;
            
$show['extrainfo'] = true;
        }
    }

    if (
$userinfo['showbirthday'] == 2)
    {
        if (
$year $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000')
        {
            require_once(
DIR '/includes/functions_misc.php');
            
$vbulletin->options['calformat1'] = mktimefix($vbulletin->options['calformat1'], $bday[2]);
            if (
$bday[2] >= 1970)
            {
                
$yearpass $bday[2];
            }
            else
            {
                
// day of the week patterns repeat every 28 years, so
                // find the first year >= 1970 that has this pattern
                
$yearpass $bday[2] + 28 ceil((1970 $bday[2]) / 28);
            }
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat1'], mktime(000$bday[0], $bday[1], $yearpass), falsetruefalse);
        }
        else
        {
            
// lets send a valid year as some PHP3 don't like year to be 0
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat2'], mktime(000$bday[0], $bday[1], 1992), falsetruefalse);
        }
        if (
$userinfo['birthday'] == '')
        {
            if (
$bday[2] == '0000')
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]";
            }
            else
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]-$bday[2]";
            }
        }
        
$show['extrainfo'] = true;
        
$show['birthday'] = true;
    }
    else
    {
        
$show['birthday'] = false;
    }

then you can use $userinfo['birthday'].
Reply With Quote
  #5  
Old 02-04-2006, 03:59 AM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by deathemperor
I thought you know PHP, that code is php so you can put in a php page. if you can use the $vbulletin->userinfo[username] then I belive that code will work and give you $userinfo['age'], then use that for the member age. try this code:

PHP Code:
$userinfo['birthday'] = $vbulletin->userinfo['birthday'];
$userinfo['showbirthday'] = $vbulletin->userinfo['showbirthday'];
// BIRTHDAY
// Set birthday fields right here!
if ($userinfo['birthday'] AND $userinfo['showbirthday'] > 0)
{
    
$bday explode('-'$userinfo['birthday']);

    
$year vbdate('Y'TIMENOWfalsefalse);
    
$month vbdate('n'TIMENOWfalsefalse);
    
$day vbdate('j'TIMENOWfalsefalse);
    if (
$year $bday[2] AND $bday[2] != '0000')
    {
        
$userinfo['age'] = $year $bday[2];
        if (
$month $bday[0] OR ($month == $bday[0] AND $day $bday[1]))
        {
            
$userinfo['age']--;
        }

        if (
$userinfo['age'] > 101)
        {    
// why can't we have 102 year old forum users?
            
$show['age'] = false;
        }
        else
        {
            
$show['age'] = true;
            
$show['extrainfo'] = true;
        }
    }

    if (
$userinfo['showbirthday'] == 2)
    {
        if (
$year $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000')
        {
            require_once(
DIR '/includes/functions_misc.php');
            
$vbulletin->options['calformat1'] = mktimefix($vbulletin->options['calformat1'], $bday[2]);
            if (
$bday[2] >= 1970)
            {
                
$yearpass $bday[2];
            }
            else
            {
                
// day of the week patterns repeat every 28 years, so
                // find the first year >= 1970 that has this pattern
                
$yearpass $bday[2] + 28 ceil((1970 $bday[2]) / 28);
            }
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat1'], mktime(000$bday[0], $bday[1], $yearpass), falsetruefalse);
        }
        else
        {
            
// lets send a valid year as some PHP3 don't like year to be 0
            
$userinfo['birthday'] = vbdate($vbulletin->options['calformat2'], mktime(000$bday[0], $bday[1], 1992), falsetruefalse);
        }
        if (
$userinfo['birthday'] == '')
        {
            if (
$bday[2] == '0000')
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]";
            }
            else
            {
                
$userinfo['birthday'] = "$bday[0]-$bday[1]-$bday[2]";
            }
        }
        
$show['extrainfo'] = true;
        
$show['birthday'] = true;
    }
    else
    {
        
$show['birthday'] = false;
    }

then you can use $userinfo['birthday'].
It still just post the persons birthday when I add that code. Below is the code of the page I'm using.

<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
chdir('/home/httpd/vhosts/url.com/httpdocs/bbs');
require('/home/httpd/vhosts/url.com/httpdocs/bbs/global.php');
include('/home/httpd/vhosts/url.com/httpdocs/bbs/global.php');
chdir('/home/httpd/vhosts/url.com/httpdocs');

$userinfo['birthday'] = $vbulletin->userinfo['birthday'];
$userinfo['showbirthday'] = $vbulletin->userinfo['showbirthday'];
// BIRTHDAY
// Set birthday fields right here!
if ($userinfo['birthday'] AND $userinfo['showbirthday'] > 0)
{
$bday = explode('-', $userinfo['birthday']);

$year = vbdate('Y', TIMENOW, false, false);
$month = vbdate('n', TIMENOW, false, false);
$day = vbdate('j', TIMENOW, false, false);
if ($year > $bday[2] AND $bday[2] != '0000')
{
$userinfo['age'] = $year - $bday[2];
if ($month < $bday[0] OR ($month == $bday[0] AND $day < $bday[1]))
{
$userinfo['age']--;
}

if ($userinfo['age'] > 101)
{ // why can't we have 102 year old forum users?
$show['age'] = false;
}
else
{
$show['age'] = true;
$show['extrainfo'] = true;
}
}

if ($userinfo['showbirthday'] == 2)
{
if ($year > $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000')
{
require_once(DIR . '/includes/functions_misc.php');
$vbulletin->options['calformat1'] = mktimefix($vbulletin->options['calformat1'], $bday[2]);
if ($bday[2] >= 1970)
{
$yearpass = $bday[2];
}
else
{
// day of the week patterns repeat every 28 years, so
// find the first year >= 1970 that has this pattern
$yearpass = $bday[2] + 28 * ceil((1970 - $bday[2]) / 28);
}
$userinfo['birthday'] = vbdate($vbulletin->options['calformat1'], mktime(0, 0, 0, $bday[0], $bday[1], $yearpass), false, true, false);
}
else
{
// lets send a valid year as some PHP3 don't like year to be 0
$userinfo['birthday'] = vbdate($vbulletin->options['calformat2'], mktime(0, 0, 0, $bday[0], $bday[1], 1992), false, true, false);
}
if ($userinfo['birthday'] == '')
{
if ($bday[2] == '0000')
{
$userinfo['birthday'] = "$bday[0]-$bday[1]";
}
else
{
$userinfo['birthday'] = "$bday[0]-$bday[1]-$bday[2]";
}
}
$show['extrainfo'] = true;
$show['birthday'] = true;
}
else
{
$show['birthday'] = false;
}
}

if (!in_array($vbulletin->userinfo['usergroupid'], array(5,6,7,9,10))){
?>
<!-- CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="../bbs/clientscript/vbulletin_css/chatlogin.css" id="vbulletin_css" />
<br>
<table class="tborder" cellpadding="3" cellspacing="1" border="0" width="70%" align="center">
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div align="left">
<script type="text/javascript" src="../bbs/clientscript/vbulletin_md5.js"></script>
<form action="../bbs/login.php" target="_top" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<input type="hidden" name="do" value="login" />
<input type="hidden" name="url" value="../chat/chat.html" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />


<input type="hidden" name="s" value="" />

<!-- permission error message - user not logged in -->

<div align="center" class="mediumfont"><b>To Enter the Chat Room</b></div>
<br>
<br>
<div align="center" class="mediumfont">You must have a registered chat name to enter our chat rooms. If you have<br>
not yet registered your chat name and would like to do so, please <a href="../bbs/register.php?do=signup" target="_top">click here.</a></div>
<br>
<br>

<fieldset class="fieldset">
<legend>Log in</legend>
<table cellpadding="0" cellspacing="2" border="0" align="center">
<tr>
<td>Chat Name:<br /><input type="text" class="bginput" name="vb_login_username" size="50" accesskey="u" tabindex="1" /></td>
</tr>
<tr>
<td>Password:<br /><input type="password" class="bginput" name="vb_login_password" size="50" accesskey="p" tabindex="1" /></td>
</tr>
<tr>
<td>
<span style="float:right"><a href="../bbs/login.php?do=lostpw" target="_top">Forgotten Your Password?</a></span>
<label for="cb_cookieuser"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" tabindex="1" />Remember Me?</label>
</td>
</tr>
<tr>
<td align="right">
<input type="submit" class="button" value="Log in" accesskey="s" tabindex="1" />
<input type="reset" class="button" value="Reset Fields" accesskey="r" tabindex="1" />
</td>
</tr>
</table>
</fieldset>
</form>

<!-- / permission error message - user not logged in -->
</div>
</div>
</td>
</tr>
</table>
<?
}else {
?>

<html>
<head>
<title>Chat Login Page</title>
<link rel="stylesheet" href="styles.css" type="text/css">
</HEAD>
<BODY LEFTMARGIN=0 RIGHTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0>

<center>
<!-- Begin: RealChat Client code -->
<applet
archive = "RealChat.jar"
codebase = "."
code = "rcs.client.RealChatClient.class"
name = "ChatClient"
width = "100%"
height = "100%"
align = "top"
alt = "RealChat Client applet"
MAYSCRIPT>

<param name="nick" value="<?php echo $vbulletin->userinfo[username];?>">
<param name="embedded" value="yes">
<param name="channel" value="Room">
<param name="pLabel1" value="Gender:">
<param name="pValue1" value="<?php echo $vbulletin->userinfo[field14];?>">
<param name="pLabel2" value="Age:">
<param name="pValue2" value="<?php echo $vbulletin->userinfo[birthday];?>">
<param name="pLabel3" value="Location:">
<param name="pValue3" value="<?php echo $vbulletin->userinfo[field2];?>">
<param name="pLabel4" value="">
<param name="pValue4" value="">
<param name="pLabel5" value="">
<param name="pValue5" value="">
<param name="pLabel6" value="">
<param name="pValue6" value="">
<param name="pLabel7" value="">
<param name="pValue7" value="">
<param name="pLabel8" value="">
<param name="pValue8" value="">

<param name="onCloseURL" value="http://www.url.com/index.php">

<!-- no java or java disabled -->
RealChat client requires Java compatible web browser<br>For more information visit our <a target="_blank" href="http://www.realchat.com/">java chat software</a> support page<br><br><a target="_blank" href="http://www.java.com/"><img src="getjava.gif" alt="Java - Get it now!" width="88" height="31" border="0"></a><br><br>Please click the button above to get the Java plug-in now
</applet>
<!-- End: RealChat Client code -->

<br><br>
<small>
Please wait for applet to load.
</small>

</center>
</body>
</html>
<? } ?>
Reply With Quote
  #6  
Old 02-04-2006, 04:09 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I told you to use $userinfo['age'], not $vbulletin->userinfo[birthday]
Reply With Quote
  #7  
Old 02-04-2006, 04:20 AM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Age profile field is blank when I go into the chat room. I will post the code below so you can see exactly what I put instead of $vbulletin->userinfo[birthday]

<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
chdir('/home/httpd/vhosts/url.com/httpdocs/bbs');
require('/home/httpd/vhosts/url.com/httpdocs/bbs/global.php');
include('/home/httpd/vhosts/url.com/httpdocs/bbs/global.php');
chdir('/home/httpd/vhosts/url.com/httpdocs');

$userinfo['birthday'] = $vbulletin->userinfo['birthday'];
$userinfo['showbirthday'] = $vbulletin->userinfo['showbirthday'];
// BIRTHDAY
// Set birthday fields right here!
if ($userinfo['birthday'] AND $userinfo['showbirthday'] > 0)
{
$bday = explode('-', $userinfo['birthday']);

$year = vbdate('Y', TIMENOW, false, false);
$month = vbdate('n', TIMENOW, false, false);
$day = vbdate('j', TIMENOW, false, false);
if ($year > $bday[2] AND $bday[2] != '0000')
{
$userinfo['age'] = $year - $bday[2];
if ($month < $bday[0] OR ($month == $bday[0] AND $day < $bday[1]))
{
$userinfo['age']--;
}

if ($userinfo['age'] > 101)
{ // why can't we have 102 year old forum users?
$show['age'] = false;
}
else
{
$show['age'] = true;
$show['extrainfo'] = true;
}
}

if ($userinfo['showbirthday'] == 2)
{
if ($year > $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000')
{
require_once(DIR . '/includes/functions_misc.php');
$vbulletin->options['calformat1'] = mktimefix($vbulletin->options['calformat1'], $bday[2]);
if ($bday[2] >= 1970)
{
$yearpass = $bday[2];
}
else
{
// day of the week patterns repeat every 28 years, so
// find the first year >= 1970 that has this pattern
$yearpass = $bday[2] + 28 * ceil((1970 - $bday[2]) / 28);
}
$userinfo['birthday'] = vbdate($vbulletin->options['calformat1'], mktime(0, 0, 0, $bday[0], $bday[1], $yearpass), false, true, false);
}
else
{
// lets send a valid year as some PHP3 don't like year to be 0
$userinfo['birthday'] = vbdate($vbulletin->options['calformat2'], mktime(0, 0, 0, $bday[0], $bday[1], 1992), false, true, false);
}
if ($userinfo['birthday'] == '')
{
if ($bday[2] == '0000')
{
$userinfo['birthday'] = "$bday[0]-$bday[1]";
}
else
{
$userinfo['birthday'] = "$bday[0]-$bday[1]-$bday[2]";
}
}
$show['extrainfo'] = true;
$show['birthday'] = true;
}
else
{
$show['birthday'] = false;
}
}

if (!in_array($vbulletin->userinfo['usergroupid'], array(5,6,7,9,10))){
?>
<!-- CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="../bbs/clientscript/vbulletin_css/chatlogin.css" id="vbulletin_css" />
<br>
<table class="tborder" cellpadding="3" cellspacing="1" border="0" width="70%" align="center">
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div align="left">
<script type="text/javascript" src="../bbs/clientscript/vbulletin_md5.js"></script>
<form action="../bbs/login.php" target="_top" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<input type="hidden" name="do" value="login" />
<input type="hidden" name="url" value="../chat/chat.html" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />

<input type="hidden" name="s" value="" />

<!-- permission error message - user not logged in -->

<div align="center" class="mediumfont"><b>To Enter the Chat Room</b></div>
<br>
<br>
<div align="center" class="mediumfont">You must have a registered chat name to enter our chat rooms. If you have<br>
not yet registered your chat name and would like to do so, please <a href="../bbs/register.php?do=signup" target="_top">click here.</a></div>
<br>
<br>

<fieldset class="fieldset">
<legend>Log in</legend>
<table cellpadding="0" cellspacing="2" border="0" align="center">
<tr>
<td>Chat Name:<br /><input type="text" class="bginput" name="vb_login_username" size="50" accesskey="u" tabindex="1" /></td>
</tr>
<tr>
<td>Password:<br /><input type="password" class="bginput" name="vb_login_password" size="50" accesskey="p" tabindex="1" /></td>
</tr>
<tr>
<td>
<span style="float:right"><a href="../bbs/login.php?do=lostpw" target="_top">Forgotten Your Password?</a></span>
<label for="cb_cookieuser"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" tabindex="1" />Remember Me?</label>
</td>
</tr>
<tr>
<td align="right">
<input type="submit" class="button" value="Log in" accesskey="s" tabindex="1" />
<input type="reset" class="button" value="Reset Fields" accesskey="r" tabindex="1" />
</td>
</tr>
</table>
</fieldset>
</form>

<!-- / permission error message - user not logged in -->
</div>
</div>
</td>
</tr>
</table>
<?
}else {
?>

<html>
<head>
<title>Chat Login Page</title>
<link rel="stylesheet" href="styles.css" type="text/css">
</HEAD>
<BODY LEFTMARGIN=0 RIGHTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0>

<center>
<!-- Begin: RealChat Client code -->
<applet
archive = "RealChat.jar"
codebase = "."
code = "rcs.client.RealChatClient.class"
name = "ChatClient"
width = "100%"
height = "100%"
align = "top"
alt = "RealChat Client applet"
MAYSCRIPT>

<param name="nick" value="<?php echo $vbulletin->userinfo[username];?>">
<param name="embedded" value="yes">
<param name="channel" value="Room">
<param name="pLabel1" value="Gender:">
<param name="pValue1" value="<?php echo $vbulletin->userinfo[field14];?>">
<param name="pLabel2" value="Age:">
<param name="pValue2" value="<?php echo $vbulletin->userinfo[age];?>">
<param name="pLabel3" value="Location:">
<param name="pValue3" value="<?php echo $vbulletin->userinfo[field2];?>">
<param name="pLabel4" value="">
<param name="pValue4" value="">
<param name="pLabel5" value="">
<param name="pValue5" value="">
<param name="pLabel6" value="">
<param name="pValue6" value="">
<param name="pLabel7" value="">
<param name="pValue7" value="">
<param name="pLabel8" value="">
<param name="pValue8" value="">

<param name="onCloseURL" value="http://www.url.com/index.php">

<!-- no java or java disabled -->
RealChat client requires Java compatible web browser<br>For more information visit our <a target="_blank" href="http://www.realchat.com/">java chat software</a> support page<br><br><a target="_blank" href="http://www.java.com/"><img src="getjava.gif" alt="Java - Get it now!" width="88" height="31" border="0"></a><br><br>Please click the button above to get the Java plug-in now
</applet>
<!-- End: RealChat Client code -->

<br><br>
<small>
Please wait for applet to load.
</small>

</center>
</body>
</html>
<? } ?>
Reply With Quote
  #8  
Old 02-04-2006, 04:28 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

T______T

dude, use $userinfo[age], and do not use $vbulletin->userinfo[age]

$userifo and $vbulletin->userinfo is different.
Reply With Quote
  #9  
Old 02-04-2006, 04:37 AM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much. That worked.

BTW, I'm not a dude...I'm a girl :-)

Thanks again...knew someone on here had to know how to do what I was trying to do.

Jaime
Reply With Quote
  #10  
Old 02-04-2006, 05:58 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

glad that helped (finally ^^), girl.
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 12:35 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.06038 seconds
  • Memory Usage 2,480KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete