Advertisement:

Author Topic: Disable Subject Change  (Read 26789 times)

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Disable Subject Change
« on: August 06, 2009, 01:35:20 PM »
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
« Last Edit: June 23, 2011, 08:03:10 PM by 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.

Offline shadow82x

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,275
  • Gender: Male
    • cmblaber on LinkedIn
Re: Disable Subject Change
« Reply #1 on: August 06, 2009, 01:54:34 PM »
Nice mod TyTy. :)
Colin B
Former Spammer, Customize, & Support Team Member

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #2 on: August 06, 2009, 10:05:37 PM »
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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #3 on: September 07, 2009, 02:54:36 PM »
getting error on install

Quote
Execute Modification     ./Themes/default/Post.template.php     Test failed

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

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

The one in my themes folder does not have it either ::)
« Last Edit: September 07, 2009, 03:03:45 PM by 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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #4 on: September 07, 2009, 09:12:55 PM »
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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #5 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>
:: 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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #6 on: September 07, 2009, 09:23:27 PM »
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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #7 on: September 07, 2009, 09:28:15 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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #8 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>
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.

Offline gbsothere

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,780
  • I'm a Pappy!
Re: Disable Subject Change
« Reply #9 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

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.

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #10 on: September 07, 2009, 09:59:20 PM »
lol, your welcome gbsothere! :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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #11 on: September 07, 2009, 10:10:06 PM »
it wont break my other mod ??
:: 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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #12 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?
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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #13 on: September 07, 2009, 10:15:47 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

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #14 on: September 07, 2009, 10:27:19 PM »
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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #15 on: September 07, 2009, 10:28:51 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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #16 on: September 07, 2009, 10:30:46 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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #17 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.
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.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Disable Subject Change
« Reply #18 on: September 07, 2009, 10:55:18 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

Offline tyty1234

  • SMF Hero
  • ******
  • Posts: 2,132
  • Gender: Male
  • <?php give_support(); ?>
    • tyty1234's SMF Site
Re: Disable Subject Change
« Reply #19 on: September 07, 2009, 10:58:23 PM »
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.