Page 1 of 1

More Button

Posted: 2018-01-11 09:07
by gatenet
Hi there, question, can we hide more button for specific groups?

Re: More Button

Posted: 2018-01-18 09:22
by R Tammam
yes , you can use footer-extras.php to detect user's group
then write a Jquery code to hide buttons for this group

Re: More Button

Posted: 2018-01-18 09:29
by gatenet
Thank you Tammam, can you help me with the code?

Re: More Button

Posted: 2018-01-24 11:39
by R Tammam
with my pleasure

and here's the code that is working for me

Code: Select all

	//get user group 
	$memberInfo = getMemberInfo();
	$user_group=$memberInfo['group'];
	echo $user_group;
 ?>
 <script>
		
			$j(function(){
				var user_group=<?php echo json_encode($user_group) ?>;
				alert(user_group);
				 if(user_group !='admins'){
					 $j('#selected_records_more').remove();
				 }
 		
			})
					 
		 </script>
i hope it would hep you ,
Regards ,
Reham

Re: More Button

Posted: 2018-01-24 11:40
by R Tammam
you will need to remove the alert button , i wrote it for testing and replace the admins by any group you want to prevent

Re: More Button

Posted: 2018-01-25 21:17
by gatenet
Thank you Tammam you are great

Re: More Button

Posted: 2018-01-28 19:23
by R Tammam
Thank you gatenet for your kind words