Use WWF authentication for other parts of website |
Post Reply | Page 12> |
Author | ||||
Info_Tech
Newbie Joined: 08 Apr 2007 Location: United States Status: Offline Points: 9 |
Post Options
Quote Reply
Topic: Use WWF authentication for other parts of website Posted: 04 Oct 2010 at 4:59am |
|||
Hello guys...
Is there a way to use WWF authentication for pages that are outside of the forum? If so, how can that be done? Thanks!
|
||||
Matt
Admin Group Joined: 07 Feb 2003 Location: Manchester, UK Status: Offline Points: 195 |
Post Options Quote Reply Posted: 09 Oct 2010 at 4:02pm | |||
You can secure pages with our Member-Only Pages tutorial. Or if you just want to grab user details (eg submitting a form) you can follow part of the tutorial (eg everything except for the redirect). Details you can use are (among others) Username = strLoggedInUsername Group ID = intGroupID (1 = admin, 2 = guest, rest depend on how you set it) User ID = lngLoggedInUserID (1 = admin, 2 = guest, rest are users who signed up) so adding the following to a page will print the members username: [code]<%=strLoggedInUsername%>[/url] |
||||
Info_Tech
Newbie Joined: 08 Apr 2007 Location: United States Status: Offline Points: 9 |
Post Options Quote Reply Posted: 13 Oct 2010 at 11:19pm | |||
Scotty, this is great, thank you!!!
I am setting up a page (conference page) that involves other attributes, such as username color, gender, etc... so I don't know if I should do it so that they are logged in first, then redirected to a page where they pick a username color before they can login to the conference page or what.. I'm working on it and will probably need some more help. Thank you again!
Edited by Info_Tech - 13 Oct 2010 at 11:20pm |
||||
Info_Tech
Newbie Joined: 08 Apr 2007 Location: United States Status: Offline Points: 9 |
Post Options Quote Reply Posted: 14 Oct 2010 at 2:40am | |||
Ok here is the first problem I'm having:
I'm trying to include a URL to get to a member profile... so I'm using the following
However, the URL isn't including the User ID at the end... it only takes you to this: forum/member_profile.asp?PF= As you could see from the URL above, the user ID is missing after the equal ( = ) sign... what am I missing?
Edited by Info_Tech - 14 Oct 2010 at 2:59am |
||||
Matt
Admin Group Joined: 07 Feb 2003 Location: Manchester, UK Status: Offline Points: 195 |
Post Options Quote Reply Posted: 14 Oct 2010 at 6:02pm | |||
Is this a link for the currently logged in user? If so, then "lngUserID" is wrong and, as I said above, should be "lngLoggedInUserID" for example:
If this is your own custom code grabbing the user data from somewhere else, I would need more info on where "lngUserID" is set. |
||||
Info_Tech
Newbie Joined: 08 Apr 2007 Location: United States Status: Offline Points: 9 |
Post Options Quote Reply Posted: 14 Oct 2010 at 6:45pm | |||
Dear Scotty,
You're the man! The "lngLoggedInUserID" did the trick : ) Now, I'm struggling to display the user's gender... my own profile displays my gender but when i try to grab it from outside the forum, I keep getting "Not Given".. even though it's specified. I'm using the following code:
I appreciate all the help you've provided... it helped me tremendously! |
||||
Matt
Admin Group Joined: 07 Feb 2003 Location: Manchester, UK Status: Offline Points: 195 |
Post Options Quote Reply Posted: 14 Oct 2010 at 7:16pm | |||
The Gender field isnt set as part of the current users details, its only things that are used frequently throughout the forum for that user. The full list of variables set globally for the current user is:
You can add more if you wish, to the "functions/functions_login.asp" file. Add the variable (eg strLoggedInUserGender) to the start of the Function around line 321 like so:
Though I would recommend using something unique. You will notice from my mods that I generally prefix things with "S2H", For example "strS2HUserGender" so that it isnt likely to create a conflict with the forum software. Add the fields you want (in this case "Gender" to the end of (roughly) line 350, it should look like so:
Then grab the data Around like 390 like so:
|
||||
Info_Tech
Newbie Joined: 08 Apr 2007 Location: United States Status: Offline Points: 9 |
Post Options Quote Reply Posted: 16 Oct 2010 at 9:16pm | |||
Hello Scotty,
I tried doing the following for two items I'm trying to grab (Gender and Avatar) so I did the following in the functions/functions_login.asp file:
But I still cannot get those two from outside the forum.... what did I miss this time? |
||||
Matt
Admin Group Joined: 07 Feb 2003 Location: Manchester, UK Status: Offline Points: 195 |
Post Options Quote Reply Posted: 20 Oct 2010 at 8:26pm | |||
Im sorry I have no idea, I do a similar thing my self on one of my forums and it works perfectly. Does the user your logged in as (Guest, if not logged in) have anything set for those fields? Also, I would try doing a simple "<%=strLoggedInUserGender%>" to see if anything is produced. |
||||
Info_Tech
Newbie Joined: 08 Apr 2007 Location: United States Status: Offline Points: 9 |
Post Options Quote Reply Posted: 21 Oct 2010 at 7:31am | |||
Scotty, I'm not sure what I did.. but it works now. Thank you for all your help!!
|
||||
Post Reply | Page 12> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.078 seconds.