27 September 2014 ~ 0 Comments

How to Add Gravatars to PHPBB.. the easy way!

I’ve spent the better part of this afternoon figuring out an easy way to add gravatars to the Team Conquets forum.. there was a serious lack of information about it so I figured I’d make a post explaining simply how you can do it by changing the avatar function to gravatar…

The first step is to go to viewtopic.php in your forum directory..

You will find this at or around line 1156

‘avatar’ => ($user->optionget(‘viewavatars’)) ? get_user_avatar($row[‘user_avatar’], $row[‘user_avatar_type’], $row[‘user_avatar_width’], $row[‘user_avatar_height’]) : ” ,

Just simply replace it with:

‘avatar’ => ($user->optionget(‘viewavatars’)) ? get_user_avatar($row[‘user_avatar’], $row[‘user_avatar_type’], $row[‘user_avatar_width’], $row[‘user_avatar_height’], ‘USER_AVATAR’, $row[‘user_email’]) : ” ,

The next step is to find your functions_display.php file in the forums include folders, it will be at or around line 1302

function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = ‘USER_AVATAR’)
{

global $user, $config, $phpbb_root_path, $phpEx;

if (empty($avatar) || !$avatar_type)
{

return ”;

}

}

Now replace that with this Gravatar function

function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = ‘USER_AVATAR’, $user_email = ”)
{

global $user, $config, $phpbb_root_path, $phpEx;

if (empty($avatar) || !$avatar_type)
{

if ($user_email) {

$grav_id = md5($user_email);
$grav_default = ‘mm’;
$grav_rating = ‘R’;
$grav_size = 100;

$grav_url = “http://www.gravatar.com/avatar.php?gravatar_id=$grav_id&default=$grav_default&size=$grav_size&rating=$grav_rating”;

return ‘<img alt=”‘ . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . ‘” src=”‘ . $grav_url . ‘” width=”‘ . $grav_size . ‘” height=”‘ . $grav_size . ‘” />’;

}

else {

return ”;

}

}

}

That return string is your output, you may wish to add Center tags or css to it.

The default is any of the Gravatar default images, you can change that variable to whichever you prefer, including the URL to an image.. the size is the pixel size, and the rating is the maximum rating you’ll allow to be displayed.

Enjoy ­čÖé

Continue Reading

31 August 2010 ~ 0 Comments

3900income- Review – Cheap Hosting, Great Affiliate Opportunity

3900 income provides affordable hosting services and a great resell opportunity.

3900 income provides affordable hosting services and a great resell opportunity.

3900income provides inexpensive hosting solutions and a terrific affiliate sales opportunity. ┬áAt only $6.75 a month, it’s an easy sell and really a no brainer to buy into. ┬áNot only is the hosting product very good and something a lot of people can use to help host their own websites at low cost, but the sales opportunity is amazing. ┬áIn fact my very first day as a member I made 34 sales and $31 in commission by days end. ┬áYou get paid 5 levels down and it is fixed-width forced 5×5 matrix so you get spill over from your affiliate sponsor as well. ┬áIf you make 5 sales, and each of those people make 5 sales, so on and so forth, you can be earning $3,905 a month in profit. ┬áNormally I would laugh at those sort of claims, but seriously, 34 sales in one day made me think otherwise. http://www.thelteam.com/jointn.php. […]

Continue Reading