Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: tyty1234 on August 06, 2009, 01:35:20 PM

Title: Disable Subject Change
Post by: tyty1234 on August 06, 2009, 01:35:20 PM
Disable Subject Change

Written by: tyty1234 (http://www.simplemachines.org/community/index.php?action=profile;u=159909)
Current Version: 2.0
Compatible With: SMF 2.0

Download (http://custom.simplemachines.org/mods/index.php?mod=2045)




Summary
This mod adds an option in the admin panel to disable the ability to change the subject of a topic when replying to that topic. This option can be accessed via Admin -> Forum -> Post and Topics.

Installation
This mod should be installed using the Package Manager. No manual edits should be necessary, but if it comes to that resort, please use the Package Parser (http://www.tytyweb.net/projects/smf/package-parser/).

Changelog
What's new in this version?
Released for SMF 2.0
Enabled subject changing for all moderators (board moderators, global moderators)
Slight change of code.
Dropped SMF 1.1.x compatibility. DO NOT use this version for SMF 1.1.x
Title: Re: Disable Subject Change
Post by: shadow82x on August 06, 2009, 01:54:34 PM
Nice mod TyTy. :)
Title: Re: Disable Subject Change
Post by: tyty1234 on August 06, 2009, 10:05:37 PM
Thanks Shadow!

I hope that most people will find it useful. :D
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 02:54:36 PM
getting error on install

QuoteExecute Modification     ./Themes/default/Post.template.php     Test failed

post.template.php does not have this bit of code your mod is looking for

</td>
</tr>
<tr>
<td align="right">
<b>', $txt[71], ':</b>


The one in my themes folder does not have it either ::)
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 09:12:55 PM
Have you tried installing the mod manually?
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 09:16:47 PM
I would .. but this bit of code that needs to be replaced is not in post.template

Quote</td>
                     </tr>
                     <tr>
                        <td align="right">
                           <b>', $txt[71], ':</b>
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 09:23:27 PM
Can you attach your Post.template.php file?
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 09:28:15 PM
Quote from: tyty1234 on September 07, 2009, 09:23:27 PM
Can you attach your Post.template.php file?

i have attached my theme's post.template ... but its also not found in the default themes post.template .. Im using SMF 1.1.10
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 09:48:46 PM
This is caused by another mod you have installed. Here are the changes you should make though.

Code (Find) Select

', $txt[70], ':
</td>
<td>


Code (Replace With) Select

', $txt[70], ':
</td>
<td>';


Code (Find) Select

<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="50" />


Code (Replace With) Select

// Disable Subject Change Mod.
if(isset($modSettings['disableSubjectChange']))
echo '
', $modSettings['disableSubjectChange'] ? !isset($context['num_replies']) ? '' : $context['subject'] == '' ? '' : $context['subject'] . '&nbsp;' : '', '<input type="', $modSettings['disableSubjectChange'] ? !isset($context['num_replies']) ? 'text' : 'hidden' : 'text', '" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />


Code (Find) Select

</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td>
<fieldset id="newstyleMI">
<legend><b>', $txt[71] ,':</b></legend>


Code (Replace With) Select

echo '
</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td>
<fieldset id="newstyleMI">
<legend><b>', $txt[71] ,':</b></legend>
Title: Re: Disable Subject Change
Post by: gbsothere on September 07, 2009, 09:58:40 PM
Thank you for this, tyty1234.  I'm tired of my posters taking advantage of my senility by changing the subject and messing with my head.  This'll fix 'em! 

:D

Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 09:59:20 PM
lol, your welcome gbsothere! :D
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 10:10:06 PM
it wont break my other mod ??
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 10:12:12 PM
If anything goes wrong, just let me know. It shouldn't break your other mod. What mod is that btw?
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 10:15:47 PM
Quote from: tyty1234 on September 07, 2009, 10:12:12 PM
If anything goes wrong, just let me know. It shouldn't break your other mod. What mod is that btw?

look like the new style message icon mod i have ...
http://custom.simplemachines.org/mods/index.php?mod=1447

I also changed the maxsubjectlength from 80 to 50 .. but that i can easily edit in your code
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 10:27:19 PM
question ... can the original poster edit the subject?
and can admin/mods still adjust subjects
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 10:28:51 PM
Quote from: aw06 on September 07, 2009, 10:27:19 PM
question ... can the original poster edit the subject?
and can admin/mods still adjust subjects
This has been addressed to me by someone else, as the mod prevents everyone from changing the subject line.
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 10:30:46 PM
Quote from: tyty1234 on September 07, 2009, 10:28:51 PM
Quote from: aw06 on September 07, 2009, 10:27:19 PM
question ... can the original poster edit the subject?
and can admin/mods still adjust subjects
This has been addressed to me by someone else, as the mod prevents everyone from changing the subject line.

wow .. this is not good  :-[ if that's the case this mod will slightly handicap things on my boards ...

Can you not make it so that it will only affect regular members ?
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 10:36:31 PM
I'll probably address that in the next release of the mod. :)
Right now, I am caught up with other things at the moment.
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 10:55:18 PM
Quote from: tyty1234 on September 07, 2009, 10:36:31 PM
I'll probably address that in the next release of the mod. :)
Right now, I am caught up with other things at the moment.

ok kool, keep us posted 8)
Title: Re: Disable Subject Change
Post by: tyty1234 on September 07, 2009, 10:58:23 PM
You can also receive updates from this mod by going here (http://custom.simplemachines.org/mods/index.php?mod=2045) and clicking on "Notify me of updates".
Title: Re: Disable Subject Change
Post by: aw06 on September 07, 2009, 11:21:00 PM
done .. i hope to see an update sometime in this quarter hehe
Title: Re: Disable Subject Change
Post by: aw06 on September 13, 2009, 08:29:51 PM
thanks for the update ... so admin can now edit the subjects ...

can the original topic starter edit as well ?
Title: Re: Disable Subject Change
Post by: tyty1234 on September 13, 2009, 09:00:52 PM
should be able to. If not, let me know. :)
Title: Re: Disable Subject Change
Post by: Smog on September 25, 2009, 05:57:53 PM
Installed Disable Subject Change v1.2 on SMF 2.0 RC1.2, admins can't change the subject...
Title: Re: Disable Subject Change
Post by: tyty1234 on September 26, 2009, 01:43:46 AM
Fixed in version 1.3 :)
Title: Re: Disable Subject Change
Post by: Smog on September 26, 2009, 03:55:49 AM
Quote from: tyty1234 on September 26, 2009, 01:43:46 AM
Fixed in version 1.3 :)
Txs for the fast action, all tests passed  :)
Title: Re: Disable Subject Change
Post by: aw06 on September 26, 2009, 09:40:56 AM
can original topic starters change subject as well ?
Title: Re: Disable Subject Change
Post by: tyty1234 on September 27, 2009, 08:26:58 PM
Quote from: aw06 on September 26, 2009, 09:40:56 AM
can original topic starters change subject as well ?

