Recent Topics

1 Sep 18, 2007 14:06    

My b2evolution Version:1.10

I found a interesting widget called addthis on this web http://www.addthis.com

Users can bookmark your posts in any bookmarking service but there's a problem... they only show codes for Blogger, MT, WP and Myspace

If you want to get a code for B2 you must choose "Others" so when you install the code in your template and click any bookmarking service you only see the name of your blog, not your post or tags.

I got this code for WP (for blog post) and is like this:

<!-- AddThis Bookmark Post Button BEGIN -->
<?php echo "<div><a href=\"http://www.addthis.com/bookmark.php?pub=marval1&url=".get_permalink()."&title=".get_the_title($id)."\" title=\"Bookmark using any bookmark manager!\" target=\"_blank\"><img src=\"http://s9.addthis.com/button2-bm.png\" width=\"160\" height=\"24\" border=\"0\" alt=\"AddThis Social Bookmark Button\" /></a></div>"; ?>
<!-- AddThis Bookmark Post Button END -->

How can I adapt it to b2evo?

And most important: Why services like this ignore B2evo? I´m beginning to hate WordPress

[/code]

3 Sep 18, 2007 18:46

THANK YOU SO MUCH AUSTRIACO!!!!

4 Mar 26, 2008 05:41

I am new to php and to b2evo. I would like to add the addthis share widget to my blog (http://localecology.org/localecologist). Where would I place the code for this addthis widget? In main.php? If so, where?

Thank you!
- ecology

The widget:

<!-- AddThis Button BEGIN -->
<a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?wt=nw&pub=seatulip&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), '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 and Share" target="_blank"><img src="http://s9.addthis.com/button0-share.gif" width="83" height="16" border="0" alt="Bookmark and Share" /></a>
<!-- AddThis Button END -->

5 Mar 26, 2008 12:52

Hi ecology,

You should experiment a little. The snippet goes in the file _main.php as you suggested. A good place would be between

	<?php


and



	} // ---------------------------------- END OF POSTS ------------------------------------

Good luck

8 Mar 27, 2008 21:05

I'm getting close, I've been experimenting before calling for help but being a novice at php I know when I need help.

I've substituted the functions as mentioned but when trying to bookmark the post url is not included and there is a bit of gibberish on the post itself.

Obviously I have removed it from the site for meantime.

Can someone more experienced than have a quick look over the coding below and let me know what needs changing.

// AddThis Bookmark Post Button BEGIN

echo "<div><a href=\"http://www.addthis.com/bookmark.php?pub=barnesnet&url=".$Item->permanent_url()."&title=".$Item->title()."\"
 title=\"Bookmark and Share\" target=\"_blank\"><img src=\"http://s9.addthis.com/button1-addthis.gif\" width=\"125\" height=\"16\" border=\"0\" alt=\"Bookmark and Share\" /></a></div>"; 
// AddThis Bookmark Post Button END

Many thanks

9 Mar 27, 2008 22:07

Hi sims,

The first variable will be $Item->get_permanent_url()

The second variable I am not sure about. Try: $Item->title('', '', 'false', 'raw') Unfortunately I cannot test at the moment.
The rest of your code looks good. Don't forget that this code must be between <?php and ?>. You can use the code in between existing ones or wrap your code around new ones.

Good luck

10 Mar 27, 2008 23:02

Thank you, it was better but still came up with this:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/barntcou/public_html/inc/items/model/_itemlight.class.php on line 707

An unexpected error has occured!
If this error persits, please report it to the administrator.

Go back to home page

Additional information about this error:
Output format [] not supported.

Unfortunately, that doesnt mean too much to me.

11 Mar 28, 2008 01:53

sims,

What version of b2evo do you have?

I'm running b2evo 2.4.1 and I've been running this script for a while. I agree. It's very cool.

here's my code.

<!-- ADDTHIS BUTTON BEGIN -->
<script type="text/javascript">
addthis_pub             = 'Your_AccountName'; 
addthis_brand           = 'Your Brand Name';
addthis_options         = 'favorites, email, digg, delicious, myspace, facebook, google, live, more';
</script>
<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '<?php $Item->permanent_url(); ?>', '<?php $Item->title(array('link_type'=>'none'))?>')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-share.gif" width="125" height="16" border="0" alt="" /></a>
<script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
<!-- ADDTHIS BUTTON END -->
                                

Click here to see in action:
http://www.thechristianalert.org/index.php/2008/03/26/five-easy-ways-to-make-your-life-conveni?blog=5

12 Mar 28, 2008 16:16

That's excellant, thank you very much.
I worked out what the arrow was (=>), had a 30 second nightmare with php tags but managed to implement it very easily.
Would not have been able to create that on my own so thank you very much.

One more question, slightly off topic. I notice you have a hack/plugin that puts BBCode buttons on your message/feedback form. I have noticed this on a few websites but cannot find the hack/plugin to implement it.

14 May 18, 2009 15:16

Hello everyone,

and if I'd like to add AddThis code to every comment - the same like in blogger.com it is possible to share every post, I need to have possibility to share every comment.

thanx,

Ben

15 May 19, 2009 12:46

I have added the script to _item.comment.inc.php and it works as a by default link to post, so I'm promoting all the post with all the comments. If I'd like to promote only one comment is there any possibility to change [URL] into permalink of a comment somehow?


Form is loading...