News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Admin option to disable editing of subject line in replies?

Started by revolver8657, December 12, 2008, 10:51:17 PM

Previous topic - Next topic

revolver8657

Hello:

I recently (in August) migrated from a Perl threaded-view board to SMF. I love it. My users have grown accustomed to it (biggest complaint is topic view vs. threaded view). I don't care anything about threaded view, but my users have an annoying habit of editing the subject line in their replies. They developed this habit when we were a thread-view board but it drives me crazy in topic view. Plus, Blackberry / WAP users can't see the subject lines of replies so they miss part of the post.

Is there a way that you brilliant dev types could make it an administrator option to disable the editing of subject lines for replies?

Oldiesmann

Sure.

Themes/default/Post.template.php

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

Replace
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', !isset($context['current_topic']) ? '' : ' readonly="readonly"', ' />

That will make the subject field read-only if they're posting a reply :)
Michael Eshom
Christian Metal Fans

Advertisement: