Eve Support Community
Forums
Eve Community
Customization Ideas
Detect Username and Title|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Groupee Member |
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. |
||
|
|
Groupee VIP |
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 |
|||
|
|
Groupee Member |
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? |
|||
|
|
Groupee |
User Title is not in the cookie, as Michael pointed out.
You can use the user_oid (in the cookie) to get the user title out of IP_PROFILES. |
|||
|
|
Groupee Member |
quote:Ah, missed that! lol quote:Alright, thanks, I'll try to comprehend that and see what I can do. |
|||
|
|
Eve Developer Aspiring Monkey |
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. |
|||
|
|
Groupee Member |
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?
|
|||
|
|
Eve Developer Aspiring Monkey |
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. |
|||
|
|
Groupee Member |
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? |
|||
|
|
Groupee |
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. |
|||
|
|
|
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. |
|||
|
|
Groupee Member |
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.
|
|||
|
|
Eve Developer Aspiring Monkey |
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. |
|||
|
|
Groupee Member |
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. Thanks! |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Eve Support Community
Forums
Eve Community
Customization Ideas
Detect Username and Title
