Recent Topics

1 Jul 25, 2007 22:14    

My b2evolution Version: Not Entered

Hello,

I recently returned to blogging and decided to give b2evolution a try. In the past I had utilized blogger, typepad, and wordpress on my various blogs. Having never had a fully satsifactory experience with any of them, I decided to start fresh with b2. So far, I really like but I am hoping for some assistance with my first real problem that I have encountered.

I would like to add statcounter (www.statcounter.com) to my site. I have used it on my other blogs and quite simply have found it to be excellent. I know virtually nothing about php. I had managed to add it and several other items to WordPress, but really hated Wordpress. Can someone give me a quick walkthrough on how to add code like this to my b2evolution blog.

The code that I need to install looks like this:

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=21345496;
var sc_invisible=0;
var sc_partition=5;
var sc_security="c9po98cb";
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c6.statcounter.com/21345496/0/c9po98cb/0/" alt="blog stats" /></a></div></noscript>
<!-- End of StatCounter Code -->

Thanks.

2 Jul 25, 2007 22:26

First determine what the name of the skin is, e.g. in the skin list on your right or in the backoffice in Blogsetting -> Skin (or similar).

Next go to the folder ../blog/skins/YOUR_SKIN and open _main.php. Open it in a texteditor. Somewehere you find :

<!-- =================================== START OF SIDEBAR =================================== -->


That is wat it sais it is. There you see the various items in the side bar. Now choose the place where you want your counter to be and find it in _main.php.

Add to your code this div:

<div class="bSideItem">


before <!-- Start of StatCounter Code --> and a

</div>


after <!-- End of StatCounter Code -->.
Now place this complete code block between a </div> and a <div class="bSideItem">.
This should do the trick.

Good luck

3 Jul 25, 2007 22:47

Thank you for the quick reply. I followed your instructions, but appear to have a problem in terms of where to place the code.

I would like to place the code below the calendar, but am not seeing a <div> and </div> between each of these.

<?php // -------------------------- ARCHIVES INCLUDED HERE -----------------------------
// Call the Archives plugin:
$Plugins->call_by_code( 'evo_Arch', array( // Parameters follow:
'block_start'=>'<li>',
'block_end'=>'</li>',
'title'=>T_('Archives').':',
'limit'=>'', // No limit
'more_link'=>'', // No more link
) );
// -------------------------------- END OF ARCHIVES ---------------------------------- ?>

<?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
// Call the Calendar plugin:
$Plugins->call_by_code( 'evo_Calr', array( // Params follow:
'block_start'=>'<li id="calendar">',
'block_end'=>'</li>',
'title'=>'', // No title.
'linktomontharchive'=>false,
'monthstart'=>'<caption>',
'monthend'=>"</caption>\n",
'tablestart'=>'<table id="wp-calendar" summary="Monthly calendar with links to each day\'s posts">',
'headerdisplay'=>'e', // One letter header
'headercellstart'=>'<th abbr="[abbr]" scope="col" title="[abbr]">',
'headercellend'=>"</th>\n",
'todaycellstart'=>'<td id="today">',
) );
// -------------------------------- END OF CALENDAR ---------------------------------- ?>

<?php if( ! $Blog->get('force_skin') )
{ // We skin switching is allowed for this blog: ?>
<li><?php echo T_('Choose skin') ?>:
<ul>
<?php // ------------------------------- START OF SKIN LIST -------------------------------
for( skin_list_start(); skin_list_next(); ) { ?>
<li><a href="<?php skin_change_url() ?>"><?php skin_list_iteminfo( 'name', 'htmlbody' ) ?></a></li>
<?php } // ------------------------------ END OF SKIN LIST ------------------------------ ?>
</ul>
</li>
<?php } ?>

<li id="other"><?php echo T_('Other'); ?>:
<ul>
<?php
user_login_link( '<li>', '</li>' );
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>
</ul>
</li>

Am I missing something here?

4 Jul 25, 2007 22:57

I am getting old. This is a 1.10 type skin. Just forget about the div and place the code after:

// -------------------------------- END OF CALENDAR ---------------------------------- ?> 


If it doesn't give the result you expext, add thie <div>'s as stated.

5 Jul 25, 2007 23:08

Thanks for the quick and helpful replies. I have it up and running.


Form is loading...