Display a phpBB3 Avatar on a Custom Page
November 26th, 2007
In your php file, you will need to run a database query, for example:
$sql = 'SELECT user_avatar, user_avatar_type, user_avatar_width, user_avatar_height
FROM ' . USERS_TABLE . "
WHERE user_id = " . $user->data['user_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result)
FROM ' . USERS_TABLE . "
WHERE user_id = " . $user->data['user_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result)
Now that you have the required data, you can use the [url=http://area51.phpbb.com/docs/code/phpBB3/_includes---functions_display.php.html#functionget_user_avatar]get_user_avatar[/url] function that’s in includes/functions_display.php
$avatar = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']);
Assign $avatar to a template variable.
$template->assign_var('USERS_AVATAR', $avatar)
And finally, add {USERS_AVATAR} into the template page, where you want it to show.
<!-- IF USER_AVATAR -->
{USER_AVATAR}
<!-- ELSE -->
{USER_AVATAR_NONE}
<!-- ENDIF -->
{USER_AVATAR}
<!-- ELSE -->
{USER_AVATAR_NONE}
<!-- ENDIF -->
I have a flash site
i’m looking for the script who makes google ads on flash.
where can i get it?