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.

Gloably remove Invite Friends buttons and links

8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

ISSUE SUMMARY:
Our community is completely closed and there is only one path to gaining membership, therefore we want the Invite Friend button from the Member Directory removed as well any other instances and links (mobile and desktop) that allows a member to invite someone from the outside.

Please Advise.

STEPS TO REPLICATE:
1 Log in to the front end
2 Click Member Directory
3 See the Invite Friends button
4
5
RESULT
The button is there
EXPECTED RESULT
We want the button gone
BROWSER
Any

8 years 8 months ago
Licenses:

Hi,

you can do it by using template overrides, so the changes will not disappear at upgrade process.
documentation.jomsocial.com/wiki/Customizing_Template

1st it would be great if you using jomsocial latest version: 4.2.4, because many bug fixes there.

to remove all invite friend button:
/components/com_community/templates/jomsocial/layouts/activities/system/topusers.php
copy to
/templates/yoo_monday/html/com_community/layouts/activities/system/topusers.php
and remove this code from
line 41

<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $user->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_PENDING_FRIEND_REQUEST'); ?></span></a>
line 44
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $user->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></span></a>

do same thing with
/components/com_community/templates/jomsocial/layouts/people.browse.php:
line 116
<a class="joms-button--neutral joms-button--small" href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $row->user->id;?>')"><?php echo JText::_('COM_COMMUNITY_PROFILE_PENDING_FRIEND_REQUEST'); ?></a>
line 119
<a class="joms-button--primary joms-button--small" href="javascript:" onclick="joms.api.friendAdd('<?php echo $row->user->id;?>')"><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></a>

do same thing with
/components/com_community/templates/jomsocial/layouts/profile.header.php:
line 77
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></span></a>

do same thing with
/components/com_community/templates/jomsocial/layouts/profile.miniheader.php:
line 99
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
line 103
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
line 163
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $user->id;?>')">

do same thing with
/components/com_community/templates/jomsocial/layouts/profile/focus.php:
line 162
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
line 170
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
line 250
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
line 258
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">

do same thing with
/components/com_community/templates/jomsocial/layouts/profile/hovercard.php:
line 142
<a href="javascript:" class="joms-button--neutral joms-button--small" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
line 150
<a href="javascript:" class="joms-button--neutral joms-button--small" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">

enjoy :)

The following user(s) said Thank You: Edward
8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

Thank you for your reply!
I have upgraded to 4.2.4.

I do not have a file called
/components/com_community/templates/jomsocial/layouts/profile/hovercard.php
or
/components/com_community/templates/jomsocial/layouts/profile/focus.php

Does mean that there is something wrong with our JomSocial installation?

Regards,
Dom

8 years 8 months ago
Licenses:

Hi,

i'm sure that file is there. I cant access your FTP anymore.
you need to browse to joomla site root first. it can be public_html or else (depending with hosting)

Regards

The following user(s) said Thank You: Edward
8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

Found them....missed a directory in the location you mentioned.
OOPS!
Thank you!

8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

The Invite Friends button is still on the ALL MEMBERS page even after making the changes you suggested to people.browse.php. The other suggestion to add fields works great however.

I have double checked the code and I'm pretty sure that I have it correct, but I have attached it for your review.

I have made all the other suggested changes and put them in the corresponding directories under yoo_monday/com_community/layouts

Thank you,
Dom

8 years 8 months ago
Licenses:

Hi,

please make override for:
/components/com_community/templates/jomsocial/layouts/general/friend-dropdown.php

and delete all code at that file. so at override file having empty code.

Regards

8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

I have added an empty file named friend-dropdown.php into templates/yoo_monday/html/com_community/layouts/general

There is no change...The Invite Friends button is still there and clicking it goes to the Invite form. We cannot have this method of inviting outsiders to the community.

Other ideas? Thanks,
Dom

8 years 8 months ago
Licenses:

Hi,

let me do it for you at dev site. please open FTP access for me, I can't access it anymore
and here my IP:
125.162.154.12
just in case if you need it.

Regards

The following user(s) said Thank You: Edward
8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

All set, the FTP ports are opened and all the logins should be the same. I gave you an FTP account on the development environment.

Thank you for this!

8 years 8 months ago
Licenses:

Hi,

please check it, I made at your dev site. I put at:
/templates/yoo_monday/html/com_community/layouts/general/friend-dropdown.php

Regards

The following user(s) said Thank You: Edward
8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

OK, I am still not sure what I am missing or if I'm not explaining myself correctly.
But the Invite Friends button is still there...that is what I am trying to get rid of it, completely.

I have attached what the dev site shows with all members are listed.

Thanks,

Attachments:
8 years 8 months ago
Licenses:

Hi,

sorry my bad, not aware with that.
please check it. I remove that button from people.browse.php.

Regards

The following user(s) said Thank You: Edward
8 years 8 months ago
  • Edward's Avatar
    Topic Author
  • Edward
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Licenses:
JomSocial Active

Thank you!

It is important that there is no where on the site where the Invite Friends button is available.
Are there other files that need to be modified?

Regards!

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