Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: live627 on April 16, 2008, 11:31:17 PM

Title: Change All Subjects
Post by: live627 on April 16, 2008, 11:31:17 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=1165)

Change All Subjects


Original Author: [SiNaN] (http://www.simplemachines.org/community/index.php?action=profile;u=118168)
Previous Authors: live627 (http://www.simplemachines.org/community/index.php?action=profile;u=154736)
SMF Version: 2.0.X
Mod Version: 1.2

Description:
This modification adds an option to change the subjects of all messages in a topic. When the first message of a topic is being modified by a member that has suitable permissions, a checkbox for enabling the feature appears under the Additional Options.

It makes the subject of all replies equal to the first message's subject while preserving the response prefix.

It should work on any theme that uses the same base Profile template as the SMF core theme, for anything else you may have to do a theme edit, but it is a very small edit in the profile itself.

Changelog
    Version 1.2
       Taken over by Runic
       Removed 1.1 Support
    Version 1.1.2
        ! All errors should be fixed now
    Version 1.1.1
        Fixed permissions bug where checkbox would not appear with the correct permission set
    Version 1.1
        Added 2.0 RC1 and 2 support
        Added permissions
    Version 1.0
        Initial Release


Why Not Visit:
http://www.smfhacks.com (http://www.smfhacks.com/)
Title: Re: Change All Subjects
Post by: Apllicmz on April 17, 2008, 01:09:49 AM
thank nice work

translate portugues pt_PT/pt_BR

<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['changeallsubject'] = 'Mudar todos assunto';]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['changeallsubject'] = 'Mudar todos assunto';]]></add>
</operation>
Title: Re: Change All Subjects
Post by: Marcus Forsberg on April 21, 2008, 10:49:23 AM
Thanks for this!  ;D
Title: Re: Change All Subjects
Post by: Marcus Forsberg on April 28, 2008, 02:20:07 PM
Swedish translation

$txt['changeallsubject'] = '&Auml;ndra titel p&aring; alla inl&auml;gg i detta &auml;mne';
Title: Re: Change All Subjects
Post by: perro88 on April 28, 2008, 10:18:11 PM
thanks. useful mod
Title: Re: Change All Subjects
Post by: Marcus Forsberg on August 30, 2008, 04:52:23 AM
Will this work whit 2.x?

And if not, will it do in the future?
Title: Re: Change All Subjects
Post by: [SiNaN] on August 30, 2008, 04:57:35 AM
Not yet, but probably in the future.
Title: Re: Change All Subjects
Post by: Leemy on February 05, 2009, 04:03:15 PM
Quote from: Blue Dream on August 30, 2008, 04:57:35 AM
Not yet, but probably in the future.
2.0 RC1 is out; would love to include in my soon-to-be 2.0 forum. Please update :)

Awesome mod, should be standard!
Title: Re: Change All Subjects
Post by: vinston84 on February 21, 2009, 12:14:06 PM
can someone explain how does it work?
Title: Re: Change All Subjects
Post by: [SiNaN] on February 21, 2009, 12:54:40 PM
Edit the first post of a topic.
Expand the Additional Options in the post area.
You will see the option to Change All Subjects.
Check it and click "Save".

It should then change subjects of all posts in that topic as the subject of the first post.
Title: Re: Change All Subjects
Post by: Leemy on February 22, 2009, 02:36:38 AM
Does this work in 2.0 rc1?
Title: Re: Change All Subjects
Post by: [SiNaN] on February 22, 2009, 04:08:18 AM
No.
Title: Re: Change All Subjects
Post by: vinston84 on February 24, 2009, 08:10:40 AM
Quote from: Blue Dream on February 21, 2009, 12:54:40 PM
Edit the first post of a topic.
Expand the Additional Options in the post area.
You will see the option to Change All Subjects.
Check it and click "Save".

It should then change subjects of all posts in that topic as the subject of the first post.
Quote from: Blue Dream on February 21, 2009, 12:54:40 PM
Edit the first post of a topic.
Expand the Additional Options in the post area.
You will see the option to Change All Subjects.
Check it and click "Save".

It should then change subjects of all posts in that topic as the subject of the first post.

thank a lot:)
Title: Re: Change All Subjects
Post by: gunsite on May 16, 2009, 06:55:40 PM
Hi

Thanks for the mod.

Just a small problem.  I installed this on 1.1.7 and am using the Babylon theme, the check box appears in the post screen, but not the text next to it to identify the function, how can I corrct this?

Thanks.
Title: Re: Change All Subjects
Post by: Rattler on July 22, 2009, 11:27:06 AM
works great, just one small non functional error (typo) in the english modifications file (./Themes/default/languages/Modifications.english.php):


$txt['changeallsubject'] = 'Chage Subject of All';


should probably be:


$txt['changeallsubject'] = 'Change Subject of All';


Fixed it in my theme, but maybe you want to fix it overall.

Rattler
Title: Re: Change All Subjects
Post by: smokester on November 02, 2009, 05:17:28 PM
I have just upgraded my forum to 2.0 RC1.2 and this is one mod that I am really going to miss.  Are there any plans to get it working with versions 2x by manual installation at least? (I tried the manual installation given for this mod and my version but it is in error).
Title: Re: Change All Subjects
Post by: Eclipse16V on December 27, 2009, 05:39:29 PM
Nice Mod
Runs on 2.0RC2

Here the German Lang
// Change All Subjects MOD
$txt['changeallsubject'] = 'Alle Betreffe ändern';
$txt['permissionname_change_all_subjects'] = 'Alle Betreffe ändern';
$txt['permissionhelp_change_all_subjects'] = 'Erlaubt es dem User das er alle Betreffe in seinem Thema, auf den neuen Betreff seines ersten Beitrag-Betreffs ändert.';
$txt['permissionname_change_all_subjects_own'] = 'Eigener Beitrag';
$txt['permissionname_change_all_subjects_any'] = 'Alle Beiträge';
Title: Re: Change All Subjects
Post by: AK_CCM on January 06, 2010, 12:20:58 AM
A german translation too:

