Các lưu ý khi lập trình NukeViet 4.x

Ví dụ:

$my_head .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "js/jquery/jquery.imgpreload.min.js\"></script>\n";
$my_footer .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "themes/" . $module_info['template'] . "/js/contentslider.js\"></script>\n";

Ngoài ra có thể chèn trực tiếp vào các file tpl, khi xuất ra trình duyệt hệ thống tự động đưa js và css về vị trí thích hợp.

if (defined('NV_EDITOR')) {
    require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
}
 
$row['bodytext'] = htmlspecialchars(nv_editor_br2nl($row['bodytext']));
 
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
    $row['bodytext'] = nv_aleditor('bodytext', '100%', '300px', $row['bodytext']);
} else {
    $row['bodytext'] = '<textarea style="width:100%;height:300px" name="bodytext">' . $row['bodytext'] . '</textarea>';
}
$("input[name=selectimg]").click(function() {
	var area = "image";
	var alt = "imagealt";
	var path = uploads_dir_user;
	var type = "image";
	nv_open_browse(script_name + "?" + nv_name_variable + "=upload&popup=1&area=" + area + "&alt=" + alt + "&path=" + path + "&type=" + type, "NVImg", 850, 420, "resizable=no,scrollbars=no,toolbar=no,location=no,status=no");
	return false;
});
$("#selecteduid").click( function() {
    nv_open_browse('{NV_BASE_ADMINURL}index.php?' + nv_name_variable + '=users&' + nv_fc_variable + '=getuserid&area=userid&return=username&filtersql={FILTERSQL}', 'NVImg', 850, 500, 'resizable=no,scrollbars=no,toolbar=no,location=no,status=no');
});
$xtpl->assign('THEME_IMG_CRONJOBS', NV_BASE_SITEURL . "index.php?second=cronjobs&amp;p=" . nv_genpass());

Trong phần cuối của website cần có dòng

<img alt="" title="" src="{THEME_IMG_CRONJOBS}" width="1" height="1" />

(Thông thường phần cuối thường do file footer.tpl quyết định).