Hello.
I created "VIP" joomla user group and would like to display some specific styles for it (another color for avatar border: red instead of white)
Hi,
ON this code :
$juser = CFactory::getUser();
$juser = CFactory::getUser(USER_ID);
Hi. I changed code, but can't see the difference.
Wnen I visit site like guest, everything looks as usual.
New style still apply only when I logging as "demo" (joomla user group 10). And it apply for all users:
Hi,
Where do you want to apply it? for all page? its hard to be implmented.. its really tricky because you need modify many files, for the pointer code you can use this
$user = JFactory::getUser(USER_ID);
$user_groups = $user->groups;
// check if this user have VIP id
print_r($user_groups);
Hi.
I supposed that it's possible to do something like that.
For example, simple user's activity looks loke this:
Seems I really need to edit this stream activity temlate layout (make override) and "display some extra class if user is VIP"?ts really tricky because you need modify many files
$user = JFactory::getUser(USER_ID);
$user_groups = $user->groups;
// check if this user have VIP id
print_r($user_groups);
<?php
// Lets obtain the user object first
$juser = CFactory::getUser(USER_ID); // Get the user object you want to display the badge for. On profile page you can use $juser = CFactory::getRequestUser(); to obtain the user object of the user we are looking at.
$juserid = $juser->id; // extract the user ID
// Now, lets get the array of all Joomla User Groups user is member of
jimport( 'joomla.user.helper' );
$groups = JUserHelper::getUserGroups($juserid);
?>
Hi,
That is smart solution, user jomsocial profile type and use watermark avatar for difference the general user with VIP user.
Create profile type, on Jomsocial backend->Profile->Multiple Profiles->create new profile type, and on the form upload "Watermark" config item.
thank you!
Hi. Can you please tell what file(s) was edited to display "JS ACTIVE" badge at jomsocial.com and may be publish code from it (because code from documentation apply for me only after login)?
I would like to display some badge like there.
Thanks.
JS active? please explain more..
we use custom code, I dont recommended you to use custom / hack method, your issue actually can be fixed easily, just activate multiprofile and create watermark avatar there
Hi. Is it possible to use "if Featured user" condition?
Should I add this code to general.header.php:
- or I need to use another code in this file?$featured = new CFeatured(FEATURED_USERS);
$featuredList = $featured->getItemIds();
or may be this one:<?php if (is_array($featuredList) && in_array($row->user->id, $featuredList)) { ?>
custom badge or class-style
<?php } ?>
<?php echo ($profile->featured == true) ? 'CUSTOM-CODE-THERE' : ' '; ?>
Hi,
I am sorry your request is too many hack tehnical issue, and that is not simple hack, I suggest you hire 3rd party developer.
thank you!