Support

  1. dlh
  2. Features Request
  3. Tuesday, June 25 2019, 05:07 PM
Hi,
I would like to add a "page" inside the user's page to display a php content. The page should have the same apparence as the links "Activity", "Info", "Friends", etc. AN when you are on this page, you should be still on the profile page (it shouldn't be a redirection to an other page in an other position in the website).
Thans for your help.
Kind regards,
Yann Arnould
Accepted Answer
admin Accepted Answer
Admin
Hi,
you can do this by follow these steps:
1) Create php content by creating a file called /plugins/jsn/socialnetwork/app/View/Users/ajax_page.ctp and add to this file the content
2) Create the link in left menu
- Access to Admin Panel (http://docs.easy-profile.com/index.php/article/social-network-configuration)
- Go to Theme Manager
- Choose "SocialNetwork Theme"
- Choose the file to override from left menu (Users->view.ctp)
- Click on button "Copy" and copy it in "Blue Theme" (With this you will create the override, the override will be not re-written wh en you install upgrade of the plugin)
- Come back to Theme Manager and choose "Blue Theme"
- You will see your override to customize.
- In this new file you can add something like this at line 159
<li>
<a data-url="<?php echo $this->request->base?>/users/ajax_page/<?php echo $user['User']['id']?>" rel="profile-content" href="#"><i class="icon-file-text-alt"></i> <?php echo __('New Page')?></a>
</li>

3) Create controller function
in file at /plugins/jsn/socialnetwork/app/Controller/UsersController.php you should add a function like this (for example at line 14):
public function ajax_page( $uid = null )
{

}


NOTE: changes at steps 1 and 2 will be not overridden after upgrade, but unfortunately in future when you upgrade Social Network plugin then you need to re-apply step 3
  1. more than a month ago
  2. Features Request
  3. # Permalink


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

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.