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/)
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>
Thanks for this! ;D
Swedish translation
$txt['changeallsubject'] = 'Ändra titel på alla inlägg i detta ämne';
thanks. useful mod
Will this work whit 2.x?
And if not, will it do in the future?
Not yet, but probably in the future.
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!
can someone explain how does it work?
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.
Does this work in 2.0 rc1?
No.
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:)
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.
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
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).
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';
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';
Hmm do my eyes deceive me or are the translations different?
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
Excuse me, can you provide a screenshot of this mod?
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.
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.
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.
Thanks, although language files go in the separate Language Pack
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.
For the admin, yes. They are superman :P
Try 1.1.1 which addresses your issue, holler back for help
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 ;)
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
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 ;)
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
3 days no feedback oO
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id'])
$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!)
Quote from: live627 on February 09, 2010, 12:21:50 PM
$context['can_changeallsubjects'] = ($ID_MEMBER_POSTER = $user_info['id'])
$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
The package is now officially updated and tthe parse error should be gone (it is on my test site!)
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!
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.
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';
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.
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
Do you get an error when modifying a topic?
No
only the errorlog message :-\
Sorry I will delete it from my SMF 2.0RC3.
There are too many errors from this mod. :'(
Hi live627! Do you update this mod for 2.0 RC3?
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!
Please, someone could update this mod to 2.0RC3??? It's a greatfull mod!!!
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
Some one? Sorry for FLOOD, but this MOD is really important to me.
thanks.
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 .
i don't understand this part...
Quoteemulate your package manager to SMF 2.0 RC2
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
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);
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
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?
@live627, in install20.xml find $ID_MEMBER_POSTER and replace with $id_member_poster (SMF 2!)...
Thank you for catching that!
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... :)
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?
Errr... what does that mean exactly? ::)
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:
Have you seen — http://www.simplemachines.org/community/index.php?topic=234633.msg2847036#msg2847036 ?
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
My error log is clear.
Error occurs when creating a new topic.
@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">< && 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>
update for smf 2.0 rc4. :(
@ bugo - could you take over this mod if the original author is not interested in updating this anymore :)
Maybe he is busy.
Quote from: Bugo on November 14, 2010, 08:52:09 AMLook at my fixed install20.xml:
and fixed install11.xml:
Thanks for the fix ;)
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 :)
New version is on the mod site that seems to have no errors.
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();
Post three lines above that.
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();
There's no semicolon after line 197
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? ::)
No, because I double-checked and it was there
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');
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']);
Can you attach your Post.php?
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?
Never mind, I've modified the package a bit so all subjects are changed by default, no more settings :)
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 :(
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
I installed this mod and the checkbox wasn't there. Weird. Was it tested on SM 2 RC5?
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.
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!
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.
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
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.
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
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.
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.
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?
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).
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.
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 ::)
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?
Try this one http://dev.live627.com/index.php?action=mods#65 Do the errors go away?
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. :-\
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.
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?
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>
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
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
You're right, something is wrong in Sources/Post.php
Will there be any support for this?
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!
Russian translation attached.
There is a small typo in the English file... I edited it out here.
"Change" was missing it's "N"
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...
EDIT: oops, forgot it was already reported
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
a fix is easy, but the interesting thing to have is the original mod updated by his author....(live627 where are you???)
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.
This is working fine on 1.1.17. Maybe there was something missing in the installation.
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?
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??
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.
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?
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.
Works great, thanks!
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
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
Is anyone working on this mod any more?
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.
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.)
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:
I'm half sick. So, I didn't pay attention to it :P
Update released
Fixed language issue and possible undefined index issue.
You forgot to update the change log.
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.
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?
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.
Aaron, here is a bug I currently have. I see the permission displayed TWICE.
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).
Sorry for the late reply, but I want to give the permission only to some people.
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 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.
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.
Which people do you want to have the permission? Admins? Who else?
global mods.
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.
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!
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'?
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!
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.
What a great mod, highly recommended! ;D
Glad you enjoy it!
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... ;) ).
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. ;)
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
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?
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
Can you attach your sources/managepermissions.php file
Here's mine.
If you were referring to this line of code:
'change_all_subjects' => array(true, 'topic', 'moderate'),
yep, it's showing only once.
Try changing this line
'change_all_subjects' => array(true, 'topic', 'moderate'),
To
'change_all_subjects' => array(false, 'topic', 'moderate'),
Yep, that did it :).
So, what was the problem, why setting the default value of the option to false remove the double permission entry?
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';
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" ???.
Are you using simple permissions?
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.
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
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)
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)
That's because the 'true' was changed to 'false' - that value is 'is this an own/any permission or not'...
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?
No, it just means the expected language strings for both modes aren't present.
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".
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';
Thanks for the code changes, Gigawatt. Works as expected on my end. ;D
I couldn't bother with keeping a backup of ManagePermissions.english.php, so I just modded the installer and installed it like that ;).
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.
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.
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 © <a href="http://www.smfhacks.com" target="_blank">SMFHacks.com</a>';
]]></add>
</operation>
</file>
@vbgamer45 Please put this translation in a modification.
Added thanks!
Also thank you.
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
Hello, will this plugin be updated for SMF 2.1?
When 2.1 final released probably.
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.
Just add the word "checked" to the input box within the template.
in Themes\default\Post.template.php
', $context['can_changeallsubjects'] ? '<li><label for="check_changeallsubject"><input type="checkbox" name="changeallsubject" id="check_changeallsubject" class="input_check" /> ' . $txt['changeallsubject'] . '</label></li>' : '', '
', $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.
@ Shambles: thanks, that did the job! 😀 👍
(and your 'Just add' made me smile, hard to 'Just add' if you don't have a clue... 😉).
I can't wait till you update this mod to work with SMF 2.2.1! I really like this mod!
Thank you!
@vbgamer45Is there a chance you will update this mod for SMF 2.1?
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.
Steve, thank you for informing me about this mod.
You're welcome. Like I said though, I kind of like the way this mod does it as well.
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.
Oops, forgot about that. Sorry
@Doug Heffernan and
@jsx.