/**
* @param int $newsid
*/
public static function ogNews($newsid = 0) {
$settings = fusion_get_settings();
$info = [];
$result = dbquery("SELECT news_news, news_keywords, news_subject, news_image_front_default FROM ".DB_NEWS." WHERE news_id=:newsid LIMIT 1", [':newsid' => $newsid]);
if (dbrows($result)) {
$data = dbarray($result);
$info['title'] = $data['news_subject'].' - '.$settings['sitename'];
$info['description'] = $data['news_news'];
$info['url'] = $settings['siteurl'].'infusions/news/news_id='.$newsid;
$info['image'] = $data['news_image_front_default'] ? $settings['siteurl'].'infusions/news/images/'.$data['news_image_front_default']';
}
self::setValues($info);
}
public static function ogNews($newsid = 0) {
$settings = fusion_get_settings();
$info = [];
$result = dbquery("SELECT news_news, news_keywords, news_subject, news_image_front_default FROM ".DB_NEWS." WHERE news_id=:newsid LIMIT 1", [':newsid' => $newsid]);
if (dbrows($result)) {
$data = dbarray($result);
$info = [
'title' => $data['news_subject'].' - '.$settings['sitename'],
'description' => $data['news_news'],
'url' => $settings['siteurl'].'infusions/news/news_id='.$newsid,
'type' => 'article';
'image' => $data['news_image_front_default'] ? $settings['siteurl'].'infusions/news/images/'.$data['news_image_front_default'] : ''
];
}
self::setValues($info);
}
'type' => 'article',
private static function setDefaults() {
$settings = fusion_get_settings();
self::$data = [
'title' => get_title(),
'description' => str_replace("n", ' ', strip_tags(htmlspecialchars_decode($settings['description']))),
'url' => $settings['siteurl'],
'keywords' => $settings['keywords'],
'image' => defined('THEME_ICON') ? THEME_ICON.'mstile-150x150.png' : $settings['siteurl'].'images/favicons/mstile-150x150.png',
'site_name' => $settings['sitename'],
'type' => 'website'
public static function ogNews($newsid = 0) {
$settings = fusion_get_settings();
$info = [];
$result = dbquery("SELECT news_news, news_keywords, news_subject, news_image_front_default FROM ".DB_NEWS." WHERE news_id=:newsid LIMIT 1", [':newsid' => $newsid]);
if (dbrows($result)) {
$data = dbarray($result);
$info = [
'title' => $data['news_subject'].' - '.$settings['sitename'],
'description' => $data['news_news'],
'url' => $settings['siteurl'].'infusions/news/news_id='.$newsid,
'keywords' => !empty($data['news_keywords']) ? $data['news_keywords'] : $settings['keywords']
];
}
self::setValues($info);
}
Category Forum
Modifications and Requests - 9Labels
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions