Suggestion for update

1 year 8 months ago #1 by Frank
First of all, thank you for this plugin. It works great!

Now my suggestion for update.
It is checking just the first usergroup, but if this is not the usergroup on which you want to filter the users, it is not working very nice. So i made a change myself for checking all usegroups.

My change is made in the templateassigner.php file:
$groups = $user->groups;
		
		$newTemplate = null;
		
		foreach($groups as $tempGroup)
		{
			if($mapping->$tempGroup != '')
			{
				if($newTemplate != null)
				{
					if($newTemplate != $mapping->$tempGroup)
						return true;
				}
				else
				{
					$newTemplate = $mapping->$tempGroup;
				}
			}
		}
		
		JFactory::getApplication()->input->set('templateStyle', $newTemplate);

This way all usergroups of the user are looped. If all changes are to the same template, the template is used. If different groups are set to different templates, the user sees the default template for that page.

Please Log in or Create an account to join the conversation.

1 year 8 months ago #2 by Function90
Hello Frank,

Thanks for the appreciation and for the suggestion.
It seems good, but we can not assure you if we will add exact same. We will think about the implementation and will add it.

It will be great if you can write a review on JED about this plugin
extensions.joomla.org/extension/template-assigner

Thank you
Team Function90
You can share your views regarding our extension at JED ( extensions.joomla.org/profile/profile/details/225115#extensions )

Hire Professional Joomla Developers. ( www.function90.com/contact-us.html )

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum