Gender Member Color

Started by _Anthony_, June 24, 2009, 04:40:18 AM

Previous topic - Next topic

_Anthony_

Link to mod

Gender Member Color
Created by Anthony (Credits to [SiNaN] for the original code)




Compatibility
SMF 2.0 RC1-1

Description
A simple thing that makes member color based on gender.

Demo
None.

Changelog
1.0-Initial release
2.0-1.1.9 support
2.1-1.1.9 support dropped and administrative conrtols added.

Sevgiformu.com



Sevgiformu.com


_Anthony_

Sorry, there must have been some sort of bug, I fixed it now.

Sevgiformu.com

       
Thank you for your interest

_Anthony_

I will be uploading a newer version soon.

Antechinus

Gotta love this mod. Cheapest way to get a sex change I've ever seen. :D

_Anthony_

Lol :) hopefully tomorrow ill upload a version with more extensive features

Sevgiformu.com


hhy89

../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 ? $modSettings['gendercolormale'] : $modSettings['gendercolorfemale']) . ';">' : '') . $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 ? $modSettings['gendercolormale'] : $modSettings['gendercolorfemale']) . ';">' . $row['realName'] . '</a>';
            else   
                $link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';


ModSettings.php

find:

            array('check', 'enableReportPM'),

replace:

            array('check', 'enableReportPM'),
        '',
            // Gender Member Color
            array('text', 'gendercolormale'),
            array('text', 'gendercolorfemale'),


Modifications.eng.php

find:

?>

replace:

$txt['gendercolormale'] = ' color for male :';
$txt['gendercolorfemale'] = 'color for female:';

?>



it is for admin control
Seo4Smf 2.0 - Full Top10 Stats(full top10) - Aligned and Bilateral Child Boards(2li 3lü alt bölümler)
http://www.smfmod.com
http://destek.smfmod.com

_Anthony_

#11
hhy89: thanks a bunch I kind of already had it just haven't had the time to upload it :P(computer problems)
but thanks a bunch for trying to contribute to the mod.

EDIT: New version with dropped 1.1.9 support :(.

Bugo

Can you make such a fashion that each user given its own color?

_Anthony_

Quote from: Bugo on January 10, 2010, 04:51:30 PM
Can you make such a fashion that each user given its own color?
I guess you could, just add a profile field to their profile for it, I personally am not going to do this but you can try :D

Bugo

Heh, I'm not going to do this too :) But the idea is interesting enough, isn't it?

_Anthony_

Yeah, I'm sure you can get someone to do it.
I'm just too lazy/have no use for it.

Advertisement: