Last Edit Link

Started by vbgamer45, July 07, 2009, 11:10:55 PM

Previous topic - Next topic

vbgamer45

Link to Mod

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
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


Arantor

I'll add it in just a moment - this is autoposted from the entry made to the mod site.

JBlaze

Very nice Arantor :)

Better than my attempt at this :)

One suggestion:

Code (find) Select
$msgOptions['modify_name'] = '<a href="' . $boardurl . '/index.php?action=profile;u=' . $user_info['id'] . '">' . $user_info['name'] . '</a>';
Code (replace with) Select
$msgOptions['modify_name'] = '<a href="' . $scripturl . '?action=profile;u=' . $user_info['id'] . '">' . $user_info['name'] . '</a>';

Also, that step is in there twice...
Jason Clemons
Former Team Member 2009 - 2012

Arantor

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.

JBlaze

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.
Jason Clemons
Former Team Member 2009 - 2012

Özgür

Actually we need converter too. Because old message edits not include userlink.
So Long

Arantor

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)

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Robbo_

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.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Arantor

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.

Robbo_

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)...
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Arantor

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.

Advertisement: