Page 1 of 1

Help for a mod...

PostPosted: 27 Apr 2010, 02:09
by chattasubito
Hi, in the past days I've already little modded my copy of Arrowchat to better fit the needs of my community and now I have only 1 mod left which I really need but I'm having some problems to make it work...

What I need is a mod to show the names of the users in the list in different colors according to their sex (let's say for example, pink color for women, blue for men). I modified my getFriendsList() function adding a new "gender" field which I already have in my user's table:

Code: Select all
..... ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." gender, .......


This "gender" field returns "1" if the user is a man, "2" if a woman.

Now my question is: using this modified getFriendsList() function, how to modify the arrowchat_core.js (and relative template's style.css) to show the username in blue color if "gender = 1" and pink if "gender = 2"?

Any help would be very appreciated, thank you!

Re: Help for a mod...

PostPosted: 27 Apr 2010, 11:38
by Jason
You'll need to edit receive_buddylist like so:

Code: Select all
            $buddyList[] = array('g' => $chat['gender'], 'id' => $chat['userid'], 'n' => $chat['username'], 's' => $chat['status'], 'm' => $chat['message'], 'a' => $avatar, 'l' => $link);


Then in arrowchat_core.js you'll need to just add a style if it is male or a different style for female. So in the function Va(b) you'll need to do this.

I didn't test this or anything so it may not be 100% correct, but something like this (f.g is your gender variable)..

Code: Select all
if(f.g==1){a("#arrowchat_user_"+f.id).css("color","#FFF")}else if(f.g==2){a("#arrowchat_user_"+f.id).css("color","#000")}


You could also do .addClass("classname") and then add a male and female style to the css file.

PostPosted: 13 Oct 2012, 00:53
by FBorcherds
Hi. Which file do I edit to get the different genders show up differently in Skadate?

Help will be much appriciated

Topic Closed

PostPosted: 16 Dec 2014, 00:26
by Staff Bot
[b]This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.[/b]