Template:Mainpage-rssfeeds

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 16:20, 29 July 2006 by Ramuk (Talk | contribs) (RSS-Feed Mediawiki extension)

Jump to: navigation, search

UNIQc09babdb24914603-rss-00000000-QINU UNIQc09babdb24914603-rss-00000001-QINU

GISWiki/RSS

Uses an extension from: http://meta.wikimedia.org/wiki/GISWiki/RSS


RSS-Feed Mediawiki extension

  • original by mutante 25.03.2005
  • extended by Duesentrieb 30.04.2005
  • extended by Rdb78 07.07.2005
  • extended by Mafs 10.07.2005, 24.07.2005
  • extended by User:Arcy 07.09.2005
  • Updated for MediaWiki 1.6 by User:piku 13.06.2006
  • Update for Wikicode output, by User:cogdog 14.jul.2006

Requires:

Installation:

  • put this file (rss.php) into the extension directory of your mediawiki installation
  • add the following to the end of LocalSettings.php: include("extensions/rss.php");
  • make sure magpie can be found by PHP.

Usage:

Use one section between <rss>-tags for each feed. The rss section may contain parameters separated by a pipe ("|"), just like links and templates. These parameters are supported:

  • charset=... The charset used by the feed. iconv is used to convert this.
  • short Do not show the description text for each news item.
  • max=x Shows x most recent headlines.
  • highlight= term1 term2 The terms separated by a space are highlighted.
  • filter= term1 term2 Show only rss items containing at least one of the terms.
  • reverse display the rss items in reverse order.
  • title=x display an alternative title instead of chanel name.
  • title = none dont display any title.

Example:

<rss>http://slashdot.org/slashdot.rss|charset=UTF-8|short|max=5</rss>

DVD Player Found In Tesla Autopilot Crash, Says Florida Officials

Sat, 02 Jul 2016 03:30:00

An anonymous reader quotes a report from Reuters: A digital video disc player was found in the Tesla car that was on autopilot when its driver was killed in a collision with a truck in May, Florida Highway Patrol officials said on Friday. "There was a portable DVD player in the vehicle," said Sergeant Kim Montes of the FHP in a telephone interview. She said there was no camera found, mounted on the dash or of any kind, in the wreckage. A lawyer for a truck driver involved in the accident with the Tesla told Reuters his investigators had spoken to a witness who said the DVD player was playing a "Harry Potter" video after the accident, but the lawyer was unable to verify that beyond the witness account. Lawyers for the family of the victim, 40-year-old Joshua Brown, released a statement Friday saying the family is cooperating with the investigations "and hopes that information learned from this tragedy will trigger further innovation which enhances the safety of everyone on the roadways." Lawyers for the family of the victim, 40-year-old Joshua Brown, released a statement Friday saying the family is cooperating with the investigations "and hopes that information learned from this tragedy will trigger further innovation which enhances the safety of everyone on the roadways." Tesla said in a statement Friday, "Autopilot is by far the most advanced driver assistance system on the road, but it does not turn a Tesla into an autonomous vehicle and does not allow the driver to abdicate responsibility."

Share on Google+


Read more of this story at Slashdot.

Facebook Messenger Now Has 11,000 Bots

Sat, 02 Jul 2016 01:25:00

An anonymous reader writes: Three months after Facebook announced a platform for building bots that operate inside its Messenger app, Messenger chief David Marcus said in a blog post that more than 11,000 bots have been created. He also said 23,000 more developers have signed up to use tools provided by Wit.ai, a Facebook acquisition that automates conversational interactions between users and businesses. Facebook has yet to announce any numbers regarding how many users actually use the bots, but developers appear to be actively engaged. Facebook has said that bots will rapidly improve as more developers create them. Marcus did announce several new features for the platform. Bots can now respond with GIFs, audio, video, and other files "to help a brand's personality come across," Marcus said. They can now link Messenger profiles to customer accounts, such as a bank or online merchant. They're also getting some new UI elements: "quick replies" that suggest interactions for the user to help them set their expectations, and a "persistent menu" option for bots that displays available commands at all times so users don't have to remember them. A star system is now in place for users to rate bots and provide feedback directly to developers. Slashdot also has a Facebook Messenger bot. You can chat with it by messaging the Slashdot Facebook page.

Share on Google+


Read more of this story at Slashdot.

