FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Mask usernames?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Mask usernames? [message #39381 is a reply to message #39360] Fri, 19 October 2007 10:13 Go to previous messageGo to previous message
pgregg is currently offline  pgregg   United Kingdom
Messages: 14
Registered: July 2006
Karma:
Junior Member
Welcome back - glad all the spam is gone now. Figured you were on vacation with the IRC "idle 176 hours" Smile

It looks like draw_user_link() is only used in the 'who is logged in' and 'what people are doing' - it isn't used in the Forum/Category listing's "last post by", nor is it used in the actual message display or user's profile page.

I found in drawmsg.inc.t and drawpmsg.inc.t references outputting $user_login (which I can regex easily) and directly outputing $obj->alias in the template (thinking I could do a $user_login = $obj->alias; in drawpmsg.inc.t and change the template to $user_login much the same way as drawmsg.inc.t works). Haven't figured out the profile page yet.

But, I'm consious that this gets right into the core of FUDforum and will limit any ability to upgrade. Ideally I'd like minimal core code impact (maybe a standard output hook/filter for a custom function we can stick at the bottom of GLOBALS.php)?

e.g. in drawmsg.inc.t Line 157:
$user_login = $obj->user_id ? $obj->login : $GLOBALS['ANON_NICK'];

add:
if (function_exists('output_filter_userlogin'))
$user_login = output_filter_userlogin($user_login);

in my GLOBALS.php:
/* DO NOT EDIT FILE BEYOND THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING */
require($INCLUDE.'core.inc');

// borland additions - pgregg
function output_filter_userlogin($user_login) {
// pgregg modification to protect email address of users (when used as a login)
if (strpos($user_login, '@') !== false)
$user_login = preg_replace('#@.*?\.(\w+)$#', '@###.\\1', $user_login);
return $user_login;
}

Do you think something like this is valueable in the core code?

Cheers,
PG
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to make index.php RDF button stick to the category in the URL?
Next Topic: Protect a non Fud page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 02:53:02 GMT 2024

Total time taken to generate the page: 0.10850 seconds