• Welcome to Simple Machines Community Forum. Please login or sign up.
January 18, 2022, 06:31:58 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


Gender Member Color Link

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

Previous topic - Next topic

[SiNaN]

August 18, 2008, 11:19:04 AM Last Edit: August 18, 2008, 11:20:32 AM by H
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: