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)
 can i Change the forum id ?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

asafdr
New Member

Israel
90 Posts

Posted - 18 December 2003 :  09:16:54  Show Profile  Send asafdr an ICQ Message
i mean,
if my first forum is in this link:
http://127.0.0.1/forum/forum.asp?FORUM_ID=1

can i Change the line to:
http://127.0.0.1/forum/forum.asp?FORUM_ID=Support

?

i know how to do it in DCFORUM. but in snitz forum i cant know how to do it

asafdr
New Member

Israel
90 Posts

Posted - 18 December 2003 :  15:46:08  Show Profile  Send asafdr an ICQ Message
?
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 18 December 2003 :  15:58:35  Show Profile
Well, you could if you wanted to - bu you'd have to change a lot of code to get the ID when supplied with the description. Actually I thought Snitz USED to work like this and they changed it.
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 18 December 2003 :  19:56:59  Show Profile  Visit masterao's Homepage
Former versions of Snitz used the querystring to pass the forum titles as well as the forum-id, while the current version uses a sql-query based upon the forum-id to get the forum title and the category title. As far as I can tell, Snitz has always used only numbers for forum-id.

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

asafdr
New Member

Israel
90 Posts

Posted - 18 December 2003 :  22:39:47  Show Profile  Send asafdr an ICQ Message
i use snitz 3.3.03, its there ?
and how can i do it :) ?
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 18 December 2003 :  22:42:22  Show Profile
no, the code for that version also uses the forum_id to identify the correct forum. you would have to do extensive changes like laser said to get that to work.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 19 December 2003 :  05:38:15  Show Profile
I've probably misunderstood your request (as always!), but, if you just want to make this change when providing links to people for use outside your forums all you'd need to do is replace (line 48, forum.asp):
if (Request("FORUM_ID") = "" or IsNumeric(Request("FORUM_ID")) = False) and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") then
	Response.Redirect "default.asp"
else
	Forum_ID = cLng(Request("FORUM_ID"))
end if
With something like:
if IsNumeric(Request("FORUM_ID")) = false then
	Select Case Request("FORUM_ID")
		Case "Support"
			Forum_ID = 1
		Case "Title 2"
			Forum_ID = 2
		Case "Title 3"
		.
		.
		.
		Case Else
			if Request.Form("Method_Type") <> "login" and Request.Form("Method_Type") <> "logout" then
				Response.Redirect	"default.asp"
			end if
	End Select
else
	Forum_ID = cLng(Request("FORUM_ID"))
end if
Obviously you'd need to do a ChkString on Request("FORUM_ID") to alleviate any potential security issues.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 19 December 2003 :  06:04:35  Show Profile
oh yuck !!! .... hardcoding forum IDs is like pointing a loaded gun at your head (one hiccup and you're dead). It would be MUCH better to replace your Select Case with a database call to figure out what the forum id is.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 19 December 2003 :  08:03:36  Show Profile
quote:
Originally posted by laser

oh yuck !!! .... hardcoding forum IDs is like pointing a loaded gun at your head (one hiccup and you're dead).
Yup, I agree, was just trying to make things as easy as possible (i.e., no db modification) plus it was early and I didn't have any caffeine inside me! Definitely not my best thought out piece of advice!


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 19 December 2003 :  17:25:01  Show Profile
hehhe ... don't worry mate, I've had some shockers lately as well (on here as well).
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07