What does ‘Close Topics After’ exactly mean in forum configuration - is it since last update or since first post? Any chance to have this configurable no a per-forum basis in the future?
Hi Filip, sorry for the delay in responding to this.
That setting is since the topic was created not since the last post. You could change this to a per form setting pretty easy. Basically it closes it in the template. So if you go into the template for forum posts you’ll see a line in there where it does the check ($this->helper->isTopicClosed($this->topic,$this->forum)).
Now you’d just need to change this line and do time checks based on each forum. So if you’re in forum that you want to close early you’d do something like this:
if($this->get_id == 3 && time() < strtotime(‘20 days’, $this->topic[‘dtGMTPosted’]) )
So if you’re in forum 3 then as long as the current time is less than 20 days after the initial post show the post form.
Thanks Ian, I was more interested to have them auto closed based on activity though, e.g. close after 24 hours of no activity (since last update). I imagine that should not be difficult either.
Yeah you should be able to do a similar thing, you’ll either need to use the tags to loop through the post array for the topic or just do a query to look up the last post time. I recall that you’re already doing some other queries in there so that would be fastest.