Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: Alcor on December 05, 2011, 01:58:56 PM

Title: Reactivate a topic after N days
Post by: Alcor on December 05, 2011, 01:58:56 PM
Hello.

I was searching the forum but I could not find anything similar. I want some mod that allows to bump the topic after a while, that is, on that topic creator cannot respond until after a few days or hours, after those days past a button will appear that would reactivate the topic and bumping it. I know that this exists in other forum, Can you help me? Thanks
Title: Re: Reactivate a topic after N days
Post by: Alcor on December 12, 2011, 08:11:14 AM
I think the wrong place to post my request. I don't search the creation of a mod, just to know if there is one to do what I explain in the previous post.

Sorry my bad English.
Title: Re: Reactivate a topic after N days
Post by: All Colours Sam on December 12, 2011, 11:34:55 AM
You can "bump" a topic by just posting on it, no button is needed.


What you can do is automate the process, with a scheduled task , if in X days a topic hasn't been answered then create a post on that very own topic.
Title: Re: Reactivate a topic after N days
Post by: Alcor on December 13, 2011, 03:03:36 AM
Thanks for your answer, Miss All Sunday.

I don't want to bump a topic, I want that any users who want to reactivate it, they can do it without writing it simply with a button or link. Reactivating the topic is changing the posting date, so the topic jumps to the top.

How can I do a scheduled task with SMF?
Title: Re: Reactivate a topic after N days
Post by: All Colours Sam on December 13, 2011, 09:17:52 AM
So, reactivating is ONLY changing the date?

any other parameters?

There is a tutorial buried somewhere about scheduled task, unfortunately I can't find it, but since your own users are the ones that gonna click the button, then there is no need for a scheduled task.

I don't know what repercussions will arise if the date of a topic is changed.
Title: Re: Reactivate a topic after N days
Post by: Alcor on December 14, 2011, 03:30:51 AM
Yes, at lest it seems to do  the phpbb built-in function bumping topic (http://www.phpbb.com/community/viewtopic.php?f=46&t=2126328&p=12985263&hilit=bumping+mod#p12985263)
Title: Re: Reactivate a topic after N days
Post by: All Colours Sam on December 14, 2011, 10:02:29 AM
That code doesn't tell me much, in essence they are only changing the posted time, with some checks at the beginning.

porting that to SMF it will be a custom action, something like  action=bump  then a function on Subs.php  at the end:

function Bump()
{

// get the topic id via get
$_GET['topic']

// we do the query to change the time

}



the check to see if X topic has or not a response it will be done with the function that will display the button in Display.php, of course, permissions by membergroup can be applied here too.
Title: Re: Reactivate a topic after N days
Post by: Alcor on December 20, 2011, 01:57:30 AM
Thanks Miss All SUnday.

Ok, but if I knew coding, I would try