<?xml version="1.0" encoding="UTF-8" ?><Module>
  <ModulePrefs title="News Keyword Search" directory_title="News Keyword Search" description="Shows news headlines containing your keyword or keywords.  Filter the news to just what you are interested in!  Choose any number of key words.  Searches CNN, Google news, BBC, New York Times, Fox News, Reuters, MSNBC, ABC News, CBS News, Newsweek, USA Today, Discovery, Time, and more... Please submit comments so we will know what you like, what we can change, what new features you would like, what new gadgets you would like, and if you stop using this gadget, why.  Thank you, and enjoy!" title_url="http://mediawink.com" author="MediaWink.com" author_email="mediawink+feedback@gmail.com" author_location="USA" author_affiliation="MediaWink.com" author_photo="http://hosting.gmodules.com/ig/gadgets/file/113198001483006027607/mediawink.png" author_aboutme="Provider of software for PC as well as cell phone." author_link="http://mediawink.com" author_quote="More fulfilling life through technology and education" screenshot="http://hosting.gmodules.com/ig/gadgets/file/113198001483006027607/news_ss.png" thumbnail="http://hosting.gmodules.com/ig/gadgets/file/113198001483006027607/news_tn.png" width="280" height="240" render_inline="never" scaling="false" scrolling="true" category="communication" category2="lifestyle">
    <Require feature="analytics" />
  </ModulePrefs>
  <UserPref name="mylist"  default_value="Edit Settings to set key words" display_name="Add Search Terms" datatype="list" required="true"/>
  <Content type="html">
  <![CDATA[ 
  <style type="text/css">
    .special-link {
    }
  </style>
  <style> #content_div { font-size: 80%; margin: 5px; } </style>
  <div id=content_div></div>

  <script>
    _IG_Analytics("UA-2382139-2", "/news");
  </script>
  <script type="text/javascript"> 
  // Get userprefs
  var prefs = new _IG_Prefs();

  // Get the array of search terms entered by the user
  var search_terms = prefs.getArray("mylist");

  _gel("content_div").innerHTML += "Keywords: " + search_terms;

  var i = 0;
  var urls = new Array();
  urls[i++] = 'http://rss.cnn.com/rss/cnn_topstories.rss';
  urls[i++] = 'http://news.google.com/?output=rss';
  urls[i++] = 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml';
  urls[i++] = 'http://www.google.com/ig/modules/builtin_news_customized.xml';
  urls[i++] = 'http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml';
  urls[i++] = 'http://www.foxnews.com/xmlfeed/rss/0,4313,0,00.rss';
  urls[i++] = 'http://today.reuters.com.edgesuite.net/rss/topNews/';
  urls[i++] = 'http://rss.msnbc.msn.com/id/3032091/device/rss/rss.xml';
  urls[i++] = 'http://my.abcnews.go.com/rsspublic/fp_rss20.xml';
  urls[i++] = 'http://rss.cbc.ca/canadiannews.xml';
  urls[i++] = 'http://www.cbsnews.com/feeds/rss/main.rss';
  urls[i++] = 'http://feeds.newsweek.com/newsweek/TopNews';
  urls[i++] = 'http://www.npr.org/rss/rss.php?id=1001';
  urls[i++] = 'http://www.psychologytoday.com/articles/index.rss';
  urls[i++] = 'http://rss.cnn.com/rss/cnn_world.rss';
  urls[i++] = 'http://www.usatoday.com/repurposing/NewslineRss.xml';
  urls[i++] = 'http://economictimes.indiatimes.com/rssfeeds/1286551815.cms';
  urls[i++] = 'http://dannyjoo.googlepages.com/diggstop24.xml';
  urls[i++] = 'http://boolean.googlepages.com/wanted.xml';
  urls[i++] = 'http://www.foxnews.com/xmlfeed/rss/0,4313,2,00.rss';
  urls[i++] = 'http://www.fark.com/fark.rss';
  urls[i++] = 'http://dsc.discovery.com/news/subjects/technology/xdb/topstories.xml';
  urls[i++] = 'http://setiathome.berkeley.edu/rss_main.php';
  urls[i++] = 'http://rss.time.com/web/time/rss/top/index.xml';

  for (var j = 0; j < urls.length; j++){

  // Use the _IG_FetchFeedAsJSON() function to retrieve core feed data from
  // the specified URL. Then combine the data with HTML markup for display in
  // the gadget.
  _IG_FetchFeedAsJSON(
    urls[j],
    function(feed) { 
      if (feed == null){ 
        return;
      }

    var html = "";

    // Start building HTML string that will be displayed in gadget.

    // Access the data for a given entry
    if (feed.Entry) {
      var title = 0;
      for (var i = 0; i < feed.Entry.length; i++) {
        // flag used to indicate whether an entry title matches a search term
        var flag = -1; 

        // Iterate through array of search terms to see if any of them matches
        // entry title
        for (var termIndex = 0; termIndex < search_terms.length ; termIndex++) {
          // Do case-insensitive comparison
          var titletxt = " " + (feed.Entry[i].Title).toLowerCase() + " ";
          var term = " " + (search_terms[termIndex]).toLowerCase() + " ";
          html += "<div>";

          // Set flag to 1 if entry title matches one of search terms
          if ((titletxt.indexOf(term)) != -1){
            flag = (titletxt.indexOf(term));
            break;
          } 
        }
        // If the entry title matches one of the search terms, display the entry
        // link in red text.
        if (flag!=-1){
          // Display the feed title
          if (title==0){
            title = 1;
            html += "<div><b>" + feed.Title + "</b></div>"; 
          }
          html += "<a class='special-link' target='_blank' href='" + _hesc(feed.Entry[i].Link) + "'>";
          var headline = "";
          headline = _hesc(feed.Entry[i].Title);
          var headline2 = "";
          html += " ";
          headline2 = headline.substring(0, flag) + "<span style=\"background: yellow\">" + search_terms[termIndex] + "</span>" + headline.substring(flag + search_terms[termIndex].length, headline.length);
          html += headline2;
//          html += _hesc(feed.Entry[i].Title);
        }
//        else {
//          html += "<a target='_blank' href='" + _hesc(feed.Entry[i].Link) + "'>";
//        }
        +   "</a> "        + "</div>";
      } 
    }
   _gel("content_div").innerHTML += html;
   }, 9); 
 
  }
  </script>

<script type="text/javascript"><!--
google_ad_client = "pub-3939792523679113";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
//2007-12-17: Phobia
google_ad_channel = "1410174289";
//google_ad_channel = "5475858339";
//google_ad_slot = "1410174289";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br>
<script src="http://hosting.gmodules.com/ig/gadgets/file/113198001483006027607/try.js"></script>

  ]]> 
  </Content></Module>


























































































































