Dynamic Gender Reporting in Dashboard

Shylo Hana Posted in Beginning Developers 4 years ago

After installing the MoreGenders component I found the Dashboard not entirely useful.
The related classes and library are male/female oriented.
I modified them to retrieve a list of genders from the database and populate the dashboard graphs dynamically according to what's in use rather than hard-coding genders.
I've created a patch, but don't know where to send it for the core development team to evaluate or whether to just post it here?
Any suggestions?

This topic has been closed!

[Topic is Close]

Indonesian Arsalan Shah Replied 3 years ago

Mary, We have also family to feed. Your friend or you didn't wanted to spend single cent on anything. Why don't you upgrade to 5.2? because you have customized the things and changed core files and you afraid to lose the changes. I respect you and you should also understand and respect developers.

I am closing this topic as the owner may getting spammed for irreverent replies.

@Shylo, i am sorry for the irreverent replies on the topic.

us Mary Greg Replied 3 years ago

Arsalan don't make me laugh. Instead of blaming me create more options and increase your support level. Whether the people here are a premium customer or not, they are your users. Be kind enough to meet their needs and if you can't -then close your company and do something else job.

Indonesian Arsalan Shah Replied 3 years ago

Don't act stupid Mary ,you are using older version and don't blame us. This feature has been added in 5.2. I don't know what is the problem with you in understanding, we don't know you personally and you take everything personally. Please try to understand this is not kids playing stuff that we can fix things on one click and give anyone what they wish. To have something you need to atleast fullfil the requirements

us Mary Greg Replied 3 years ago

))))))))Whatever I want to do, it turns out, is not for me. This is already becoming ridiculous)))))))))

Indonesian Arsalan Shah Replied 3 years ago

Because you are using old version upgrade your network please.

us Mary Greg Replied 3 years ago

I didn't find any color code in the folder you mentioned.

nz Shylo Hana Replied 3 years ago

You'll find them in the 'opensource-socialnetwork' or 'premium' source.
There's a series of files in the 'locale' directory (/locale/ossn.[country_code].php).

us Mary Greg Replied 3 years ago

Can you detail, In which file i can find it for changing => ?

German Michael Zülsdorff Replied 4 years ago

This crazy editor doesn't seem to allow to save linefeeds \ n correctly, so I added that extra space

Okay, so basically it would be sufficient if Ossn stores the 2 colors for male and female in the main language file, additional colors would go to the MoreGenders compoment.

German Michael Zülsdorff Replied 4 years ago

what you could do is using ossn_print() and derive the colors from $gender + defined #xxxxx

Just gave it a try and my loop looks like this now:

foreach($genders as $gender => $total) {
            echo    "{\ n";
            echo    "value: $total,\ n";
            echo    "color: '" . ossn_print($gender . ':gendercolor') . "',\ n";
            echo    "highlight: '" . ossn_print($gender . ':gendercolor') . "',\ n";
            echo    "label: '" . ucfirst(ossn_print($gender)) . "'\ n";
            echo    "},\ n";

and the accompanying language file entries

'male:gendercolor' => '#ff0000',
'female:gendercolor' => '#00ff00',
'robot:gendercolor' => '#0000ff',