
{eval} // JSON-LD Structured Data for SEO if (isset($moduleid) && $moduleid == 21 && isset($itemid)) { $jsonld = array( "@context" => "https://schema.org", "@type" => "Article", "headline" => $title, "description" => $introduce ? $introduce : mb_substr(strip_tags($content), 0, 200, 'UTF-8'), "datePublished" => date('c', $addtime), "dateModified" => isset($edittime) ? date('c', $edittime) : date('c', $addtime), "mainEntityOfPage" => array( "@type" => "WebPage", "@id" => $linkurl ) ); // Add image if available if (isset($thumb) && $thumb) { $jsonld["image"] = array( "@type" => "ImageObject", "url" => $thumb, "width" => 800, "height" => 600 ); } // Add author if available if (isset($username) && $username) { $jsonld["author"] = array( "@type" => "Person", "name" => $username ); } // Check if it's a FAQ article if (isset($content) && strpos($content, '
(.*?)<\/p>/s', $content, $matches, PREG_SET_ORDER); if (!empty($matches)) { $jsonld["@type"] = "FAQPage"; $jsonld["mainEntity"] = array(); foreach ($matches as $match) { $jsonld["mainEntity"][] = array( "@type" => "Question", "name" => strip_tags($match[1]), "acceptedAnswer" => array( "@type" => "Answer", "text" => strip_tags($match[2]) ) ); } // Remove fields not applicable to FAQPage unset($jsonld["articleBody"]); } } echo '' . "\n"; } {/eval}
图库浏览完毕
