ManagersOnly
A snippet based on Adam Crownoble’s LoginLogoutLink (8/3/2005) and MemberCheck by Ryan Thrash, Jason Coward (3/4/2007) .
Purpose
The purpose of ManagersOnly is to offer very light way to show/place content to/for Manager Users. This snippet doesn’t check group memberships, it will only check to see if the manager is logged in and return the contents of a chunk.
Note: If you would like a snippet that also checks group membership try Susan Otwell’s modified MemberCheck,
ManagerCheck.
If logged in the manager user will see the chunk content where called. If not logged in no one else will see the links.
Usage
1. Place this text into a new snippet and name it ManagersOnly
2. Create a Chunk with the contents for managers only such as links or text.
3. Place snippet call into template or document. Where `chunkname` is the name of your chunk:
[!ManagersOnly? &chunk=`chunkname`!]
Important: Do not place the normal chunk call into your page or template as it will be publicly accessible.
Parameters
&chunk - Name of Chunk containing content to display [String] (REQUIRED)
&debug - Turns on Debugging to see what the problem is [0|1] (REQUIRED) Default = 0
Current Version: 0.1.1
Last Update: 06-01-2008 (Usage info update. No change to actual snippet code)
Note:
Looking for people to see how it works on their stacks. Especially PHP5. Any simple suggestions are welcomed.