Topic: php beginner- punbb avatar intergration (yes i have used search)
i am a beginner with php i need a way to get the users avatar if they are logged in to show on the main page of the site . i have managed to intergrate the login but i am stumped with how to get there avatar.
ps. this is the code i used for login intergration
<?php define('PUN_ROOT', './forum/');?>
<?php require PUN_ROOT.'include/common.php';?>
<?php require('login.php'); ?>
<?php login_menu(); ?>
and in login.php :
<?php
function login_menu()
{
global $pun_user;
if ($pun_user['is_guest'])
{
$stroutput= '<form id="login" method="post" action="'.PUN_ROOT.'login.php?action=in" onsubmit="return process_form(this)"><style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
-->
</style>
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="redirect_url" value="'.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'" />
<label for="req_username">Username: </label>
<input type="text" id="req_username" name="req_username" size="4" maxlength="25" />
<label for="req_password">Password: </label>
<input type="password" id="req_password" name="req_password" size="4" maxlength="16" />
<input type="submit" name="login" value="Login" />
[<a href="'.PUN_ROOT.'register.php">Register</a>]
</form>';
echo $stroutput;
}
else
{
$stroutput= ''.pun_htmlspecialchars($pun_user['username']).' ('.$pun_user['g_user_title'].') [<a href="'.PUN_ROOT.'login.php?action=out&id='.$pun_user['id'].'&csrf_token='.sha1($pun_user['id'].sha1(get_remote_address())).'">'.$lang_common['Logout'].'Logout</a>]</p>';
echo $stroutput;
}
}
?>
hopefully that helps someone help me
thanks in advanced sam