Current Accounts | Pokemon Episodes | Car Credit | News by Tags | Watch Anime Online
Looking for a java script [Archive] - PCMech Forums

PDA

View Full Version : Looking for a java script


Eaglefeather
01-11-2003, 01:34 PM
A friend at a forum I frequent regulary has a java script in her signature that uses the id of whomever has opened that string.

ie: if I open it her sig would read something like,

Hi Eaglefeather, good to see you again.

If you open the string it would use your name.

Has any one seen this script somewhere or know of a good script site where I might find it? Sure would appreciate the help I would like to pull a neat little surprise on her, but need that script to do it.

Eaglefeather
01-12-2003, 11:04 AM
To whomever sent me the email with the suggestion, thanks. I should have thought of that myself.

Force Flow
01-12-2003, 11:35 PM
Hmm... That sounds interesting. Would you mind posting it?

Eaglefeather
01-13-2003, 01:04 PM
Sorry, must have been asleep. It was suggested that I open the page in question and go to View/Source.

I have been tied up with another problem since then and have not been able to get to the page to check it out, but it should work.

Force Flow
01-13-2003, 10:17 PM
Where's the page?

Eaglefeather
01-13-2003, 10:52 PM
The script is being used by a couple of ladies in their signatures at Graphics Central, an EZBoard forum.

http:\\pub76.ezboard.com/bgraphicscentral

What the script does is display the ID of the viewer in the signature. For example I could add the following line to my signature here at PCMechanic and if you were reading the post it would read:

Hi force_flow2002, my favourite hobby it seems to me is.......

or I could change it completely to something such as:

Thank you force_flow2002, your advice and assistance were greatly appreciated.

It kind of personalizes the post.

Force Flow
01-13-2003, 10:56 PM
Wouldn't it be almost easier just to type in the name?

[edit]: Btw, I have to sign-up to gain access. And I don't really want to sign-up.

Eaglefeather
01-13-2003, 11:09 PM
Yeah, sorry I forgot that new members are now screened. Many of the ezboards have been having trouble with people that like to cause problems.

You may be right Force_flow, this thing with the signature is probably something only us older folk find amazing anyway. I still marvel at the things that can be done with a PC.

I just went and picked up the script but now I have to figure out how to use it. But when you are in retirement you some how find the time to do things like this :)

reboot
01-14-2003, 10:56 AM
Instead of anyone having to register, wait, then try and log in, why don't you just post the script here?

Eaglefeather
01-14-2003, 01:16 PM
Ok Jim, here you go. This is exactly as it came off of the source page.

It is in two parts the first part goes within, "head /head" the second part goes within, "body /body".

I just haven't figured out yet where exactly it goes in a forum, but I suspect the second part goes into the Signature box in your profile. But at the moment I am not sure where the first part goes.

Note I had to use * in place of < > to get the script to show.

*script language="JavaScript"*



function showEl(name,s)
{
if (document.getElementById)
{
var el = document.getElementById(name);
el.style.display = (s)?"":"none";
}
}

function setMode (mode)
{
var show = true;
switch (mode) {
case 0: g_html=false; show=false;break;
case 1: g_html=false; break;
case 2: g_html=true; break;
}
showEl ("insertcodes", show);
showEl ("textformatting", show);
}
/script


This is the second part.



*script langauge="JavaScript"*

*!-- hide me



var the_cookie = document.cookie;



var the_cookie = unescape(the_cookie);



var broken_cookie = the_cookie.split(";");



for (loop = 0; loop < broken_cookie.length; loop++)



{



var property_value = broken_cookie[loop];



var broken_info = property_value.split("=");



if (broken_info[0] == " ezbuser")



{



document.write("Thank you,!! " + broken_info[1]



+ "Your assistance is greatly appreciated.;



}





}





// show me --*



*/script*

mairving
01-14-2003, 01:40 PM
Basically, they are just pulling info out of the cookie that is stored for the user. The head section is built in to the code for ezboard. I suppose the purpose is to pull out cookie vars. For more info, check here (http://hotwired.lycos.com/webmonkey/98/29/index1a_page10.html) for using the cookie variable.

On a side note, I refuse to ever join an EZBoard forum. To me it is a privacy issue since they require, name, email address, address, city, state, zip, dob and sex. This is info that should be and on most boards is optional. I don't really have much to hide but I refuse to give out this much info if I don't have to.

reboot
01-14-2003, 02:09 PM
Yup, that has to be incorporated into the web page you're on, you cannot do it from your computer.
Interesting bit of spying being done here :D

Force Flow
01-14-2003, 05:00 PM
Originally posted by Eaglefeather
Ok Jim, here you go. This is exactly as it came off of the source page.

It is in two parts the first part goes within, "head /head" the second part goes within, "body /body".

I just haven't figured out yet where exactly it goes in a forum, but I suspect the second part goes into the Signature box in your profile. But at the moment I am not sure where the first part goes.


The part that goeas in the head has to be written right into it. In other words, you have to add it into the page or it won't work.

[edit] That's an interesting site, mairving! ;)

Eaglefeather
01-16-2003, 11:40 PM
Ummmm Mairving you have a good point, but there is no one there looking over your shoulder to make sure the information you place in those little boxes is correct, now is there. :) And just in case anyone wants to roast me over the coals for that statement,........... I am not listening.

I personally like the ezboard forums. I belong to 6 of them and Moderate and help Administer the Graphics Central forum. Aside from the things I like to do with Graphics I am deep into poetry. The ezboards have some excellent poetry sites, as that is my interest, that is where I go. If anyone knows of poetry forums other than at ezboard I would very happy to go and have a look.

And if you suggest, "Poetry. com", I will scream and yell and have temper tantrums. Been there, done that, don't want to do it again.