$txt['changeallsubject'] = 'Ändere den Betreff aller Beiträge dieses Themas';
$txt['permissionname_change_all_subjects'] = 'Ändere alle Betreffzeilen';
$txt['permissionhelp_change_all_subjects'] = 'Erlaubt dem Mitglied durch das Editieren des Betreffs im Initialbeitrag die Betreffzeilen eines Themas und sämtlichen Antworten zu ändern.';
$txt['permissionname_change_all_subjects_own'] = 'Eigenes Thema';
$txt['permissionname_change_all_subjects_any'] = 'Jedes Thema';
Title: Re: Change All Subjects
Post by: live627 on January 06, 2010, 12:25:37 AM
Hmm do my eyes deceive me or are the  translations different?
Title: Re: Change All Subjects
Post by: AK_CCM on January 06, 2010, 10:17:48 AM
Yes, the translations are different. I`ve tried to find phrases who sounds better in german language but means the same as your text. Especially the plural of "subject" in german sounds strange, but Eclipse16V was translating the word into "Betreffe" correct. This is the reason why I use "Betreffzeilen" which means "subject lines".

If you would like an exactly translation you should use this:

$txt['changeallsubject'] = 'Ändere alle Betreffe';
$txt['permissionname_change_all_subjects'] = 'Ändere alle Betreffe';
$txt['permissionhelp_change_all_subjects'] = 'Erlaubt dem Mitglied durch das Editieren des Betreffs im Initialbeitrag den Betreff eines Themas mit allen seinen Antworten festzulegen.'
$txt['permissionname_change_all_subjects_own'] = 'Eigenes Thema';
$txt['permissionname_change_all_subjects_any'] = 'Jedes Thema';


Sorry for the confusion.

Regards, Andreas
Title: Re: Change All Subjects
Post by: Max22 on January 09, 2010, 09:57:31 AM
Excuse me, can you provide a screenshot of this mod?
Title: Re: Change All Subjects
Post by: live627 on January 09, 2010, 05:25:21 PM
Quote from: [SiNaN] on February 21, 2009, 12:54:40 PM
Edit the first post of a topic.
Expand the Additional Options in the post area.
You will see the option to Change All Subjects.
Check it and click "Save".

It should then change subjects of all posts in that topic as the subject of the first post.
Title: Re: Change All Subjects
Post by: Max22 on January 12, 2010, 07:40:09 PM
I use SMF 1.1.11

There is a conflict with this mod:

http://custom.simplemachines.org/mods/index.php?mod=1554

1) If you try to install "Change All Subjects" mod after "Change of Poster" mod , you should note a failed Post.Template.php  in Packages section.

2) If you try to install "Change of Poster" mod after "Change All Subjects" mod, failed files are Post.Template.php and Subs-Post.php.

In my case, I installed "Change All Subjects" mod after "Change of Poster" mod (First case)

Please explain me how to edit install11.xml file accordingly, without errors.

Already tried, but with no success.

Thank you.
Title: Re: Change All Subjects
Post by: AnHELLuS on January 20, 2010, 01:55:08 PM
Welcome Friends.
Here is a translation into Polish.


$txt['changeallsubject'] = 'Zmień wszystkie tematy';
$txt['permissionname_change_all_subjects'] = 'Zmień wszystkie tematy';
$txt['permissionhelp_change_all_subjects'] = 'Zezwala użytkownikom na zmianę tematu wątku wraz z tematami wszystkich odpowiedzi po przez edycję tematu pierwszego postu wątku.';
$txt['permissionname_change_all_subjects_own'] = 'Własny temat';
$txt['permissionname_change_all_subjects_any'] = 'Każdy temat';


In the annex: the mod plus files in Polish in ISO-8859-2, and utf8.

Thank you for the mod and greet.
Title: Re: Change All Subjects
Post by: live627 on January 20, 2010, 02:32:17 PM
Thanks, although language files go in the separate Language Pack
Title: Re: Change All Subjects
Post by: maven on February 05, 2010, 06:03:40 PM
When I set the permission for the Global Moderators (Checkbox any post).
They dont get the checkbox when they change subject of a post at additional options.

For the admin it works like a charm.
Title: Re: Change All Subjects
Post by: live627 on February 06, 2010, 01:06:09 AM
For the admin, yes. They are superman :P

Try 1.1.1 which addresses your issue, holler back for help
Title: Re: Change All Subjects
Post by: maven on February 06, 2010, 04:30:49 AM
Quote from: live627 on February 06, 2010, 01:06:09 AM
Try 1.1.1 which addresses your issue, holler back for help

- Downloaded the 1.1.1. version
- Uninstalled 1.1.
- Deleted 1.1.

Result:

As it should be:
(http://www.edesigns.be/helppics/addonlist.png)

But not as it should be in admin/permissions?
(http://www.edesigns.be/helppics/checkboxes.png)
Checkboxes are still there.

Went on with procedure:
- Uploaded 1.1.1
- Installed
- Reset permission (saved it again & set global moderator again)

Now when I want to new thread/reply/modify this error appears:
(http://www.edesigns.be/helppics/error.png)
Even wit admin account.

When I uninstall the package the new thread/reply/modify is possible and working again.


Noot: I'm familiar with php&mysql but not with SMF & it's functions/variables.


New to the community ;)
Title: Re: Change All Subjects
Post by: Joker™ on February 06, 2010, 05:43:20 AM
im installed the package .... set the permissions also

but when i clicked on modify i got this error

Parse error: syntax error, unexpected T_VARIABLE in /home/content/f/r/e/freakyadmin/html/Sources/Post.php  on line 232
Title: Re: Change All Subjects
Post by: maven on February 06, 2010, 08:13:23 AM
Quote from: sid2varun on February 06, 2010, 05:43:20 AM
im installed the package .... set the permissions also

but when i clicked on modify i got this error

Parse error: syntax error, unexpected T_VARIABLE in /home/content/f/r/e/freakyadmin/html/Sources/Post.php  on line 232

Yep same problem  :(
See my screens above your post ;)
Title: Re: Change All Subjects
Post by: firehopper on February 06, 2010, 08:43:48 AM
Quote from: maven on February 06, 2010, 08:13:23 AM
Quote from: sid2varun on February 06, 2010, 05:43:20 AM
im installed the package .... set the permissions also

but when i clicked on modify i got this error

Parse error: syntax error, unexpected T_VARIABLE in /home/content/f/r/e/freakyadmin/html/Sources/Post.php  on line 232

Yep same problem  :(
See my screens above your post ;)

I'm also the same Prob at /Sources/Post.php  on line 232
Title: Re: Change All Subjects
Post by: maven on February 09, 2010, 04:55:14 AM
3 days no feedback oO
Title: Re: Change All Subjects
Post by: live627 on February 09, 2010, 12:21:50 PM
Code (Find) Select
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id'])

Code (Replace with) Select
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER == $user_info['id'])

I am still quite busy with other mods and life. Don't have time to redo the whole package though. Try that edit (just off the top of my head though and not properly tested!)
Title: Re: Change All Subjects
Post by: firehopper on February 10, 2010, 11:55:44 AM
Quote from: live627 on February 09, 2010, 12:21:50 PM
Code (Find) Select
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id'])

Code (Replace with) Select
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER == $user_info['id'])

I am still quite busy with other mods and life. Don't have time to redo the whole package though. Try that edit (just off the top of my head though and not properly tested!)

No effect, same Error
Title: Re: Change All Subjects
Post by: live627 on February 11, 2010, 02:13:26 PM
The package is now officially updated and tthe parse error should be gone (it is on my test site!)
Title: Re: Change All Subjects
Post by: firehopper on February 11, 2010, 03:01:57 PM
Quote from: live627 on February 11, 2010, 02:13:26 PM
The package is now officially updated and tthe parse error should be gone (it is on my test site!)

OK, done. Thanks good work!
Title: Re: Change All Subjects
Post by: Max22 on February 15, 2010, 06:41:56 PM
Quote from: Max22 on January 12, 2010, 07:40:09 PM
I use SMF 1.1.11

There is a conflict with this mod:

http://custom.simplemachines.org/mods/index.php?mod=1554

1) If you try to install "Change All Subjects" mod after "Change of Poster" mod , you should note a failed Post.Template.php  in Packages section.

2) If you try to install "Change of Poster" mod after "Change All Subjects" mod, failed files are Post.Template.php and Subs-Post.php.

In my case, I installed "Change All Subjects" mod after "Change of Poster" mod (First case)

Please explain me how to edit install11.xml file accordingly, without errors.

Already tried, but with no success.

Thank you.

Up.
Title: Re: Change All Subjects
Post by: Sirius OCTeam on February 16, 2010, 01:50:51 AM
Hi,
the French translation
$txt['changeallsubject'] = 'Changer tous les sujets';
$txt['permissionname_change_all_subjects'] = 'Changer tous les sujets';
$txt['permissionhelp_change_all_subjects'] = 'Permettre au membre de régler le sujet d\'un topic et toutes ses réponses en éditant le sujet du premier message.';
$txt['permissionname_change_all_subjects_own'] = 'Sujets personnels';
$txt['permissionname_change_all_subjects_any'] = 'Tous les sujets';
Title: Re: Change All Subjects
Post by: maven on February 16, 2010, 06:50:26 AM
Quote from: live627 on February 11, 2010, 02:13:26 PM
The package is now officially updated and tthe parse error should be gone (it is on my test site!)

Thnx!

$txt['changeallsubject'] = 'Verander alle tittels';
$txt['permissionname_change_all_subjects'] = 'Verander alle tittels;
$txt['permissionhelp_change_all_subjects'] = 'Geef toestemming aan het lid om aanpassing van de eerste tittel door te voeren bij alle antwoorden van het ondewerp.';
$txt['permissionname_change_all_subjects_own'] = 'Eigen onderwerpen';
$txt['permissionname_change_all_subjects_any'] = 'Alle onderwerpen';


Dutch translation if you want it.
Title: Re: Change All Subjects
Post by: Eclipse16V on February 26, 2010, 05:13:44 PM
Hi,
nice Mod but i have a error in my errorlogs:

see attachment

here the line
292:  $context['can_announce'] = allowedTo('announce_topic') && $context['becomes_approved'];
293: $context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);
294:
295: $context['is_new_topic'] = empty($topic);
296: $context['is_new_post'] = !isset($_REQUEST['msg']);
297: $context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $id_first_msg);
298:
299: $context['can_modify_any'] = allowedTo('modify_any');
==>300: $context['can_changeallsubjects'] = ($ID_MEMBER_POSTER == $user_info['id']) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
301: $context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post']);
302:
303: //
304: // Post Ratings BEGIN...
305: //


Thanks for help
Title: Re: Change All Subjects
Post by: live627 on February 26, 2010, 05:49:56 PM
Do you get an error when modifying a topic?
Title: Re: Change All Subjects
Post by: Eclipse16V on February 26, 2010, 06:06:42 PM
No
only the errorlog message  :-\
Title: Re: Change All Subjects
Post by: Eclipse16V on April 08, 2010, 05:24:51 PM
Sorry I will delete it from my SMF 2.0RC3.
There are too many errors from this mod.  :'(
Title: Re: Change All Subjects
Post by: grafitus on June 11, 2010, 08:59:57 AM
Hi live627! Do you update this mod for 2.0 RC3?
Title: Re: Change All Subjects
Post by: DarkflameQ on June 16, 2010, 11:30:50 AM
It's a shame there is no live support for this mod anymore, i'll attempt to make this compatible with RC3 myself, wish me luck!
Title: Re: Change All Subjects
Post by: alexleitte on July 06, 2010, 04:37:36 PM
Please, someone could update this mod to 2.0RC3??? It's a greatfull mod!!!
Title: Re: Change All Subjects
Post by: alexleitte on July 26, 2010, 12:48:57 PM
People,

I did parse to version 2.0 RC2 and applied in the archives of 2.0 RC3. I had some error reports but i don't see anything more serious in my forum, guess i can survive.

The errors that were recorded:

Undefined variable: txt
File: /.../Sources/Subs-Post.php
Line: 2452

Undefined variable: language
File: /.../Sources/Subs-Post.php
Line: 2451

Undefined variable: language
File: /.../Sources/Subs-Post.php
Line: 2447
Title: Re: Change All Subjects
Post by: alexleitte on August 27, 2010, 08:14:52 AM
Some one? Sorry for FLOOD, but this MOD is really important to me.
thanks.
Title: Re: Change All Subjects
Post by: Joker™ on August 27, 2010, 08:35:58 AM
For me it worked fine . Upload the package , emulate your package manager to SMF 2.0 RC2 , install the mod and it works perfectly . No errors for me even in error log .
Title: Re: Change All Subjects
Post by: alexleitte on August 31, 2010, 08:00:38 AM
i don't understand this part...

Quoteemulate your package manager to SMF 2.0 RC2
Title: Re: Change All Subjects
Post by: Joker™ on August 31, 2010, 08:02:39 AM
Quote from: alexleitte on August 31, 2010, 08:00:38 AM
i don't understand this part...

Quoteemulate your package manager to SMF 2.0 RC2
go to packages in admin panel . In bottom u have a option " Advance" , click it. This will be written in it
"SMF 2.0 RC3" , change it to
"SMF 2.0 RC2"

after installing the mod change it back to RC3
Title: Re: Change All Subjects
Post by: alexleitte on August 31, 2010, 08:16:20 AM
Really Thanks, my friend.
I had installed whit your metod. Now, i will look for erros.

YOU ARE MY HERO NOW!!! =)




Still showing errors in lines 2447, 2451 and 2452 in file: Sources/Subs-Post.php. I will continue using to see more erros in ERRORS LOGS.


2446: {
2447: if ($language === $user_info['language'])
2448: $context['response_prefix'] = $txt['response_prefix'];
2449: else
2450: {
2451: loadLanguage('index', $language, false);
Title: Re: Change All Subjects
Post by: Bugo on September 10, 2010, 10:23:12 AM
Quote from: Rattler on July 22, 2009, 11:27:06 AM
works great, just one small non functional error (typo) in the english modifications file (./Themes/default/languages/Modifications.english.php):


$txt['changeallsubject'] = 'Chage Subject of All';


should probably be:


$txt['changeallsubject'] = 'Change Subject of All';


Fixed it in my theme, but maybe you want to fix it overall.

Rattler
Up
Title: Re: Change All Subjects
Post by: FragaCampos on November 02, 2010, 11:18:21 PM
Hey there.
My post.template file is a bit different because it was modified by another mod. Is there anyone available to check how do i have to edit it?
Title: Re: Change All Subjects
Post by: Bugo on November 10, 2010, 03:07:47 PM
@live627, in install20.xml find $ID_MEMBER_POSTER and replace with $id_member_poster (SMF 2!)...
Title: Re: Change All Subjects
Post by: live627 on November 11, 2010, 12:47:28 AM
Thank you for catching that!
Title: Re: Change All Subjects
Post by: Bugo on November 11, 2010, 02:19:21 AM
Not at all.

Other errors: in install20.xml find block:
<operation>
<search position="before"><![CDATA[global $user_info, $modSettings, $smcFunc, $context]]></search>
<add><![CDATA[, $txt, $language;]]></add>
</operation>

and replace with:
<operation>
<search position="before"><![CDATA[global $user_info, $modSettings, $smcFunc, $context]]></search>
<add><![CDATA[, $txt, $language]]></add>
</operation>

because ";" is unnecessary...

And find line:
WHERE ID_TOPIC = {int:topicOptions}',
replace with:
WHERE id_topic = {int:topicOptions}',
because SMF 2 is using... :)
Title: Re: Change All Subjects
Post by: FragaCampos on November 13, 2010, 11:02:12 AM
Ok, i finally managed to install this without errors, but when i reply to some topic, i get the following error:

Parse error: syntax error, unexpected T_VARIABLE in Sources\Post.php on line 222

Anyone knows why this is happening?
Title: Re: Change All Subjects
Post by: Bugo on November 13, 2010, 11:26:57 AM
Quote from: FragaCampos on November 13, 2010, 11:02:12 AM
syntax error
Title: Re: Change All Subjects
Post by: FragaCampos on November 13, 2010, 08:42:34 PM
Errr... what does that mean exactly?  ::)
Title: Re: Change All Subjects
Post by: Joker002 on November 14, 2010, 02:36:42 AM
Thank you Bugo, but

Quote
8: Undefined variable: id_member_poster
File: /home/***/public_html/forum/Sources/Post.php
Line: 233

232: $context['can_modify_any'] = allowedTo('modify_any');
==>233: $context['can_changeallsubjects'] = ($id_member_poster == $user_info['id']) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
234: $context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post']);
235: $context['can_quote'] = empty($modSettings['disabledBBC']) || !in_array('quote', explode(',', $modSettings['disabledBBC']));
236:
Title: Re: Change All Subjects
Post by: Bugo on November 14, 2010, 02:42:50 AM
Have you seen — http://www.simplemachines.org/community/index.php?topic=234633.msg2847036#msg2847036 ?
Title: Re: Change All Subjects
Post by: Joker002 on November 14, 2010, 03:30:04 AM
Quote from: Bugo on November 14, 2010, 02:42:50 AM
Have you seen — http://www.simplemachines.org/community/index.php?topic=234633.msg2847036#msg2847036 ?
Уes.
This my install20.xml
Title: Re: Change All Subjects
Post by: Bugo on November 14, 2010, 04:03:18 AM
My error log is clear.
Title: Re: Change All Subjects
Post by: Joker002 on November 14, 2010, 07:29:33 AM
Error occurs when creating a new topic.
Title: Re: Change All Subjects
Post by: Bugo on November 14, 2010, 08:52:09 AM
@Joker222
Try replace
$context['can_changeallsubjects'] = ($id_member_poster == $user_info['id']) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
with
$context['can_changeallsubjects'] = $context['can_lock'] ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
P. S. Не забудь, что это всё надо в Notepad++ делать ;)

@live627
Look at my fixed install20.xml:
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>[SiNaN]:Change_All_Subjects</id>
<version>1.1.1</version>

<file name="$sourcedir/Post.php">
<operation>
<search position="before"><![CDATA[$context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);]]></search>
<add><![CDATA[

$context['is_new_topic'] = empty($topic);
$context['is_new_post'] = !isset($_REQUEST['msg']);
$context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $id_first_msg);

$context['can_modify_any'] = allowedTo('modify_any');
$context['can_changeallsubjects'] = $context['can_lock'] ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
$context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post']);]]></add>
</operation>
</file>

<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="after"><![CDATA[// Change the post.
$smcFunc['db_query']('', ']]></search>
<add><![CDATA[ //Change all subjects if wanted and subject set.
if (!empty($_POST['changeallsubject']) && isset($msgOptions['subject']))
{
// Get a response prefix (like 'Re:') in the default forum language.
if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix')))
{
if ($language === $user_info['language'])
$context['response_prefix'] = $txt['response_prefix'];
else
{
loadLanguage('index', $language, false);
$context['response_prefix'] = $txt['response_prefix'];
loadLanguage('index');
}
cache_put_data('response_prefix', $context['response_prefix'], 600);
}

//Add the prefix and do it.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET subject = {text:new_subject}
WHERE id_topic = {int:topicOptions}',
array(
'topicOptions' => $topicOptions['id'],
'new_subject' => $context['response_prefix'] . $msgOptions['subject'],
)
);
}

]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
function modifyPost(&$msgOptions, &$topicOptions, &$posterOptions)
{
global $user_info, $modSettings, $smcFunc, $context]]></search>
<add><![CDATA[, $txt, $language]]></add>
</operation>
</file>
<file name="$sourcedir/ManagePermissions.php">
<operation>
<search position="before"><![CDATA['modify_replies' => array(false, 'topic', 'moderate'),]]></search>
<add><![CDATA[//
'change_all_subjects' => array(true, 'topic', 'moderate'),
]]></add>
</operation>
</file>

</modification>

and fixed install11.xml:
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>[SiNaN]:Change_All_Subjects</id>
<version>1.1.1</version>
<file name="$sourcedir/Post.php">
<operation>
<search position="before"><![CDATA[ $context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);]]></search>
<add><![CDATA[
$context['can_modify_any'] = allowedTo('modify_any');
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $ID_MEMBER) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
$context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $ID_FIRST_MSG);]]></add>
</operation>
</file>
<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="after"><![CDATA[ // Change the post.
db_query("
UPDATE {$db_prefix}messages]]></search>
<add><![CDATA[ //Change all subjects if wanted and subject set.
if (!empty($_POST['changeallsubject']) && isset($msgOptions['subject']))
{
//Add the prefix and do it.
db_query("
UPDATE {$db_prefix}messages
SET subject = '$txt[response_prefix]$msgOptions[subject]'
WHERE ID_TOPIC = $topicOptions[id]", __FILE__, __LINE__);
}

]]></add>
</operation>
<operation>
<search position="before"><![CDATA[global $db_prefix, $user_info, $ID_MEMBER, $modSettings]]></search>
<add><![CDATA[, $txt]]></add>
</operation>
</file>
<file name="$sourcedir/ManagePermissions.php">
<operation>
<search position="before"><![CDATA['modify_replies' => false,]]></search>
<add><![CDATA[//
'change_all_subjects' => true,
]]></add>
</operation>
</file>
<file name="$themedir/Post.template.php">
<operation>
<search position="after"><![CDATA['
</table>
</div>
</td>
</tr>';]]></search>
<add><![CDATA[$context['can_changeallsubjects'] ? '
<tr>
<td class="smalltext"><label for="check_changeallsubject"><input type="checkbox" name="changeallsubject" id="changeallsubject" value="1" class="check" /> ' . $txt['changeallsubject'] . '</label></td>
<td class="smalltext"></td>
</tr>' : '', ]]></add>
</operation>
</file>
</modification>


Title: Re: Change All Subjects
Post by: Neo_TE on November 27, 2010, 08:34:00 AM
update for smf 2.0 rc4. :(

@ bugo - could you take over this mod if the original author is not interested in updating this anymore :)
Title: Re: Change All Subjects
Post by: Bugo on November 27, 2010, 08:34:47 AM
Maybe he is busy.
Title: Re: Change All Subjects
Post by: FragaCampos on November 29, 2010, 10:37:43 AM
Quote from: FragaCampos on November 13, 2010, 08:42:34 PM
Errr... what does that mean exactly?  ::)

Bump...
Title: Re: Change All Subjects
Post by: HunterP on December 07, 2010, 04:51:53 PM
Quote from: Bugo on November 14, 2010, 08:52:09 AMLook at my fixed install20.xml:
and fixed install11.xml:

Thanks for the fix ;)
Title: Re: Change All Subjects
Post by: Neo_TE on February 16, 2011, 11:14:44 AM
update for SMF 2.0 RC5. :(

@ bugo/other mod authors - could you take over this mod if the original author is not interested in updating this anymore :)
Title: Re: Change All Subjects
Post by: live627 on February 22, 2011, 01:31:09 PM
New version is on the mod site that seems to have no errors.
Title: Re: Change All Subjects
Post by: HunterP on February 22, 2011, 03:28:22 PM
Quote from: live627 on February 22, 2011, 01:31:09 PM
New version is on the mod site that seems to have no errors.

When posting, I get:

Parse error: syntax error, unexpected T_VARIABLE in Post.php on line 199

But line 199 seems to be the comment line below, which doesn't make any sense :

   // An array to hold all the attachments for this topic.
   $context['current_attachments'] = array();
Title: Re: Change All Subjects
Post by: live627 on February 22, 2011, 06:30:01 PM
Post three lines above that.
Title: Re: Change All Subjects
Post by: HunterP on February 23, 2011, 08:22:27 AM
Quote from: live627 on February 22, 2011, 06:30:01 PM
Post three lines above that.

A few more, to be sure :

// !!! These won't work if you're posting an event!
$context['can_notify'] = allowedTo('mark_any_notify');
$context['can_move'] = allowedTo('move_any');
$context['can_announce'] = allowedTo('announce_topic');
$context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);
$context['can_modify_any'] = allowedTo('modify_any');
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id']) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
$context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post'])

// An array to hold all the attachments for this topic.
$context['current_attachments'] = array();
Title: Re: Change All Subjects
Post by: live627 on February 23, 2011, 07:24:35 PM
There's no semicolon after line 197
Title: Re: Change All Subjects
Post by: HunterP on February 23, 2011, 09:26:29 PM
Quote from: live627 on February 23, 2011, 07:24:35 PM
There's no semicolon after line 197

Thanks! Did you correct it in the mod as well?  ::)
Title: Re: Change All Subjects
Post by: live627 on February 23, 2011, 10:23:24 PM
No, because I double-checked and it was there
Title: Re: Change All Subjects
Post by: HunterP on February 24, 2011, 09:01:49 AM
Quote from: live627 on February 23, 2011, 10:23:24 PM
No, because I double-checked and it was there

Weird, I can't recall making any manual changes....

Anyway, I'm getting a new error :

8: Undefined index: id
File: Post.php
Line: 195

$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id']) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
Title: Re: Change All Subjects
Post by: HunterP on February 24, 2011, 09:06:22 AM

Sorry, and another one :

8: Undefined index: is_first_post
File: Post.php
Line: 196

$context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post']);
Title: Re: Change All Subjects
Post by: live627 on February 24, 2011, 03:12:28 PM
Can you attach your Post.php?
Title: Re: Change All Subjects
Post by: HunterP on February 24, 2011, 07:34:41 PM
Quote from: live627 on February 24, 2011, 03:12:28 PM
Can you attach your Post.php?

Here you go!
Title: Re: Change All Subjects
Post by: HunterP on February 25, 2011, 09:23:43 AM

A bit stupid maybe, but I didn't actually test this MOD. It installed just as good as the previous version (which ofcourse was de-installed). I've just discovered that this checkbox isn't visible anymore?
Title: Re: Change All Subjects
Post by: HunterP on February 25, 2011, 09:59:03 AM

Never mind, I've modified the package a bit so all subjects are changed by default, no more settings :)
Title: Re: Change All Subjects
Post by: HunterP on February 25, 2011, 04:34:19 PM

Sorry, don't want to be annoying, but I have another question. I'd like to simplify this mod without permissions/settings, no checkbox, just allways change all subjects, but ONLY if we are modifying ID_FIRST_MSG, but I can't figure this out myself :(
Title: Re: Change All Subjects
Post by: Bugo on March 11, 2011, 05:15:53 AM
Quote from: Rattler on July 22, 2009, 11:27:06 AM
works great, just one small non functional error (typo) in the english modifications file (./Themes/default/languages/Modifications.english.php):


$txt['changeallsubject'] = 'Chage Subject of All';


should probably be:


$txt['changeallsubject'] = 'Change Subject of All';


Fixed it in my theme, but maybe you want to fix it overall.

Rattler
Bump
Title: Re: Change All Subjects
Post by: chep on April 10, 2011, 10:41:26 AM
I installed this mod and the checkbox wasn't there. Weird. Was it tested on SM 2 RC5?
Title: Re: Change All Subjects
Post by: chep on April 10, 2011, 11:29:11 AM
Ok, I found out my problem was related to permissions. The mod is there now that I have fixed permissions. It would be nice to fix the spelling on the mod.

Currently it states next to the checkbox: "chage all subjects"

Should be: "Change all subjects"


Very useful feature. Thank you. I mean that. This should be part of the core of SMF.
Title: Re: Change All Subjects
Post by: dougiefresh on June 15, 2011, 02:38:25 PM
Thank you for the wonderful mod!  I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods.  This mod installed without issues and without emulation.  Hope this info helps someone!
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 09:43:22 AM
Quote from: Max22 on January 12, 2010, 07:40:09 PM
I use SMF 1.1.11

There is a conflict with this mod:

http://custom.simplemachines.org/mods/index.php?mod=1554

1) If you try to install "Change All Subjects" mod after "Change of Poster" mod , you should note a failed Post.Template.php  in Packages section.

2) If you try to install "Change of Poster" mod after "Change All Subjects" mod, failed files are Post.Template.php and Subs-Post.php.

In my case, I installed "Change All Subjects" mod after "Change of Poster" mod (First case)

Please explain me how to edit install11.xml file accordingly, without errors.

Already tried, but with no success.

Thank you.

Up.
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 09:47:10 AM
Quote from: Max22 on June 18, 2011, 09:43:22 AM
1) If you try to install "Change All Subjects" mod after "Change of Poster" mod , you should note a failed Post.Template.php  in Packages section.

2) If you try to install "Change of Poster" mod after "Change All Subjects" mod, failed files are Post.Template.php and Subs-Post.php.

In my case, I installed "Change All Subjects" mod after "Change of Poster" mod (First case)

Please explain me how to edit install11.xml file accordingly, without errors.

Please upload your Post.Template.php
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 10:16:11 AM
Quote from: HunterP on June 18, 2011, 09:47:10 AM
Quote from: Max22 on June 18, 2011, 09:43:22 AM
1) If you try to install "Change All Subjects" mod after "Change of Poster" mod , you should note a failed Post.Template.php  in Packages section.

2) If you try to install "Change of Poster" mod after "Change All Subjects" mod, failed files are Post.Template.php and Subs-Post.php.

In my case, I installed "Change All Subjects" mod after "Change of Poster" mod (First case)

Please explain me how to edit install11.xml file accordingly, without errors.

Please upload your Post.Template.php

Done.

Attachment deleted.
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 12:43:54 PM

Ok, leave this mod as it is. Edit the other mod (change poster id).

1. Uninstall the Change Poster ID mod
2. Open Post_and_Change_as_Alternate_User.xml and change the Post.template part into :

<file name="$themedir/Post.template.php">
<operation>
<search position="replace"><![CDATA[ </tr>' : '', '
</table>
</div>
</td>
</tr>';]]></search>
<add><![CDATA[ </tr>' : '';
if (allowedto('reply_alternate'))
{
echo ' <tr>
<td class="smalltext"><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label></td>
<td class="smalltext"><label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></td>
          </tr>';
}
if ($context['user']['is_admin'] && isset($_REQUEST['msg']))
{
echo ' <tr>
<td class="smalltext"><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label></td>
<td class="smalltext"><label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></td>
</tr>';
}
echo '
</table>
</div>
</td>
</tr>';]]></add>
</operation>
</file>


3. Install this mod again
4. Install the Change All Subjects mod

I hate mods which don't alter the PHP-code in a correct way
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 02:03:03 PM
I followed your instructions, but I have another error message after installing 'Change All Subject' in step 4:

Parse error: syntax error, unexpected T_VARIABLE in Sources/Post.php on line 199

Attachment deleted.
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 02:54:56 PM
Quote from: Max22 on June 18, 2011, 02:03:03 PM
I followed your instructions, but I have another error message after installing 'Change All Subject' in step 4:

Parse error: syntax error, unexpected T_VARIABLE in Sources/Post.php on line 199

Did you reverse this step? I can't find any modified code at (or close to) line 199.
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 03:30:53 PM
Quote from: HunterP on June 18, 2011, 02:54:56 PM
Quote from: Max22 on June 18, 2011, 02:03:03 PM
I followed your instructions, but I have another error message after installing 'Change All Subject' in step 4:

Parse error: syntax error, unexpected T_VARIABLE in Sources/Post.php on line 199

Did you reverse this step? I can't find any modified code at (or close to) line 199.

This mod writes something to the DB?
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 03:32:33 PM
Quote from: Max22 on June 18, 2011, 03:30:53 PM
This mod writes something to the DB?

Yes, it adds a column to the message table in which the reason can be stored (if entered).
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 04:00:25 PM
Quote from: HunterP on June 18, 2011, 03:32:33 PM
Quote from: Max22 on June 18, 2011, 03:30:53 PM
This mod writes something to the DB?

Yes, it adds a column to the message table in which the reason can be stored (if entered).

I solved this error. It was an error related to this mod.

Simply, in Post.php there was no semicolon in the last line.

$context['can_modify_any'] = allowedTo('modify_any');
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id']) ? allowedTo(array('change_all_subjects_own', 'change_all_subjects_any')) : allowedTo('change_all_subjects_any');
$context['can_changeallsubjects'] = ($context['can_changeallsubjects'] && $context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post'])
 

It was some posts ago.
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 04:30:18 PM

Interesting, I seemed to have the same problem some months ago ;)

Quote from: HunterP on February 22, 2011, 03:28:22 PM
Parse error: syntax error, unexpected T_VARIABLE in Post.php on line 199

But line 199 seems to be the comment line below, which doesn't make any sense :

   // An array to hold all the attachments for this topic.
   $context['current_attachments'] = array();

But it's been a while, sorry  ::)
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 04:31:48 PM
Quote from: HunterP on June 18, 2011, 04:30:18 PM

Interesting, I seemed to have the same problem some months ago ;)

Quote from: HunterP on February 22, 2011, 03:28:22 PM
Parse error: syntax error, unexpected T_VARIABLE in Post.php on line 199

But line 199 seems to be the comment line below, which doesn't make any sense :

   // An array to hold all the attachments for this topic.
   $context['current_attachments'] = array();

But it's been a while, sorry  ::)

Now I'm having also these your "old" issues in the error log:
http://www.simplemachines.org/community/index.php?topic=234633.msg2966862#msg2966862
http://www.simplemachines.org/community/index.php?topic=234633.msg2966870#msg2966870

Have you solved them?
Title: Re: Change All Subjects
Post by: live627 on June 18, 2011, 04:35:05 PM
Try this one http://dev.live627.com/index.php?action=mods#65 Do the errors go away?
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 04:46:36 PM
Quote from: live627 on June 18, 2011, 04:35:05 PM
Try this one http://dev.live627.com/index.php?action=mods#65 Do the errors go away?

I can't download it, also as registered user I receive this error:
The download you are looking for is either not existing or is off limits to you.

EDIT: I downloaded Change_All_Subjects_1_1_3.zip from your server, the install11.xml is equal to my version.  :-\
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 04:55:20 PM
Quote from: Max22 on June 18, 2011, 04:31:48 PM
Now I'm having also these your "old" issues in the error log:
http://www.simplemachines.org/community/index.php?topic=234633.msg2966862#msg2966862
http://www.simplemachines.org/community/index.php?topic=234633.msg2966870#msg2966870

Have you solved them?

Can't recall anymore. At that time I was still using 1.1.13 and upgraded to SMF 2.0 (first RC5) a few months ago.

Also, I modded this mod for my own needs, on my forum it allways changes all subjects when the first posting is being modified.
Title: Re: Change All Subjects
Post by: Max22 on June 18, 2011, 05:09:04 PM
Quote from: HunterP on June 18, 2011, 04:55:20 PM
Quote from: Max22 on June 18, 2011, 04:31:48 PM
Now I'm having also these your "old" issues in the error log:
http://www.simplemachines.org/community/index.php?topic=234633.msg2966862#msg2966862
http://www.simplemachines.org/community/index.php?topic=234633.msg2966870#msg2966870

Have you solved them?

I modded this mod for my own needs, on my forum it allways changes all subjects when the first posting is being modified.

Would you like to share your custom mod here?
Title: Re: Change All Subjects
Post by: HunterP on June 18, 2011, 05:14:46 PM
Quote from: Max22 on June 18, 2011, 05:09:04 PM
Would you like to share your custom mod here?

For 1.1.x that will be :

<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="after"><![CDATA[ // Change the post.
db_query("
UPDATE {$db_prefix}messages]]></search>
<add><![CDATA[ // Check if this is the first message in the topic
$request = mysql_query("SELECT ID_FIRST_MSG FROM {$db_prefix}topics
WHERE ID_TOPIC=$topicOptions[id]") or database_error(__FILE__, __LINE__);
$row = mysql_fetch_array($request);
mysql_free_result($request);

// Change all subjects if subject set and if first message
if (isset($msgOptions['subject']) && ($row['ID_FIRST_MSG'] == $msgOptions['id']))
{
//Add the prefix and do it.
db_query("
UPDATE {$db_prefix}messages
SET subject = '$txt[response_prefix]$msgOptions[subject]'
WHERE ID_TOPIC = $topicOptions[id]", __FILE__, __LINE__);
}

]]></add>
</operation>
<operation>
<search position="before"><![CDATA[global $db_prefix, $user_info, $ID_MEMBER, $modSettings]]></search>
<add><![CDATA[, $txt]]></add>
</operation>
</file>

Title: Re: Change All Subjects
Post by: Branko. on August 12, 2011, 04:55:19 PM
Hello, live627!

Croatian translation
Croatian
$txt['changeallsubject'] = 'Promijeni sve naslove';
$txt['permissionname_change_all_subjects'] = 'Promijeni sve naslove';
$txt['permissionhelp_change_all_subjects'] = 'Dozvoli clanu da podesi naslov teme sa svim njenim odgovorima uredjivanjem naslova prvog posta teme.';
$txt['permissionname_change_all_subjects_own'] = 'Vlastita tema';
$txt['permissionname_change_all_subjects_any'] = 'Bilo koja tema';


Croatian UTF-8
$txt['changeallsubject'] = 'Promijeni sve naslove';
$txt['permissionname_change_all_subjects'] = 'Promijeni sve naslove';
$txt['permissionhelp_change_all_subjects'] = 'Dozvoli clanu da podesi naslov teme sa svim njenim odgovorima uredjivanjem naslova prvog posta teme.';
$txt['permissionname_change_all_subjects_own'] = 'Vlastita tema';
$txt['permissionname_change_all_subjects_any'] = 'Bilo koja tema';


And in english version, please, replace this:


$txt['changeallsubject'] = 'Chage all subjects'
with $txt['changeallsubject'] = 'Change all subjects'

Thanks for this excellent mod
Title: Re: Change All Subjects
Post by: Subject13 on August 27, 2011, 01:27:29 AM
Where do I download the one compatible with 1.1.14?

I get this error:

Parse error: syntax error, unexpected T_VARIABLE in /home/chronic/public_html/xenomorph-hive.net/forums/Sources/Post.php on line 199
Title: Re: Change All Subjects
Post by: Branko. on August 27, 2011, 08:15:58 AM
You're right, something is wrong in Sources/Post.php
Title: Re: Change All Subjects
Post by: Subject13 on August 27, 2011, 10:16:57 AM
Will there be any support for this?
Title: Re: Change All Subjects
Post by: Parenting-Furkids on September 09, 2011, 02:29:27 PM
Thanks for a GREAT mod! 

When modifying all subject lines of a thread.. the wording (in the drop-down menu) reads "Chage all subjects."  I see the error is in the english xml file, but I have no clue how to edit it.

Never mind.  Fixed it on my own.  YIPPEEEEE! 
Title: Re: Change All Subjects
Post by: MrCreatoR on February 17, 2012, 09:11:02 AM
Russian translation attached.
Title: Re: Change All Subjects
Post by: NekoJonez on March 21, 2012, 07:00:35 AM
There is a small typo in the English file... I edited it out here.
"Change" was missing it's "N"
Title: Re: Change All Subjects
Post by: GravuTrad on June 02, 2012, 08:21:32 AM
French Translation:

$txt['changeallsubject'] = 'Changer tous les titres';
$txt['permissionname_change_all_subjects'] = 'Changer tous les titres';
$txt['permissionhelp_change_all_subjects'] = 'Permet au membre de modifier le titre d'un sujet sur toutes ses réponses, en éditant le titre du premier message.';
$txt['permissionname_change_all_subjects_own'] = 'Propre sujet';
$txt['permissionname_change_all_subjects_any'] = 'Tous les sujets';


nb: there's missing one "n" in the first "change" in your mod page, live627...

and why this option isn't already integrated in smf? it's really a basic one for a forum...
Title: Re: Change All Subjects
Post by: Jessica. on June 02, 2012, 10:46:06 PM
EDIT: oops, forgot it was already reported
Title: Re: Change All Subjects
Post by: NekoJonez on June 19, 2012, 07:55:29 AM
Quote from: GravuTrad on June 02, 2012, 08:21:32 AM
nb: there's missing one "n" in the first "change" in your mod page, live627...

Quote from: JonezJeA on March 21, 2012, 07:00:35 AM
There is a small typo in the English file... I edited it out here.
"Change" was missing it's "N"

I posted a fix :P
Title: Re: Change All Subjects
Post by: GravuTrad on June 19, 2012, 05:36:49 PM
a fix is easy, but the interesting thing to have is the original mod updated by his author....(live627 where are you???)
Title: Re: Change All Subjects
Post by: MaryLouW on January 27, 2013, 12:48:59 AM
Unfortunately, this mod didn't work for me.  I am running 1.1.7 and decided to install it today.  All seemed to go well but I soon discovered that when I clicked on the reply button for any  given message, all I got was a blank white screen.  I quickly uninstalled it and that fixed the problem.  Just thought you should know.
Title: Re: Change All Subjects
Post by: FragaCampos on January 27, 2013, 12:37:43 PM
This is working fine on 1.1.17. Maybe there was something missing in the installation.
Title: Re: Change All Subjects
Post by: MaryLouW on January 27, 2013, 01:38:28 PM
according to the message, all went well on the installation.  Is there maybe something in the control panel settings that I might need to change?
Title: Re: Change All Subjects
Post by: MaryLouW on January 27, 2013, 07:55:17 PM
Okay, I removed, then reinstalled it and that part went okay but where do I find the box to put a checkmark that I want to change all the subjects??
Title: Re: Change All Subjects
Post by: FragaCampos on January 27, 2013, 08:20:19 PM
I don't remember the exact details (I think in Additional Options), because I exchanged this mod for this (http://custom.simplemachines.org/mods/index.php?mod=384) one. But I know it was working.
Title: Re: Change All Subjects
Post by: ApplianceJunk on February 03, 2013, 12:24:58 PM
If you stop using the mod will the subjects that had been changed with the mod revert back or are the changes to the subject permeant regardless of if the mod is still installed or not?
Title: Re: Change All Subjects
Post by: HunterP on February 03, 2013, 12:35:52 PM
Quote from: ApplianceJunk on February 03, 2013, 12:24:58 PM
If you stop using the mod will the subjects that had been changed with the mod revert back or are the changes to the subject permeant regardless of if the mod is still installed or not?

When using this mod, all entries in smf_messages for this topic will be changed permanently, there are no references to the old subject.
Title: Re: Change All Subjects
Post by: ApplianceJunk on February 03, 2013, 01:53:20 PM
Works great, thanks!
Title: Re: Change All Subjects
Post by: Ned.net on September 26, 2013, 10:08:02 AM
Hello,

I recently installed a forum using SMF 2.0.5, and wanted to use this mod that I find extremely useful for moderators (mainly to add "[SOLVED]" to all posts subject of a given thread, easing future research for solutions).
Yet I have a problem : it doesn't seem functionnal at all, it's option doesn't appear in the reply's additional options.
I noticed the permission wasn't set by default for global moderators, so I checked it, but no luck. And since  it isn't possible to edit administrator's permissions (which seems logical, they're supposed to have them all), I can't say if it is checked or not for them, but I can tell that even my forum's administrator can't "change all subjects" ...
I tried the "advanced" option in the package manager in order to fake using smf 2.04, but it didn't change anything at all neither.

Am I the only one to face this ? Could someone suggest a lead to a solution ?

TIA
Title: Re: Change All Subjects
Post by: Kimmie on October 28, 2013, 05:53:00 PM
Mod installed with no problems however I found two things.

1. Listing under Additional Options is wrong. It says Chage not Change  (not a big deal)

(http://img841.imageshack.us/img841/8577/1ttv.png)



2. It does not keep the "RE:" on the replies like it says it does,

"It makes the subject of all replies equal to the first message's subject while preserving the response prefix."


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


I am also getting errors when I change a thread

8: Undefined variable: txt /home/***/public_html/Sources/Subs-Post.php
Line: 2462

8: Undefined variable: language /home/*****/public_html/Sources/Subs-Post.php
Line: 2461

8: Undefined variable: language/home/*****/public_html/Sources/Subs-Post.php
Line: 2457
Title: Re: Change All Subjects
Post by: Kimmie on October 31, 2013, 12:45:00 AM
Is anyone working on this mod any more?
Title: Re: Change All Subjects
Post by: NekoJonez on January 31, 2014, 08:27:33 AM
Quote from: Kimmie on October 28, 2013, 05:53:00 PM
Mod installed with no problems however I found two things.

1. Listing under Additional Options is wrong. It says Chage not Change  (not a big deal)

(http://img841.imageshack.us/img841/8577/1ttv.png)



2. It does not keep the "RE:" on the replies like it says it does,

"It makes the subject of all replies equal to the first message's subject while preserving the response prefix."


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


I am also getting errors when I change a thread

8: Undefined variable: txt /home/***/public_html/Sources/Subs-Post.php
Line: 2462

8: Undefined variable: language /home/*****/public_html/Sources/Subs-Post.php
Line: 2461

8: Undefined variable: language/home/*****/public_html/Sources/Subs-Post.php
Line: 2457

Your first problem is easy to fix. It has to do with your language file IIRC.
Title: Re: Change All Subjects
Post by: NekoJonez on February 22, 2014, 09:59:56 AM
Fix for the bad language.

Before installing edit "English.xml" and look for ALL these  lines:

$txt['changeallsubject'] = 'Chage all subjects';

Replace them with:

$txt['changeallsubject'] = 'Change all subjects';

If already installed, change these lines in your Modifications.language.php (Languange being the language you installed this mod in.)
Title: Re: Change All Subjects
Post by: Shambles on February 22, 2014, 12:21:46 PM
Quote from: NekoJonez
... (Languange being the language you installed this mod in.)

Sorry for this quote, but your typo is quite ironic in the context of your post  :laugh:
Title: Re: Change All Subjects
Post by: NekoJonez on February 24, 2014, 08:21:26 AM
I'm half sick. So, I didn't pay attention to it :P
Title: Re: Change All Subjects
Post by: vbgamer45 on February 24, 2014, 11:10:19 AM
Update released
Fixed language issue and possible undefined index issue.
Title: Re: Change All Subjects
Post by: NekoJonez on February 25, 2014, 01:48:34 AM
You forgot to update the change log.
Title: Re: Change All Subjects
Post by: Aaron10 on July 29, 2014, 03:30:10 PM
Just installed on 2.0.8 and fixed both the subs-post.php errors and the missing Re: prefix. Please note I am using this (http://custom.simplemachines.org/mods/index.php?mod=2045) mod in addition.

First off, I'm making this a default setting, so I've only actually modded the 3 files: post.template.php, post.php and subs-post.php. I've been messing around with the code a LOT, so with these manual edits hopefully you can fix the errors too, this is what I have:

post.template.php:

Find:
approve_this_post'] . '</label></li>' : '', '

Add After:
', $context['can_changeallsubjects'] ? '<input type="hidden" name="changeallsubject" id="check_changeallsubject" value="1" /> ' : '', '

post.php:

Find:
$context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);

Add After:
$context['is_new_topic'] = empty($topic);
$context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $id_first_msg);
$context['can_changeallsubjects'] = $context['is_first_post'];


subs-post.php : Edit it like it is in the manual edits (I actually didn't bother with the second part though; , $txt, $language).

So yeah if you wanna try that, like I said it's not giving me any errors, the Re: is showing on all replies, and it works for all membergroups.

If the errors are still there for people I'll go through what I did again and try to replicate what I did, but this SHOULD work.
Title: Re: Change All Subjects
Post by: NekoJonez on July 31, 2014, 04:07:23 AM
Quote from: Aaron10 on July 29, 2014, 03:30:10 PM
Just installed on 2.0.8 and fixed both the subs-post.php errors and the missing Re: prefix. Please note I am using this (http://custom.simplemachines.org/mods/index.php?mod=2045) mod in addition.

First off, I'm making this a default setting, so I've only actually modded the 3 files: post.template.php, post.php and subs-post.php. I've been messing around with the code a LOT, so with these manual edits hopefully you can fix the errors too, this is what I have:

post.template.php:

Find:
approve_this_post'] . '</label></li>' : '', '

Add After:
', $context['can_changeallsubjects'] ? '<input type="hidden" name="changeallsubject" id="check_changeallsubject" value="1" /> ' : '', '

post.php:

Find:
$context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);

Add After:
$context['is_new_topic'] = empty($topic);
$context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $id_first_msg);
$context['can_changeallsubjects'] = true;


subs-post.php : Edit it like it is in the manual edits (I actually didn't bother with the second part though; , $txt, $language).

So yeah if you wanna try that, like I said it's not giving me any errors, the Re: is showing on all replies, and it works for all membergroups.

If the errors are still there for people I'll go through what I did again and try to replicate what I did, but this SHOULD work.

So, you need to install that other mod as well?
Title: Re: Change All Subjects
Post by: Aaron10 on July 31, 2014, 11:46:39 AM
I would recommend it until there's a fix for the following bug that I just noticed:

If you (as an admin) modify a reply (not quick modify), then save without changing the subject field, so it's saying "Re: blah blah", it will also change the original title to "Re: blah blah", then all replies will become "Re: Re: blah blah".

So using the disable subject change mod I previously mentioned, this will only happen if an admin edits their post, in which case just remember to remove "Re:" from the subject line so it's just "blah blah" like the OP, or just use quick modify and it won't happen.

Without the disable subject change mod, every member will constantly be adding "Re: Re: Re: Re" etc. to the subject title whenever they modify a post.

EDIT: Ok did a quick test and this issue actually affects any member that modifies their post (except in quick reply). Gonna try and fix this but in the meantime maybe ditching the Re: prefix in subs-post.php might be a good idea for now. Will report back with any progress.


Ok so pretty embarrasing that I was wasting time messing around trying to fix this in subs-post.php when it was a simply change within post.php

Find:
$context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);

Add After:
$context['is_new_topic'] = empty($topic);
$context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $id_first_msg);
$context['can_changeallsubjects'] = $context['is_first_post'];


Pretty ridiculous how I didn't just remember that I simply put $context['can_changeallsubjects'] = true; but oh well lol. So yeah, this should work without the disablesubjectrename mod, post back if it doesn't. For me this mod is now working as it should, no errors in error log, and a correct "Re:" prefix on all replies.

Will update my previous post with this change too.
Title: Re: Change All Subjects
Post by: NekoJonez on August 04, 2014, 11:48:31 AM
Aaron, here is a bug I currently have. I see the permission displayed TWICE.
Title: Re: Change All Subjects
Post by: Aaron10 on August 04, 2014, 09:01:11 PM
Are you trying to do it like me (forcing the option) or giving people the option to change all subjects? If it's the former, uninstall the mod then do the edits in the 3 files I show above. It works perfectly in 2.0.8 (and should in any version).
Title: Re: Change All Subjects
Post by: NekoJonez on August 17, 2014, 06:45:25 AM
Sorry for the late reply, but I want to give the permission only to some people.
Title: Re: Change All Subjects
Post by: Kimmie on August 25, 2014, 02:54:28 PM
Quote from: vbgamer45 on February 24, 2014, 11:10:19 AM
Update released
Fixed language issue and possible undefined index issue.


Did you fix the problem I reported above about it not keeping the "Re:" on the posts?
Title: Re: Change All Subjects
Post by: Aaron10 on August 26, 2014, 10:21:28 AM
Quote from: NekoJonez on August 17, 2014, 06:45:25 AM
Sorry for the late reply, but I want to give the permission only to some people.

Change this part:

$context['can_changeallsubjects'] = $context['is_first_post'];

is_admin etc. depends which people you want, if it's admin also I think you can do that as well as the OP anyway.

Quote from: vbgamer45 on February 24, 2014, 11:10:19 AM
Update released
Fixed language issue and possible undefined index issue.

Did you fix the problem I reported above about it not keeping the "Re:" on the posts?
[/quote]

I've provided a fix, see my replies above.
Title: Re: Change All Subjects
Post by: NekoJonez on August 31, 2014, 11:41:08 AM
Quote from: Aaron10 on August 26, 2014, 10:21:28 AM
Quote from: NekoJonez on August 17, 2014, 06:45:25 AM
Sorry for the late reply, but I want to give the permission only to some people.

Change this part:

$context['can_changeallsubjects'] = $context['is_first_post'];

is_admin etc. depends which people you want, if it's admin also I think you can do that as well as the OP anyway.


? Could you explain a bit more plz.
Title: Re: Change All Subjects
Post by: Aaron10 on September 02, 2014, 05:12:41 PM
Which people do you want to have the permission? Admins? Who else?
Title: Re: Change All Subjects
Post by: NekoJonez on September 03, 2014, 05:00:21 PM
global mods.
Title: Re: Change All Subjects
Post by: Aaron10 on September 10, 2014, 09:34:00 PM
Hmm I'm not sure how you would do that. As it is, anyone who's able to modify the first post can do it, so admins, super mods and the original poster. If you only want admins and super mods to modify it I think there's a setting in admin CP > permissions to disallow original posters editing the original post.
Title: Re: Change All Subjects
Post by: lemur21 on February 24, 2016, 01:24:43 PM
I had originally set up my forum almost 10 years ago, and didn't touch the forum since then. A slew of issues (outdated PHP, support from the webhost, etc.) required me to update to 2.0.11 -- and now I'm functionally rebuilding my site from scratch (structure-wise). I've certainly forgotten a LOT of what I learned back then.

So far, I've update the theme (to Blue Star) and began adding some mods in -- the first one was Change All Subjects (because it was first, alphabetically), and -- of course -- I cannot get it to work!

I went to the parse instructions for 2.0.11, and every change listed was actually taken care of, via the installed mod.

However, al the instructions refer to either  /Sources (which I assume is universal, regardless of the theme) or Themes/default (which means -- if I was using the default theme, perhaps the mod would be working)? But none refer to custom themes.

In fact, in the directory for the theme I have installed, none of those files (in this case, Post-Template.php and some language files) don't even exist. Does the custom theme "borrow" those files from the default?

Even more concerning, I reset the forum BACK to the "default" theme to see if the mod had taken effect there, and still nothing.

So, before I proceed much further, installing more mods ... I figured I'd get to the bottom of the matter.

Thanks for any help!
Title: Re: Change All Subjects
Post by: Steve on February 24, 2016, 03:41:39 PM
Just to be clear, when you modify the initial post of a thread, are you saying the checkbox to change all subjects doesn't appear under 'Attachments and other options'?
Title: Re: Change All Subjects
Post by: lemur21 on February 24, 2016, 04:41:15 PM
OK ... never mind :)

LOL - Apparently, in 10 years, I also forgot how to read!

I had thought this would change all subjects going forward (so, I could place a new reply, and I would be able to change previous subject lines as well).

Now that I see it - I see that's NOT what this does -- it's only the initial post.

On the positive side, apparently I have a LITTLE more idea of what I'm doing. On the negative side, I can't read and I like to waste people's time :)

Thanks!
Title: Re: Change All Subjects
Post by: Steve on February 24, 2016, 08:20:23 PM
No worries. It does change all the replies but only if the initial post is modified (as far as I know). As for what you want, check your PM.
Title: Re: Change All Subjects
Post by: Dwev on December 22, 2017, 04:26:01 AM
What a great mod, highly recommended! ;D
Title: Re: Change All Subjects
Post by: vbgamer45 on December 22, 2017, 09:18:09 AM
Glad you enjoy it!
Title: Re: Change All Subjects
Post by: Dwev on December 22, 2017, 11:14:55 AM
I was thinking of doing this through edits in the database. Doable, but not exactly the easiest way to do this.

This mod makes it two clicks away, much better!  :D

By the way: if possible, an option that this is the default behaviour would be even better (would save even those two click every time...   ;) ).
Title: Re: Change All Subjects
Post by: GravuTrad on December 22, 2017, 12:36:43 PM
This shouldn't be only a mod. I don't understand why this option isn't directly in smf itself, so logical option...

Thanks to maintain it VB. ;)
Title: Re: Change All Subjects
Post by: Dwev on December 22, 2017, 06:14:04 PM
I completely agree with GravuTrad, I find it very strange that this isn't the default behaviour.

And I also agree that it's great that this mod is maintained, many thanks from me as well!  :D
Title: Re: Change All Subjects
Post by: jack208 on July 01, 2018, 03:44:18 AM
Just installed this mod on ver 2.0.15. Works fine. and have to agreed with everyone here this is a great mod, and in fact should be included as part of SMF featureset. Anyway glad that vbgamer45 has done this to share with us.

I do have a small issue. After installing, I found that my SMF site (default theme) has two "Change all subjects" permission lines under the [Moderate the Board] section. I'd thought there should only be one? See attached pic.

The help text for both permission item is the same = "Allows the member to set the subject of a topic with all its replies by edditing the subject of the topic post."

It didn't seem to affect the functionality ie I tested the following
1) enabled both - checkbox shown
2) disabled both - obviously checkbox not shown
3) enabled first, disabled second - checkbox shown
4) disabled first, enabled second - checkbox shown
5) enabled first, denied second - checkbox still shown
6) denied first, enabled second - checkbox still shown

The mod was not installed twice. Has anyone got this issue?
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 09:05:16 AM
Quote from: jack208 on July 01, 2018, 03:44:18 AM
and have to agreed with everyone here this is a great mod, and in fact should be included as part of SMF featureset.

Would agree with this too ;).

Quote from: jack208 on July 01, 2018, 03:44:18 AM
Has anyone got this issue?

Hmmm... I do have this mod installed, but I'd have to check, although I don't think I had this problem.

Actually, you're right, I do have the same permission twice.

(https://s20.postimg.cc/snk8m24t9/SHOT8656.png)

These are the Global Moderators permissions. Let's see if the Local Moderators have the same double setting.

(https://s20.postimg.cc/qvr9r9vrx/SHOT8658.png)

Yep, the same permission is shown twice in the Local Moderators permissions too.

What other mods do you have installed? Here is list of mine.

1. Allow Access while in Maintenance Mode 1.2
2. Enhancements to purge inactive members 1.3.7
3. Recount Member Posts 1.1
4. No Download Attachment 1.0
5. PM Quick Reply 1.9
6. Slash through Banned Usernames 4.0
7. Yet Another YouTube BBCode Tag 4.9
8. Hide ip stuff for users 1.05
9. Avatars on Board/MessageIndex 2.0
10. Recent Forum Topics Boardindex 1.0
11. Change All Subjects 1.3
12. List Of Users In Forum/Board/Topic 3.0
13. Moderator and Administrator Comment Tags 1.9
14. Contact Page 4.5
15. Favicon 1.3
16. Search Sent PMs 2.7
Title: Re: Change All Subjects
Post by: vbgamer45 on July 01, 2018, 09:10:51 AM
Can you attach your sources/managepermissions.php file
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 09:29:43 AM
Here's mine.
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 09:31:54 AM
If you were referring to this line of code:

'change_all_subjects' => array(true, 'topic', 'moderate'),

yep, it's showing only once.
Title: Re: Change All Subjects
Post by: vbgamer45 on July 01, 2018, 09:32:11 AM
Try changing this line

'change_all_subjects' => array(true, 'topic', 'moderate'),

To

'change_all_subjects' => array(false, 'topic', 'moderate'),
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 09:37:43 AM
Yep, that did it :).

So, what was the problem, why setting the default value of the option to false remove the double permission entry?
Title: Re: Change All Subjects
Post by: vbgamer45 on July 01, 2018, 09:40:58 AM
Not sure i think you are in a different permission modes area normally you have two permissions one for own topic and for any

$txt['permissionname_change_all_subjects'] = 'Change all subjects';
$txt['permissionhelp_change_all_subjects'] = 'Allows the member to set the subject of a topic with all its replies by edditing the subject of the topic post.';
$txt['permissionname_change_all_subjects_own'] = 'Own topic';
$txt['permissionname_change_all_subjects_any'] = 'Any topic';
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 09:50:00 AM
Hmmm... so that mean that the regular members will have this option in their permissions, right?

Let me just check that.

Yep, they have it and it's unchecked, just as I'd like, but in the description, it states the following.

QuoteAllows the member to set the subject of a topic with all its replies by edditing the subject of the topic post.

It doesn't say "Own topic" ???.
Title: Re: Change All Subjects
Post by: vbgamer45 on July 01, 2018, 10:14:05 AM
Are you using simple permissions?
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 11:13:10 AM
Didn't know there were advanced permissions ???.

Do I need to have Advanced Profile Fields active to see the advanced permissions? If yes, then no, Advanced Profile Fields are disabled.
Title: Re: Change All Subjects
Post by: jack208 on July 01, 2018, 11:19:45 AM
Hi all, sorry late to the response. :)

Yup I checked and my managepermissions.php have the same line as mentioned above. Will make the change false/true and see if that removes the extra line. Also attaching the file here if anyone wants to browse thru the codes.

My board's just installed so not many mods installed but here's the list in case it helps for future diagnostic

1. Boilerplates for Posts v3.1
2. Change All Subjects v1.3
3. Default Avatar v2.3
4. Membergroup Signature Permissions v1.0
5. SMFPacks Mentions v2.0.3
6. Moderator and Administrator Comment Tags v1.9
7. Recent Forum Topics BoardIndex v1.0
8. Similar Topics v0.8
9. SMFPacks WYSIWYG Editor v3.0
Title: Re: Change All Subjects
Post by: Arantor on July 01, 2018, 12:39:28 PM
Quote from: GigaWatt on July 01, 2018, 11:13:10 AM
Didn't know there were advanced permissions ???.

Do I need to have Advanced Profile Fields active to see the advanced permissions? If yes, then no, Advanced Profile Fields are disabled.

No, there are two views to permissions, they do the exact same job but present them differently. You're using 'Simple' but many people use 'Classic' view here which presents the any/own better (IMO)
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 02:11:34 PM
Oh yeah, saw the switch now ;).

And you're right, the Classic view is better ;).

But even in classic view, it doesn't show the Own topics/Any topics additional option.

(https://s20.postimg.cc/vpxzsq8kt/SHOT8659.png)
Title: Re: Change All Subjects
Post by: Arantor on July 01, 2018, 02:27:33 PM
That's because the 'true' was changed to 'false' - that value is 'is this an own/any permission or not'...
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 03:03:53 PM
Yep, right as usual. Changed it back to "true" and the permissions are back to Own/Any topic in the Classic view ;).

(https://s20.postimg.cc/mn9ilsoa5/SHOT8660.png)

So, is this a bug? Should there be a switch in the mod for the Classic/Simple permissions view?
Title: Re: Change All Subjects
Post by: Arantor on July 01, 2018, 03:08:38 PM
No, it just means the expected language strings for both modes aren't present.
Title: Re: Change All Subjects
Post by: jack208 on July 01, 2018, 03:11:25 PM
I checked on my end and yeah in Classic View, it does differentiate between Own Topics and Any Topics permission. So it does seem we need two permission line items except the description in Simple View should be updated to indicate "own" and "any" topics.

The 2nd "Change All Subjects" permission line item is for "any topics".
Title: Re: Change All Subjects
Post by: GigaWatt on July 01, 2018, 03:38:56 PM
Solved it ;). This text should be added in the language files.

$txt['permissionname_simple_change_all_subjects_own'] = 'Change all subjects of a topic they started';
$txt['permissionname_simple_change_all_subjects_any'] = 'Change all subjects of any topic';
Title: Re: Change All Subjects
Post by: jack208 on July 02, 2018, 02:42:52 PM
Thanks for the code changes, Gigawatt. Works as expected on my end.  ;D
Title: Re: Change All Subjects
Post by: GigaWatt on July 02, 2018, 08:03:00 PM
I couldn't bother with keeping a backup of ManagePermissions.english.php, so I just modded the installer and installed it like that ;).
Title: Re: Change All Subjects
Post by: Dwev on September 01, 2018, 02:25:06 PM
Quote from: HunterP on February 25, 2011, 09:59:03 AM

Never mind, I've modified the package a bit so all subjects are changed by default, no more settings :)

Can anyone tell me how this can be done?

I have this mod installed and it works, but every time a subject is changed (and that's quite often) there are always extra clicks required.

Would love to have it set up so that it's always checked, or not needed at all anymore.
Title: Re: Change All Subjects
Post by: GigaWatt on September 05, 2018, 10:01:58 AM
Hmmm... I'm not a developer, but I think there was a PHP command/code to keep a tick box ticked by default without having to remeber this setting somewhere in the database. Someone who actually is a developer could shed some light on this, but you'd have to make the adequate code changes in the package installer, repack the mod, uninstall the previous version and install the modified one.
Title: Re: Change All Subjects
Post by: jsx on March 04, 2019, 01:31:11 PM
Polish translation UTF-8:

<file name="$languagedir/Modifications.polish-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['changeallsubject'] = 'Zmień wszystkie tematy.';
$txt['permissionname_change_all_subjects'] = 'Zmień wszystkie tematy';
$txt['permissionhelp_change_all_subjects'] = 'Ta opcja pozwala użytkownikowi zmienić nazwę tematu wraz z wszystkimi tematami odpowiedzi.';
$txt['permissionname_change_all_subjects_own'] = 'Własny temat';
$txt['permissionname_change_all_subjects_any'] = 'Każdy temat';
$txt['subjectcopy'] = 'Change All Subjects Mod &copy; <a href="http://www.smfhacks.com" target="_blank">SMFHacks.com</a>';
]]></add>
</operation>
</file>


@vbgamer45 Please put this translation in a modification.
Title: Re: Change All Subjects
Post by: vbgamer45 on March 04, 2019, 02:26:16 PM
Added thanks!
Title: Re: Change All Subjects
Post by: jsx on March 04, 2019, 03:39:33 PM
Also thank you.
Title: Re: Change All Subjects
Post by: SoftAid on January 08, 2020, 09:30:54 AM
Hi,

I think there is a fault in the "Manual Change All Subjects - Installatie instructies voor 2.0.15"

In the file \\Sources\Subs-Posts.php there is a "ad text" to do:

Find:
global $user_info, $modSettings, $smcFunc, $context
Ad after:
, $txt, $language


In the Subs_Posts.php-file there are 3 items with the name ""global $user_info, $modSettings, $smcFunc, $context; ""
And adding the "" , $txt, $language, $txt, $language "" gives an error on my site:

QuoteExpect ' or ;

Notice the ; at the end of the original frase. If you just AD the string to the original, you get:

global $user_info, $modSettings, $smcFunc, $context[b];, [/b]$txt, $language
I changed this in:

global $user_info, $modSettings, $smcFunc, $context, $txt, $language;
and all went well then.
I did this to the 3 strings. Hope I was right so....  :o

Thank you for your help!

And thank to every one who is involved in making such a great program.

SoftAid
Title: Re: Change All Subjects
Post by: smartmouse on March 03, 2020, 04:46:49 AM
Hello, will this plugin be updated for SMF 2.1?
Title: Re: Change All Subjects
Post by: vbgamer45 on March 03, 2020, 08:54:22 AM
When 2.1 final released probably.
Title: Re: Change All Subjects
Post by: Dwev on April 01, 2020, 09:20:39 AM
Since there's again some activity on this subject I'll try again for something that has been asked before in this thread: is it possible to make Change All Subjects-option on by default. I'm changing subject daily on our Apple forum (thanks to Apple's strange spelling of lots of their products), and it's a pity that you have to tick a box each time of you want to have the subject changed on all of the reactions as well.

So I'm looking for a solution that ticks the "Change all subjects"-box by default.
Title: Re: Change All Subjects
Post by: Shambles on April 01, 2020, 10:02:36 AM
Just add the word "checked" to the input box within the template.

in Themes\default\Post.template.php
Code (Find) Select
', $context['can_changeallsubjects'] ? '<li><label for="check_changeallsubject"><input type="checkbox" name="changeallsubject" id="check_changeallsubject" class="input_check" /> ' . $txt['changeallsubject'] . '</label></li>' : '', '

Code (Replace) Select
', $context['can_changeallsubjects'] ? '<li><label for="check_changeallsubject"><input type="checkbox" name="changeallsubject" id="check_changeallsubject" class="input_check" checked /> ' . $txt['changeallsubject'] . '</label></li>' : '', '

Untested, but should do the trick.
Title: Re: Change All Subjects
Post by: Dwev on April 02, 2020, 03:10:19 AM
@ Shambles: thanks, that did the job!   😀 👍

(and your 'Just add' made me smile, hard to 'Just add' if you don't have a clue...  😉).
Title: Re: Change All Subjects
Post by: Michael Vail on April 24, 2022, 11:24:07 PM
I can't wait till you update this mod to work with SMF 2.2.1! I really like this mod!

Thank you!
Title: Re: Change All Subjects
Post by: jsx on September 26, 2022, 06:15:13 AM
@vbgamer45

Is there a chance you will update this mod for SMF 2.1?
Title: Re: Change All Subjects
Post by: Steve on September 26, 2022, 08:42:45 AM
Until vbgamer gets to this: https://custom.simplemachines.org/index.php?mod=3167 works just fine on my 2.1.2 ...

I do like the idea of a checkmark in additional options to rename all the posts that this mod provides.
Title: Re: Change All Subjects
Post by: jsx on September 26, 2022, 09:50:56 AM
Steve, thank you for informing me about this mod.
Title: Re: Change All Subjects
Post by: Steve on September 26, 2022, 10:05:02 AM
You're welcome. Like I said though, I kind of like the way this mod does it as well.
Title: Re: Change All Subjects
Post by: Doug Heffernan on September 27, 2022, 10:06:05 AM
Quote from: Steve on September 26, 2022, 08:42:45 AMhttps://custom.simplemachines.org/index.php?mod=3167 works just fine on my 2.1.2

It will not work on a smf 2.1.x if downloaded and installed as it is. First the version number must be changed to reflect the 2.1., and a minor edit as well must be made, which is needed to surpress an error that it throws with 2.1.
Title: Re: Change All Subjects
Post by: Steve on September 27, 2022, 11:09:06 AM
Oops, forgot about that. Sorry @Doug Heffernan and @jsx.