simpub/b/2017/00-template.php

62 lines
1.3 KiB
PHP

<?php
$blogentry = (object) array(
'file' => __FILE__,
'title' => 'Title',
'description' => 'Description',
'author' => 'Markus',
'tags' => 'video,tags',
'status' => 'unlisted', // released, private, unlisted
'ctime' => strtotime("2017-01-24 20:20")
// 'utime' => strtotime("2017-01-25 09:21")
);
if (!isset($CMS_ACTIVE) or !renderPost()) return;
?>
<h2 class="subheading">-- Subheading</h2>
<p>
<?php includeGraphics("Post image", "2017/fft.png", $preview=""); ?>
</p>
<p>
<?php
includeVideo("https://www.youtube.com/embed/fzQ6gRAEoy0");
// Preview can be "+" (auto gen), "" (take src) or "<url>" (take url)
// Link will normally link to self
includeGraphics("Random FFT image", "2017/fft.png", $preview="", $style="width:640px;", $link="http://notsyncing.net/");
?>
</p>
<?php
if (extended()) {
?>
<h2>Hidden section</h2>
<p>
This will only show when opening the post, but not on the overview page.
</p>
<?php
}
?>
<h2>Protected section</h2>
<?php
if (password("hello")) {
?>
<p>
This will only show after entering the correct password.
</p>
<?php
}
?>
<h2>Some provided styles</h2>
<p>
<div class="code">
$ some formatted code <br>
$ foobar
</div>
</p>
<p>
Inline <code>$code</code> is also possible.
</p>