Security Researcher Publishes How-To Guide To Crack Android Full Disk Encryption

Sat, 02 Jul 2016 00:45:00

An anonymous reader writes: Google first implemented Full Disk Encryption in Android by default with Android 5.0 Lollipop in an effort to prevent criminals or government agencies from gaining unauthorized access to one's data. What it does is it encodes all the data on a user's Android device before it's ever written to disk using a user's authentication code. Once it is encrypted, it can only be decrypted if the user enters his/her password. However, security researcher Gal Beniamini has discovered issues with the full disk encryption. He published a step-by-step guide on how one can break down the encryption protections on Android devices powered by Qualcomm Snapdragon processors. The source of the exploit is posted on GitHub. Android's disk encryption on devices with Qualcomm chips is based only on your password. However, Android uses your password to create a 2048-bit RSA key (KeyMaster) derived from it instead. Qualcomm specifically runs in the Snapdragon TrustZone to protect critical functions like encryption and biometric scanning, but Beniamini discovered that it's possible to exploit a security flaw and retrieve the keys from TrustZone. Qualcomm runs a small kernel in TrustZone to offer a Trusted Execution Environment known as Qualcomm Secure Execution Environment (QSEE), which allows small apps to run inside of QSEE away from the main Android OS. Beniamini has detailed a way for attackers to exploit an Android kernel security flaw to load their own QSEE app inside this secure environment, thereby exploiting privilege escalation flaw and hijacking of the complete QSEE space, including the keys generated for full disk encryption. The researcher also said Qualcomm or OEMs can comply with government or law enforcement agencies to break the FDE: "Since the key is available to TrustZone, Qualcomm and OEMs [Original Equipment Manufacturers] could simply create and sign a TrustZone image which extracts the KeyMaster keys and flash it to the target device," Beniamini wrote. "This would allow law enforcement to easily brute force the FDE password off the device using the leaked keys."

Share on Google+


Read more of this story at Slashdot.

Senate Staffers Will No Longer Be Issued BlackBerry Devices

Sat, 02 Jul 2016 00:05:00

An anonymous reader writes: Senate staffers will no longer be issued BlackBerry devices. According to Politico, a note sent to staffers on Wednesday said the Senate had no choice after BlackBerry decided to discontinue devices running its own BlackBerry 10 software. "Once we have exhausted our current in-house stock, new device procurements will be limited, while supplies last, to warranty exchanges only," reads the Sergeant at Arms note. The 600 BlackBerry smartphones currently in the Senate's possession will be supported for the "foreseeable future." The news comes after a report that President Obama has ditched his BlackBerry handset in favor of a "hardened" version of the Samsung Galaxy S4 that is supported by the Defense Information Systems Agency. It also follows a report that the Canadian smartphone maker lost $670 million in the first quarter of its 2017 financial year. During BlackBerry's first quarter, the company sold roughly 500,000 devices at an average price of $290 each. They will apparently need to sell about three million phones at an average of $300 each to break even.

Share on Google+


Read more of this story at Slashdot.

Slackware 14.2 Released, Still Systemd-Free

Fri, 01 Jul 2016 23:25:00

sombragris writes: Slackware, the oldest GNU/Linux distribution still in active maintenance, was released just minutes ago. Slackware is noted for being the most Unix-like of all Linux distributions. While sporting kernel 4.4.14 and GCC 5.3, other goodies include Perl 5.22.2, Python 2.7.11, Ruby 2.2.5, Subversion 1.9.4, git-2.9.0, mercurial-3.8.2, KDE 4.14.21 (KDE 4.14.3 with kdelibs-4.14.21) Xfce 4.12.1... and no systemd! According to the ChangeLog: "The long development cycle (the Linux community has lately been living in

"interesting times," as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else

who pitched in to help make this release a reality." Grab the ISOs at a mirror near you. Enjoy! The torrents page can be found here.

Share on Google+


Read more of this story at Slashdot.


