My b2evolution Version: 1.8.x
Hi, I'm trying to add the [url=http://www.addthis.com/]addthis button[/url] on our blog but I encountered some problems.
I added the code I got from their site just after the <div class="bSmallHead">. The code works fine if I click on it while I'm in the post's page itself eg. "index.php?blog=2&title=my_first_post". But if in the mainpage (index.php) where it shows all recent post, if I click on it, the URL and Title shows the index.php and title of the blog eg. "My Weblog" instead of the posts.
Here's what I've been trying to do:
I changed the location.href to <?php $Item->permanent_url() ?> and the document.title to <?php $Item->title(); ?>
<!-- AddThis Bookmark Button BEGIN -->
<a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?wt=nw&pub=Shanghaiexpat&url='+encodeURIComponent([b]<?php $Item->permanent_url() ?>[/b])+'&title='+encodeURIComponent([b]<?php $Item->title(); ?>[/b]), 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no,screenX=200,screenY=100,left=200,top=100'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s7.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="AddThis Social Bookmark Button" /></a>
<!-- AddThis Bookmark Button END -->
Is there anyway to get the post's title and URL without using the $Item -> ?? Any help would be great! Thanks!
Could you post a link to your blog so I can see exactly what is being generated by that code?