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)
 Detecting logged in users....
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bobby131313
Senior Member

USA
1163 Posts

Posted - 28 March 2011 :  14:55:13  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Has anyone ever put together a "bare minimum" file that could be included on non-forum pages just to detect if the visitor is a logged in forum member? Just enough to check mlev I suppose?

Switch the order of your title tags

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 28 March 2011 :  15:19:32  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
I use this in a real website:


<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_func_common.asp"-->


 'Get the MemberID from the forum login

set my_Conn = Server.CreateObject("ADODB.Connection")
 
my_Conn.Open strConnString


'copying stuff from inc_header.asp...

strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")

if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
  mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
else
  MemberID = -1
  mLev = 0
end If

my_conn.Close
Set my_conn = Nothing


You will need cookies set to forum for this to work. You may also have to add the forum path to the includes.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 28 March 2011 :  17:26:43  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Thanks Rui, I will give it a go this week.

Switch the order of your title tags
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 28 March 2011 :  17:34:27  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Let me know if you have any issues.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 15 August 2011 :  12:27:11  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Well, months and months later I've finally gotten around to testing this and it works like a charm. Thanks Rui.

Switch the order of your title tags
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 15 August 2011 :  12:50:52  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Cool. You're welcome .


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07