Gossamer Forum
Home : Products : Gossamer Links : Discussions :

User_Status

Quote Reply
User_Status
We are asking more and more of link.html, but the User tags don't seem to be available. isLinkOwner is not always enough, the User->{Status} (Administrator, Editor, User, etc) is often more important for providing options.

I've asked Alex to consider adding in the following line to site_html_link:

Code:
(defined $Links::USER->{Status}) ?
($rec->{'User_Status'} = $Links::USER->{Status}) :
($rec->{'User_Status'} = 0);


But, you can get the same effect with the following template global:

Code:
User_Status => sub {
(defined $Links::USER->{Status}) ? (return $Links::USER->{Status}) : (return 0);
}


This is *extremely* useful for showing admin-only options in the templates during debugging, or for enhancing features such as edit/modify/add features beyond what 'isLinkOwner' can do.

Example:

Code:
<%if User_Status eq 'Administrator'%>
<%GT::Template::dump%>
<%endif%>


And that way, your site can still function "normally" while you try to debug or change some templates.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread User_Status pugdog 1468 Jul 25, 2002, 5:23 AM
Thread Re: [pugdog] User_Status
Paul 1390 Jul 25, 2002, 5:27 AM
Thread Re: [Paul] User_Status
pugdog 1385 Jul 25, 2002, 6:21 AM
Thread Re: [pugdog] User_Status
Paul 1388 Jul 25, 2002, 6:24 AM
Post Re: [Paul] User_Status
pugdog 1383 Jul 25, 2002, 6:45 AM