コード例 #1
0
ファイル: heading.php プロジェクト: hongoctrien/module-code
    define('FACEBOOK_JSSDK', true);
}
if (!defined('GOOGLE_PLUS')) {
    $contents .= "<script type=\"text/javascript\" data-show=\"after\">\n\twindow.___gcfg = {lang: nv_lang_data};\n\t(function() {\n\tvar po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;\n\tpo.src = 'https://apis.google.com/js/plusone.js';\n\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n\t})();\n\t</script>";
    define('GOOGLE_PLUS', true);
}
/*
 * $header = '';
 * if( $array_data['catid'] > 0 )
 * {
 * $header .= '<h1>' . $array_data['title'] . '</h1>';
 * $header .= '<span><strong>' . $lang_module['cat'] . '</strong>: <a href="' . $array_cat[$array_data['catid']]['link'] .'" title="' . $array_cat[$array_data['catid']]['title'] . '">' . $array_cat[$array_data['catid']]['title'] . '</a>&nbsp;&nbsp;&nbsp;<span><strong>' . $lang_module['poster'] . '</strong>: ' . $array_data['adduser'] . '</span>';
 * }
 * $header .= '<div style="margin-top: 10px" class="clearfix"><div style="float: left; margin-right: 30px" class="fb-like" data-href="' . $client_info['selfurl'] . '" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div><div class="g-plusone" data-size="medium"></div></div>';
 * $header .= '<hr />';
 *
 */
$contents .= nv_build_heading($array_data);
if ($array_data['viewdemo']) {
    $contents .= nv_build_demo($array_data);
}
$contents .= nv_theme_code_detail($array_data);
if (!empty($array_data['image'])) {
    $meta_property['og:image'] = NV_MY_DOMAIN . NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $array_data['image'];
}
$page_title = $array_data['title'];
$description = $array_data['description'];
$array_mod_title = array(array('title' => $array_cat[$array_data['catid']]['title'], 'link' => $array_cat[$array_data['catid']]['link']));
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
コード例 #2
0
ファイル: detail.php プロジェクト: hongoctrien/module-code
        $row['image'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $row['image'];
    } else {
        $row['image'] = '';
    }
    $array_data_other[] = $row;
}
if (!defined('FACEBOOK_JSSDK')) {
    $lang = NV_LANG_DATA == 'vi' ? 'vi_VN' : 'en_US';
    $facebookappid = '835372636499958';
    $contents .= "<div id=\"fb-root\"></div>\n\t<script type=\"text/javascript\" data-show=\"after\">\n\t (function(d, s, id) {\n\t var js, fjs = d.getElementsByTagName(s)[0];\n\t if (d.getElementById(id)) return;\n\t js = d.createElement(s); js.id = id;\n\t js.src = \"//connect.facebook.net/" . $lang . "/all.js#xfbml=1&appId=" . $facebookappid . "\";\n\t fjs.parentNode.insertBefore(js, fjs);\n\t }(document, 'script', 'facebook-jssdk'));\n\t</script>";
    define('FACEBOOK_JSSDK', true);
}
if (!defined('GOOGLE_PLUS')) {
    $contents .= "<script type=\"text/javascript\" data-show=\"after\">\n\twindow.___gcfg = {lang: nv_lang_data};\n\t(function() {\n\tvar po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;\n\tpo.src = 'https://apis.google.com/js/plusone.js';\n\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n\t})();\n\t</script>";
    define('GOOGLE_PLUS', true);
}
$contents .= nv_build_heading($array_data);
if ($array_data['viewdemo']) {
    $contents .= nv_build_demo($array_data);
}
$contents .= nv_theme_code_detail($array_data, $array_data_other);
$meta_property['og:type'] = 'article';
if (!empty($array_data['image'])) {
    $meta_property['og:image'] = NV_MY_DOMAIN . NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $array_data['image'];
}
$page_title = $array_data['title'];
$description = $array_data['description'];
$array_mod_title = array(array('title' => $array_cat[$array_data['catid']]['title'], 'link' => $array_cat[$array_data['catid']]['link']));
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';