Original topic starters can only change the subject of the OP, thus, changing the subject for all replies that were added after the subject of the OP was changed.
Title: Re: Disable Subject Change
Post by: aw06 on September 27, 2009, 08:47:16 PM
Quote from: tyty1234 on September 27, 2009, 08:26:58 PM
Quote from: aw06 on September 26, 2009, 09:40:56 AM
can original topic starters change subject as well ?

Original topic starters can only change the subject of the OP, thus, changing the subject for all replies that were added after the subject of the OP was changed.

Niceee  8)
Title: Re: Disable Subject Change
Post by: aw06 on September 27, 2009, 09:07:55 PM
ok, i have new style message icon mod installed .. and its conflicting with this mod ... can you take a look at my post.template.php  ...

I installed version 1.3 and as admin it can't seem to edit the subjects ... i tried to edits you suggested to me on the first page of this thread, but it still does not work...
Title: Re: Disable Subject Change
Post by: aw06 on September 27, 2009, 09:51:28 PM
ahhh nevermind ... my mistake  :P was using code from old version ... get it sorted and error free now ..
Title: Re: Disable Subject Change
Post by: aw06 on September 27, 2009, 10:02:49 PM
Quote from: tyty1234 on September 27, 2009, 08:26:58 PM
Quote from: aw06 on September 26, 2009, 09:40:56 AM
can original topic starters change subject as well ?

Original topic starters can only change the subject of the OP, thus, changing the subject for all replies that were added after the subject of the OP was changed.

