Featured Blogs
Suggest a blog

Templates News
BlogOut on 24th May in Singapore How to Upload Images to the File Manager Playing Music Video On Your Blog About the (new) BlogDrive WYSIWYG Editor Christmas Templates
All news...

Blogdrive Scripts
Sociable for Blogdrive - all-in-one Google Sitemap Generator for Blogdrive How to Edit Old Entry using Plain Text? Recent Entries Script (AJAX RSS Reader) Comments Page Tool - Auto Hide Entry
All scripts...

Layouts & Designs
The Cutting Edge Dusk Angel's Memories Gunbound ~ Ha'Je F.R.I.E.N.D.S. Blue nonsense world... so lost; so lonely Initial D S T R I F E - Final Fantasy fullmetalkupal ZGMF-X10A Freedom Gundam Seed
All layouts...

Enter your email for new updates:













Give a warm welcome to your visitors! - Cookie Reader Script

 
Latest Update:
This new codes is written based on JavaScript, compatible with all browsers. It'll not just show the username of your visitor, but it'll also provide a link back to themselves (by clicking on their own name, just as you can see on the welcome message)

Example:

note: You won't see your name if you do not frequent BlogDrive's tagboard.

Install this where you want your welcome message to appear:
<script type="text/javascript" src="http://design.blogdrive.com/scripts/welcome"></script>
<script type="text/javascript">
<!--//http://design.blogdrive.com/

line = "Welcome " + welname + " to my blog!";

document.writeln(line);
//--></script>

For advance users:
You can edit how you want your message to look by editing the "message" variable.
Remember to include the "welname" variable.
To edit the CSS style of how "welname", insert a new line within your CSS column named "welname":
for example:
<style type="text/css">
a.welname {
font: verdana;
font-size: 14pt;
font-weight: bold;
color: #CC0000;
text-decoration: none;
}
</style>

Have fun!

(Script written by Seige)




Archive:
Have you noticed that some websites know your name when you arrive? Example: http://aguyslife.blogdrive.com Ever wondered how this is done, or wanted your own? Well here is the code and an explanation.



Copy the code directly into your html page where you want the name to appear. Where it says document.write ("Welcome " & name) replace Welcome with whatever message you want.

How does it work? The script only works on computers which have cookies enabled, and they must also have used a Blogdrive.com tagboard, or the main tagboard. However most of your blog readers will have done this.

First of all it opens the Blogdrive.com cookie into a variable named username, then it creates a variable called cookielen which contains a number equal to the number of characters in the cookie. The cookie contains several bits of information; the name is just one. The format for a cookie is stringname=value;.

In the blogdrive cookie, name is the first string. The DO loop starts at the 15th character of the cookie which is the start of the name value. It adds the 15th character to the username variable then checks for then semi colon which denotes the end of the value. If it finds a semi colon it ends the loop, and prints the name variable which contains the name of the user. Otherwise it loops and adds another letter and checks again for a semi colon etc.

By Guy Burton



Posted at 09:08 pm on Sunday, June 13, 2004 by Guyb

View Comments: 9