Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Publicly display user status

Quote Reply
Publicly display user status
I'm struggling with this one.

All I want to do is display a user status next to their name - Member / Administrator / Editor

Searching the forums I can only find posts relating to users who are logged in - eg they only see certain things due to their status:

Code:
<%if Status eq 'Administrator'%>Only Admin can see this<%endif%>

Is there any way I can display statuses generally so everyone can see them (for example - in reviews):

Adam - Member
Brian - Administrator
Colin - Member
Quote Reply
Re: [MJB] Publicly display user status In reply to
Is it in the link.html / detailed.html pages you wanna show it, or somewhere else?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Publicly display user status In reply to
It's in review_include.html

This is what I currently have:

Code:
Status: <%if Review_GuestName%><font class="guest">Guest</font><%else%>Member<%endif%>

I want to show Administrator or Editor as well if possible. I use it on the Detailed pages and also in a global for last 3 reviews displayed on the home page.
Quote Reply
Re: [MJB] Publicly display user status In reply to
A simple global should do the trick:

get_linkowner_status
Code:
sub {
return $DB->table('Users')->select( ['Status'], { Username => $_[0] } )->fetchrow;
}

Then call with:

Code:
Status: <%if Review_GuestName%><font class="guest">Guest</font><%else%><%get_linkowner_status($Review_Owner)%><%endif%>

That should do it Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Publicly display user status In reply to
Yes, that works. Thanks Andy.