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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 help with admin config.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

zao
Starting Member

11 Posts

Posted - 09 March 2004 :  18:14:34  Show Profile
Hi i am trying to make a config for a mod. i am fairly new to this so sorry if this is a simple thing..
i am pretty sure i have every thing set up right but for some reason it doesn't update the database with the new vaules.. i have all the database stuff setup right to..

here is my code i am using..


<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_admin.asp"--><%
if Session(strCookieURL & "Approval") <> "15916941253" then
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if

NewsScriptV = "1.0" ' to do put in main script.

Response.Write	"<div class=""content"">" & _
"<table>" & _
		"<tr>" & _
		"<td>" & _
		 "<a href=""default.asp"">All Forums</a> " & _
		 "<a href=""admin_home.asp"">Admin Section</a> " & _
		 "Site Addon's Configuration</td>" & _
		"</tr>" & _
		"</table>"

if Request.Form("Method_Type") = "Write_Configuration" then
	Err_Msg = ""
	if Request.Form("strNewsForum_ID") = "" then 
		Err_Msg = Err_Msg & "<li>You Must Enter a forum Number</li>"
	end if
	if Request.Form("STRNEWSTOPICCOUNT") = "" then 
		Err_Msg = Err_Msg & "<li>You Must Enter a Number for news post</li>"
	end if

	if Err_Msg = "" then
		for each key in Request.Form
			if left(key,3) = "str" or left(key,3) = "int" then
				strDummy = SetConfigValue(1, key, ChkString(Request.Form(key),"SQLstring"))
			end if
		next

		Application(strCookieURL & "ConfigLoaded") = ""

		Response.Write "<table><tr><td class=""tc"">Configuration Posted" & _
		"<meta http-equiv=""Refresh"" content=""2; URL=admin_home.asp"">" & _
		"<br />Congratulations!" & _
		"<br /><a href=""admin_home.asp"">Back To Admin Home</a></td></tr></table>" 
	end if
else
strtest = chkString(STRNEWSTOPICCOUNT,"")
	Response.Write	"<form action=""admin_config_addon.asp"" method=""post"" id=""Form1"" name=""Form1"" onReset=""Javascript:doDefaultHighlights();"">" & _
	"<input type=""hidden"" name=""Method_Type"" value=""Write_Configuration"">" & _
	"<table>" & _
	"<tr>" & _
	"<td><b>Site Addon's Configuration</b></td>" & _
	"</tr>" & _
	"<tr>" & _
	"<td class=""tc""><b>News Setup</b><br />" & strtest & "</td>" & _
	"</tr>" & _
	"</table>" & _
	"<table>" & _
	"<tr>" & _
	"<td><b>News Script Version Number</b></td>" & _
	"<td>" & NewsScriptV & "</td>" & _
	"</tr>" & _
	"<tr>" & _
	"<td><b>Script outside of forum</b></td>" & _
	"<td>" & _
	"<input type=""radio"" class=""radio"" name=""strOUTSIDEFORUM"" value=""1""" & _
	chkRadio(strOUTSIDEFORUM,0,1) & ">Yes " & _
	"<input type=""radio"" class=""radio"" name=""strOUTSIDEFORUM"" value=""0""" & _
	chkRadio(strOUTSIDEFORUM,0,0) & ">No " & _
	" </td>" & _
	"</tr>" & _
	"<tr>" & _
	
	"<tr>" & _
	"<td><b>Select News Forum</b><br /></td>" & _
	"<td>" & _
	"<input type=""text"" name=""strNewsForum_ID"" size=""3"" value=""" & chkExist(chkString(strNewsForum_ID,"edit")) & """> " & _
	" </td>" & _
	"</tr>" & _
	
	"<tr>" & _
	"<td><b>Total Post to Disply</b></td>" & _
	"<td>" & _
	"<input type=""text"" name=""STRNEWSTOPICCOUNT"" size=""3"" value=""" & chkExist(chkString(strNEWSTOPICCOUNT,"edit")) & """> " & _
	" </td>" & _
	"</tr>" & _
	"</table>" & _	
	"<table>" & _	
	"<tr class=""tc"">" & _
	"<td>" & _
	"<input type=""submit"" value=""Submit New Config"" id=""submit1"" name=""submit1""> " & _
	"<input type=""reset"" value=""Reset Old Values"" id=""reset1"" name=""reset1""></td>" & _
	"</tr>" & _
	
	"</table>" & _
	"</div>" & _
	"</form>"
end if
Call WriteFooter
Response.End
%>

Main Site - http://cavesoft.no-ip.com - My Forum - http://cavesoft.no-ip.com/forum

zao
Starting Member

11 Posts

Posted - 10 March 2004 :  00:14:37  Show Profile
well guess no one know the problem.. i noticed this with the email setup config to. my host just updated to windows 2003 could that be why its doing it.. ??

Main Site - http://cavesoft.no-ip.com - My Forum - http://cavesoft.no-ip.com/forum
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 10 March 2004 :  08:04:03  Show Profile  Visit masterao's Homepage
Have you added the variables to config.asp?

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

zao
Starting Member

11 Posts

Posted - 10 March 2004 :  22:00:29  Show Profile
no i haven't this is the first mod i have ever did. Is there any documentation for writing mods? but that if that was all that was wrong. why does it happen to some of the ones that are in snitz by default.. also when i change them then look in the database with ms access it has my change's but it doesn't show then on the config page..

Main Site - http://cavesoft.no-ip.com - My Forum - http://cavesoft.no-ip.com/forum
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 11 March 2004 :  03:57:28  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by zao

no i haven't this is the first mod i have ever did. Is there any documentation for writing mods? but that if that was all that was wrong. why does it happen to some of the ones that are in snitz by default.. also when i change them then look in the database with ms access it has my change's but it doesn't show then on the config page..


after updating the database, you have to force the web application to load them in to memory, that is why they need adding to config.asp so they can be reloaded by the forum (it does not check the database every time)

look at the other admin_config pages and in config.asp to see how it is done.
Go to Top of Page

zao
Starting Member

11 Posts

Posted - 15 March 2004 :  00:25:45  Show Profile
thanks man sorry for the late reply.

Main Site - http://cavesoft.no-ip.com - My Forum - http://cavesoft.no-ip.com/forum
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.83 seconds. Powered By: Snitz Forums 2000 Version 3.4.07