Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=1920)
Last Edit Link
Original Author: Arantor
SMF Version: 2.0.X
Mod Version: 2.0
Description:
This mod simply makes it so the last edited post information will link to the person who made the edit. It will not apply the link to edits made before this mod is installed. It will also update the name if the user changes their display name. If the user is deleted then the link will no longer be displayed.
ChangeLog:
Version 2.0
- Removed 1.1.x support
- Updated for 2.0.X
- Taken over by Runic
Version 1.1
- The link will now be the same name as what is in the users profile, so if they change their display name it will change in the link as well.
- If a user is deleted then the link will be turned back into plain text.
Version 1.0
- Initial release
Why Not Visit:
http://www.smfhacks.com (http://www.smfhacks.com)
Link? :P
I'll add it in just a moment - this is autoposted from the entry made to the mod site.
Very nice Arantor :)
Better than my attempt at this :)
One suggestion:
$msgOptions['modify_name'] = '<a href="' . $boardurl . '/index.php?action=profile;u=' . $user_info['id'] . '">' . $user_info['name'] . '</a>';
$msgOptions['modify_name'] = '<a href="' . $scripturl . '?action=profile;u=' . $user_info['id'] . '">' . $user_info['name'] . '</a>';
Also, that step is in there twice...
Because it's in the file twice. It's called in two separate functions, as referenced by both of the global declarations.
I hadn't thought about using $scripturl, thanks for that - I'll update that shortly.
Quote from: Arantor on July 08, 2009, 05:08:15 AM
Because it's in the file twice. It's called in two separate functions, as referenced by both of the global declarations.
I hadn't thought about using $scripturl, thanks for that - I'll update that shortly.
Ahh ok. I see now. I didn't notice it was in there twice.
Actually we need converter too. Because old message edits not include userlink.
A converter is doable only if the members haven't changed their names since making the edit, and is a fairly complex process (since it involves querying every edited post, followed by querying the members table once per edited post - on a large forum this can take a while)
Thank you :)
I have taken over this mod from Arantor and basically just re-written it. There should be no need for any future versions (unless SMF updates break it).
Note: SMF 2.0 users will have to uninstall 1.0 before installing 1.1.
Version 1.1
- the link will now be the same name as what is in the users profile, so if they change their display name it will change in the link as well.
- if a user is deleted then the link will be turned back into plain text.
Great work ! This is what I should have done originally but a) I was new to modding and b) I was trying to do less work overall, this is far more elegant than I should have done, and had I done this a few months later (and with the rewrite I told myself I was gonna do 'someday') this is the sort of thing I would have done :) Only you did it first and better.
Well at least you know your mods will be taken care of lol.
This is something that should be default to SMF imo. Everywhere else a username links to a profile (if one exists)...
Too many mods go unmaintained, and it's great to see someone with the skills step up to the plate :)
I agree, it should be default and it's something I'd like to see in 2.1.