Kolbu

Computers, Gadgets and Beyond!
Subscribe


CNN News plugin

April 03, 2008 By: webmaster Category: WordPress Plugins

CNN has a number of RSS feeds with current news available, on a number of topics.

This plugin works both as a widget, as inline content replacement and can be used in themes. It can be used as all three simultaneously, but there can be only one instance of the widget. Multiple feeds can be configured and used accordingly. Clicking on a news item will of course take you straight to the relevant article at CNN, as per CNN Terms of Use.

I know there are generic RSS feed widgets out there, but I figured with so many CNN feeds they warranted their own widget with easier configuration than your average generic RSS widget.

NOTE! Always upgrade to the latest version if you experience problems, most things are fixed already. :-)

The latest version is 2.6.

Download CNN News plugin


Known bugs: See the Google News plugin post. These two widgets are virtually identical, so bugs also tend to be the same in both.

Let me know if you find bugs, or if you want additional features or changes. Admin-selectable news item look, extra class/id for CSS etc.


Another Test Feed


Yet Another Test Fd

    28 Comments to “CNN News plugin”


    1. Thanks for the plug in. The only problems I had were server side. My servers firewall blocks ALL fopen requests unless added to white list. These are the addresses I had to whitelist to get it to work for anyone else who might have a problem.

      edition.cnn.com
      rss.cnn.com

      1
    2. Hey, any chance you could set up a similar or the same plugin for Google News? What’s cool about them is that you can do a search on Google News for whatever topic you want, and the search results page is ALSO an RSS feed… meaning someone could have a custom setup for their particular page’s topic(s).

      Barring that, have a suggestion on which generic RSS feed widget is best for WordPress use?

      Thanks!

      2
    3. Thanks couchmouse! I’ve added a small note in the readme about firewall settings.

      3
    4. Hi Paul!
      A similar one for Google News can certainly be written. These widgets are fairly easy to churn out once you get past the initial hurdles. I’ll see what I can do!

      As for generic feed widgets, I did install a couple and checked them out but I didn’t really like any of them. Try FeedList, FeedCache, FeedSnap or RSSImport. Don’t be too surprised if they’re not exacly what you’re looking for though.

      4
    5. And the one for Google News has now been written. See plugin-repository at wordpress.org.

      5
    6. hey couchmouse:

      I think I’m running into the same blocked requests. My question (’cause I’m barely web-literate) is: How do I find the white list option you mention?

      Thanks
      John

      6
    7. Hi Jeff!
      Not much I can do about the error in line 504 in rss.php, as that is a WordPress file. I’ll see if I can file a but report with the guys. And I suspect that a PHP error will have a few html-codes around it, which is probably why you’re getting a strange layout when that happens.

      Or do you get a template mess without the error as well?

      OK

      7
    8. Hi braddoc
      The debug() call appears to be a bug inside WordPress, I’ll see if I can track it down and report it. The RSS support inside WordPress is a complete mess, and I might end up rolling my own instead of relying on WordPress functionality there.

      OK

      8
    9. Hi,
      Inserting into index.php of my custom theme gives
      “Warning: Invalid argument supplied for foreach() in /hsphere/local/home/xzamen/my.xzamen.info/wordpress/wp-content/plugins/cnn-news/cnn_news.php on line 622
      No default feed available”
      However using it in single.php works fine. But I really need it in index.php. How can this be fixed?
      Thanks.

      9
    10. Oops, php code disappeared :) I am inserting do_action(‘cnn_news’)

      10
    11. Hi Andrey!
      That looks like a bug. I’ll send you an email with a bugfix for you to try out.

      OK

      11
    12. Dear Webmaster:

      I’m getting the same error Audrey is. Can I get the same fix?

      12
    13. Hi Dillon!
      You can add separators without editing the plugin source. The plugin itself is wrapped in a LI-tag with the id=”cnn-news”. The link-set is wrapped in an UL-tag (no id) and the individual links are all LI-wrapped. (View the page source on a page showing the plugin). You can use this information in your CSS file to say have a big bullet-like graphics in front of each link. As for the “fatal error”, you have most likely made a syntax error in your PHP-code. Se your webserver error log for additional information on what you did wrong. Hope this helps!

      OK

      13
    14. Greetings,

      Having trouble with the plug in. Running it as a widget. Runs fine if I don’t mess with it, but once I try to edit it (i.e. show only business feeds) it displays “feed unavailable.”

      Am I missing steps in the process? Using WP 2.7

      Thanks.

      14
    15. Hi crandall!
      Hm, not quite sure what that could be. Note that Google does not have a full list of feeds, so business may or may not be available as a sub-choice in your language. However, if you use english on your site it certainly should be. Can you try some of the others to see if it’s a general problem or not?
      OK

      15
    16. I tried replacing edit.php with tools.php and it didn’t work. I am running WP 2.7.1

      16
    17. Hi Rolando!
      Can you try the latest version of the plugin, it should be compatible with the new WP file layout without you having to edit anything. Running it here under 2.7.1 and that seems to work fine.
      OK

      17
    18. Hello,

      I just checked my version of CNN plugin and I’m using version 2.4 which is the latest. Latest on your site is version 2.2. Should I try your version?

      Thanks!

      18
    19. Hi Rolando
      Naa, that’s just me being slow. There is very little difference between 2.2 and 2.4, mainly the 2.7 series compat fixes. And I’ve implemented those by hand. So what looks like the 2.2 on the outside is really a 2.2 modified with the 2.4 changes. Could you describe in more detail how you’re using the plugin and what it is that doesn’t work? Email to olav at the obvious domain will also work if you want to write long.
      OK

      19
    20. I am trying to implement this on a content page. I tried both plugins and neither seem to work. I am using WP 2.8.1 version. What could be the problem?

      20
    21. Hi, I feel kind of silly asking this but is it possible to make the feed appear on a static page and not on the sidebar? I would really like to use it as content, not just a sidebar feed. I tried copying the code into the html on a page, after installing the widget into the sidebar. Am I doing something wrong? Is this an option-to have the feeds on a page as opposed to just the sidebar?

      21
    22. Thanks for the great plugin! I listet it on my site.

      22
    23. Donk know if this plugin is still working. last comments was last year

      23
    24. hello is there anyway that you can update this plugin to the new version of wordpress 3.0.1??

      Thank You For Your Time.
      bill

      24
    25. Warning: not well-formed (invalid token) at line 7, column 11 in /home/jspen211/public_html/Welcome/wp-includes/rss.php on line 385

      Can you help me trouble shoot this error messege? I get it everytime I try to use the CNN widget.

      25
    26. Hm, not seen this one before. Line 7 of rss.php is in the middle of a comment and should pose no problems for WP or the widget. Which probably means that the file is corrupted. Try downloading it again, or upgrading to the latest WP.
      OK

      26
    27. Greetings: I have been using the CNN plugin on my site for awhile, and just 2 days ago, most of the feeds stopped working. There only seems to be a few out of the many choices that now work. Is there a problem with the CNN news feeds? Please advise. Thank you.

      27
    28. Scarlett says:

      Hi,

      Aching to make this CNN feed work as in-line. Top/right. Breaking news thing.

      WP NEWBIE.

      Can u please help?

      28


    Leave a Reply


    nine + 7 =

    • Hit me

    • Current Poll

      Which sub-note are you getting?
      View Results
    • Default test