นอกจากทำให้เป็น opengraph แล้ว code นี้ยังสามารถนำเอาไปใช้จุดประสงค์อื่นได้
facebook app id ของ thai25 : 1757727621161613
code php
if(strstr($this->item->text, "
$dom = new DOMDocument;
@$dom->loadHTML($this->item->text);
$imagez = $dom->getElementsByTagName("img");
$imageu = $imagez->item(0)->getAttribute("src");
$imgmeta = iconv("UTF-8", "ISO-8859-9", $imageu);
$ux = urlencode($imgmeta);
$pixmeta = str_replace("%2F", "/", $ux);
$doc =& JFactory::getDocument();
$MetaTags = '';
if (substr($pixmeta, 0, 4) != 'http') $pixmeta = JURI::base().$pixmeta; {
$MetaTags .= '';
}
$MetaTags .= '';
$MetaTags .= '';
$MetaTags .= '';
$MetaTags .= '';
$doc->addCustomTag($MetaTags);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น