Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Aportadordelmix on October 06, 2009, 11:40:01 AM

Title: Remove Reply Prefix
Post by: Aportadordelmix on October 06, 2009, 11:40:01 AM
Remove Reply Prefix
Originally created by 130860 (http://oharascans.com/) Take by Aportadordelmix (http://www.simplemachines.org/community/index.php?action=profile;u=239378)

Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2172l) | Comments on this Mod (http://www.simplemachines.org/community/index.php?topic=340715.0)

When a topic is replied to, the topic will simply have 'Re: ' in front of it, though it is different in other languages.

This mod attempts to remove the prefix from topics in the board index (and in the message index for child boards)

So, for example, if the most recent reply in a topic is 'Re: My Topic', the board listing will say 'Last post by Arantor in My Topic' rather than  'Last post by Arantor in Re: My Topic'

It won't attempt every language, but will use the language you are currently using; for most cases, this will be the language of the forum.
Title: Re: Remove Reply Prefix
Post by: Costa on October 06, 2009, 01:54:18 PM
Congrats :D
Title: Re: Remove Reply Prefix
Post by: Arantor on October 06, 2009, 01:54:51 PM
Thanks :)

Now I gotta find the request from the user...
Title: Re: Remove Reply Prefix
Post by: Costa on October 06, 2009, 01:57:50 PM
Quote from: Arantor on October 06, 2009, 01:54:51 PM
Now I gotta find the request from the user...
Lmao, you're the man dude!
Title: Re: Remove Reply Prefix
Post by: Arantor on October 06, 2009, 02:01:43 PM
:) Thanks!

Btw, I found the topic back on 26th September and have replied as a follow up.
Title: Re: Remove Reply Prefix
Post by: Blinker on October 06, 2009, 09:28:29 PM
Nice mod Arantor, thanks.

So simple yet makes a big difference on the index....I never liked that whole "re" thing.
Title: Re: Remove Reply Prefix
Post by: LHW on October 06, 2009, 10:31:08 PM
Agreed, nice mod!  Thanks!!
Title: Re: Remove Reply Prefix
Post by: Sevgiformu.com on October 07, 2009, 03:59:11 AM
very very nice and good betiful oooo thank you . Arantor
Title: Re: Remove Reply Prefix
Post by: Afro on October 07, 2009, 07:38:27 AM
i installed this mod but havent noticed any changes
where am i supposed to be looking at ?
Title: Re: Remove Reply Prefix
Post by: Arantor on October 07, 2009, 09:58:06 AM
On the board index, for replies to a topic, it will display "Last post by [poster] in [topic]" instead of "Last post by [poster] in Re: [topic]"

That said, I can't remember offhand if it needs installation manually on to custom themes.
Title: Re: Remove Reply Prefix
Post by: meehan09 on October 07, 2009, 10:06:49 AM
When i view : http://www.exoticforums.co.uk//index.php/board,8.0.html

Iam getting :

    Last post
Array
September 01, 2009, 21:22:09 PM
by Tilliesreptilerescue

??


If you could take a look i added the code has told, and when viewing a cat i get that on all last posts bit?


Hope you can help fix this, thanks paul  8)
Title: Re: Remove Reply Prefix
Post by: Arantor on October 07, 2009, 10:12:31 AM
Not my mod at fault.

The error you're seeing is in your MessageIndex.php/MessageIndex.template.php file. My mod does not touch that file.

Hide Post Authors From Guests might be at fault here, but I doubt it. I would suggest your MessageIndex.template.php has been modified (incorrectly).
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 07:47:46 AM
Installed and it don't work. "Re:" is still visible. FWIW, have cleared the cache but it still don't make a difference.

Board: SMF 2.0 RC1.2
Standard SMF theme
No multiple languages
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 07:48:53 AM
Can I see a link to the site please?
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 07:51:49 AM
http://www.smokey-services.eu/forums/index.php (But I uninstalled your mod because it is not working atm)

Please register, in that way you will have access to a test forum for members-only.
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 07:52:46 AM
Well, I need to see what it does with the mod installed.

Note it only touches the board index.
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 07:56:09 AM
Re-installed, please perform your test here: http://www.smokey-services.eu/forums/index.php/board,34.0.html (again, only access for registered members...)
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 08:03:19 AM
Quote from: Arantor on October 10, 2009, 07:52:46 AM
Note it only touches the board index.
I know  ;)
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 08:36:33 AM
In which case pointing me at a board isn't going to demonstrate things. Though I look at the front page and see that it should work, and isn't.

Do you get any errors in the error log?
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 09:20:01 AM
Quote from: Arantor on October 10, 2009, 08:36:33 AM
Do you get any errors in the error log?
Several errors but IMO not related to your mod.

I just remember that the Category View Mod is installed on my board, can that be the cause for malfunction?

