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.