<?php
# RSS-Feed Mediawiki extension
# 
# original by mutante 25.03.2005
# extended by Duesentrieb 30.04.2005
# extended by Rdb78 07.07.2005
# extended by Mafs  10.07.2005, 24.07.2005
# extended by User:Arcy  07.09.2005
# Updated for MediaWiki 1.6 by User:piku 13.06.2006
# Update for Wikicode output, by User:cogdog 14.jul.2006
#
# Requires: 
#  * magpie rss parser <http://magpierss.sourceforge.net/>
#  * iconv <http://www.gnu.org/software/libiconv/>, see also <http://www.php.net/iconv>
#
# Installation:
#  * put this file (rss.php) into the extension directory of your mediawiki installation 
#  * add the following to the end of LocalSettings.php: include("extensions/rss.php");
#  * make sure magpie can be found by PHP.
#
# Usage:
#  Use one section between <rss>-tags for each feed. The rss section may contain parameters
#  separated by a pipe ("|"), just like links and templates. These parameters are supported:
#
#    * charset=...             The charset used by the feed. iconv is used to convert this.
#    * short                   Do not show the description text for each news item.
#    * max=x                   Shows x most recent headlines.
#    * highlight= term1 term2  The terms separated by a space are highlighted.
#    * filter= term1 term2     Show only rss items containing at least one of the terms.
#    * reverse                 display the rss items in reverse order.
#    * title=x                 display an alternative title instead of chanel name.
#    * title = none            dont display any title.
#
# Example: 
#    <rss>http://slashdot.org/slashdot.rss|charset=UTF-8|short|max=5</rss>
#

#change this according to your magpie installation!
require_once('rss_fetch.inc'); 

#install extension hook
$wgExtensionFunctions[] = "wfRssExtension"; 

#extension hook callback function
function wfRssExtension() { 
  global $wgParser;

  #install parser hook for <rss> tags
  $wgParser->setHook( "rss", "renderRss" );
}

