By Kurt Wündsch on Sunday, 14 September 2014
Posted in General Issues
Replies 5
Likes 0
Views 584
Votes 0
Is there any configuration possible, that allows us to disable the complete functionality for adding/removing friends ? (at least at the surface).

We know, that this is a key function of easysocial, but we do not need to allow our users to add someone as friend.
If it is not possible on a easy way, is there a possibility to deactivate it direct in the coding ?
On the other hand, we need to replace this function (e.g in the easySocial Users - Plugin) by using the "follow" - function.
Can you at least give us some hints, where we need to adjust the coding (where in the classes), to replace these two functions.
Thanks in advance,
kr
Kurt
Hello Kurt,

I am not really sure if there's an "easy" way around this but you can first try to disable the Friends application as this would probably hide most of the friend suggestions etc from the dashboard and profile. As for the rest, you probably need to customize the theme files directly
·
Sunday, 14 September 2014 22:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

Thanks for your fast answer.
Maybe you can show us an example coding snippet and it would be perfect if you can provide us some information where to look for those methodes and classes or at least their names.

Many thanks and greetings from austria
Kurt
·
Sunday, 14 September 2014 22:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Kurt,

I think what you want to do now is to remove the friends functionality on the profile views. You would probably want to start by editing the theme files in /components/com_easysocial/themes/wireframe/profile/default.header.php and remove any "friends" items that you see
·
Sunday, 14 September 2014 23:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

thank you for your answer. I will have a look on it.

Additional i have other question:
In the module "easysocial user" i need a link below every picture, where i can use the "follow" or "unfollow" function.

In the file /modules/mod_easysocial_users/tmpl/default.php i put following line below where the picture will be outputed.

<div class="followAction"
data-id="<?php echo $user->id; ?>"
data-profile-followers
style="position:relative;"
>
<?php if( FD::get( 'Subscriptions' )->isFollowing( $user->id , SOCIAL_TYPE_USER ) ){ ?>
<a href="javascript:void(0);" data-es-followers-unfollow data-es-followers-id="<?php echo $user->id;?>"><span><?php echo JText::_( 'unfollow Author' ); ?></span></a>
<?php } else { ?>
<a href="javascript:void(0);" data-es-followers-follow data-es-followers-id="<?php echo $user->id;?>"><span><?php echo JText::_( 'Follow Author' ); ?></span></a>
<?php } ?>
</div>



This is working, but i need additional, that when i follow somebody, that the name of the link change outomatically to "unfollw" without any refresh of the site ?


First i tried to copy of the code of the normal userpage "default.header.php":

<?php if( $this->config->get( 'followers.enabled' ) ){ ?>
<div class="followAction"
data-id="<?php echo $user->id; ?>"
data-profile-followers
style="position:relative;"
>
<?php if( FD::get( 'Subscriptions' )->isFollowing( $user->id , SOCIAL_TYPE_USER ) ){ ?>
<?php echo $this->loadTemplate( 'site/profile/button.followers.unfollow' ); ?>
<?php } else { ?>
<?php echo $this->loadTemplate( 'site/profile/button.followers.follow' ); ?>
<?php } ?>
</div>
<?php } ?>

But this is not working, cos i dont know the iclude i will need.

Maybe you can help ?

thank you

best regards

Kurt
·
Monday, 15 September 2014 21:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Kurt,

I am really sorry but unfortunately there's no way around this right now unless you hack the javascript api
·
Tuesday, 16 September 2014 00:38
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post