Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Auto-disable comments after more than 6 weeks
Don’t think there’s a plugin to modify such a preference: is there a way to tell txp to automatically close comments after an amount of time larger than 6 weeks? In my case, 6 months (or a year) would be perfect…
Thanks in advance
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline
Re: Auto-disable comments after more than 6 weeks
In the txp_prefs table, you can find a row where name=‘comments_disabled_after’. That’s the number of days that comments are allowed. Setting that to 365 would keep comments open for a year. To avoid this value from being changed each time you save something on the preferences tab, you’d have to change the value in the type column for that preference from 0 to 2, which hides the preference.
Offline
Re: Auto-disable comments after more than 6 weeks
ruud wrote:
In the txp_prefs table, you can find a row where name=‘comments_disabled_after’. That’s the number of days that comments are allowed. Setting that to 365 would keep comments open for a year. To avoid this value from being changed each time you save something on the preferences tab, you’d have to change the value in the type column for that preference from 0 to 2, which hides the preference.
Thanks ruud, I’ll give it a try.
Anyway, i think it would be much more useful (and safe, i guess!) to modify in some way the options in the preferences. Best thing would be to change, say, 1 -> 6 weeks in 1 -> 6 months. Which lines of which file should I modify to achieve this result?
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline
Re: Auto-disable comments after more than 6 weeks
I’d recommend against changing TXP code, because that would make upgrading more difficult.
Offline
Re: Auto-disable comments after more than 6 weeks
Uhm, You’re not completely wrong, i guess… :)
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline
Re: Auto-disable comments after more than 6 weeks
Could a plugin do it?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Auto-disable comments after more than 6 weeks
MattD wrote:
Could a plugin do it?
Sure, but currently there’s no such a plugin…
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline