Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: D#S on September 08, 2011, 11:07:38 AM

Title: TopicRenamer
Post by: D#S on September 08, 2011, 11:07:38 AM
Ссылка на мод (https://custom.simplemachines.org/mods/index.php?mod=3167)

TopicRenamer

Author: D#S (http://simplemachines.org/community/index.php?action=profile;u=189535) (russian support: BIOHAZARD (http://www.simplemachines.ru/index.php?action=profile;u=7149))
Current Version: 2.2
Compatibility: SMF 2.0-2.0.1
Languages: (http://www.simplemachines.org/site_images/lang/russian.gif) (http://www.simplemachines.org/site_images/lang/croatian.gif) (http://www.simplemachines.org/site_images/lang/english.gif) (http://www.simplemachines.org/site_images/lang/italian.gif) (http://www.simplemachines.org/site_images/lang/polish.gif) (http://www.simplemachines.org/site_images/lang/serbian.gif)

Features
This mod allow you to rename all messages in topic by two clicks.

Installation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.

Useful Links
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

(https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif) (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQ7T7YU6MG8E2)



This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License (http://creativecommons.org/licenses/by-nc-nd/3.0/) (applies to all versions past and present).

(http://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-nd.png)
  • Attribution —  You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
  • Noncommercial —  You may not use this work for commercial purposes.
  • No Derivative Works —  You may not alter, transform, or build upon this work.



Changelog
Legend:
! = Bugfix
- = Removed
+ = New Feature
o = Update
> = New Language
^ = Initial/New Release

Code: [Select]
2011.09.22 - v. 2.2
> Croatian added.
> Serbian latin and cyrillic added.
o SMF 2.0.1 compatible.
2011.09.10 - v. 2.1
> Italian added.
> Polish added.
2011.08.14 - v. 2.0
o Hooks based installation.
2011.08.13 - v. 1.0
^ Initial release.
Title: Re: TopicRenamer
Post by: MotRude on September 08, 2011, 02:46:43 PM
All your Mods Are Great!
Title: Re: TopicRenamer
Post by: Kimmie on September 08, 2011, 04:10:02 PM
Nice mod. They need to make this a default feature within SMF


EDIT::  This mod does not show whether or not the executions will be "succesful" or if there are any "test failed". Do not know id that is a mod issue or an SMF issue as I have never had that happen before.

Also you might want to put a screenshot or two on your mod page showing how to use the mod. "2 clicks" isnt real descriptive. ;)


(http://i56.tinypic.com/2q9ylhx.png)


The xml file cannot be opened either. I think I will wait until someone else has installed it before I try it ;)
Title: Re: TopicRenamer
Post by: D#S on September 09, 2011, 05:12:34 AM
All your Mods Are Great!
tnx

EDIT::  This mod does not show whether or not the executions will be "succesful" or if there are any "test failed". Do not know id that is a mod issue or an SMF issue as I have never had that happen before.
not needed
after redirect to a theme you'll see it

Also you might want to put a screenshot or two on your mod page showing how to use the mod. "2 clicks" isnt real descriptive. ;)
it is, it is :о)

The xml file cannot be opened either. I think I will wait until someone else has installed it before I try it ;)
it is first public release, so mod was tested official smf moderators
Title: Re: TopicRenamer
Post by: bruce86 on September 09, 2011, 07:11:48 PM
Italian Translation..;)
Title: Re: TopicRenamer
Post by: Kimmie on September 09, 2011, 08:35:52 PM
Quote
EDIT::  This mod does not show whether or not the executions will be "succesful" or if there are any "test failed". Do not know id that is a mod issue or an SMF issue as I have never had that happen before. not needed
after redirect to a theme you'll see it


It most certainly is needed  lol. I need to know if the files will be installed successfully or if there are any fails and I need to make any manual edits. This is a given with "any" mod you install. Heavily modded forums need it most of all because chances are they will need to make manual edits to atleast their custom themes and quite possibly the default themes and we need to know what those files are that it is failing on and why.

Standard practice on any mod

Quote
The xml file cannot be opened either. I think I will wait until someone else has installed it before I try it ;)
it is first public release, so mod was tested official smf moderators

Doesnt matter, its an XML file and I should still be able to open it so I can see the code.
Title: Re: TopicRenamer
Post by: D#S on September 09, 2011, 09:48:00 PM
Italian Translation..;)
this is an italian or italian-utf8?
Title: Re: TopicRenamer
Post by: Adrek on September 10, 2011, 04:21:59 AM
and here you have polish and polish-utf8 translations ;)

A jeśli ktoś już zainstalował tą modyfikację tutaj (http://www.smf.pl/index.php/topic,8159.0.html) znajduje się wersja "instalacyjna" spolszczenia ;)
Title: Re: TopicRenamer
Post by: D#S on September 10, 2011, 05:08:32 AM
and here you have polish and polish-utf8 translations ;)
tnx
dziękuję :о)
Title: Re: TopicRenamer
Post by: bruce86 on September 11, 2011, 06:31:50 AM
Italian Translation..;)
this is an italian or italian-utf8?
In Italian and Italian-utf8..;)
Title: Re: TopicRenamer
Post by: D#S on September 11, 2011, 10:39:23 AM
In Italian and Italian-utf8..;)
tnx
grazie
Title: Re: TopicRenamer
Post by: Branko. on September 11, 2011, 12:07:25 PM
Serbian_latin,Serbian_cyrillic and Croatian, both...ISO/UTF-8
Title: Re: TopicRenamer
Post by: Doburpally on September 20, 2011, 05:27:02 PM
Nice mod ;)

However, the package needs to be updated for 2.0.1
   <install for="2.0 - 2.99.99">

   <uninstall for="2.0 - 2.99.99">

 ;)
Title: Re: TopicRenamer
Post by: D#S on September 22, 2011, 09:51:43 AM
Serbian_latin,Serbian_cyrillic and Croatian, both...ISO/UTF-8
tnx
хвала
Title: Re: TopicRenamer
Post by: jsx 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.
Title: Re: TopicRenamer
Post by: NekoJonez on February 22, 2014, 09:54:37 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.

Yeah, same issue here.
Title: Re: TopicRenamer
Post by: Kimmie on August 25, 2014, 03:35:06 PM
I need to get this mod removed, but I have a question. I installed this mod way back when we had an earlier version of SMF (before it was gold) so I don't have an "uninstall" option. I realize I have to do this all manually which is fine. I parsed the mod and it doesn't have any "find/replace" code. These are the only operations it carried out.


(http://i.imgur.com/guhHV58.png)



==================



(http://i.imgur.com/Grpl9kx.png)


Is it safe to assume all I have to do is delete these 3 files and it will be uninstalled or is there something else I need to do?


Thanks :)



Edit: Nevermind. I emulated the site to 2.0 and when that happened I had an "Install Mod" option there so I just clicked on delete files.

Sorry to bother you.  :P
Title: Re: TopicRenamer
Post by: Mstcool on August 25, 2014, 09:19:49 PM
You should upgrade to 2.0.8 because it fixes a lot of bugs and security issues. :p
Title: Re: TopicRenamer
Post by: Kimmie on August 25, 2014, 10:08:44 PM
You should upgrade to 2.0.8 because it fixes a lot of bugs and security issues. :p


I already have 2.0.8. This mod was installed way before 2.0.8 even came out and has never been updated for it. That is why I got rid of it. The mod no longer works.
Title: Re: TopicRenamer
Post by: Mstcool on August 25, 2014, 10:34:30 PM
Oh, ok.
Title: Re: TopicRenamer
Post by: BeatsMe on November 10, 2015, 01:41:34 AM
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.
Title: Re: TopicRenamer
Post by: br360 on November 10, 2015, 02:51:01 AM
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.
Title: Re: TopicRenamer
Post by: BeatsMe on November 10, 2015, 03:26:21 AM
Good to know it works on 2.1 too  ;)
Thanks for the reply.
Title: Re: TopicRenamer
Post by: Wellwisher on November 16, 2015, 03:00:09 AM
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.
Title: Re: TopicRenamer
Post by: Steve on November 16, 2015, 08:27:03 AM
Does it still do this?

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.
Title: Re: TopicRenamer
Post by: Wellwisher on November 16, 2015, 03:25:44 PM
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.
Title: Re: TopicRenamer
Post by: Steve on November 16, 2015, 05:17:33 PM
Thanks. :)
Title: Re: TopicRenamer
Post by: BeatsMe on November 26, 2015, 02:49:36 AM
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.

Does it still do this?

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.
Title: Re: TopicRenamer
Post by: Shambles on May 19, 2017, 03:35:41 AM
Quote from: ErrorLog
Only 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" => ''));
Title: Re: TopicRenamer
Post by: Shambles on July 11, 2021, 08:12:53 AM
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,
)
);
Title: Re: TopicRenamer
Post by: Steve on July 11, 2021, 09:08:49 AM
Nice. (https://i.imgur.com/Wm1mvsd.gif)