Recent Topics

1 Dec 27, 2007 20:03    

My b2evolution Version: 2.x

[SOLVED] http://www.masonworld.com/computer/b2evo/adding-feedflare-to-b2evolution

I want to cut throught all this social bookmarking and syndication nonsense by hooking up feedburner and feedflare. Feedburner is easy, as the chicklet can be placed in the free html widget.

I was surprised not to see much discussion about feedflare on the forum. Did I miss something? It seems like a clean low maintainance way to handle all of this constantly evolving social bookmark stuff.

Of course, a feedflare plugin would be really cool, but I don't think I am up to that...

Can someone help me understand the best way to add the code for a feedflare? It is supposed to go at the end of each post, and needs the include the premalink URL.

Here is what FeedBurner has to say about FeedFlares

In order to add FeedFlare to your blog, you’ll need to insert a <script> tag at the bottom of each post (near author, date, comments, etc), anywhere a post appears. Usually, this means editing two templates — the home page template, which lists all recent posts, and the individual post template, which shows one post at a time.

Thanks!

2 Jan 02, 2008 17:59

OK -- I think that I have figured out how to do this, but I need some help.

I want to modify the evocamp skin to place some js at the end of the posts. It needs to be blog specific.

So, I need to do something like this:

switch case (BLOG_ID)

case: BLOG ID = 1
some script
end case

case: BLOG ID = 2
some other script
end case

end switch.

I will need to querry the blog ID and the permalink. I am having trouble understanding where these functions are documented. Can some one point me in the right direction?

Also, where is the best (proper) place to locate the code?

Thanks.

3 Jan 02, 2008 19:24

I think I am abandoning feedflare for AddThis.com.


<!-- AddThis Bookmark Post Dropdown BEGIN -->
<div><script type='text/javascript'>addthis_url='<?php $Item->permanent_url(); ?> '; addthis_title='<?php $Item->title( '', '', false ); ?>'; addthis_pub='ttadddd0';</script><script src='http://s7.addthis.com/js/addthis_widget.php?v=12' type='text/javascript'></script></div>
<!-- AddThis Bookmark Post Dropdown END -->

5 Feb 23, 2008 05:54

Is it my imagination, or did the code disappear?

6 Feb 23, 2008 06:01

Oh, bugger. I migrated this blog and it broke the code.
Let me see what I can dig up.
Mark

7 Feb 23, 2008 06:07

<p>
<h3 class="feedback_section">Social Bookmarks and Tags (tell people about this post)</h3>
</p>

<?php
// code to add FeedFlares to the end of the post
// works for multiple feeds (that is what the switch case is for)

// Find the blog ID
$items_blog = $Item->get_Blog();
$items_blog_ID = $items_blog->ID; 

// Watch out for blogs without flares
$do_flare = 1;

switch ( $items_blog_ID ):

  //Blog ID = 4
  case 4:
  $fb_src = "http://feeds.feedburner.com/~s/MasonWorldTestBlog";
  break;

  //Blog ID = 5
  case 5:
  $fb_src = "http://feeds.feedburner.com/~s/FightinTexasAggieGoodBullBlog";
  break;

  //Blog ID = 7
  case 7:
  $fb_src = "http://feeds.feedburner.com/~s/Masonworld";
  break;

  //Blog ID = 8
  case 8:
  $fb_src = "http://feeds.feedburner.com/~s/CochlearWorld";
  break;

   //Yikes, our blog is not set up for flares
  default:
  $do_flare =0;

endswitch;

if ($do_flare) {
echo '<script src="'.$fb_src.'?i='.$Item->get_permanent_url().'" type="text/javascript" charset="utf-8" ></script>';
};


// END code to add FeedFlares to the end of the post
?>

8 Feb 23, 2008 06:09

Not exactly sexy....

9 Apr 03, 2008 15:26

Is there any way to do this as a widget instead of a skin hack?

10 Apr 03, 2008 15:54

Well, it is certainly possible to write one, if that is what you are asking.

If you are asking if one exists, I think the answer is "no." However, I am not up to date on the latest developments.

If you want one badly enough, you could also hire it done cheaply. It would be a pretty simple plugin compared to some of the stuff out there.

Regards,
Mark

11 Apr 03, 2008 15:59

I tried plugging in your php code into a html widget. The feedflare ad appeared, but none of the other items like "edit this", "email the author", and so on.

12 Apr 03, 2008 16:34

Well, it may depend on how you display the page. The main question will be what $Item->get_permanent_url() returns. If you are viewing the index page, I am not sure what $Item->get_permanent_url() means. On a single post, you get the permalink.

Take a look at the page source that you generate and see what is happening. That will give you a clue.

13 Apr 03, 2008 16:50

If use

<script src="http://feeds.feedburner.com/~s/comiclistcomplete?i=<?php $Item->permanent_url() ?>" type="text/javascript" charset="utf-8"></script>

for an indivual post, I get the ad only. In the source I see:

<div class="PostBottom"><script src="http://feeds.feedburner.com/~s/comiclistcomplete?i=<?php $Item->permanent_url() ?>" type="text/javascript" charset="utf-8"></script></div>

If I put your PHP code into a widget for the end of the post, it appears to simply print the code at the end of the post.

14 Apr 03, 2008 16:55

The i=part needs to resolve to the actual permalink, and that is not happening. That is the problem. Not sure why -- maybe someone else on here can comment.

Sorry that I am not more help, but I have not worked in b2evo since Jan...

15 Apr 03, 2008 16:57

You've been very helpful! Feedflare works in 2.4.1 using your method, and I appreciate that a great deal. If it can be turned into a widget, even better. I will continue to experiment.

16 Apr 04, 2008 11:44

If blog #1 is the blog that aggregates the other blogs, what's the best way to make certain it does not have an ad or links? Create a separate skin and don't include the feedflare PHP? Or some other way, perhaps?

17 Apr 04, 2008 18:26

You can detect the blog ID and just not show feed flare.

If you want this in a widget then it'd need to be inside your post loop and you'd need to global $Blog,$Item to be able to get the bits that you want.

If the code that's added never changes ( per post ), which it looks like it doesn't then you'd probably be better to make it a renderer plugin instead ... although then it'd show on blog 1 ... but there's ways around taht as well ;)

¥

18 Aug 12, 2008 04:04

Strangely, feedflare no longer works as it should on my blog. It's showing google ads, but none of the links.


Form is loading...