
Originally Posted by
swguy
@lat9 If you could post the block of code you're using as an example for other store maintainers and plugin authors, it would be great!
OK, here's one:
PHP Code:
// -----
// The initial version of GPSF-2 supports zc156, zc157 and zc158. zc158b will be removing
// the 'legacy' stylesheets and javascript provided in previous versions. As such, determine
// the Zen Cart base version in use to maintain the downwardly-compatible use of this module.
//
$gspf_zc_version = PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR;
$admin_html_head_supported = ($gspf_zc_version >= '1.5.7');
$body_onload = ($admin_html_head_supported === true) ? '' : ' onload="init();"';
?>
<!doctype html>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta charset="<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<?php
if ($admin_html_head_supported === true) {
require DIR_WS_INCLUDES . 'admin_html_head.php';
} else {
?>
<link rel="stylesheet" href="includes/stylesheet.css">
<link rel="stylesheet" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<script src="includes/menu.js"></script>
<script src="includes/general.js"></script>
<script>
function init()
{
cssjsmenu('navbar');
if (document.getElementById) {
var kill = document.getElementById('hoverJS');
kill.disabled = true;
}
}
</script>
<?php
}
?>
</head>
<body<?php echo $body_onload; ?>>
<?php require DIR_WS_INCLUDES . 'header.php'; ?>
<?php
Bookmarks