Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Junior Mechanic
Posted
Hi
I do I get a web counter to my web site (www.takeback.se)?
I´m more than impressed about the sitespinner, I, who never have had a lesson in learn anything about xml or other web "lingva" have actually made my firs web site, I´m more than suprised that I made it by the software Sitespinner, but... how do I get a web counter to my site ? I have not found a simpel drag and drop commad for that yet.
Perhaps it is already there but I haven´t found it yet....
Breg/ Mats B
 
Posts: 1 | Location: Norrköping Sweden | Registered: December 25, 2003Reply With QuoteEdit or Delete MessageReport This Post
VM Staff
Picture of Derry
Posted Hide Post
Hi,

You have to find a service that offers web counters. There are many around the web, try doing a search for 'web counter', or maybe someone else on the forum can recommend one.

- Derry
 
Posts: 4167 | Location: Toronto, Canada | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Picture of comfixer
Posted Hide Post
A Free Counter is available from Bravenet.com along with instructions on how to paste the code to your page. Smile
 
Posts: 49 | Location: Smethport, PA - USA | Registered: February 18, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Picture of Kika
Posted Hide Post
Hi,
I use statcounter. It is a great counter that even has an invisible counter and best of all it is FREE. www.statcounter.com

Kika


Thanks!

Kika

http://webdesignworkz.com/sitespinnertemplates
$12 SiteSpinner ready made templates
 
Posts: 69 | Registered: January 29, 2004Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Picture of comfixer
Posted Hide Post
I'll try it out - looks like a good counter.
Smile
 
Posts: 49 | Location: Smethport, PA - USA | Registered: February 18, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Picture of Mick
Posted Hide Post
Greetings,

This is my first post. I have a problem with those free counters because I don't like the way they make your site link to theirs. Isn't this a bit like spy ware?

Anyway, I got this book from the library with a cookie based hit counter java script code that I put into my site. It doesn't give me error messages, but I can't seem to get it to tell me anything or to display a counter.

Can someone who knows JavaScript let me know what I am missing? Here is the code, compliments of JavaScript Essentials:

<html>
<script language="Javascript">
<!--
// Number of visits variable:

var visits = 0;

// Standard cookie functions:

function extractCookieValue(Val) {
if ((endOfCookie =
document.cookie.indexOf(";", val)) == -1) { endOfCookie = document.cookie.length;
}
return unescape(document.cookie.substring(val,endOfCookie));
}
function ReadCookie(cookiename) {
var numOfCookies = document.cookie.length;
var nameOfCookie = cookiename + "=";
var x = 0;
while (x <= numOfCookies) {
var y = (x + cookieLen);
if (document.cookie.substring(x,y) == nameOfCookie)
return (extractCookieValue(y));
x = document.cookie.indexOf(" ",x) + 1;
if (x == 0)
break;
}
function createCookie(name, value, expiredays) {
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name +
"=" +
value +
"; expires=" +
todayDate.toGMTString() +
";"
}

function showHits() {
// First we'll check if the user has visited this
//page before, so let us examine the _visitSite cookie:

userCookie = ReadCookie("_visitSite");
if (userCookie == null)
visits = 1; //This is the first Visit
else
visits = parseInt(userCookie) + 1;
// Create or update existing cookie:
createCookie("_visitSite", visits, 30);
document.write("you have visited this site on <BR>" + visits + "<BR> occasions<HR>");
}
//-->
</script>
</head>
<body>
<script>
<!--
Call the hit counter ...
-->
showHits();
</script>
This is where ...<P>
</body>
</html>


Thanks
 
Posts: 22 | Location: Taber | Registered: June 24, 2005Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Picture of podge
Posted Hide Post
at the beginning of that code you have opened it with the body tag "<body>" right?
I see the close tag </body> but no opening, this could be your problem.


A part of JD&Co web design
-------------------------------------------------
"It's not where you take things from - It's where you take them to" -Jean-Luc Godard
 
Posts: 837 | Location: England | Registered: March 13, 2005Reply With QuoteEdit or Delete MessageReport This Post
VM Staff
Picture of Derry
Posted Hide Post
You need to place some of the code into a Header, and some of the code as a Code Object. Some of the code you need to leave out altogether.

Go to the Page Editor > Header tab and paste this in:

<script language="Javascript">
<!--
// Number of visits variable:

var visits = 0;

// Standard cookie functions:

function extractCookieValue(Val) {
if ((endOfCookie =
document.cookie.indexOf(";", val)) == -1) { endOfCookie = document.cookie.length;
}
return unescape(document.cookie.substring(val,endOfCookie));
}
function ReadCookie(cookiename) {
var numOfCookies = document.cookie.length;
var nameOfCookie = cookiename + "=";
var x = 0;
while (x <= numOfCookies) {
var y = (x + cookieLen);
if (document.cookie.substring(x,y) == nameOfCookie)
return (extractCookieValue(y));
x = document.cookie.indexOf(" ",x) + 1;
if (x == 0)
break;
}
function createCookie(name, value, expiredays) {
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name +
"=" +
value +
"; expires=" +
todayDate.toGMTString() +
";"
}

function showHits() {
// First we'll check if the user has visited this
//page before, so let us examine the _visitSite cookie:

userCookie = ReadCookie("_visitSite");
if (userCookie == null)
visits = 1; //This is the first Visit
else
visits = parseInt(userCookie) + 1;
// Create or update existing cookie:
createCookie("_visitSite", visits, 30);
document.write("you have visited this site on <BR>" + visits + "<BR> occasions<HR>");
}
//-->
</script>

And click OK.

Now Click the Code Editor and paste this in:

<script>
<!--
Call the hit counter ...
-->
showHits();
</script>

Now try to Preview. That is how you would place the code into your page - assuming the code works that is.


- Derry
 
Posts: 4167 | Location: Toronto, Canada | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Picture of Mick
Posted Hide Post
Thanks Derry

I will give it a try.
 
Posts: 22 | Location: Taber | Registered: June 24, 2005Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Picture of Mick
Posted Hide Post
quote:
Originally posted by Mick:
Thanks Derry

I will give it a try.


Well, I tried it, and I also tried the <BODY> tag suggestions from Podge. I even tried it in both the header and the code editor, just to make sure. All to no avail.

I suspect it may be a problem with the version of JavaScript. The book I am reading is old, circa 1996 - and the author makes mention of Netscape as if it is the dominant browser throughout his whole book (or the parts of it that I have perused).

In any case, don't worry about it. I am using the HTML only version of StatCounter for now, and I am liking it. So don't spend any more time trying to rework his old cookie code. Time is better spent in other areas.

For example (and I realize this is off the topic of counters so please accept my apologies in advance) Big Grin but where does someone with a hodge podge of do-it-yourself programming experience get a foothold in Java?

I have been using Visual Basic 6.0 and like the whole package in terms of the ease of programming that comes with that software. But I can't seem to make the transition from VB to DHTML for some reason due to my poor background in programming, or due to the utter complex nature of using VB to create Active X forms to use with Web Pages.

In essence, I have given up trying to use VB and am convinced that JAVA might better suit my needs.

But all I have figured out from Java thus far is that you write the code with a text editor, and then somehow compile it.

How do you compile it? VB has that nice software with toolbar buttons to compile and test. How does one do stuff like that with JAVA?

Thanks in advance.

Mick
 
Posts: 22 | Location: Taber | Registered: June 24, 2005Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Picture of podge
Posted Hide Post
most things can be written in notepad, and just changing the file extension work. Try searching http://www.download.com for some free software.


A part of JD&Co web design
-------------------------------------------------
"It's not where you take things from - It's where you take them to" -Jean-Luc Godard
 
Posts: 837 | Location: England | Registered: March 13, 2005Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
Unless you actually want spam, stay away from bravenet. And unsubscribing does nothing but inform them your address works.
 
Posts: 151 | Registered: November 23, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.