Hmmm, just tested this ... not the case  :-[ original topic starters CANT modify subject of the original post  :(

Cand everybody can edit via quick/inline edit
Title: Re: Disable Subject Change
Post by: tyty1234 on September 28, 2009, 02:49:56 AM
Quote from: aw06 on September 27, 2009, 10:02:49 PM
Quote from: tyty1234 on September 27, 2009, 08:26:58 PM
Quote from: aw06 on September 26, 2009, 09:40:56 AM
can original topic starters change subject as well ?

Original topic starters can only change the subject of the OP, thus, changing the subject for all replies that were added after the subject of the OP was changed.

Hmmm, just tested this ... not the case  :-[ original topic starters CANT modify subject of the original post  :(

Cand everybody can edit via quick/inline edit

Thanks for letting me know. I have released a new version that addresses these issues. :)
Title: Re: Disable Subject Change
Post by: aw06 on September 28, 2009, 08:36:09 AM
Quote from: tyty1234 on September 28, 2009, 02:49:56 AM
Quote from: aw06 on September 27, 2009, 10:02:49 PM
Quote from: tyty1234 on September 27, 2009, 08:26:58 PM
Quote from: aw06 on September 26, 2009, 09:40:56 AM
can original topic starters change subject as well ?

Original topic starters can only change the subject of the OP, thus, changing the subject for all replies that were added after the subject of the OP was changed.

Hmmm, just tested this ... not the case  :-[ original topic starters CANT modify subject of the original post  :(

Cand everybody can edit via quick/inline edit

Thanks for letting me know. I have released a new version that addresses these issues. :)

Wow .. thanks for the quick update ... do we un-install the 1.3 totally, or this new version will install and overwrite it ?

Are the new chanages only done in Post.template.php and Display.template.php ? can i just go ahead and add those edits manually while still under version 1.3 ?

****sniper edit****
Made changes to the files above .. all seems to be working and error free now ...  :P
Title: Re: Disable Subject Change
Post by: aw06 on September 28, 2009, 06:34:22 PM
Someone mad a reply to their own topic and this came up as the subject

%subject%

any ideas ??

......................

OK, i see what's happening, when a user uses the inlink/quick edit, when they hit save it changes the subject to %subject% :o

Seems to be related to this part of the codeing

Quotevar smf_template_subject_edit = \'', $modSettings['disableSubjectChange'] ? $context['user']['is_admin'] ? '' : '%subject%' . '&nbsp;' : '', '<input type="', $modSettings['disableSubjectChange'] ? $context['user']['is_admin'] ? 'text' : 'hidden' : 'text', '" name="subject" value="%subject%" size="60" style="width: 99%;"  maxlength="80" />\';

Title: Re: Disable Subject Change
Post by: aw06 on September 28, 2009, 08:05:45 PM
OK, as a fix i replaced

This Code
Quotevar smf_template_subject_edit = \'', $modSettings['disableSubjectChange'] ? $context['user']['is_admin'] ? '' : '%subject%' . '&nbsp;' : '', '<input type="', $modSettings['disableSubjectChange'] ? $context['user']['is_admin'] ? 'text' : 'hidden' : 'text', '" name="subject" value="%subject%" size="60" style="width: 99%;"  maxlength="80" />\';

With
Quotevar smf_template_subject_edit = \'', $modSettings['disableSubjectChange'] ? $context['user']['is_admin'] ? '' : '%subject%' . '&nbsp;' : '', '<input type="', $modSettings['disableSubjectChange'] ? $context['user']['is_admin'] ? 'text' : 'hidden' : 'text', '" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="60" style="width: 99%;"  maxlength="80" />\';

Error logs are clean ... but i don't know if this is the correct way to fix .. please advise ..
Title: Re: Disable Subject Change
Post by: tyty1234 on September 28, 2009, 11:31:47 PM
1. It's recommended you uninstall 1.3 before installing 1.4, that way, you don't need to make manual edits unless it was necessary.

2. %subject% is a JavaScript that is replaced using XML I believe. The reason why it's %subject%, is so it gets the subject of the message, not the subject of the topic. (e.g. If the subject of the message was Re: Disable Subject Change, %subject% will be replaced with the "Re: Disable Subject Change". However, if you used $context['subject'], then that will be replaced by "Disable Subject Change", which is what you don't want. I will however find a possible solution, so I will see what I can do with it.
Title: Re: Disable Subject Change
Post by: aw06 on September 28, 2009, 11:43:59 PM
Yup, you are right,,, i just notice what happens when i use the fix i did ..... It puts back the original first post subject ... and not a Re: Subject as you pointed out ...

Hoping you find a fix soon :)

how about trying $context['%subject%'] ???
Title: Re: Disable Subject Change
Post by: tyty1234 on September 29, 2009, 12:04:52 AM
$context['%subject%'] does not exist and therefore will not work.
Title: Re: Disable Subject Change
Post by: aw06 on September 29, 2009, 12:09:29 AM
Quote from: tyty1234 on September 29, 2009, 12:04:52 AM
$context['%subject%'] does not exist and therefore will not work.

8) ok .. figured as much ... will wait on your fix :)
Title: Re: Disable Subject Change
Post by: tyty1234 on September 29, 2009, 01:21:04 AM
The latest version (1.4.1) should now address those issues. :)
Title: Re: Disable Subject Change
Post by: aw06 on September 29, 2009, 01:26:19 AM
Quote from: tyty1234 on September 29, 2009, 01:21:04 AM
The latest version (1.4.1) should now address those issues. :)