http://custom.simplemachines.org/mods/index.php?mod=1834
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 09:24:46 AM
It shouldn't do, no.

What errors did you get?
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 09:46:35 AM
I'm a cautious person, have sent the errors via PM.
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 09:48:32 AM
Hmm, you're right they do appear unrelated.

Please attach your Sources/Subs-BoardIndex.php file here.
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 09:58:41 AM
Attached.
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 10:02:31 AM
I know the core reason now, though what's triggered this, I have no idea.

Try this edit to Subs-BoardIndex.php:
Code (find) Select
$row_board['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row_board['subject']);


Code (replace) Select
$row_board['subject'] = preg_replace('/^\s*' . preg_quote($txt['response_prefix']) . '/', '', $row_board['subject']);
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 10:12:19 AM
Quote from: Arantor on October 10, 2009, 10:02:31 AM
I know the core reason now, though what's triggered this, I have no idea.
As well do I, uploaded/installed your mod via SMF...

QuoteTry this edit to Subs-BoardIndex.php:
Code (find) Select
$row_board['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row_board['subject']);


Code (replace) Select
$row_board['subject'] = preg_replace('/^\s*' . preg_quote($txt['response_prefix']) . '/', '', $row_board['subject']);

That did the trick, as usual, thanks Arantor!  :)
Title: Re: Remove Reply Prefix
Post by: Arantor on October 10, 2009, 10:24:35 AM
Quote from: Smog on October 10, 2009, 10:12:19 AM
As well do I, uploaded/installed your mod via SMF...

That's not what I meant. For reasons I can't imagine right now, all your replies are getting a space prefixed to them. Hover over the links in the board index, you'll see what I mean.

New topics as [Topic title] but replies are [ Re: Topic title]. The original code didn't allow for spaces at the start of that field.
Title: Re: Remove Reply Prefix
Post by: Smog on October 10, 2009, 10:35:34 AM
Hmmm... Good question...
Title: Re: Remove Reply Prefix
Post by: Sordell Media on November 04, 2009, 07:23:20 PM
Just thought I'd let you know Arantor, that this appears to work perfectly still in 2.0 RC2, providing you emulate "SMF 2.0" via package manager. Executes with no errors, and browsing my board index no longer shows those annoying "Re:" prefixes :D
Title: Re: Remove Reply Prefix
Post by: Arantor on November 04, 2009, 07:25:03 PM
Quote from: Sordell Media on November 04, 2009, 07:23:20 PM
Just thought I'd let you know Arantor, that this appears to work perfectly still in 2.0 RC2, providing you emulate "SMF 2.0" via package manager. Executes with no errors, and browsing my board index no longer shows those annoying "Re:" prefixes :D

I thought I'd updated this one to have the RC2 specification in it... guess not. Thanks for letting me know; I'll update it in just a moment.

EDIT: Updated. Didn't bother bumping the version number though.
Title: Re: Remove Reply Prefix
Post by: villasg on November 06, 2009, 09:38:22 AM
Installed but dont work for me .
Smf 1.1.10  Greek utf-8 is my Language
www.thai.gr is my forum

Any idea ?
Title: Re: Remove Reply Prefix
Post by: Arantor on November 06, 2009, 03:52:35 PM
Looks like it's working to me on http://www.thai.gr/forum/index.php?action=forum

The board ΝΕΑ ΕΠΙΚΑΙΡΟΤΗΤΑ ΑΠΟ ΤΑΙΛΑΝΔΗ shows its most recent topic as Η επικαιρότητα σε εικόνε... while the last reply states its subject as Απ: Η επικαιρότητα σε εικόνες - the prefix has been removed on the board index, just as the mod states it would do.

(I apologise in advance if the topic titles are inappropriate on this forum, I do not know Greek)
Title: Re: Remove Reply Prefix
Post by: villasg on November 06, 2009, 05:07:22 PM
Quote from: Arantor on November 06, 2009, 03:52:35 PM
Looks like it's working to me on http://www.thai.gr/forum/index.php?action=forum

The board ΝΕΑ ΕΠΙΚΑΙΡΟΤΗΤΑ ΑΠΟ ΤΑΙΛΑΝΔΗ shows its most recent topic as Η επικαιρότητα σε εικόνε... while the last reply states its subject as Απ: Η επικαιρότητα σε εικόνες - the prefix has been removed on the board index, just as the mod states it would do.

(I apologise in advance if the topic titles are inappropriate on this forum, I do not know Greek)

Hi
In Greek language the " Re: " = " Απ : "
If you look all the replies have the prefix "Απ : "
Title: Re: Remove Reply Prefix
Post by: Arantor on November 06, 2009, 05:12:00 PM
It is functioning PRECISELY as described.

Quote from: Arantor on October 06, 2009, 11:40:01 AM
This mod attempts to remove the prefix from topics in the board index (and in the message index for child boards)

So, for example, if the most recent reply in a topic is 'Re: My Topic', the board listing will say 'Last post by Arantor in My Topic' rather than  'Last post by Arantor in Re: My Topic'

It only does the board index, nothing more or less, so it won't do the other stuff.
Title: Re: Remove Reply Prefix
Post by: villasg on November 06, 2009, 05:14:27 PM
Ok i understund
Sorry and thanks for reply
Title: Re: Remove Reply Prefix
Post by: Paul_Pauline on November 16, 2009, 03:16:08 PM
Excellent Mod !

Installed on 1.1.10 perfectly.

Thanks.
Title: Re: Remove Reply Prefix
Post by: social on November 17, 2009, 08:59:54 AM
Good work friend. You are the best.
Title: Re: Remove Reply Prefix
Post by: Spuddy on February 22, 2010, 07:27:19 AM
I thought I'd let you know it works perfectly with SMF 1.1.11.

Many thanks, just what I was looking for.
Title: Re: Remove Reply Prefix
Post by: Arantor on February 22, 2010, 11:18:20 AM
Yeah, most mods will work just fine; just needs the mod page updating it (there was nothing in 1.1.11 that would have affected it, but I'd passed the mod on long before 1.1.11 was issued)
Title: Re: Remove Reply Prefix
Post by: 7s-1k on March 29, 2010, 05:34:58 AM
Does it also has to work on the 'Recent posts' at board index? I'm using RC3 and i don't notice any of it..
Title: Re: Remove Reply Prefix
Post by: Arantor on March 29, 2010, 07:26:25 AM
No, it only works on the main part of the board index, least that's all it did when I originally wrote it.
Title: Re: Remove Reply Prefix
Post by: 7s-1k on March 29, 2010, 09:37:45 AM
ok :)
Title: Re: Remove Reply Prefix
Post by: Bugo on June 09, 2010, 11:43:13 PM
Maybe it makes sense to add this mod as one of the features in a future version of SMF? :)
Something like a checkbox in the administration panel....
Title: Re: Remove Reply Prefix
Post by: Am' on June 25, 2010, 05:38:43 AM
Hi,

