With no friends on the list for new users, the module displayed a blank friends online box.
I\'ve altered this a tad to say something if new users have not yet added a friend to their list.
/modules/mod_opensim_friends
Original:
========
Line 34-40
// Create a userfriendly status-message
if(count($friendlist) > 0) {
foreach($friendlist AS $friendkey => $friend) {
if($friend[\'onlinestatus\'] == 1) $friendlist[$friendkey][\'statusmsg\'] = \"<font color=\'\".$onlinecolor.\"\'>\".JText::_(\'Online\').\"</font>\";
else $friendlist[$friendkey][\'statusmsg\'] = \"<font color=\'\".$offlinecolor.\"\'>\".JText::_(\'<strong>Offline</strong>\').\"</font>\";
}
}
Changes:
=======
Line 34-41
// Create a userfriendly status-message
if(count($friendlist) < 1) {
echo JText::_(\'LABEL_FRIENDSLIST\');
} else {
foreach($friendlist AS $friendkey => $friend) {
if($friend[\'onlinestatus\'] == 1) $friendlist[$friendkey][\'statusmsg\'] = \"<font color=\'\".$onlinecolor.\"\'>\".JText::_(\'Online\').\"</font>\";
else $friendlist[$friendkey][\'statusmsg\'] = \"<strong><font color=\'\".$offlinecolor.\"\'>\".JText::_(\'<strong>Offline</strong>\').\"</font></strong>\";
}
}
Or another way it can be said.. not really necessary that I see. The above works fine.
// Create a userfriendly status-message
if(count($friendlist) < 1) {
echo JText::_(\'LABEL_FRIENDSLIST\');
} else if(count($friendlist) > 0) {
foreach($friendlist AS $friendkey => $friend) {
if($friend[\'onlinestatus\'] == 1) $friendlist[$friendkey][\'statusmsg\'] = \"<strong><font color=\'\".$onlinecolor.\"\'>\".JText::_(\'Online\').\"</font></strong>\";
else $friendlist[$friendkey][\'statusmsg\'] = \"<strong><font color=\'\".$offlinecolor.\"\'>\".JText::_(\'<strong>Offline</strong>\').\"</font></strong>\";
}
}
Also need to alter your /languages/en-GB.mod_opensim_friends.ini
Language file addition:
LABEL_FRIENDSLIST=No friends online or none enabled