Very Nice .... i see where you made it not hidden.. but read only  :P Super Nice

var smf_template_subject_edit = \'<input readonly="readonly" type="text" name="subject" value="%subject%" size="60" style="width: 99%;"  maxlength="80" />\';

Thats the only change you made to the mod right ?
Title: Re: Disable Subject Change
Post by: tyty1234 on September 29, 2009, 02:31:03 AM
That's correct. It should also allow admins to edit the subject via inline/quick editing, whilst everyone else cannot change the subject. :)
Title: Re: Disable Subject Change
Post by: aw06 on September 29, 2009, 07:40:04 AM
OK thanks 8) I'm still using version 1.3, I just did the edits manually as the only  changes are in my custom theme files...
Title: Re: Disable Subject Change
Post by: villasg on September 29, 2009, 10:55:59 AM
greek-utf8
$txt['disableSubjectChange'] = 'Απενεργοποίησε την αλλαγή τίτλου κατά την απάντηση στα θέματα';]
Title: Re: Disable Subject Change
Post by: flamechica on November 19, 2009, 03:54:51 AM
Will this be updated for RC2?
Title: Re: Disable Subject Change
Post by: tyty1234 on November 20, 2009, 03:03:15 PM
Yes it will. I will be working on it when I have the time. :)
Title: Re: Disable Subject Change
Post by: tyty1234 on November 25, 2009, 12:43:43 AM
Updated for RC2. Enjoy! ;D
Title: Re: Disable Subject Change
Post by: Amanda. on January 17, 2010, 03:27:26 PM
Does this also remove the annoying "Re:" prefix from the main index page when someone replies to a topic?
Title: Re: Disable Subject Change
Post by: tyty1234 on January 17, 2010, 05:24:54 PM
With this mod alone, no. You will need to install this mod (http://custom.simplemachines.org/mods/index.php?mod=2172) to remove the prefix. If you're asking if this mod will work with the remove reply prefix mod, it should. :)
Title: Re: Disable Subject Change
Post by: Amanda. on January 17, 2010, 06:27:27 PM
Thanks :)
Title: Re: Disable Subject Change
Post by: Eclipse16V on March 15, 2010, 02:22:30 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Disable Subject Change
Post by: tyty1234 on March 16, 2010, 03:50:50 PM
1.6 has been released for SMF 2.0 RC3!

I kept the 1.5 package up for users using SMF 1.1.x and SMF 2.0 RC2 since there were minor changes made in 1.6 that makes it different from 1.5, but keeping it working in the same way. In other words, there was a change to the RC3 template that I had to adapt to making it different from RC2.

An even shorter description, all users using SMF 1.1.x or SMF 2.0 RC2, please use version 1.5. All users using SMF 2.0 RC3, please use version 1.6. Thanks! :D
Title: Re: Disable Subject Change
Post by: ~DS~ on March 16, 2010, 04:57:40 PM
Nice, can you make it work for thread starter as well, we prefer having the staff editing the subjects on request rather than having members editing them.
Title: Re: Disable Subject Change
Post by: miftahx on August 09, 2010, 11:58:02 PM
tyty1234, thanks for the mod...

can you make that moderators able to modify the subject change as well? (other that admin)

Thanks
Title: Re: Disable Subject Change
Post by: GohighVoltage on November 05, 2010, 11:52:41 AM
Any Update to RC4?
Title: Re: Disable Subject Change
Post by: tyty1234 on December 13, 2010, 03:41:02 PM
Quote from: miftahx on August 09, 2010, 11:58:02 PM
tyty1234, thanks for the mod...

can you make that moderators able to modify the subject change as well? (other that admin)

