Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Locking / Unlocking (Automating)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
RokDev Posted - 10 April 2008 : 03:58:54
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" /><
3   L A T E S T    R E P L I E S    (Newest First)
HuwR Posted - 10 April 2008 : 11:23:12
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<
RokDev Posted - 10 April 2008 : 11:12:17
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.<
HuwR Posted - 10 April 2008 : 06:13:58
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.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000 Version 3.4.07