![]() |
help in automating a task
I want to automate a task to run once a day. This task should look at the last time a thread was posted in a section. If no thread was posted in the last 30 days, that forum needs to be turned off and closed. How can I implement this?
Thanks in advance, Keyser520 |
You can create a vBulletin Scheduled Task to do what you want.
|
That's what I'm asking: how do I do that? I don't see the options in the scheduled task to do any of the things I asked in the first post. Can you give me specifics of how to do this? Or point me to a place where examples are posted?
|
You will need to create your own task using PHP. I don't believe there are any examples relevant to this task.
|
Could you help me at all? I know php, but I don't know the way vbulletin is programmed, so creating such a task is knowledge that I don't have.
|
I've written a couple of cron jobs/Scheduled Tasks for my site. Here is the basic template I use:
Code:
<?php |
To be more specific:
I have sections on my forum for instructors/djs. Each of them is the moderator of their own specific forum. I want to have the script check to see if that user has posted in their forum in the last month. If they have not, i want it to close and hide that forum. |
This requires more knowledge of MySQL than PHP. All the PHP you need has been posted by Lynne. You just need to craft an SQL query to delete the posts/threads/forums. You need to compare dateline (in the database) to the current time. dateline is UNIX time (seconds from epoch).
|
That's the part I don't have knowledge of... :-(
|
Well, you can always request to someone make the mod (unpaid). Or, you can post in the "Request for paid services" forum and see if someone will create it you.
|
All times are GMT. The time now is 04:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|