More Button

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
gatenet
Veteran Member
Posts: 45
Joined: 2016-07-26 09:34
Location: Greece
Contact:

More Button

Post by gatenet » 2018-01-11 09:07

Hi there, question, can we hide more button for specific groups?

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

Re: More Button

Post by R Tammam » 2018-01-18 09:22

yes , you can use footer-extras.php to detect user's group
then write a Jquery code to hide buttons for this group

gatenet
Veteran Member
Posts: 45
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Re: More Button

Post by gatenet » 2018-01-18 09:29

Thank you Tammam, can you help me with the code?

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

Re: More Button

Post by R Tammam » 2018-01-24 11:39

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

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

Re: More Button

Post by R Tammam » 2018-01-24 11:40

you will need to remove the alert button , i wrote it for testing and replace the admins by any group you want to prevent

gatenet
Veteran Member
Posts: 45
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Re: More Button

Post by gatenet » 2018-01-25 21:17

Thank you Tammam you are great

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

Re: More Button

Post by R Tammam » 2018-01-28 19:23

Thank you gatenet for your kind words

Post Reply