i'd like to add severals page.php in the gallery (no module) without use the .class, .inc, .tpl, just php files. So i'd like to know which code must i write to protect them, only the adminstrator group will have access ! Maybe it's just an include, but i didn't find it !
Thanks.
Posts: 130
i never did exactly the same thing, but you can use
{if $user.isAdmin}
{* your code *}
{/if}
you can use it to display or not hyperlink to page you want to display. Or include other file.
kind regards, Chris.
Posts: 8601
you can't use $user.isAdmin if you don't use G2 for your page.. if you must have your own php file then you'll need to use the GalleryEmbed interface to find out if the current user is an admin. The easier alternative is to make your own module with some static views.. these can use $user.isAdmin as suggested above. click documentation / User Contributions and find the static html module.