Hoffe
Starting Member
3 Posts |
Posted - 14 November 2003 : 03:51:12
|
Hi all!
I just tried to solve this on my own. I took a deep dive into the Snitz code and was, to say the least, overwelmed.
We are running Snitz and we are very happy with it, the only thing I'd like to add is the possibility for users to log in to the forum directly from our site's front page.
What I'm trying to do is a small snippet of code doing the following: 1) Checking if the visitor is logged on to the forum already (Snitz set a session right? What's the name of that one?) 2) What his or hers user ID is. 3) Using the user ID to fetch user name. 4) And if he's not logged on drawing the name/password input fields (Uhm, I know how to do that. :) But I need to know where and how (method and field name) I should send the data).
The code I'm looking for should looks something like this, where the stuff I don't know is Italic.
if Session("iUserId") > 0 then iTheUsersId = Session("iUserId") response.write("Welcome aboard " & getUserNameFromUserId(iTheUsersId) & "! Harrr!") else response.write("<form method=post action=doLogin.asp>" & _ "<input type=text name=sUserName>" & _ "<input type=password name=sPassword>" & _ "</form>") end if
Uhm, get it? Any help would be deeply appreciated! If I get this going I'd be happy to send you a nice lil include back, then we could pronounce it the smallest mod ever, and have a party, and stuff. |
Edited by - Hoffe on 14 November 2003 03:53:59 |
|