New plugin loader, page features, API0.2b, Bugfixes

This commit is contained in:
2016-11-19 16:13:37 +01:00
parent 6d1eef25ca
commit b97faf21fd
230 changed files with 36532 additions and 36346 deletions

48
api.php
View File

@ -1,25 +1,25 @@
<?php
require_once 'core.php';
header('Content-type: application/json');
$blog = new blog();
$entries = array();
if ($blog->entries)
{
while ($data = $blog->entries())
array_push($entries, array('entryTitle'=>$data['entryTitle'], 'entrySlug'=>$data['entrySlug'], 'entryPublished'=>show_date($data['entryPublished']), 'entryContent'=>entry_show_init($data['entryContent'], $data['entrySlug'], true)));
/*echo "<article>
<header>
<h2><a href='".get_entry_link($data['entrySlug'])."'>$data[entryTitle]</a></h2>
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a>".get_entry_admin($data)."</p>
</header>
<div class='content'>".entry_show_init($data['entryContent'], $data['entrySlug'])."</div>
</article>\n";*/
}
echo json_encode($entries);
<?php
require_once 'core.php';
header('Content-type: application/json');
$blog = new blog(false, 0, true, (isset($_GET['no']) ? $_GET['no'] : fasle));
$entries = array();
if ($blog->entries)
{
while ($data = $blog->entries())
array_push($entries, array('entryTitle'=>$data['entryTitle'], 'entrySlug'=>$data['entrySlug'], 'entryPublished'=>show_date($data['entryPublished']), 'entryContent'=>entry_show_init($data['entryContent'], $data['entrySlug'], true)));
/*echo "<article>
<header>
<h2><a href='".get_entry_link($data['entrySlug'])."'>$data[entryTitle]</a></h2>
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a>".get_entry_admin($data)."</p>
</header>
<div class='content'>".entry_show_init($data['entryContent'], $data['entrySlug'])."</div>
</article>\n";*/
}
echo json_encode($entries);
?>