Welcome, Guest. Please Login or Register.
May 02, 2025, 12:36:49 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  [REQ] User cannot change display name! « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [REQ] User cannot change display name!  (Read 414 times)
tykatt
Noobie
*
Posts: 22


[REQ] User cannot change display name!
« on: April 22, 2002, 11:58:20 PM »
Reply with quote

Hi,

I have another item on my wishlist - I'd like to make it so that users cannot change their display names - so they always use their username..... I don't suppose anyone could just whip up a little mod for that, that will work in SE 1.3?  *grinning*.....

tykatt~
Logged

When you least expect it..... expect it.
tykatt
Noobie
*
Posts: 22


Re:[REQ] User cannot change display name!
« Reply #1 on: April 23, 2002, 07:30:14 AM »
Reply with quote

UPDATE!!
I left the stuff below in case anyone already read it, or maybe so someone can help me find the flaws in my logic.  Anyway, upon closer inspection, this doesn't work very well at all.  Yes, it keeps the display name box from appearing in the edit profile screen.... but if the user tries to make any other changes, it chokes - it expects to find a value there...... I think if I can just tell it somehow to use the value from the username box, I'll be off to the races..... but I'm too tired now to work that one out.  I'll check here tomorrow before I devote any more brainpower to it.  Thanks, and sorry for the false alert  :P

tykatt~

WHAT FOLLOWS IS MY BROKEN MOD.... for educational purposes only!!


well, wonders never cease.... I started tinkering, and I managed to modify this without breaking my board (so far - *heh*)...... If anyone else wants to disallow users to change their display names in the profile settings..... here's how I did it....

This mod was done on my clean install of YaBBSE 1.3.0

Open up sources/Profile.php... and find this (in mine, it started at line 126):

Quote   <td width="45%"><font size=2><b>$txt[68]: </b></font><BR>
   <font size=1>$txt[518]</font></td>
   <td><input type="text" name="name" size="30" value="$memsettings[realName]"></td>
      </tr><tr>

If you don't ever want it back, you can delete it, but I'm always reluctant to do that, so I chose to remark it out instead.  Below is what I pasted in its stead.  If you ever want to restore the ability to change display names, all you need to do is remove the top and bottom lines, and change all the {} to <>.

Quote<!-- The following lines remarked out to disallow users resetting display names
   {td width="45%"}{font size=2}{b}$txt[68]: {/b}{/font}{BR}
   {font size=1}$txt[518]{/font}{/td}
   {td}{input type="text" name="name" size="30" value="$memsettings[realName]"}{/td}
      {/tr}{tr}
    -->

DISCLAIMER - I'm not a modder, or even all that familiar with php.... please back up your Profile.php file before trying this, as I cannot be held responsible if you toast your board.

PS - if anyone knows a better way to accomplish this, don't be shy about correcting me :)

tykatt~
« Last Edit: April 23, 2002, 08:05:29 AM by tykatt » Logged

When you least expect it..... expect it.
tykatt
Noobie
*
Posts: 22


Re:[REQ] User cannot change display name!
« Reply #2 on: April 23, 2002, 08:25:53 AM »
Reply with quote

*LMAO*....

ok ok.... I know I'm essentially having a conversation with myself here, but I gave myself an idea with that last edited post, and wasn't able to go to sleep without trying it.  I think we have a winner here, folks, but don't try this at home (without a good backup of the affected file, that is).

If you're using YaBBSE 1.3 and you want to prevent users from changing their display name, and thus keep username as display name permanently.... here's how:

Open up sources/Profile.php... and find this (in mine, it was line 128):

Quote<td><input type="text" name="name" size="30" value="$memsettings[realName]"></td>

As mentioned above, I don't like to delete anything - so I remarked out the original stuff, and added the new line below it, like so:

Quote<!-- the next line remarked out and replaced below, to disallow users from changing display name
   {td}{input type="text" name="name" size="30" value="$memsettings[realName]"}{/td}
   -->
   <td><font size=2><input type="hidden" name="name" value="$user">$user</font></td>

The very last line is what makes it work though, so if you don't want the remarks, just use the last line to replace the original line.  (But what if you want to change it back?)

This just tells YaBB to use the username value as the display name (realname) value.  This one works because it satisfies the need to have something in that field...... the user just can't happen to change it :)

tykatt~
Logged

When you least expect it..... expect it.
joshxpcable11
Full Member
***
Posts: 232


Eat my shorts

joshj@pei.eastlink.ca
Re:[REQ] User cannot change display name!
« Reply #3 on: April 24, 2002, 10:24:01 PM »
Reply with quote

Hehe, talking too yourself??  ::)
Logged

Check out my boards: ~~~J-Boards~~~
tykatt
Noobie
*
Posts: 22


Re:[REQ] User cannot change display name!
« Reply #4 on: April 25, 2002, 07:49:42 AM »
Reply with quote

pretty much, yea Josh *lol*
I decided to leave it all in case somebody else wanted to know how to make those same changes.

tykatt~
Logged

When you least expect it..... expect it.
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  [REQ] User cannot change display name! « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.038 seconds with 21 queries.