public static function getBodyMetaTags() { if (empty(self::$loaded)) { self::$loaded = self::getContentData(); } if (empty(self::$loaded) || isset(self::$loaded["data"]) == false || isset(self::$loaded["type"]) == false || (self::$loaded["type"] == "software" || self::$loaded["type"] == "vappliance") === false) { return ""; } $data = SEO::$loaded["data"]; $meta = SEO::$loaded["meta"]; $link = SEO::$loaded["link"]; $res = '<noscript>'; $res .= '<style>.noscript.softwareentry {display: block;width: 1000px;}.noscript.softwareentry .field {display: block;padding-bottom: 0.5em;padding-left: 10em;width: auto;text-align:left;}'; $res .= '.noscript.softwareentry .field .fieldtype {color: #444444;display: inline-block;font-weight: bold;min-width: 90px;vertical-align: top;width: 90px;}'; $res .= '.noscript.softwareentry .field .fieldvalue {display: inline-block;max-width: 780px;text-align:left;}.noscript.softwareentry .field.image {height: 100px;left: -110px;position: absolute;top: 0;width: 100px;.height: 100px;border:none;}'; $res .= '</style>'; $res .= '<div class="noscript softwareentry" itemscope itemtype="https://schema.org/SoftwareApplication">'; $res .= '<div class="field name"><span class="fieldtype">Name:</span><span class="fieldvalue" itemprop="name">' . htmlentities($data->name, ENT_QUOTES, "UTF-8") . '</span></div>'; $res .= '<div class="field description"><span class="fieldtype">Description:</span><span class="fieldvalue" itemprop="description">' . $meta["description"] . '</span></div>'; $res .= '<div class="field abstract"><span class="fieldtype">Abstract:</span><span class="fieldvalue" itemprop="text">' . htmlentities($data->abstract, ENT_QUOTES, "UTF-8") . '</span></div>'; $res .= '<img class="field image" alt="' . htmlentities($data->name, ENT_QUOTES, "UTF-8") . ' logo" src="https://' . $_SERVER["SERVER_NAME"] . '/apps/getlogo?id=' . $data->id . '" width="100px" itemprop="image thumbnailUrl" />'; $res .= '<div class="field canonical"><span class="fieldtype">Url:</span><span class="fieldvalue"><a href="' . $link["canonical"] . '" itemprop="url" >' . $link["canonical"] . '</a></span></div>'; if ($data->dateAdded) { $res .= '<div class="field datecreated"><span class="fieldtype">Created:</span><span class="fieldvalue" itemprop="dateCreated">' . date('Y-m-d', strtotime($data->dateAdded)) . '</span></div>'; } if ($data->lastUpdated) { $res .= '<div class="field lastupdated"><span class="fieldtype">Last updated:</span><span class="fieldvalue" itemprop="dateModified">' . date('Y-m-d', strtotime($data->lastUpdated)) . '</span></div>'; } if ($data->rating) { $res .= '<div itemscope itemprop="aggregateRating" itemtype="https://schema.org/AggregateRating">'; $res .= '<meta itemprop="bestRating" content="5">'; $res .= '<meta itemprop="worstRating" content="0">'; $res .= '<div class="field ratingvotes">'; $res .= '<span class="fieldtype">Rating votes:</span>'; $res .= '<span class="fieldvalue"><span itemprop="ratingCount">' . $data->getRatingcount() . '</span></span>'; $res .= '</div>'; $res .= '<div class="field rating">'; $res .= '<span class="fieldtype">Rating score:</span>'; $res .= '<span class="fieldvalue"><span itemprop="ratingValue">' . $data->getRating() . '</span><span> / 5 </span></span>'; $res .= '</div></div>'; } $res .= '</div>'; $res .= '</noscript>'; return $res; }