Collins’ Onovia

Tag: phpbb3

Send a Private Message on Group Request in phpBB3

by Mat Collins on Dec.06, 2007, under programming

Check out my phpBB3 development board for directions on private messaging leaders on a group request!

Leave a Comment :, more...

Display a phpBB3 Avatar on a Custom Page

by Mat Collins on Nov.26, 2007, under Onovia, hardware, programming

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)

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 -->
1 Comment :, more...

What I’ve been up to…

by Mat Collins on Apr.22, 2007, under Onovia

I’ve been hard at work on getting this Gungame AMXX server online for UFIGaming.net. The forums will display statistics from the game server. Sends and receives data from the game server every 3 hours. The possibilities with this are really open.

- UFI Forums and CS Game Server integrated to sync Steam ID’s
- CS Game Server gives special abilities depending on forum groups

This could become a large project.

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...