Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1267
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Generic avatars in top 5 users

Started by AlenNS, November 22, 2008, 02:54:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AlenNS

Is it possible to make connections with this so generic avatars could be shown in SP?

H

So you want a 'default' avatar for users with no avatar set?
-HFormer Simple Machines Support


AlenNS

Bump!

Top 5 posters and new member block.
There should be generic avatar set shown.

There are gender generic avatars and neutral.

[SiNaN]

This can't be a default feature, but I can give you the directions so that you can use it for your own forum.

SPortal2.php

Find:

m.posts, m.avatar, a.id_attach, a.attachment_type, a.filename

Replace:

m.posts, m.avatar, a.id_attach, a.attachment_type, a.filename, m.gender

Find:

//Collect the ids

Replace:

if (!empty($modSettings['generic_avatars_member_enable']) && $row['avatar'] == '' && $row['id_attach'] < 1)
{
if (!empty($modSettings['generic_avatars_gender_enable']) && ($row['gender'] == 2) && !empty($modSettings['generic_avatars_female_image_url']))
$generic_avatar_image = $modSettings['generic_avatars_female_image_url'];
else if (!empty($modSettings['generic_avatars_gender_enable']) && ($row['gender'] == 1) && !empty($modSettings['generic_avatars_male_image_url']))
$generic_avatar_image = $modSettings['generic_avatars_male_image_url'];
else if (!empty($modSettings['generic_avatars_neutral_image_url']))
$generic_avatar_image = $modSettings['generic_avatars_neutral_image_url'];

if (!empty($generic_avatar_image))
$row['avatar'] = $generic_avatar_image;
}

//Collect the ids


Find:

//The Membercolor Link has all ready add this?

Replace:

global $txt;
if (!empty($modSettings['generic_avatars_member_enable']) && empty($memberContext[$latest_member_id]['avatar']['href']))
{
if (!empty($modSettings['generic_avatars_gender_enable']) && ($memberContext[$latest_member_id]['gender']['name'] == $txt['female']) && !empty($modSettings['generic_avatars_female_image_url']))
$generic_avatar_image = $modSettings['generic_avatars_female_image_url'];
else if (!empty($modSettings['generic_avatars_gender_enable']) && ($memberContext[$latest_member_id]['gender']['name'] == $txt['male']) && !empty($modSettings['generic_avatars_male_image_url']))
$generic_avatar_image = $modSettings['generic_avatars_male_image_url'];
else if (!empty($modSettings['generic_avatars_neutral_image_url']))
$generic_avatar_image = $modSettings['generic_avatars_neutral_image_url'];

if (!empty($generic_avatar_image))
$memberContext[$latest_member_id]['avatar']['href'] = $generic_avatar_image;
}

//The Membercolor Link has all ready add this?
And slowly, you come to realize... It's all as it should be...