Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Number of friends negative & how to hide number of Friends everywhere

12 years 1 month ago
  • Susan's Avatar
    Topic Author
  • Susan
  • Offline
  • Fresh Boarder
  • Posts: 69
  • Thank you received: 20
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

We have a problem that the number of friends is displaying a negative figure...

But we also don't want number of friends to display anywhere on our site eg Profile, Group Member lists, List of people Attending events

1) Please can you investigate why the number of friends is wrong

2) We have seen a solution for the list of people attending events (#19074) - but please could you provide a solution that hides number of Friends everywhere? eg Profile, Group Member lists, List of people Attending events

Thank you very much

12 years 1 month ago
Licenses:

Hi,

here the steps for hide the friends number:
1)
for profile page copy /components/com_community/templates/default/modules/profile/userinfo.php to /templates/gk_msocial/html/com_community/modules/profile/userinfo.php and edit it. at line 108 replace it from

<?php echo ($profile->_friends == 1) ?  JText::sprintf('COM_COMMUNITY_FRIENDS_COUNT',$profile->_friends) : JText::sprintf('COM_COMMUNITY_FRIENDS_COUNT_MANY',$profile->_friends) ?>
to
<?php echo JText::sprintf('COM_COMMUNITY_FRIENDS'); ?>

2)
for friends list, copy /components/com_community/templates/default/friends.list.php to /templates/gk_msocial/html/com_community/friends.list.php. edit it, at line 53. replace it from
<a href="<?php echo CRoute::_('index.php?option=com_community&view=friends&userid=' . $user->id );?>"><?php echo JText::sprintf( (CStringHelper::isPlural($user->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT' , $user->friendsCount);?></a>
to
<a href="<?php echo CRoute::_('index.php?option=com_community&view=friends&userid=' . $user->id );?>"><?php echo JText::sprintf('COM_COMMUNITY_FRIENDS');?></a>

3)
for search result list, copy /components/com_community/templates/default/people.browse.php to to /templates/gk_msocial/html/com_community/people.browse.php. edit it, at line 204 replace it from
<span><?php echo JText::sprintf( (CStringHelper::isPlural($row->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT', $row->friendsCount);?></span>
to
<span><?php echo JText::sprintf('COM_COMMUNITY_FRIENDS');?></span>

4)
for events attender, copy /components/com_community/templates/default/events.viewguest.php to /templates/gk_msocial/html/com_community/events.viewguest.php. edit it, replace line 40 from
<?php echo JText::sprintf( (CStringHelper::isPlural($guest->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT' , $guest->friendsCount);?>
to
<?php echo JText::sprintf('COM_COMMUNITY_FRIENDS');?>

5)
for groups members, copy /components/com_community/templates/default/groups.viewmembers.php to /templates/gk_msocial/html/com_community/groups.viewmembers.php. edit it, at line 126. replace it from
<?php echo JText::sprintf((CStringHelper::isPlural($member->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT', $member->friendsCount); ?>
to
<?php echo JText::sprintf('COM_COMMUNITY_FRIENDS'); ?>

6)
for invite friends list. copy /components/com_community/templates/default/friends.invite.php to /templates/gk_msocial/html/com_community/friends.invite.php. at line 128, replace it from
<?php echo JText::sprintf( (CStringHelper::isPlural($user->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT' , $user->friendsCount);?>
to
<?php echo JText::sprintf('COM_COMMUNITY_FRIENDS');?>

7)
for invite pendding list. copy components/com_community/templates/default/friends.pending.php to /templates/gk_msocial/html/com_community/friends.pending.php. at line 62. replace it from
<?php echo JText::sprintf( (CStringHelper::isPlural($row->user->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT' , $row->user->friendsCount);?>
to
<?php echo JText::sprintf('COM_COMMUNITY_FRIENDS');?>

8)
for friends request. copy /components/com_community/templates/default/friends.request.php to /templates/gk_msocial/html/com_community/friends.request.php. at line 59, from
<?php echo JText::sprintf( (CStringHelper::isPlural($row->user->friendsCount)) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT' , $row->user->friendsCount);?>
to
<?php echo JText::sprintf('COM_COMMUNITY_FRIENDS');?>

I think thats all. for wrong friends number, could you please tell me what users got this issue?
and please provide me FTP and phpmyadmin/cpanel access detail. I need it for debugging purpose.

Regards,
Albert

The following user(s) said Thank You: Susan
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW