Recent Topics

1 Jan 29, 2007 11:40    

A while ago I had a problem when I added a google search to my sidebar that it somehow changed the footer on my blog, I know it was the search that changed it because I did the same thing with my business blog and it did exactly the same thing, I haven't worked out what it did the code I added was no where near the code for the footer.

Anyway one of your readers added the code that was required to fix it and it worked.

I have recently noticed that all stat tracking has stopped since the 23rd January, I think this is about the same time I did the google search box but not sure.

Yesterday I found the code that should be added to enable stat tracking when I did a search of this site, I can not find it today no matter how I search, could someone please post the code that is required and where it should be inserted and to which template.

My blogs are
www.runescapeblog.co.uk
www.mflshop.co.uk/blog

The code might be there but not working for some reason, any help would be appreciated.

Cheers

Steve

2 Jan 29, 2007 12:06

The very end of your skins _main.php should look something like this :-

<?php
	$Hit->log();	// log the hit on this page
	debug_info(); // output debug info if requested
?>
</body>
</html>

That's the bit that counts your hits ;)

¥

3 Jan 29, 2007 12:24

Let me break your question in two parts:
1) Stats. Have you on or around jan 23. updated your B2o to a new version, or have you done anything other than adding the Google search bar and changing the footer? I can't find anything on the site that's not normal.
2) Google, footer. Please rewrite the _main.php. You seem to have skipped a few <div>'s. Let me explain. The sidebar is located between:

<div class="bSideBar">
.....
</div>


Now you add an item like so:

<div class="bSideBar">
.....
     <div class="bSideItem">
         item goes here
     </div>
.....
</div>


If you do this properly, you'll end up with as many <div class="bSideItem"> as there are </div>. On the skin you'll notice vertical bars between the items.
The last </div> should close the sidebar. After the sidebar comes the footer:

<div id="pageFooter">
.....
</div>


It can help if you add a few comments:

<!-- Comment goes here -->


to know on wich part you are working.

Good luck

4 Jan 29, 2007 14:35

Thank you all for your help

I have now added the extra lines and my hits are now being counted.

Just a quick question about html or php.

Why are there so many spaces or tabs or whatever all over the listing.

I will explain.
When I did programming (Basic on the ZX81) yes I am showing my age, all the program lines were numbered and the program lines of code were all aligned on the left hand side against the number, this made it a lot easier to read than the way it appears now.

I don't have time to study html or php just wondered if there is a quick answer.

5 Jan 29, 2007 14:57

pi-stoff wrote:

... Why are there so many spaces or tabs or whatever all over the listing. ...

It's to make the code easy to look at when you're editing code - it has no functional value at all. MOST of the time!

Blank lines separate major chunks that do some sort of unique display piece. Tabs tell you how deep into a div or an if or a loop your code is. In theory you'll always come back out to the same starting point, else you didn't close something properly. When all is said and done though, to me, it's bad to have the tabs in there because all it does is make your visitor wait a tad longer for page delivery. All those tabs end up part of the source code is what I mean.


Form is loading...