Thanks

Will try to see if I can find the time to implement the permission in the next update :)

Quote from: GohighVoltage on November 05, 2010, 11:52:41 AM
Any Update to RC4?

I've been away from SMF for a very long time, so if I can find time some time this week, I will work on an update :)
Title: Re: Disable Subject Change
Post by: SamiBH on December 29, 2010, 11:04:06 AM
thank you the mod works great

I only have on problem

is some one writes reply

in topic forum list , last reply will not have any subject

like:
...................

Last post by soulwhite
in N/A
on Today at 06:28:38 PM

(http://img189.imageshack.us/img189/7499/32180536.jpg)
Title: Re: Disable Subject Change
Post by: gcoco on January 30, 2011, 05:50:19 PM
nice mod, exactly what i was looking for. any updates on rc4? maybe someone has modified it? i'd really like to use it!
Title: Re: Disable Subject Change
Post by: GohighVoltage on March 07, 2011, 09:11:23 AM
Any update to RC5?
Title: Re: Disable Subject Change
Post by: NHWD on April 17, 2011, 07:22:12 AM
Quote from: GohighVoltage on March 07, 2011, 09:11:23 AM
Any update to RC5?
Title: Re: Disable Subject Change
Post by: RML on June 01, 2011, 12:41:28 PM
Quote from: GohighVoltage on March 07, 2011, 09:11:23 AM
Any update to RC5?
Title: Re: Disable Subject Change
Post by: tyty1234 on June 16, 2011, 06:03:47 AM
Hey guys,

I want to apologize for not updating the mod periodically and addressing your errors. I've been real busy and it's been so long since I coded for SMF, but with the release of SMF 2.0, the mod will need to be updated. Before I do that however, if you guys would go here (http://www.tytyweb.net/forum/mod-support/disable-subject-change/) to report some bugs or errors that you found in the mod so that I can fix those bugs and errors and the next version of this mod can be bug-free and is working smoothly. I promise that I will do my best to update and fix the mod in a timely manner as I have a little free time on my hands.

Thanks,
tyty1234
Title: Re: Disable Subject Change
Post by: tyty1234 on June 23, 2011, 07:29:35 PM
Version 2.0 has been released! It supports SMF 2.0, but no longer supports SMF 1.1.x forums. Please refer to the OP for what's new in this version. This mod, along with the other mods that I wrote are also available on my site (http://www.tytyweb.net/forum/mod-support/).
Title: Re: Disable Subject Change
Post by: wwwserfer on October 03, 2011, 07:37:50 AM
Hi!

Is it possible modify code for SMF 1.1.15:

Quote from: miftahx on August 09, 2010, 11:58:02 PM

...that moderators able to modify the subject change as well? (other that admin)


my test  :D Construction:

............$context['is_first_post'] || $context['subject'] == '' || $context['user']['is_admin'] || $context['user']['is_mod'] ? '' :................

does not work :-\

Thanks!

=========================
SOLVED
Title: Re: Disable Subject Change
Post by: tyty1234 on October 03, 2011, 03:43:14 PM
As of version 2.0 of this mod, I do not provide support for SMF 1.1.x as version 2.0 is not compatible with SMF 1.1.x. Version 1.6 is however compatible with SMF 1.1.x,  but you are to use it at your own risk.
Title: Re: Disable Subject Change
Post by: tyty1234 on December 13, 2011, 12:51:08 PM
Hi Fernando,

That's odd...it should say "RE: Topic Subject" for every reply to a topic. It could be something I missed in the coding...I'll take a look as soon as I can. Thanks for reporting.

Regards,
tyty1234
Title: Re: Disable Subject Change
Post by: Fernando Rocker on December 13, 2011, 12:58:21 PM
Oh... you see. I haven't installed your mod yet.

I installed another mod to remove the RE: prefix.

Could you please take a lot to this thread I just created and see if you can help me? I would really appreciate that. It's the only thing I want to do before launching my forum. Thanks!

http://www.simplemachines.org/community/index.php?topic=462282.0
Title: Re: Disable Subject Change
Post by: tyty1234 on December 13, 2011, 01:24:16 PM
It looks like a Support Specialist is already helping you on your matter. Coordinate with him as he tries to help you out with your situation. :)
Title: Re: Disable Subject Change
Post by: Fernando Rocker on December 13, 2011, 01:39:50 PM
=)
Title: Re: Disable Subject Change
Post by: Fernando Rocker on December 13, 2011, 02:21:46 PM
No luck... could you help me, please?

