Support

  1. Queenielass
  2. Support
  3. Friday, April 06 2018, 02:30 PM
  4.  Subscribe via email
Back to the Mentoring site....
When a mentee runs a search on the Mentor usergroup, limited to 10 possible users, we would like 10 users to be shown, even if 1-2 of them are unavailable at that time.
Would it be possible to distinguish these by having them 'greyed out' or having a banner to show they are only unavailable 'at the moment'? ie make this relevant field stand out in some way?

Thanks
admin Accepted Answer
Admin
Hi,
this is not possible natively, but maybe there is a workaround,

We need to understand what mean "unavailable" status (for example this is set by a field, this is set by a usergroup or it mean offline)?
  1. one week ago
  2. Support
  3. # 1
Queenielass Accepted Answer
Pro
This position is set by two possible conditions 1. Are you available to Mentor - yes/no checkbox - That would mean mentees could 'see' the mentor exists but that he is presently unavailable 2. Number of mentees - max of 5 - when Mentor is checked as Available, but has reached max number of mentees,,,,at present.

This would be a 'nice to have' option to keep the search populated with mentors, even if they are currently unavailable.

Would some instance of this type of option be possible?

Thanks
  1. one week ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
I have found a solution.
You can use HTML delimiter field type with some plugin like sourcerer (https://www.regularlabs.com/extensions/sourcerer) to add a style different for each user based on field value.

Try to follow these steps:
- Download and install Sourcerer plugin
- Create an HTML Delimiter field hidden into registration and edit profile pages like screenshot, with this code:
{source}
<?php
global $JSNLIST_DISPLAYED_ID;
if($JSNLIST_DISPLAYED_ID) $owner_id=$JSNLIST_DISPLAYED_ID;
else $owner_id=JRequest::getVar( 'id' , JFactory::getUser()->id );
$user = JsnHelper::getUser($owner_id);
$class = 'profile'.substr(md5($user->username),0,10);
if($user->available_for_mentoring || $user->no_of_mentees_at_present > 4) echo '<style>.'.$class.' .jsn-l-top{opacity:0.2}</style>';
?>
{/source}

- Add this field to show in User List

This field should show a CSS code that make user "grey out" when available_for_mentoring is equal to "No" (value is 1) or no_of_mentees_at_present is greater than 4

NOTE: this code is not tested and not supported, it is only for example purpose.
  1. one week ago
  2. Support
  3. # 3
Queenielass Accepted Answer
Pro
This looks like a good possibility!
I'll test it out and let you know.

Thanks!
  1. one week ago
  2. Support
  3. # 4
Queenielass Accepted Answer
Pro
In essence, it should work, but I can't get it to do so.
If you can have a look and see what I've done wrong I'd appreciate it :)
  1. one week ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Hi,
I have removed condition that remove field "Availability css".

Of course this field need to be hidden so I have added in your custom.scss this code:
.availability_css{display:none;}
  1. one week ago
  2. Support
  3. # 6
Queenielass Accepted Answer
Pro
That has worked! Many thanks as ever!
  1. one week ago
  2. Support
  3. # 7
  • Page :
  • 1


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

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

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.