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/Code)
 Required Reading Mod
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 December 2008 :  18:32:45  Show Profile  Reply with Quote
I wrote this in response to a request. This mod allows administrators (or moderators) to force members to view a topic before continuing to use the board. To turn the moderator access off is a matter of changing one line of code.

When the member views the topic, a value is set into the member's record. If the topic concerns a rule violation, for example, the administrator will be able to check whether a member viewed the topic about a rules change.

Required topic id changes are made from the admin home page.

Get a copy at SnitzBitz.<

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 19 December 2008 :  14:57:10  Show Profile  Reply with Quote
For those who downloaded earlier releases, please get the last one - it has several fixed routines and uses the config_new table vs the config table.<
Go to Top of Page

jgs
New Member

Netherlands
95 Posts

Posted - 24 January 2009 :  13:45:50  Show Profile  Reply with Quote
I downloaded the Mod very recently, but the .chm is empty, besides the TOC. (file not found)

I found in both files that need editing 2 lines to add, is that all that needs editing?

Both my files have many mods, so comparing them is not easy.<

Info about my forum: http://www.govvd.nl/forumsoftware.htm list of Mods included.
Most of userinterface translated into Dutch.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 January 2009 :  15:13:02  Show Profile  Reply with Quote
Well, since it has been downloaded about 60 times in the last month, and I had not yet heard that complaint, I re-downloaded it about a minute ago. The .chm file works perfectly, it isn't empty, and there were no "file not found" results.

My best guess is that you got a corrupted download. Delete it and try again.<
Go to Top of Page

jgs
New Member

Netherlands
95 Posts

Posted - 24 January 2009 :  17:01:25  Show Profile  Reply with Quote
When I use winzip to open the file unpacked, I can read it. After unzipping not.
Downloaded the file again, same result.
Used another unpacking tool, same result.

If you had no further complaints, do'nt bother, I'll use the unpacked way.<

Info about my forum: http://www.govvd.nl/forumsoftware.htm list of Mods included.
Most of userinterface translated into Dutch.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 24 January 2009 :  20:58:57  Show Profile  Visit AnonJr's Homepage  Reply with Quote
If memory serves - With a recent Windows update, .chm files are typically "blocked" by default. You need to right-click on the .chm, select "Properties", and unblock it.<
Go to Top of Page

jgs
New Member

Netherlands
95 Posts

Posted - 25 January 2009 :  06:59:31  Show Profile  Reply with Quote
I'm still using W2K, but I tried to open another .chm file, no poblem.

The problem is the file opens, but in the text screen I get an IE error that opening is breaking off (don't remember the english text, but it's the screen that says try reloading or try later again. File not available.<

Info about my forum: http://www.govvd.nl/forumsoftware.htm list of Mods included.
Most of userinterface translated into Dutch.

Edited by - jgs on 25 January 2009 08:20:22
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 January 2009 :  19:23:50  Show Profile  Reply with Quote
That's just odd.

The file has been updated on SnitzBitz. Added ability to force reading of FAQ (use an "f" or "F") & rules (use an "r" or "R") pages, instructions to turn it on/off (simply type a "0" (zero) to disable), and a bypass routine if users do not have access to a given forum.<
Go to Top of Page

jgs
New Member

Netherlands
95 Posts

Posted - 26 January 2009 :  02:18:21  Show Profile  Reply with Quote
Even stranger is that the files opens perfectly without unpacking the zip file first.<

Info about my forum: http://www.govvd.nl/forumsoftware.htm list of Mods included.
Most of userinterface translated into Dutch.
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 03 February 2009 :  11:30:17  Show Profile  Reply with Quote
Thanks Carefree for this nice Mod
I just installed it. Everyting seems to be fine - no errors. But, it doesn't force me to read the topic I specified. I am using SQL also.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 03 February 2009 :  17:22:13  Show Profile  Reply with Quote
Sorry, all - Although the file was included as an example, I forgot to include the instructions for "config.asp" (without which, it just will not work). It's been updated at SB.<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 04 February 2009 :  00:56:33  Show Profile  Reply with Quote
Still the same after adding the changes in config :(<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 04 February 2009 :  01:31:38  Show Profile  Reply with Quote
In "inc_required.asp", after the "end if" on line 45, insert these two lines and see what it prints out:


Response.Write "C_VALUE="&C_VALUE&"<br>TopID="&TopID
Response.End
<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 04 February 2009 :  02:33:53  Show Profile  Reply with Quote
quote:
Originally posted by Carefree

In "inc_required.asp", after the "end if" on line 45, insert these two lines and see what it prints out:


Response.Write "C_VALUE="&C_VALUE&"<br>TopID="&TopID
Response.End




It prints the following:

C_VALUE=2009
TopID=2009<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 04 February 2009 :  12:09:35  Show Profile  Reply with Quote
I figured out what's happening. You're not running a private forum, right? I forgot to account for open forums when I did the check for access routine.

Replace "inc_required.asp" with the following and let me know the results:
<%
'###############################################################################
'## Snitz Forums 2000 v3.4.06
'###############################################################################
'## 			Copyright © 2000-06 
'## 	Michael Anderson, Pierre Gorissen,
'## 	Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must 
'##	remain intact in the scripts and in the HTML output.
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to:
'##
'##		Free Software Foundation, Inc.
'##		59 Temple Place, Suite 330
'##		Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'## 	http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'## 	manderson@snitz.com
'##
'###############################################################################
set ReqTopic = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT C_VARIABLE, C_VALUE FROM " & strTablePrefix & "CONFIG_NEW WHERE C_VARIABLE='TPID'"
set ReqTopic = my_conn.execute(strSQL)
if not ReqTopic.EOF then
	C_VALUE=ReqTopic("C_VALUE")
	TopID=cInt(ReqTopic("C_VALUE"))
	ReqTopic.close
	set ReqTopic=Nothing
end if
if C_VALUE="F" or C_VALUE="f" or C_VALUE="R" or C_VALUE="r" then
	set ReqTopic = Server.CreateObject("ADODB.Recordset")
	strSql = "SELECT M_REQUIRED FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MEMBERID
	set ReqTopic = my_conn.execute(strSQL)
	if not ReqTopic.EOF then
		if ReqTopic("M_REQUIRED") <> C_VALUE then
			'	Member hasn't read topic
			ReqTopic.close
			set ReqTopic=Nothing
			set ReqTopic = Server.CreateObject("ADODB.Recordset")
			strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_REQUIRED = '" & C_VALUE & "' WHERE MEMBER_ID=" & MEMBERID
			set ReqTopic = my_conn.execute(strSQL)
			set ReqTopic=Nothing
			if C_VALUE="F" or C_VALUE="f" then 
				Response.Redirect "faq.asp"
			else
				Response.Redirect "rules.asp"
			end if
		end if
	end if
else
	if TopID <> 0 then
		'	Not disabled
		set ReqTopic = Server.CreateObject("ADODB.Recordset")
		strSql = "SELECT M_REQUIRED FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MEMBERID
		set ReqTopic = my_conn.execute(strSQL)
		if not ReqTopic.EOF then
			if ReqTopic("M_REQUIRED") <> C_VALUE then	
				'	Member hasn't read topic
				ReqTopic.close
				set ReqTopic = Nothing
				set ReqTopic = Server.CreateObject("ADODB.Recordset")
				strSql = "SELECT FORUM_ID, TOPIC_ID FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID=" & TOPID
				set ReqTopic = my_conn.execute(strSQL)
				FORUMID=ReqTopic("FORUM_ID")
				FORUM_ID=FORUMID
				ReqTopic.Close
				set ReqTopic=Nothing
				'	Check for access
				if strPrivateForums <> "1" then
					'	Public forum - set value in record and refer to topic
					set ReqTopic = Server.CreateObject("ADODB.Recordset")
					strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_REQUIRED = " & TopID & " WHERE MEMBER_ID=" & MEMBERID
					set ReqTopic = my_conn.execute(strSQL)
					set ReqTopic = Nothing
					NewAddy = strForumURL+"topic.asp?TOPIC_ID="+C_VALUE
					Response.Redirect	NewAddy
				elseif strPrivateForums = "1" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") and ForumChkSkipAllowed = 0 then
					'	Private forum, access allowed
					set ReqTopic = Server.CreateObject("ADODB.Recordset")
					strSql="SELECT FORUM_ID, MEMBER_ID FROM " & strTablePrefix & "ALLOWED_MEMBERS WHERE FORUM_ID=" & FORUMID & " AND MEMBER_ID=" & MEMBERID
					set ReqTopic = my_conn.Execute(strSql)
					if not ReqTopic.EOF then
						'	Set value in record and refer to topic
						ReqTopic.Close
						set ReqTopic = Nothing
						set ReqTopic = Server.CreateObject("ADODB.Recordset")
						strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_REQUIRED = " & TopID & " WHERE MEMBER_ID=" & MEMBERID
						set ReqTopic = my_conn.execute(strSQL)
						set ReqTopic = Nothing
						NewAddy = strForumURL+"topic.asp?TOPIC_ID="+C_VALUE
						Response.Redirect	NewAddy
					end if
				end if
			end if
		end if
	end if
end if
%>
<

Edited by - Carefree on 04 February 2009 16:05:45
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 04 February 2009 :  12:30:11  Show Profile  Reply with Quote
Thanks Carefree
I am running a private forum indeed.
I did replace it. The forum doesn't go past "sucessfully logged in". :-)<

Edited by - texanman on 04 February 2009 13:15:56
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07