=)
Title: Re: Disable Subject Change
Post by: tyty1234 on December 13, 2011, 02:24:55 PM
He's asking for your Display.template.php file that is found in the Themes folder for that theme you are using. If you attach it to your reply, he will be able to manually edit the file for you and make changes to your liking.
Title: Re: Disable Subject Change
Post by: Fernando Rocker on December 13, 2011, 03:39:17 PM
I see!

Thanks for your response. I'm such a newbie.

=)
Title: Re: Disable Subject Change
Post by: Fernando Rocker on December 13, 2011, 06:25:43 PM
Well... the problem I had was solved.

But I want to use this mod too. Is there a way to install this mod in SMF 2.0.1?
Title: Re: Disable Subject Change
Post by: Owdy on March 14, 2012, 12:52:56 PM
Does this work in wap2 mode?
Title: Re: Disable Subject Change
Post by: TomW on November 02, 2012, 10:11:52 AM
Nice mod !  And it works for 2.0.2.
Title: Re: Disable Subject Change
Post by: DeroZ on October 19, 2013, 06:48:37 PM
i successfully installed and check option on "admin > Post and Topics > Post settings", and don't work in any theme

my forum is 2.0.4

Title: Re: Disable Subject Change
Post by: Aaron10 on August 17, 2014, 12:04:38 PM
This breaks quick reply:

// Disable Subject Change Mod.
if (isset($modSettings['disableSubjectChange']))
{
// Check for admin, moderator and first post. Show subject textbox, otherwise, we just won't have it.
if ($modSettings['disableSubjectChange'] == 0 || ($context['user']['is_admin'] || $context['user']['can_mod']))
echo '
sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',';
}


How can I fix it? This is the closest I've gotten but don't want the blanked out input field, just display like a regular link like in post.template:

// Check for admin, moderator and first post. Show subject textbox, otherwise, we just won't have it.
if ($context['is_first_post'] || $context['user']['is_admin'] || $context['user']['can_mod'])
echo '
sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',';
}
echo '
sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" disabled />'), ',


EDIT: Well this works but as you click quick edit the subject disappears but it saves fine and the Re: subject comes back after saving.

// Check for admin, moderator and first post. Show subject textbox, otherwise, we just won't have it.
if ($context['is_first_post'] || $context['user']['is_admin'] || $context['user']['can_mod'])
echo '
sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',';
}
echo '
sTemplateSubjectEdit: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow"></a><input type="hidden" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" disabled />'), ',
sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;'), ',
sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
});


Not sure what to put within the anchor

<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow"></a>

Have tried %subject% but that will change it to %subject% on saving. Also tried ', $message['subject'], ' but no luck.
Title: Re: Disable Subject Change
Post by: SirLouen on February 01, 2017, 08:28:41 AM
It would be great to have it updated for latest SMF versions.

I don't know why SMF does not support this by default.
Title: Re: Disable Subject Change
Post by: Steve on February 01, 2017, 08:38:36 AM
Quote from: SirLouen on February 01, 2017, 08:28:41 AMI don't know why SMF does not support this by default.

Probably because in the four years or so I've been coming here you're the first person I remember asking for such a feature. Just a guess on my part though.

I use this mod which has become one of my top two or three favorites: http://custom.simplemachines.org/mods/index.php?mod=3167

While it doesn't do want you want until or unless this one is updated, it does allow you to change the subject title of all posts in two clicks.
Title: Re: Disable Subject Change
Post by: Dwev on January 11, 2018, 04:17:42 AM
Quote from: SirLouen on February 01, 2017, 08:28:41 AM
It would be great to have it updated for latest SMF versions.

I don't know why SMF does not support this by default.

I second this, would be great if it would be a setting in SMF itself to change all topics for admins/mods and lock it for users.

And it's a pity that this mod doesn't work anymore, it doesn't parse for 2.0.15 at all.
Title: Re: Disable Subject Change
Post by: Steve on January 11, 2018, 10:09:05 AM
Not parsing doesn't mean it won't work. And there's always emulation.
Title: Re: Disable Subject Change
Post by: Dwev on January 21, 2018, 10:08:29 AM
@ Steve: you were absolutely right.

Just installed it on 2.0.15 with emulation for 2.0 and it works as advertised.

'Normal' members now see the subject, but without an option to edit it.
Exactly what I wanted!