Author |
Topic |
|
asafdr
New Member
Israel
90 Posts |
|
asafdr
New Member
Israel
90 Posts |
Posted - 18 December 2003 : 15:46:08
|
? |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 18 December 2003 : 15:58:35
|
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. |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 18 December 2003 : 19:56:59
|
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 |
|
|
asafdr
New Member
Israel
90 Posts |
Posted - 18 December 2003 : 22:39:47
|
i use snitz 3.3.03, its there ? and how can i do it :) ? |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 18 December 2003 : 22:42:22
|
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 ~ |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 19 December 2003 : 05:38:15
|
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.” |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 19 December 2003 : 06:04:35
|
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. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 19 December 2003 : 08:03:36
|
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.” |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 19 December 2003 : 17:25:01
|
hehhe ... don't worry mate, I've had some shockers lately as well (on here as well). |
|
|
|
Topic |
|