Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Login From Different Page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Login From Different Page

 Post Reply Post Reply
Author
cardsfan View Drop Down
Newbie
Newbie


Joined: 11 December 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote cardsfan Quote  Post ReplyReply Direct Link To This Post Topic: Login From Different Page
    Posted: 11 December 2003 at 1:44pm

I've just migrated everything over to the the newest version and everything works fine.  Now I want to allow my members to be able to login from my homepage (different directory than the forum), I'm sure I could just put a form with user id and password and pass that information to the login_user.asp file but I also want to be able to recognize if the user is already logged in so I can maybe put a welcome 'username' on the homepage.  I would also like to pull up the last 5 posted messages and who they we're posted by on the homepage

I thought this wouldn't be to difficult, the problem I run into is that my home page and other pages are not in the same directory as my forum.  Anyone know of an easy way to do this?

Back to Top
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2003 at 3:11pm
Originally posted by cardsfan cardsfan wrote:

I've just migrated everything over to the the newest version and everything works fine.  Now I want to allow my members to be able to login from my homepage (different directory than the forum), I'm sure I could just put a form with user id and password and pass that information to the login_user.asp file but I also want to be able to recognize if the user is already logged in so I can maybe put a welcome 'username' on the homepage.  I would also like to pull up the last 5 posted messages and who they we're posted by on the homepage

I thought this wouldn't be to difficult, the problem I run into is that my home page and other pages are not in the same directory as my forum.  Anyone know of an easy way to do this?

1.  In your own login page(s), once you have a successful login just set the cookie

Response.Cookies("WWF")("UID") = "myusername759R1B9394"

Note:

  1. WWF is the strCookieName, so change to yours
  2. UPdate the cookie if you want to set its expiry, eg Response.Cookies(strCookieName).Expires = DateAdd("yyyy", 1, Now())
  3. OPtional extras are Response.Cookies(strCookieName)("NS") = "0" if you want to set their "Not be Shown" in the Active User List (0=off,1=on)
  4. Set A session variable for Last Visit  - Session("dtmLastVisit") = CDate(Request.Cookies(strCookieName)("LTVST")) and then update the cookie for next visit with  Response.Cookies(strCookieName)("LTVST") = CDbl(Now())

Once you've done this, you will be automatically "logged in"

2.

For the last 5 POsted messages, you just need to query the database as per the WWF string and place that in your ASP home page
Back to Top
cardsfan View Drop Down
Newbie
Newbie


Joined: 11 December 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote cardsfan Quote  Post ReplyReply Direct Link To This Post Posted: 12 December 2003 at 7:01am

Thanks I'll give that a shot today, I'll let you know if it works.

Thanks again

Back to Top
shadow man View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 11 December 2003
Location: United Kingdom
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote shadow man Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2003 at 2:22pm
i like the idea, but could you explain it in more detail?
Back to Top
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2003 at 2:25pm

Originally posted by shadow man shadow man wrote:

i like the idea, but could you explain it in more detail?

Which part?

Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2003 at 11:48pm

If you use my Tutorial on Quick and Dirty SIte Integration, it may help.  My method would allow you to use almost any code that works in the forum directory on any other page of your website.

Note that this method is "quick and dirty."  There are much more efficient ways of doing this.  But if you are in a hurry and want something to build upon, then this is for you.

I have used it on my site, and it allows me to have a universal login on every page among other things.

Back to Top
shadow man View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 11 December 2003
Location: United Kingdom
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote shadow man Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2003 at 9:49am
i'll take a look
Back to Top
shadow man View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 11 December 2003
Location: United Kingdom
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote shadow man Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2003 at 10:16am
which cookie do you read to determine the lngLoggedInUserID?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.