Board index PBase HTML and Style Sheets adding sitemeter.com counter to my pbase site

HTML and Style Sheets

adding sitemeter.com counter to my pbase site

Customize your galleries.
richards1052
 
Posts: 67

adding sitemeter.com counter to my pbase site

Post Fri Sep 12, 2003 4:57 am


Not being happy with pbase site stats, I decided to try to install Sitemeter.com's counter. I used the followng code & placed it in the Description box of my Root Gallery Update Gallery screen (I couldn't think of anywhere else I could place html). I notice that this is javascript. Does pbase have trouble with javascript? If so, do I have to use simple html (which is less functional because then I can't get certain tracking info on my visitors).

For those who know code, could you look at this code below & tell me what's wrong with it. It causes the sitemeter logo to appear on my site, but when I click on the logo it seeks this url:

http://sm9.sitemeter.com/<noscript><a%20href=

which doesn't seem like a viable url. I'm pretty sure it's not counting properly. Here's the code:

Code: Select all
<!--WEBBOT bot="HTMLMarkup" startspan ALT="Site Meter" -->
<script type="text/javascript" language="JavaScript">var site="sm9pbase"</script>
<script type="text/javascript" language="JavaScript1.2" src="http://sm9.sitemeter.com/js/counter.js?site=sm9pbase">
</script>
<noscript>
<a href="http://sm9.sitemeter.com/stats.asp?site=sm9pbase" target="_top">
<img src="http://sm9.sitemeter.com/meter.asp?site=sm9pbase" alt="Site Meter" border=0></a>
</noscript>
<!-- Copyright (c)2002 Site Meter -->
<!--WEBBOT bot="HTMLMarkup" Endspan -->
Richard
http://www.pbase.com/richards1052/ Into the Great Wide Open

http://www.richardsilverstein.com/ Tikun Olam: Make the World a Better Place (weblog)

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Fri Sep 12, 2003 8:47 am


Did some digging.It looks like some problem with the javascript file of the service. I tried poking into it, but have so far not been able to lay my hands on the problem. It is not a pbase.com problem because I cut and pasted the code portion into my local HTMl file and got the same result. Maybe you can ask the helpdesk of sitemeter.com?

richards1052
 
Posts: 67


Post Fri Sep 12, 2003 9:02 am


srijith wrote:Did some digging.It looks like some problem with the javascript file of the service. I tried poking into it, but have so far not been able to lay my hands on the problem. It is not a pbase.com problem because I cut and pasted the code portion into my local HTMl file and got the same result. Maybe you can ask the helpdesk of sitemeter.com?


Yes, it's very strange. It should resolve to:

http://sm9.sitemeter.com/stats.asp?site=sm9pbase (which is the url in the code)

and instead it's resolving to

http://sm9.sitemeter.com/<noscript><a%20href=

Must be something slightly off in the code. I've posted to sitemeter.com. We'll see how good their customer service is & whether they respond.

Thanks for trying to help.
Richard
http://www.pbase.com/richards1052/ Into the Great Wide Open

http://www.richardsilverstein.com/ Tikun Olam: Make the World a Better Place (weblog)

altofran
 
Posts: 144

Javascript restrictions

Post Fri Sep 12, 2003 10:48 am


Hi,

There are some Javascript restrictions on PBase to avoid harming code. However, what you can do is the following (I tried it once):

1. Put your Javascript code into a file with .js extension. Use a real code editor: Visual, Dreamweaver... Don't forget to remove html tags from it: <script>...

2. Copy into an account on the web you can access, there are some free ones.

3. In PBase code, don't write your javascript, instead, link to the .js file you created, it sould be working.

richards1052
 
Posts: 67

Re: Javascript restrictions

Post Fri Sep 12, 2003 5:10 pm


nacef wrote:Hi,

There are some Javascript restrictions on PBase to avoid harming code. However, what you can do is the following (I tried it once):

1. Put your Javascript code into a file with .js extension. Use a real code editor: Visual, Dreamweaver... Don't forget to remove html tags from it: <script>...

2. Copy into an account on the web you can access, there are some free ones.

3. In PBase code, don't write your javascript, instead, link to the .js file you created, it sould be working.


I was wondering about another possibility. Pbase doesn't seem to like the </noscript> tag (that's where the url becomes dodgy). I wonder what'd happen if I removed either that tag or both <noscript></noscript> tags?
Richard
http://www.pbase.com/richards1052/ Into the Great Wide Open

http://www.richardsilverstein.com/ Tikun Olam: Make the World a Better Place (weblog)

altofran
 
Posts: 144


Post Fri Sep 12, 2003 5:39 pm


No problem with my galleries; here is a sample of the code I added; I changed my URL's to stab ones:

Code: Select all
<!-- /ADD YOUR CODE -->

<SCRIPT LANGUAGE="JavaScript" SRC="http://perso.estat.com/js/m.js">
</SCRIPT>

<!-- /END OF YOUR CODE -->


Hope this will help

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Fri Sep 12, 2003 10:36 pm


nacef wrote:No problem with my galleries; here is a sample of the code I added; I changed my URL's to stab ones:

Code: Select all
<!-- /ADD YOUR CODE -->

<SCRIPT LANGUAGE="JavaScript" SRC="http://perso.estat.com/js/m.js">
</SCRIPT>

<!-- /END OF YOUR CODE -->


Hope this will help

Problem would be that you will not record the visits of people like me who have their Javascript disabled.

richards1052
 
Posts: 67

Re: Javascript restrictions

Post Wed Sep 17, 2003 8:12 pm


nacef wrote:Hi,

There are some Javascript restrictions on PBase to avoid harming code. However, what you can do is the following (I tried it once):

1. Put your Javascript code into a file with .js extension. Use a real code editor: Visual, Dreamweaver... Don't forget to remove html tags from it: <script>...

2. Copy into an account on the web you can access, there are some free ones.

3. In PBase code, don't write your javascript, instead, link to the .js file you created, it sould be working.


Trying to implement yr. solution using Notepad (does this pass for a "code editor"?). When you say to remove tags do you mean ALL tags? And by tags do you mean to remove only the <> carats or to remove the carats and all text within them?

Just so that we understand ea. other, here's my sitemeter.com html code:
Code: Select all
<!--WEBBOT bot="HTMLMarkup" startspan ALT="Site Meter" -->
<script type="text/javascript" language="JavaScript">var site="sm9pbase"</script>
<script type="text/javascript" language="JavaScript1.2" src="http://sm9.sitemeter.com/js/counter.js?site=sm9pbase">
</script>
<noscript>
<a href="http://sm9.sitemeter.com/stats.asp?site=sm9pbase" target="_top">
<img src="http://sm9.sitemeter.com/meter.asp?site=sm9pbase" alt="Site Meter" border=0></a>
</noscript>
<!-- Copyright (c)2002 Site Meter -->
<!--WEBBOT bot="HTMLMarkup" Endspan -->

Can you tell me how it should look as a .js file?
Richard
http://www.pbase.com/richards1052/ Into the Great Wide Open

http://www.richardsilverstein.com/ Tikun Olam: Make the World a Better Place (weblog)

ilanphoto
 
Posts: 876


Post Thu Sep 18, 2003 8:50 am


After a few tries I managed to add the code to my gallery pages. I also tried to add the code to my profile page as that is what is access by the search engines.
Any idea if that is possible and if yes where and how

I add the code in the comments box of the galleries and it worked but I could not get the same thing to work in the profile page

Thanks
Ilan

altofran
 
Posts: 144


Post Thu Sep 18, 2003 10:56 am


ilanphoto wrote:I add the code in the comments box of the galleries and it worked but I could not get the same thing to work in the profile page


Hi,

PBase administrator has the request to give more control of the 'profile page' to users, until then, all you can do is wait!

richards1052
 
Posts: 67


Post Thu Sep 18, 2003 6:22 pm


ilanphoto wrote:After a few tries I managed to add the code to my gallery pages. I also tried to add the code to my profile page as that is what is access by the search engines.
Any idea if that is possible and if yes where and how

I add the code in the comments box of the galleries and it worked but I could not get the same thing to work in the profile page

Thanks
Ilan


Ilan: The code you are adding to the comments box in your galleries...is it javascript code going directly into the box; or are you following nacef's suggestion & linking to an uploaded .js file?

Nacef, if you see this could you try to answer my post to you above which asks how I should change the javascript code after converting it to a .js file file; and also how exactly I should formulate the link to the uploaded file in my pbase.com box.

Finally, (to both Ilan & Nacef) are you adding your link to the individual gallery pages or the description box in the root gallery (that's where I've been trying to add it)? Ilan said he's placing it in the 'Profile.' He can't mean the user profile because there isn't any place to add code there & that data doesn't show in the gallery display mode. Does he mean the same place where I'm trying to add the code (description box in root gallery) or is he trying to add it to the individual galleries (I'm not sure why he'd be doing that)?
Richard
http://www.pbase.com/richards1052/ Into the Great Wide Open

http://www.richardsilverstein.com/ Tikun Olam: Make the World a Better Place (weblog)

ilanphoto
 
Posts: 876


Post Thu Sep 18, 2003 7:49 pm


I just copied and pasted the code from nedstat. Not the most moder programmer but I am quite sure it is HTML (actually, I don't know what java looks like) and I did not create a seperate file
Hope that helps
Ilan

richards1052
 
Posts: 67


Post Thu Sep 18, 2003 9:50 pm


ilanphoto wrote:I just copied and pasted the code from nedstat. Not the most moder programmer but I am quite sure it is HTML (actually, I don't know what java looks like) and I did not create a seperate file
Hope that helps
Ilan


DO you see the words javascript in your code? If not, you're only using html which Pbase deals with much better.
Richard
http://www.pbase.com/richards1052/ Into the Great Wide Open

http://www.richardsilverstein.com/ Tikun Olam: Make the World a Better Place (weblog)

altofran
 
Posts: 144

Try this!

Post Fri Sep 19, 2003 3:01 am


You forgot a '\' symbol in the source link. Try this code:

Code: Select all
<!--WEBBOT bot="HTMLMarkup" startspan ALT="Site Meter" -->

<script type="text/javascript" language="JavaScript1.2" src=\"http://sm9.sitemeter.com/js/counter.js?site=sm9pbase\">
</script>

<a href="http://sm9.sitemeter.com/stats.asp?site=sm9pbase" target="_top">
<img src="http://sm9.sitemeter.com/meter.asp?site=sm9pbase" alt="Site Meter" border=0></a>

<!-- Copyright (c)2002 Site Meter -->
<!--WEBBOT bot="HTMLMarkup" Endspan -->

ilanphoto
 
Posts: 876


Post Fri Sep 19, 2003 5:26 am


[quote="richards1052"][quote="ilanphoto"]I just copied and pasted the code from nedstat. Not the most moder programmer but I am quite sure it is HTML (actually, I don't know what java looks like) and I did not create a seperate file
Hope that helps
Ilan[/quote]

DO you see the words javascript in your code? If not, you're only using html which Pbase deals with much better.[/quote]

Now that I look at it there is a javacode in it. Attached is the cose I got from nedstat

<!-- Begin Nedstat Basic code -->
<!-- Title: Ilan's photo profil page -->
<!-- URL: http://www.pbase.com/ilanphoto/profile -->
<script language="JavaScript" type="text/javascript" src="http://m1.nedstatbasic.net/basic.js">
</script>
<script language="JavaScript" type="text/javascript" >
<!--
nedstatbasic("ACbT0Qcbv64vLiT9R14/XTz+/3FA", 0);
// -->
</script>
<noscript>
<a target="_blank" href="http://v1.nedstatbasic.net/stats?ACbT0Qcbv64vLiT9R14/XTz+/3FA"><img
src="http://m1.nedstatbasic.net/n?id=ACbT0Qcbv64vLiT9R14/XTz+/3FA"
border="0" nosave width="18" height="18"
alt="Nedstat Basic - Free web site statistics"></a>
</noscript>
<!-- End Nedstat Basic code -->

Next

Board index PBase HTML and Style Sheets adding sitemeter.com counter to my pbase site

Who is online

Users browsing this forum: No registered users and 2 guests

cron