Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Locking / Unlocking (Automating)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

RokDev
Starting Member

19 Posts

Posted - 10 April 2008 :  03:58:54  Show Profile  Reply with Quote
Hi all,

I was wondering if anyone knows how best to automate the locking and unlocking of a forum. Currently this a manual process where you have to click the icon.

Once a month we unlock a forum for 3 days, post some questions, and then lock it. It would be great if a list of dates would be stored in say a database, the system checks against these and say unlocks the forum if the current date matches.

Any ideas?

Thanks

<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" /><

Edited by - Shaggy on 10 April 2008 04:35:56

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 April 2008 :  06:13:58  Show Profile  Visit HuwR's Homepage  Reply with Quote
well, firstly, it is not very practical to do anything automatically on a website based on time since it will only ever work if someone actually accesses the website during the correct time period, so if nobody accesses the site on the day in question, it will not get opened, or not get closed, so be careful how you code it.

Now down to practical bits, all you need to do is issue a query that sets the status of the particular forum, take a look in pop_lock.asp for the relevant code required.<
Go to Top of Page

RokDev
Starting Member

19 Posts

Posted - 10 April 2008 :  11:12:17  Show Profile  Reply with Quote
Thanks for pointed me in a right direction.

I have gleaned the following:

--Lock Forum
UPDATE FORUM_FORUM
SET F_STATUS = 0
WHERE FORUM_ID = 1

--Unlock Forum
UPDATE FORUM_FORUM
SET F_STATUS = 1
WHERE FORUM_ID = 1


If I can get these queries to run in SQL scheduled task (at their various dates) then this should work.

NB. This is run over an Intranet when it is common knowledge when a specific forum opens and closes, so there's no problem with this been automated.

Thanks for your help.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 April 2008 :  11:23:12  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
If I can get these queries to run in SQL scheduled task
if you can do that, it would be the best solution

alternatively you could use isql (i think that is what it is called) and use the windows scheduler to execute a batch file to do it<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07