News:

Wondering if this will always be free?  See why free is better.

Main Menu

Gender Member Color Link

Started by [SiNaN], August 18, 2008, 11:19:04 AM

Previous topic - Next topic

[SiNaN]

Question: How do make the member color links gender based?
Original Topic: -

../Sources/Load.php

Find:

'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>',

Replace:

'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . (!empty($profile['gender']) ? '<span style="color: #' . ($profile['gender'] == 1 ? '0000FF' : 'FF0000') . ';">' : '') . $profile['realName'] . (!empty($profile['gender']) ? '</span>' : '') . '</a>',

../Sources/BoardIndex.php

Find:

mg.onlineColor, mg.ID_GROUP, mg.groupName

Replace:

mg.onlineColor, mg.ID_GROUP, mg.groupName, mem.gender

Find:

$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';

Replace:

if(!empty($row['gender']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: #' . ($row['gender'] == 1 ? '0000FF' : 'FF0000') . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';


Change 0000FF as hex color for male and FF0000 as hex color for female.
Former SMF Core Developer | My Mods | SimplePortal

BuЯЯЯЯaK


remi_naija

Found this useful too.
Thanks Sinan

1Chope


kaewjung



Hayalet Sürücü


abdull@h


Advertisement: