MyBB Community Forums

Full Version: Guests usertitle keep showing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

I've set guest usergroup not to have usertitle, but when a guest posts, in postbit author field under the name "Guest" there is a usertitle "Guest" as well.
How to remove this usertitle from guests posts?
What's the usertitle set to in the group settings?? Is it just blank??
(2009-02-16, 01:00 PM)MattR Wrote: [ -> ]What's the usertitle set to in the group settings?? Is it just blank??

Yes, it's blank.
Check the mybb_usergroups table to see if the usertitle field is blank. If it is, then it's the core files that are adding it in. From the developing I've been doing with the posting/creating stuff, I can't recall seeing it being overridden though...

Edit:

Actually, I think it's generated on the postbit - if the user is a guest, and the usertitle is blank, it will just insert "Guest" (I think it's $lang->guest, in global.lang.php). Can you check that, if you change this language variable, it also changes the guest's usertitle?
(2009-02-16, 01:31 PM)Tom.M Wrote: [ -> ]Check the mybb_usergroups table to see if the usertitle field is blank. If it is, then it's the core files that are adding it in. From the developing I've been doing with the posting/creating stuff, I can't recall seeing it being overridden though...

It's somewhere in the core files for sure. And because I hate to change things there, I made a temporary solutionSmile

In Default User Title field i have put this:
<span style="display:none;">blablabla</span>

Thanks for the help.
Have you tried changing the "Guest" variable in global.lang.php (it shows as $l['guest'] in the source file)... I think I might know where it's hiding...

Edit: I found it, it's in functions_post.php. Find, line circa 384:

$post['usertitle'] = $lang->guest;

Either change to $lang->na (which will display "N/A") or just change to the below to leave it blank:

$post['usertitle'] = "";

Remember to mark down custom edits to the core files in case this file is upgraded in the future.