<?php
+/* To-Do
+https://developers.google.com/+/plugins/snippet/
+
+<meta itemprop="name" content="Toller Titel">
+<meta itemprop="description" content="Eine tolle Beschreibung">
+<meta itemprop="image" content="http://maple.libertreeproject.org/images/tree-icon.png">
+
+<body itemscope itemtype="http://schema.org/Product">
+ <h1 itemprop="name">Shiny Trinket</h1>
+ <img itemprop="image" src="{image-url}" />
+ <p itemprop="description">Shiny trinkets are shiny.</p>
+</body>
+*/
+
if(!function_exists('deletenode')) {
function deletenode(&$doc, $node)
{
}
} else {
$src = completeurl($siteinfo["image"], $url);
+
+ unset($siteinfo["image"]);
+
$photodata = getimagesize($src);
if (($photodata[0] > 10) and ($photodata[1] > 10))
$siteinfo = parseurl_getsiteinfo($url);
if($siteinfo["title"] == "") {
- echo print_r($siteinfo, true);
- //echo sprintf($template,$url,$url,'') . $str_tags;
+ echo sprintf($template,$url,$url,'') . $str_tags;
killme();
} else {
$text = $siteinfo["text"];
$image = "";
- foreach ($siteinfo["images"] as $imagedata)
+ if(sizeof($siteinfo["images"]) > 0){
+ /*
+ Execute below code only if image is present in siteinfo
+ */
+ foreach ($siteinfo["images"] as $imagedata)
if($textmode)
- $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
+ $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
else
- $image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />';
+ $image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />';
+ }
if(strlen($text)) {
if($textmode)