Remove Reply Prefix

Started by Aportadordelmix, October 06, 2009, 11:40:01 AM

Previous topic - Next topic

Arantor

It shouldn't do, no.

What errors did you get?
Holder of controversial views, all of which my own.



Arantor

Hmm, you're right they do appear unrelated.

Please attach your Sources/Subs-BoardIndex.php file here.
Holder of controversial views, all of which my own.



Arantor

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']);
Holder of controversial views, all of which my own.


Smog

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!  :)

Arantor

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.
Holder of controversial views, all of which my own.



Sordell Media

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

Arantor

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.
Holder of controversial views, all of which my own.


villasg

Installed but dont work for me .
Smf 1.1.10  Greek utf-8 is my Language
www.thai.gr is my forum

Any idea ?

Arantor

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)
Holder of controversial views, all of which my own.


villasg

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 "Απ : "

Arantor

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.
Holder of controversial views, all of which my own.


villasg

Ok i understund
Sorry and thanks for reply

Paul_Pauline

Excellent Mod !

Installed on 1.1.10 perfectly.

Thanks.
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

social

Good work friend. You are the best.
SMF v2.0RC2 ==>>Simple Portal v2.3.1
WWW.TUREDSOCIALPR.COM

Spuddy

I thought I'd let you know it works perfectly with SMF 1.1.11.

Many thanks, just what I was looking for.

Arantor

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)
Holder of controversial views, all of which my own.


7s-1k

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..
One Day, Two Many

Advertisement: