This topic is locked
[SOLVED]

 Hide Export link depend on user

3/19/2010 6:20:33 PM
PHPRunner General questions
L
lordkain2 author

Hi, how I could hide Export link depend on user? Or How to show only Print link, no export to selected users?
Any ideas?
Thanks
MLL

Sergey Kornilov admin 3/20/2010

Check this article for inspiration:

http://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm
Sample code:

$xt->assign("export_link",$_SESSION["UserID"]=="admin")
L
lordkain2 author 3/25/2010



Check this article for inspiration:

http://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm
Sample code:

$xt->assign("export_link",$_SESSION["UserID"]=="admin")



Thanks!!! But this only hide the first export link.
Where can I find the list of elements (like "export_link")?

Sergey Kornilov admin 3/25/2010

You can lookup those tags in Visual Editor in HTML mode.
For example, proceed to the list page, make 'Export result' link selected and switch to HTML mode.

Here is the code snippet that will be highlighted:

{BEGIN export_link}<A class=tablelinks3 href="tablename_export.php" target=_blank {$exportlink_attrs}>Export results</A>{END export_link}


To hide a section use the following code:

$xt->assign("export_link",false);


More info:

http://xlinesoft.com/phprunner/docs/smarty_templates.htm