It is possible to replace Re: Re: Re: Re ... by a single Re: ? this module can do that?

thx
Title: Re: Remove Reply Prefix
Post by: mirahalo on June 25, 2010, 10:46:54 AM
where exactly the forum shows multiple Re ?  can you give me an example?
Title: Re: Remove Reply Prefix
Post by: DanteOz on December 23, 2010, 08:45:22 AM
after installation, i did not find any effecf, is there a way to activate it?
Title: Re: Remove Reply Prefix
Post by: Aportadordelmix on December 23, 2010, 11:23:03 AM
Quote from: DanteOz on December 23, 2010, 08:45:22 AM
after installation, i did not find any effecf, is there a way to activate it?

No. There is no way to activate it.
Title: Re: Remove Reply Prefix
Post by: DanteOz on December 23, 2010, 02:55:51 PM
but the RE: is still showing in topic reply
Title: Re: Remove Reply Prefix
Post by: NHWD on April 17, 2011, 11:14:46 PM
is there a way to do this on RC5?
Title: Re: Remove Reply Prefix
Post by: tartenpoint on April 22, 2011, 09:06:40 AM
It don't work  :o
Title: Re: Remove Reply Prefix
Post by: NHWD on April 23, 2011, 01:27:52 AM
Try parsing the mod and manually editing it.. that's what I did and it worked
Remember to leave out any edits to Mod settings and just focus on the Display template or Post template or whichever template it works on
Title: Re: Remove Reply Prefix
Post by: Arantor on April 23, 2011, 08:40:36 AM
More likely, the purpose of the mod was misinterpreted. It simply removes the Re: on the board index. Not in posts, not anywhere else, just on the board index. You know, like the first post says, like I wrote it to do originally.
Title: Re: Remove Reply Prefix
Post by: Dutchi00 on November 09, 2012, 11:56:24 AM
Can someone please update this, to work with 2.0.2?
Title: Re: Remove Reply Prefix
Post by: vicram10 on November 09, 2012, 12:46:40 PM
You can try..

Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)

or

http://custom.simplemachines.org/mods/index.php?action=parse;mod=2172;attach=174283;smf_version=2.0_RC5
Title: Re: Remove Reply Prefix
Post by: spiros on December 23, 2018, 02:53:38 AM
I have installed both this and this mod https://custom.simplemachines.org/mods/index.php?mod=3004 but I still get the Re: in search results.
Title: Re: Remove Reply Prefix
Post by: GigaWatt on December 24, 2018, 09:10:26 AM
That's probably from older threads, when the mod wasn't installed ;).