#parser hook callback function
function renderRss($input, $argv, $parser = null) {
  if (!$parser) $parser =& $GLOBALS['wgParser'];
  global $wgOutputEncoding;

  $DefaultEncoding = "ISO-8859-1";
  $DisableCache = true;

  # $input = mysql_escape_string($input);

  if (!$input) return ""; #if <rss>-section is empty, return nothing

  #parse fields in rss-section
  $fields= explode("|",$input);
  $url= @$fields[0];

  $args= array();
  for ($i=1; $i<sizeof($fields); $i++) {
    $f= $fields[$i];

    if (strpos($f,"=")===False) $args[strtolower(trim($f))]= False;
    else {
      list($k,$v)= explode("=",$f,2);
      if (trim($v)==False) $args[strtolower(trim($k))] = False; 
      else $args[strtolower(trim($k))]= trim($v);
    }
  }

  #get charset from argument-array    
  $charset= @$args["charset"];
  if (!$charset) $charset= $DefaultEncoding;

  #get max number of headlines from argument-array
  $maxheads = @$args["max"];
  $headcnt = 0;

  #get short-flag from argument-array
  #if short is set, no description text is printed
  if (isset($args["short"])) $short = True; else $short = False;

  #get reverse-flag from argument-array
  if (isset($args["reverse"])) $reverse = True; else $reverse = False;

  #get highlight terms from argument-array    
  $rssHighlight= @$args["highlight"];
  $rssHighlight= str_replace("  "," ", $rssHighlight);
  $rssHighlight= explode(" ", trim($rssHighlight));

  #get filter terms from argument-array    
  $rssFilter= @$args["filter"];
  $rssFilter= str_replace("  "," ", $rssFilter);
  $rssFilter= explode(" ", trim($rssFilter));    

  #fetch rss. may be cached locally.
  #Refer to the documentation of magpie for details.
  $rss = @fetch_rss($url);


  #check for errors.
  if ($rss->ERROR) {
     # return "Feed error"; #localize...
      #return "<div>Failed to load RSS feed from $url: ".$rss->ERROR."</div>"; #localize...
  }

  if (!is_array($rss->items)) {
     # return "Feed error"; #localize...
      #return "<div>Failed to load RSS feed from $url!</div>"; #localize...
  }

  #Bild title line    
  #get title from argument-array    
  
  $rssTitle= @$args["title"];
  $rssTitle= trim($rssTitle);

  if ($rssTitle !=='none') {
    if ($rssTitle=='') {
        $title= iconv($charset,$wgOutputEncoding,$rss->channel['title']);
        if ($rss->channel['link']) $title= "[".$rss->channel['link']." $title]";
        $output = "=== $title ===\n";
    }
    else
    {
      $title= "[".$rss->channel['link']." $rssTitle]";
      $output="=== $title ===\n";
    }
  } else {
      $output="\n\n\n";
  }
  
  if ($reverse) $rss->items = array_reverse($rss->items);

  $description = False; 
  foreach ($rss->items as $item) {
      if ($item['description']) {$description = True; break;}
  }

  #Bild items
  if (!$short and $description) { #full item list

    $output.="";
    foreach ($rss->items as $item) {

      $d_text = true;
      $d_title = true;

      $href = trim(iconv($charset,$wgOutputEncoding,$item['link']));
      $title = trim(iconv($charset,$wgOutputEncoding,$item['title']));

      $d_title = wfRssFilter ($title, $rssFilter);
      $title= wfRssHighlight($title, $rssHighlight);

      #bild description text if desired
      if ($item["description"]) {
        $text= trim(iconv($charset,$wgOutputEncoding,$item['description']));

        #avoid pre-tags
        $text= str_replace("\r"," ",$text);
        $text= str_replace("\n"," ",$text);
        $text= str_replace("\t"," ",$text);

        $d_text = wfRssFilter ($text, $rssFilter);
        $text= wfRssHighlight($text, $rssHighlight);

        $display = $d_text or $d_title;

      }
        else   {
          $text = "";
          $display = $d_title;
        }       

      if ($display) {
        $output.="* [$href $title]";
        if ($text) $output.="<br>$text";
        $output .= "\n";
      }

    #Cut off output when maxheads is reached:
    if (++$headcnt == $maxheads)  break;

    }
    # $output.="</dl>";
  }
  else { #short item list
   #  $output.="<ul>";
    foreach ($rss->items as $item) {
      $href = trim(iconv($charset,$wgOutputEncoding,$item['link']));
      $title = trim(iconv($charset,$wgOutputEncoding,$item['title']));

        $d_title = wfRssFilter ($title, $rssFilter);
        $title= wfRssHighlight($title, $rssHighlight);

        if ($d_title ) $output.="* [$href $title]\n";

      #Cut off output when maxheads is reached:
      if (++$headcnt == $maxheads)  break;
    }
    # $output.="</ul>";
  }


  if ($DisableCache) {

    global $wgVersion;

    # Do not cache this wiki page.
    # for details see http://public.kitware.com/Wiki/User:Barre/MediaWiki/Extensions
    global $wgTitle, $wgDBprefix;
    $ts = mktime();
    $now = gmdate("YmdHis", $ts + 120);
    $ns = $wgTitle->getNamespace();
    $ti = wfStrencode($wgTitle->getDBkey());

    $version = preg_replace("/^([1-9]).([1-9]).*/", "\\1\\2", $wgVersion);
    if ($version>14) $sql = "UPDATE $wgDBprefix"."page SET page_touched='$now' WHERE page_namespace=$ns AND page_title='$ti'";
    else             $sql = "UPDATE $wgDBprefix"."cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'";

    wfQuery($sql, DB_WRITE, "");
  }

  $out = $parser->parse ($output, $parser->mTitle,$parser->mOptions, true, false);
  return $out->getText();
}


function wfRssFilter ($text, $rssFilter) {

  $display = true;

  if (is_array($rssFilter)) {
    foreach($rssFilter as $term) {

      if ($term) {
        $display = false;
        if (preg_match("|$term|i", $text, $a))  {  $display = true; return $display; }
      }
    if ($display) break;
    }
  }
  return $display;
}


function wfRssHighlight($text, $rssHighlight) {

  $i=0;
  $starttag = "v8x5u3t3u8h";
  $endtag   = "q8n4f6n4n4x";

  $color[]="coral";
  $color[]="greenyellow";
  $color[]="lightskyblue";
  $color[]="gold";
  $color[]="violet";

  $count_color = count($color);

  if (is_array($rssHighlight)) {
    foreach($rssHighlight as $term) {
      if ($term) {
        $text = preg_replace("|\b(\w*?".$term."\w*?)\b|i", "$starttag"."_".$i."\\1$endtag", $text);
        $i++;
        if ($i == $count_color) $i=0;
        }
      }
    }
  # to avoid trouble should someone wants to highlight the terms "span", "style", ...
  for ($i=0; $i<5; $i++) {
    $text = preg_replace("|$starttag"."_".$i."|", "<span style=\"background-color:".$color[$i]."; font-weight: bold;\">", $text);
    $text = preg_replace("|$endtag|", "</span>", $text);
    }

  return $text;
}

?>