Autoversion scripts

This commit is contained in:
ruan 2018-03-30 09:46:47 +02:00
parent 50e9e16ecf
commit 4b38a80e6c
No known key found for this signature in database
GPG Key ID: 0D2EC1C52E469C0B
3 changed files with 8 additions and 8 deletions

View File

@ -1,3 +1,3 @@
<script src="inc/js/jquery.min.js"></script> <script src="<?php echo $this->autoversion('inc/js/jquery.min.js'); ?>"></script>
<script src="inc/js/bootstrap.min.js"></script> <script src="<?php echo $this->autoversion('inc/js/bootstrap.min.js'); ?>"></script>
<?php echo "</html>"; ?> <?php echo "</html>"; ?>

View File

@ -49,10 +49,6 @@ function navbar($links) {
echo '</ul>'; echo '</ul>';
} }
function autoversion($file) {
return $file . "?" . filemtime($file);
}
function print_header() { function print_header() {
$settings = $this->page->settings; $settings = $this->page->settings;
?> ?>
@ -65,8 +61,8 @@ $settings = $this->page->settings;
<meta name="author" content="LiteBans"> <meta name="author" content="LiteBans">
<link rel="shortcut icon" href="inc/img/minecraft.ico"> <link rel="shortcut icon" href="inc/img/minecraft.ico">
<!-- CSS --> <!-- CSS -->
<link href="<?php echo $this->autoversion('inc/css/bootstrap.min.css'); ?>" rel="stylesheet"> <link href="<?php echo $this->page->autoversion('inc/css/bootstrap.min.css'); ?>" rel="stylesheet">
<link href="<?php echo $this->autoversion('inc/css/custom.css'); ?>" rel="stylesheet"> <link href="<?php echo $this->page->autoversion('inc/css/custom.css'); ?>" rel="stylesheet">
<script type="text/javascript"> <script type="text/javascript">
function withjQuery(f) { function withjQuery(f) {
if (window.jQuery) f(); if (window.jQuery) f();

View File

@ -500,6 +500,10 @@ class Page {
include_once './inc/footer.php'; include_once './inc/footer.php';
} }
function autoversion($file) {
return $file . "?" . filemtime($file);
}
function table_begin() { function table_begin() {
echo '<table class="table table-striped table-bordered table-condensed">'; echo '<table class="table table-striped table-bordered table-condensed">';
} }