Support

  1. yoji
  2. General
  3. Monday, July 06 2015, 09:22 AM
I want to show the viewing Access level to registered user.
Is it possible?
It may be a Joomla question not EasyProfile...
But if anyone knows the answer, please let me know.
Thanks in advance.
Accepted Answer
admin Accepted Answer
Admin
Hi,
you can do something like this:

1. Override Easy Profile Layout (to not loss changes when you update our component)
- copy /components/com_jsn/views/profile/tmpl/default.php into /templates/your-template-folder/html/com_jsn/profile/default.php

2. add this code at line 14 on new default.php
$acl=JFactory::getUser($this->data->id)->getAuthorisedViewLevels();
$db=JFactory::getDbo();
$query=$db->getQuery(true);
$query->select('title')->from('#__viewlevels')->where('id in ('.implode(',',$acl).')');
$db->setQuery($query);
$accessLevels=$db->loadColumn();
$formattedAcl='<span class="label label-info">'.implode('</span> <span class="label label-info">',$accessLevels).'</span>';
echo '<div style="float:right">'.$formattedAcl.'</div>';


3. see screenshot for result

NOTE: this code is for example purpose, so not supported .
Attachments (1)
  1. more than a month ago
  2. General
  3. # Permalink
yoji Accepted Answer
Basic
Hi Tech.Support,

Thank you so much. I really appreciate your kind support.

Best Regards,
Yoji
  1. more than a month ago
  2. General
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Online

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.