Warning: The author of this contribution does not provide support for it anymore.

Default Random 'No Avatar'

Anyway to make it just one Avatar instead of random - Default Random 'No Avatar'

Anyway to make it just one Avatar instead of random

by Darkvelvet » Thu Aug 04, 2011 11:22 am

I know there a mod like that exist, but it is so old and outdated that it no longer work. So was wondering if I can make just make it default no Avatar image instead of random.

Great mod! I will use this mod and keep an eyes out for it.


Thanks!
Darkvelvet
Registered User
Posts: 94
Joined: Sat Jul 16, 2011 5:48 am

Re: Anyway to make it just one Avatar instead of random

by Boardtalk.net » Fri Aug 05, 2011 12:03 am

Hi Darkvelvet,
I think Universal No Avatar is the mod you are looking for. This mod still works, its just functions_display.php has been updated since that mod was first validated. Follow the edits below to make it work in 3.0.9

1.

Copy: root/images/avatars/no_avatar.gif
To: images/avatars/no_avatar.gif

2.

Open: includes/functions_display.php
Find:

Code: Select all

   if (empty($avatar) || !$avatar_type || (!$config['allow_avatar'] && !$ignore_config))
   {
      return '';


In-line Find:

Code: Select all

return '';

In-line Replace With:

Code: Select all

return '<img src="images/avatars/no_avatar.gif" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';


Hope that helps.
;)
User avatar
Boardtalk.net
Registered User
Posts: 1245
Joined: Fri Jun 05, 2009 8:12 pm
Location: Ireland
Name: Colette

Re: Anyway to make it just one Avatar instead of random

by Darkvelvet » Sat Aug 13, 2011 10:59 pm

Thank you Boardtalk, your suggestion work great.
Darkvelvet
Registered User
Posts: 94
Joined: Sat Jul 16, 2011 5:48 am