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.
Thanks Sinan :)
Nice tip =)
Found this useful too.
Thanks Sinan
Thanks,It is useful.
ok thank you so much
i have an smf 2.0 mod for this located at http://custom.simplemachines.org/mods/index.php?mod=1878
Thanks, good job
Thanks :) nice tip