Not logged in. · Lost password · Register
Forum: Customising UNB Modifications and plug-ins RSS
How to hide usernames for guests and bots
gregman #1
Member since May 2007 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to hide usernames for guests and bots
Hi,

is it possible to let unb show usernames of the posts only to logged in people? Guests and bots shall only see a "***" or whatever instead of the username.

Thx
Greg

Besides: I'm sure, it's possible. What i really mean is "how".
jense #2
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
Quote by gregman:
is it possible to let unb show usernames of the posts only to logged in people?
No. - Since the displayed usernames are aliases, why should it be?

BTW, your question seems to be somehow related to Allow anonymous posting for members.
Alala, Alala, Gimme three wishes - CSS
jense #3
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
Quote by jense:
Quote by gregman:
is it possible to let unb show usernames of the posts only to logged in people?
No.
Er, say: not directly.  You can edit post.html and mask the user name depending on the login status - or something that indicates it...
Alala, Alala, Gimme three wishes - CSS
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
That was my idea, too. Something like this should help, in post.html:

{if $LoginUserID}{$post.authorName}{else}***{endif}
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
gregman #5
Member since May 2007 · 12 posts
Group memberships: Members
Show profile · Link to this post
Thx for the code, I'll try it!

Due to the fact that I encourage the users of my forum to use their real names (because we also communicate in "real"), I was asked to hide the usernames for guests or bots.

Greg
jense #6
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
Quote by gregman:
Due to the fact that I encourage the users of my forum to use their real names (because we also communicate in "real"), I was asked to hide the usernames for guests or bots.
Well, then you should consider to entirely hide the forum to guests.  The names might appear in quotes, texts, whatever...
Off Topic:
Hm, in general, it is not a good sign if text that is publically available should not be related to its author, is it?!
Alala, Alala, Gimme three wishes - CSS
gregman #7
Member since May 2007 · 12 posts
Group memberships: Members
Show profile · Link to this post
Quote by jense on 2007-12-06, 17:55:
Well, then you should consider to entirely hide the forum to guests.  The names might appear in quotes, texts, whatever...
In deed, but hiding the hole forum is not practicable for me, because most of the topics in the forum are interesting for guests as well and I don't want to force a registration.
Quote by jense on 2007-12-06, 17:55:
Off Topic:
Hm, in general, it is not a good sign if text that is publically available should not be related to its author, is it?!
In my case the information surely is related to the author: Therefore it's more a question of handling datas respectfully.

Nevertheless: The code works very well. But in order to hide all the user information I had to add
{if $LoginUserID}{$t.startUser}{else}*****{endif}
in treadlist.html as well.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 200.3 ms (112.2 ms) · 77 database queries in 142.7 ms
Current time: 2012-02-07, 20:21:06 (UTC +01:00)