Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Eve Community  Hop To Forums  Customization Ideas    Detect Username and Title
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Groupee Member
Picture of OSUKid7
Posted
I'm trying to send the currently logged-in user's name to another page - via POST or GET. I would also like to do the same with the user's title. How can I do this from any Eve/UBB page?

Thanks.


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee VIP
Posted Hide Post
On any eve page: If you use a browser like FireFox or Opera you can examine the cookies set by eve. In them you can see a display name. The user title is not in the cookie.

Note that the cookie is available only on pages in your eve and webhosting domain so anything you do must begin there.

You can find various ways via javascript to extract the cookie info you need.

This message has been edited. Last edited by: Michael Farris,


Infopop Corporation
 
Posts: 3604 | Registered: February 23, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of OSUKid7
Posted Hide Post
Thanks. I actually have five cookies for this community, and four for my own community. I only see one with the username in it though, and that says u=OSUKid7. So do I just extract the u element?

Oh, and I don't see the member title stored in the cookie...is that there and I just don't see it?


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee
Posted Hide Post
User Title is not in the cookie, as Michael pointed out. Wink

You can use the user_oid (in the cookie) to get the user title out of IP_PROFILES.
 
Posts: 3880 | Location: Seattle, WA | Registered: January 01, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of OSUKid7
Posted Hide Post
quote:
Originally posted by Steven Benitez:
User Title is not in the cookie, as Michael pointed out. Wink
Ah, missed that! lol

quote:
You can use the user_oid (in the cookie) to get the user title out of IP_PROFILES.
Alright, thanks, I'll try to comprehend that and see what I can do. Smile


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
Eve Developer
Aspiring Monkey
Posted Hide Post
Further,

If you are running these pages on the same domain as your Eve site you do not need to send them via post/get. You should just be able to read the username and userOID out of the cookie directly.

I have been writting PHP code that takes advantage of the Eve cookie. Very cool stuff.


Jonmark Weber
Developer
Groupee, Inc.
 
Posts: 1887 | Location: Seattle | Registered: November 10, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of OSUKid7
Posted Hide Post
They're the same domain - nylf.org...I'll be transferring from the community subdomain to the irc subdomain. So community.nylf.org sends the cookie info to irc.nylf.org. That takes post/get, correct?


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
Eve Developer
Aspiring Monkey
Posted Hide Post
If the page is on a different domain than you will need to use another method to get the information for the current user...

The only thing I can think of to accomplish this would be to have the links from your forum reference the cookie's user OID in the link or form. This makes the link generation kind of painful and pretty much impossible to do within a post on the forums. They would have to be in the custom style Header/Footer HTML...

Though Steven might have some clever ideas I am not thinking of.


Jonmark Weber
Developer
Groupee, Inc.
 
Posts: 1887 | Location: Seattle | Registered: November 10, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of OSUKid7
Posted Hide Post
I'm using the u/l parameter in the cookie...they're both the same for me, since my username and display name are the same. Which one is actually the display name?

Then I'm sending that via POST to the destination page. Looks like it will work alright.

Why do I need to mess with the userOID?


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee
Posted Hide Post
IIRC, u is the display name and l is the login. I am not completely positive at the moment though.

useroid is useful if you need to get additional information from the database.
 
Posts: 3880 | Location: Seattle, WA | Registered: January 01, 2000Reply With QuoteEdit or Delete MessageReport This Post

Posted Hide Post
Hey guys,

Steven is right about "u" being the display name and "l" being the login. As an aside, for the 1.2 release we are removing the "l" (login) parameter from the cookie completely. I thought you might want to know, in case you are relying on it currently.


Regards,

Brian Lenz
Groupee Inc.
 
Posts: 2176 | Location: Seattle, WA | Registered: June 15, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of OSUKid7
Posted Hide Post
Thanks for the info. We'll be using the display name. I'm not done with the other IRC website yet, so none of this is live yet...just testing it in a hidden forum with a test style.


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
Eve Developer
Aspiring Monkey
Posted Hide Post
If you need to read any other fields for a user than you would probably have to do a SQL select using php or perl using the user_oid from the cookie. And you wouldnt be able to do this from another domain, so I guess the only reason I mention it is as an FYI type thing.


Jonmark Weber
Developer
Groupee, Inc.
 
Posts: 1887 | Location: Seattle | Registered: November 10, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of OSUKid7
Posted Hide Post
Actually...I may have a file on the community site that does the work and sends it, instead of a direct link. The link would be the same - containing no POST data - and then once on that page, it would fetch the data and forward the user to the other site.

Just a thought, but it sounds like it could work.

If I were to use php to find the member title, could I just do that in the page I create? I wasn't aware that the community site had php. That's great. Smile I guess the next question is...the SQL command. I don't know any SQL at the moment, but am willing to learn. What would I need to select using the user_oid in order to get the member title?

Thanks!


_______________________
OSUKid7
NYLF Message Boards
 
Posts: 88 | Location: Upper Arlington, OH, USA | Registered: June 25, 2004Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Eve Community  Hop To Forums  Customization Ideas    Detect Username and Title