Navigation

Contributions Dynamic Page Actions Talk

Marcus Denning, HouseOfDenning.com, 20151207-23:20

This Login/Logout Conditional Logic Script is one I have added to my own Site.PageActions which you can edit appropriately to the desired condition.
Login prompt is one color.
Logout is one of two colors based on condition.
Logout Admin is RED.
Logout non-Admin is Green.
I have found this very useful in determining what login I just entered and whether or not it was actually the Admin the wiki recognized.

(:if ! enabled AuthPw:)
* %item rel=nofollow class=login  accesskey='$[ak_login]'%  '''''%color=#8a00ac%[[{*$FullName}?action=login  | $[Login]      ]]%%'''''
(:ifend:)
(:if enabled AuthPw:)
(:if2 auth admin:)
* %item rel=nofollow class=logout accesskey="$[ak_logout]"% '''''%color=#ff0000%[[{*$FullName}?action=logout | $[Logout]     ]]%%'''''
(:else2:)
* %item rel=nofollow class=logout accesskey="$[ak_logout]"% '''''%color=#00ff00%[[{*$FullName}?action=logout | $[Logout]     ]]%%'''''
(:if2end:)
(:ifend:)