News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Disable Subject Change

Started by tyty1234, August 06, 2009, 01:35:20 PM

Previous topic - Next topic

tyty1234

Disable Subject Change

Written by: tyty1234
Current Version: 2.0
Compatible With: SMF 2.0

Download




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.

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
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

shadow82x

Colin B
Former Spammer, Customize, & Support Team Member

tyty1234

Thanks Shadow!

I hope that most people will find it useful. :D
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

#3
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 ::)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

Have you tried installing the mod manually?
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

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>
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

Can you attach your Post.template.php file?
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

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
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

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>
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

gbsothere

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

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

tyty1234

My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

If anything goes wrong, just let me know. It shouldn't break your other mod. What mod is that btw?
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

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
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

question ... can the original poster edit the subject?
and can admin/mods still adjust subjects
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

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.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

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 ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

I'll probably address that in the next release of the mod. :)
Right now, I am caught up with other things at the moment.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

aw06

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)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

tyty1234

You can also receive updates from this mod by going here and clicking on "Notify me of updates".
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Advertisement: