Closed seaweeduk closed 10 years ago
Yes, we can make this an optional feature in config.php and also check for the presence of the correct table. I'll add it to my list.
Awesome thanks mate
@seaweeduk Sorry for the delay, I had some back surgery and life got in the way. Is this feature still needed?
No problem wriley, hope you are well now. I have my own basic webpage I currently use for my name changes but it would be great to see it integrated into dayzadmin. I know I use it a lot and I'm sure other admins will probably find it useful too. It's up to you though and if you have time to look at it.
@seaweeduk I'm working on this today, may want you to test with real data.
Added in #227
beautiful wriley, working perfectly with all my old data :) thanks very much
Always something I've found useful would be nice to have it integrated into dayzadmin with gui etc
CREATE TABLE test.nickchanges ( id INT(11) NOT NULL AUTO_INCREMENT, oldname VARCHAR(255) NOT NULL, newname VARCHAR(255) NOT NULL, puid VARCHAR(255) NOT NULL, timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UNIQUE INDEX id (id) ) ENGINE = INNODB AUTO_INCREMENT = 3 AVG_ROW_LENGTH = 8192 CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DEFINER = 'dayz'@'localhost' TRIGGER test.namechange BEFORE UPDATE ON test.player_data FOR EACH ROW BEGIN
if NEW.playername <> OLD.playername then INSERT INTO nickchanges (oldname, newname, puid) VALUES (old.playername, new.playername, old.playeruid); end if; END
Could be a bit of a ball ache for people who don't have db permissions for triggers though so maybe make it optional or something.