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: General / Classic ASP versions(v3.4.XX)
 Posting without logging in: preventing it!
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carabosse
Starting Member

United Kingdom
36 Posts

Posted - 08 October 2003 :  08:36:33  Show Profile
Is there any way of turning off the facility to post without logging in?

(I want to encourage members to check their private messages and if they post without logging in they won't see that they have PMs waiting.)

weeweeslap
Senior Member

USA
1077 Posts

Posted - 08 October 2003 :  10:10:56  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
add

strRequireReg="1"

in post.asp after the set of includes that has:
<!--#INCLUDE FILE="config.asp"-->

Make sure it is after the delimeters so it can interpret it as asp That should check if they're logged in, if not, it'll display the login boxes to access the post.asp page which is where they have to go to post a reply/topic. I've tested this on pages for my site, such as:
http://www.weeweeslap.com/videos/sfgamerica/sfgamlarge.asp
click and you'll see it'll throw the login boxes at you if you're not logged in. So I assume it'll give you the same result if you add that code snippet to post.asp.

coaster crazy
Go to Top of Page

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 18 June 2004 :  08:56:08  Show Profile
quote:
Originally posted by weeweeslap

add

strRequireReg="1"

in post.asp after the set of includes that has:
<!--#INCLUDE FILE="config.asp"-->

click and you'll see it'll throw the login boxes at you if you're not logged in. So I assume it'll give you the same result if you add that code snippet to post.asp.



Does anybody use this ? It doesnt work properly on my site, it causes an invalid SQL statement to be created because it loses the forum id after logging in.

if you open a category then click 'new topic' , you will correctly be shown a login screen with this in the path bar:
http://localhost/forum/login.asp?target=post.asp?method=Topic&FORUM_ID=4
after logging in successfully, you get redirected back to post.asp with this in the title bar:
http://localhost/forum/post.asp?method=Topic

this raises the error:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-4.0.17-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1


the output of the relevant SQL at that point is:


SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION FROM FORUM_CATEGORY C, FORUM_FORUM F WHERE C.CAT_ID = F.CAT_ID AND F.FORUM_ID =  


the forum ID is lost, hence the error.

Does anyone have a work around ? For various reasons I dont want the user to be able to enter his username & pwd on post.asp
Go to Top of Page

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 18 June 2004 :  09:06:29  Show Profile
I was just checking the code in post.asp and this bit should redirect the viewer to default.asp if there is no forum_id in the querystring:


if Request.QueryString("FORUM_ID") <> "" then
	if IsNumeric(Request.QueryString("FORUM_ID")) = True then
		strRqForumID = cLng(Request.QueryString("FORUM_ID"))
	else
		Response.Redirect("default.asp")
	end if
end if


why doesnt it work? try here:
http://forum.snitz.com/forum/post.asp?method=Topic&FORUM_ID=

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 18 June 2004 :  17:37:59  Show Profile
wouldn't the easiest thing to do be to remove the section where you can enter your username/password on the post page?
Go to Top of Page

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 18 June 2004 :  18:00:00  Show Profile
quote:
Originally posted by RichardKinser

wouldn't the easiest thing to do be to remove the section where you can enter your username/password on the post page?



no, because the user can then still fill in the subject and message body. post_info.asp will then reject the form submission because there is no username & pwd from post.asp

instead of using strRequireReg="1" I can just check the value of 'mlev' instead. if it turns out the user is not logged in I can redirect him to the login page. that should do the trick, unless you know of a better way.



Go to Top of Page

peterbech
Starting Member

Denmark
2 Posts

Posted - 29 June 2004 :  07:51:25  Show Profile  Visit peterbech's Homepage  Send peterbech an ICQ Message
How do I set up my forum, so that users can both view and post messages, without any registration?
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 29 June 2004 :  08:06:45  Show Profile  Visit PeeWee.Inc's Homepage
quote:
Originally posted by peterbech

How do I set up my forum, so that users can both view and post messages, without any registration?



First of all, you need to mod the code for it. Second, please start a new topic. It's not fair to take over a topic like that.

De Priofundus Calmo Ad Te Damine
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.42 seconds. Powered By: Snitz Forums 2000 Version 3.4.07