1. drjjw
  2. Support
  3. Monday, December 28 2020, 06:42 PM
I am using a template overide you provided in another post (attached). In order to improve this slightly, can you tell me how to add the user actions on top of the profile page which would allow a logged in user to add this person as a friend?

Jordan
Attachments (1)
admin Accepted Answer
Admin
Hi,
The social network plugin uses a own framework, you can manage this override from Admin Panel:
- Access to Admin Panel (http://docs.easy-profile.com/index.php/article/social-network-configuration)
- Go to Theme Manager
- Choose "Social Network" theme
- On left bar choose Elements->cover.ctp
- Click on "Copy" button and copy in your theme (or Blue theme). with this step this file will be overridden and you will not lose changes with updates
- Goto Admin Panel->Themes Manager->Choose "Your Theme" (or Blue theme)
- On left bar choose Elements->cover.ctp (this is the new file copied from default template)
- Edit this new file
  1. more than a month ago
  2. Support
  3. # 1
drjjw Accepted Answer
Pro
Hello,

What I would like to do is use the override I attached (which you once provided) which uses the EasyProfile profile layout for the Social Network layout. But I would like to add the actions to add a friend, send a message, edit profile.

So after I remove the override from my template that you provided, how could I then create it in the override system you use and add those few functions?
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
with your "social.php" the header of the social profile is hidden, so the buttons are still available.

You can add in social.php override buttons that trigger there hidden buttons (with javascript) like:
<a href="#" id="add_friend" class="btn btn-xs btn-default">Add as Friend</a>
<a href="#" id="send_message" class="btn btn-xs btn-default">Send a Message</a>
<script>
jQuery(document).ready(function(){
jQuery('#add_friend').click(function(){
jQuery("#cover [href*='friends']").click();
});
jQuery('#send_message').click(function(){
jQuery("#cover [href*='conversations']").click();
});
});
</script>


you can this code in your social.php after line 62 ;)
  1. more than a month ago
  2. Support
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.