|
Post by cubed05 on Jun 4, 2005 6:17:39 GMT -8
How can I get it so it will take the person viewing a message's name? Like "Hello XXX, great weather."? I'm trying to get a chat room into my proboard, and I want it to automaticly log in with who ever is viewing it as their name. So what is the variable to display your user name?
|
|
|
Post by CrAzY_J on Jun 4, 2005 16:05:11 GMT -8
you stupid little people realy think there is a easy variable to get the username, well newsflash there isn't.
if you want us to help you with this then you'll need to give us your url and what chat room your using. really impossible if you dont.. =/
|
|
|
Post by cubed05 on Jun 5, 2005 6:14:02 GMT -8
Er, sorry. I always thought it was in a little varible. I actully found an IRC Chat Room instead of the thing I was using before. So, I don't need it to automaticly log in with the user name, because you can register a name.
|
|
|
Post by CD on Jun 5, 2005 11:01:47 GMT -8
Alright, but its actually pretty easy, unlike what crazy said.
<script> var name = document.getElementsByTagName("TD")[2].innerHTML.split(" ,")[1]; </script>
That should be it, when they're logged in.
|
|
100%
|
Post by Aaron on Jun 5, 2005 11:16:53 GMT -8
That gets the name, but it doesn't log them into a chat automatically =P There really isn't a way to do that.
|
|
|
Post by CD on Jun 5, 2005 11:46:03 GMT -8
Yeah, but he asked for the variable for the username
|
|
|
Post by CrAzY_J on Jun 5, 2005 12:54:06 GMT -8
Yeah, but he asked for the variable for the username you gave him the display name silly var uname=(document.cookie.match(/username\=(\w+)/))? RegExp.$1:false;
dunno if that's it
|
|
|
Post by CD on Jun 5, 2005 12:58:39 GMT -8
Nope. That doesn't work in v4. It just links to "View Profile" so you can't do that. But yeah, I said username, but he asked for display name.
|
|
|
Post by CrAzY_J on Jun 7, 2005 3:51:39 GMT -8
Nope. That doesn't work in v4. It just links to "View Profile" so you can't do that. But yeah, I said username, but he asked for display name. my code should work silly take a better look at it
|
|
|
Post by CD on Jun 7, 2005 10:36:32 GMT -8
Oh, cookie.
|
|