• Welcome to Simple Machines Community Forum. Please login or sign up.
September 20, 2021, 09:49:35 PM

News:

Check out the SMF Function DB!


TopicRenamer

Started by D#S, September 08, 2011, 11:07:38 AM

Previous topic - Next topic

BeatsMe

Just wondering if this mod is still supported by the developer, and if it works under 2.0.11 ???

Failing that is another mod that does the same.

br360

The mod author may not be around, but this mod works just fine on 2.0.11. It's using hooks so it's even working on my 2.1 test site with no issues as well.

BeatsMe

Good to know it works on 2.1 too  ;)
Thanks for the reply.

Wellwisher

This is a great mod works with 2.0.11 so easy to use, smf should apply this to their main SMF release. I love this mod it was suggested to me by br360. So easy and simple to use, it's sexy man.

Steve

Does it still do this?

Quote from: jsgrom on January 25, 2014, 11:49:22 AM
TopicRenamer is not only changing the title of the topic, but also removing the Re: (reply) why this is happening? It can't be this way, that this modification remove "Re:" from title of topic from reply. Author by this modification why is happen this way?

Your modification should change title of topic, without remove Re:

Perhaps somebody is able to correct this topicrenamer modification? I think that the author this modification didn't offend for this.
Please do not PM me for support.

Wellwisher

Steve'o works on 2.0.11 beautifully 100%. Tested on local and now running this on production. I also heard it works on 2.1.

Steve

Please do not PM me for support.

BeatsMe

Just installed this mod on my test forum.... strips the "Re:" from all the replies when you do the rename :(

Not the way I would want a rename mod to work.

Quote from: Steve on November 16, 2015, 08:27:03 AM
Does it still do this?

Quote from: jsgrom on January 25, 2014, 11:49:22 AM
TopicRenamer is not only changing the title of the topic, but also removing the Re: (reply) why this is happening? It can't be this way, that this modification remove "Re:" from title of topic from reply. Author by this modification why is happen this way?

Your modification should change title of topic, without remove Re:

Perhaps somebody is able to correct this topicrenamer modification? I think that the author this modification didn't offend for this.

Shambles

Quote from: ErrorLogOnly variables should be passed by reference

To avoid the warning message when using PHP7.1...

Sources/TopicRenamer.php
Code (Find) Select
// Stripslashes and htmlspecialchars
$context['currentSubject'] = strtr(censorText($smcFunc['db_unescape_string']($currentSubject)), array("\r" => '', "\n" => '', "\t" => ''));


Code (Replace with) Select
// Stripslashes and htmlspecialchars
$tempText = $smcFunc['db_unescape_string']($currentSubject);
$context['currentSubject'] = strtr(censorText($tempText), array("\r" => '', "\n" => '', "\t" => ''));

Shambles

To anyone who is annoyed that messages subordinate to the opening message lose the "RE:" prefix, please find a fix below.

Sources/TopicRenamer.php

Code (find) Select


// Do the dew.
$update = $smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET subject = {string:subject}
WHERE id_topic = {int:topic}',
array(
'subject' => $_POST['subject'],
'topic' => $ID_TOPIC,
)
);


Code (Upgrade to) Select


// Do the dew.
$update = $smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET subject = {string:subject}
WHERE id_topic = {int:topic}
LIMIT 1',
array(
'subject' => $_POST['subject'],
'topic' => $ID_TOPIC,
)
);

$REsubject = 'RE: ' . $_POST['subject'];

// Update subordinate messages.

$update = $smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET subject = {string:REsubject}
WHERE id_topic = {int:topic}
AND subject != {string:newsubject}',
array(
'newsubject' => $_POST['subject'],
'REsubject' => $REsubject,
'topic' => $ID_TOPIC,
)
);

Steve

Please do not PM me for support.

Advertisement: