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

View File

@ -1,19 +1,19 @@
<?php
if ($blog->entries)
{
while ($data = $blog->entries())
{
$entry_init = entry_show_init($data['entryContent'], $data['entrySlug']);
echo "<article".($data['entryPinned'] ? ' class="pinned"' : '').(strlen(strip_tags($entry_init)) <= 210 ? ' class="tweet"' : '')." title='".show_date($data['entryPublished'])."'>
<header>
<h2><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars($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></p>
</header>
<div class='content'>".$entry_init."</div>
</article>\n";
unset($entry_init);
}
echo "<p class='paginator'>".(isset($seo[1]) && isnum($seo[1]) ? "<a href='/p/".($seo[1]-1)."' class='prev'>{locale:prev_page}</a><a href='/p/".($seo[1]+1)."' class='next'>{locale:next_page}</a>" : "<a href='/p/2' class='next'>{locale:next_page}</a>")."</p>";
} else
echo "<h1>$_locale[entry_not_found_title]</h1>"
<?php
if ($blog->entries)
{
while ($data = $blog->entries())
{
$entry_init = entry_show_init($data['entryContent'], $data['entrySlug']);
echo "<article".($data['entryPinned'] ? ' class="pinned"' : '').(strlen(strip_tags($entry_init)) <= 210 ? ' class="tweet"' : '')." title='".show_date($data['entryPublished'])."'>
<header>
<h2><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars($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></p>
</header>
<div class='content'>".$entry_init."</div>
</article>\n";
unset($entry_init);
}
echo "<p class='paginator'>".(isset($seo[1]) && isnum($seo[1]) ? "<a href='/p/".($seo[1]-1)."' class='prev'>{locale:prev_page}</a><a href='/p/".($seo[1]+1)."' class='next'>{locale:next_page}</a>" : "<a href='/p/2' class='next'>{locale:next_page}</a>")."</p>";
} else
echo "<h1>$_locale[entry_not_found_title]</h1>"
."<p>$_locale[entry_not_found]</p>\n";

View File

@ -1,18 +1,18 @@
<?php
if ($blog->entries)
while ($data = $blog->entry())
{
addTitle($data['entryTitle']);
addDescription(trimlink($data['entryContent']));
addImage((preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', $data['entryContent'], $images) ? $images[1] : 0));
echo "<article class='full'>
".(strlen($data['entryTitle']) > 50 ? "<h2>".htmlspecialchars($data['entryTitle'])."</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>
<div class='content'>".entry_show_all($data['entryContent'])."</div>
<p clasS='meta'>".get_entry_admin($data)."</p>
</article>\n";
}
else
echo "<h1>$_locale[entry_not_found_title]</h1>"
<?php
if ($blog->entries)
while ($data = $blog->entry())
{
addTitle($data['entryTitle']);
addDescription(trimlink($data['entryContent']));
addImage((preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', $data['entryContent'], $images) ? $images[1] : 0));
echo "<article class='full'>
".(strlen($data['entryTitle']) > 50 ? "<h2>".htmlspecialchars($data['entryTitle'])."</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>
<div class='content'>".entry_show_all($data['entryContent'])."</div>
<p clasS='meta'>".get_entry_admin($data)."</p>
</article>\n";
}
else
echo "<h1>$_locale[entry_not_found_title]</h1>"
."<p>$_locale[entry_not_found]</p>\n";

View File

@ -1,7 +1,7 @@
<?php
if ($page->readable())
{
addTitle($page->data['pageTitle']);
echo "<article>".entry_show_all($page->data['pageContent'])."</article>";
<?php
if ($page->readable())
{
addTitle($page->data['pageTitle']);
echo "<article>".entry_show_all($page->data['pageContent'])."</article>";
}

View File

@ -1,45 +1,45 @@
<div class="profile">
<h3><?=$userData['userName'].($me ? ' <a href="'.get_current_link().'/edit" class="edit">{locale:profile_edit}</a>' : '')?></h3>
<div id="profile_pic" style="background-image: url('<?=get_profile_picture($userData)?>')">
<?php if ($me) : ?>
<form action="<?=get_current_link()?>" method="post" name="userpic-upload" enctype="multipart/form-data">
<input type="file" name="userPic" id="userPicInput" style="display: none" />
<button type="button" onclick="$('#userPicInput').focus().click()">{locale:browse}</button><button type="submit" id="userPicSaveBtn" class="orange">{locale:delete}</button>
</form>
<script>
$("#userPicInput").change(function() {
$("#userPicSaveBtn").html('{locale:save}').removeClass('orange');
});
</script>
<?php endif ?>
</div>
<?php if (LOGGEDIN) : ?>
<div class='box contact'>
<p><strong>{locale:name}:</strong> <?=$userData['userRealName']?></p>
<p><strong>{locale:email}:</strong> <?=$userData['userEmail']?></p>
<p><strong>{locale:web}:</strong> <?=$userData['userWeb']?></p>
</div>
<?php endif ?>
<?php
$recent = $_sql->query("SELECT entrySlug, entryTitle FROM entries WHERE entryBy = $userData[userId] AND entryPublished <= ".time()." ORDER BY entryPublished DESC LIMIT 5");
if ($recent->num_rows) : ?>
<div class='box recent'>
<?php
while ($data = $recent->fetch_assoc())
echo "<p><a href='".get_entry_link($data['entrySlug'])."'>".trimlink($data['entryTitle'], 42)."</a></p>\n";
?>
</div>
<?php endif; unset($recent); ?>
<div style="clear: both"></div>
<?php if ($userData['userIntroduction']) : ?>
<div class='box introduction'>
<p><?=$userData['userIntroduction']?></p>
</div>
<?php endif ?>
<div class="clear"></div>
</div>
<div class="profile">
<h3><?=$userData['userName'].($me ? ' <a href="'.get_current_link().'/edit" class="edit">{locale:profile_edit}</a>' : '')?></h3>
<div id="profile_pic" style="background-image: url('<?=get_profile_picture($userData)?>')">
<?php if ($me) : ?>
<form action="<?=get_current_link()?>" method="post" name="userpic-upload" enctype="multipart/form-data">
<input type="file" name="userPic" id="userPicInput" style="display: none" />
<button type="button" onclick="$('#userPicInput').focus().click()">{locale:browse}</button><button type="submit" id="userPicSaveBtn" class="orange">{locale:delete}</button>
</form>
<script>
$("#userPicInput").change(function() {
$("#userPicSaveBtn").html('{locale:save}').removeClass('orange');
});
</script>
<?php endif ?>
</div>
<?php if (LOGGEDIN) : ?>
<div class='box contact'>
<p><strong>{locale:name}:</strong> <?=$userData['userRealName']?></p>
<p><strong>{locale:email}:</strong> <?=$userData['userEmail']?></p>
<p><strong>{locale:web}:</strong> <?=$userData['userWeb']?></p>
</div>
<?php endif ?>
<?php
$recent = $_sql->query("SELECT entrySlug, entryTitle FROM entries WHERE entryBy = $userData[userId] AND entryPublished <= ".time()." ORDER BY entryPublished DESC LIMIT 5");
if ($recent->num_rows) : ?>
<div class='box recent'>
<?php
while ($data = $recent->fetch_assoc())
echo "<p><a href='".get_entry_link($data['entrySlug'])."'>".trimlink($data['entryTitle'], 42)."</a></p>\n";
?>
</div>
<?php endif; unset($recent); ?>
<div style="clear: both"></div>
<?php if ($userData['userIntroduction']) : ?>
<div class='box introduction'>
<p><?=$userData['userIntroduction']?></p>
</div>
<?php endif ?>
<div class="clear"></div>
</div>
<div class="clear"></div>

View File

@ -1,19 +1,19 @@
<?php
if ($tagged->num_rows)
{
$tag = $tagged->fetch_assoc();
addTitle($tag['tagName']);
if ($entries->num_rows)
{
echo "<table class='pro'>";
while ($data = $entries->fetch_assoc())
echo "<tr><td><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars(trimlink($data['entryTitle'],90))."</a></td><td>".show_date($data['entryPublished'])."</td></tr>";
echo "</table>";
}
} else
redirect();
unset($tag);
unset($tagged);
<?php
if ($tagged->num_rows)
{
$tag = $tagged->fetch_assoc();
addTitle($tag['tagName']);
if ($entries->num_rows)
{
echo "<table class='pro'>";
while ($data = $entries->fetch_assoc())
echo "<tr><td><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars(trimlink($data['entryTitle'],90))."</a></td><td>".show_date($data['entryPublished'])."</td></tr>";
echo "</table>";
}
} else
redirect();
unset($tag);
unset($tagged);
unset($entries);

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 184 KiB

View File

@ -1,12 +1,12 @@
<!-- end #sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
<p>&copy; <?=date('Y')?> <?=$_set['title']?>. All rights reserved. Powered by <a href="http://sandros.hu/">Insanely</a>.</p>
</div>
<!-- end #footer -->
<?php get_page_extra_body(); ?>
</body>
<!-- end #sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
<p>&copy; <?=date('Y')?> <?=$_set['title']?>. All rights reserved. Powered by <a href="http://sandros.hu/">Insanely</a>.</p>
</div>
<!-- end #footer -->
<?php get_page_extra_body(); ?>
</body>
</html>

View File

@ -1,40 +1,40 @@
<!doctype html>
<html>
<head>
<title><?php get_page_title(); ?></title>
<meta charset="utf-8" />
<link href="/includes/css/ui-lightness/jquery-ui.custom.min.css" rel="stylesheet" />
<link href="/<?=get_theme_lib()?>/font/typicons.min.css" rel="stylesheet" />
<link rel="stylesheet" href="/<?=get_theme_lib()?>/style.css" type="text/css" media="screen" />
<link href='http://fonts.googleapis.com/css?family=Archivo+Narrow:400,700|Open+Sans:400,300&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' />
<script src="/includes/js/jquery.js"></script>
<script src="/includes/js/jquery-ui.custom.min.js"></script>
<script src="/includes/js/functions.js"></script>
<meta name="keywords" content="<?=($description ? $description : $_set['description'])?>" />
<meta name="description" content="<?=($description ? $description : $_set['description'])?>" />
<?php get_page_extra_head(); ?>
</head>
<body>
<div id="wrapper">
<div id="header-wrapper">
<div id="header" class="container">
<div id="logo">
<h1><a href="<?=get_current_link()?>"><?=(isset($_title[0]) ? trimlink($_title[0], 50) : $_set['title'])?></a></h1>
<p><?=$_set['tagline']?></p>
</div>
<div id="menu">
<ul>
<?php
if (isset($seo[0]) && strlen($seo[0]))
echo "<li><a href='$_set[url]'>$_locale[home]</a></li>";
?>
</ul>
</div>
</div>
</div>
<div id="page">
<?php
get_errors();
get_infos();
?>
<div id="content">
<!doctype html>
<html>
<head>
<title><?php get_page_title(); ?></title>
<meta charset="utf-8" />
<link href="/includes/css/ui-lightness/jquery-ui.custom.min.css" rel="stylesheet" />
<link href="/<?=get_theme_lib()?>/font/typicons.min.css" rel="stylesheet" />
<link rel="stylesheet" href="/<?=get_theme_lib()?>/style.css" type="text/css" media="screen" />
<link href='http://fonts.googleapis.com/css?family=Archivo+Narrow:400,700|Open+Sans:400,300&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' />
<script src="/includes/js/jquery.js"></script>
<script src="/includes/js/jquery-ui.custom.min.js"></script>
<script src="/includes/js/functions.js"></script>
<meta name="keywords" content="<?=($description ? $description : $_set['description'])?>" />
<meta name="description" content="<?=($description ? $description : $_set['description'])?>" />
<?php get_page_extra_head(); ?>
</head>
<body>
<div id="wrapper">
<div id="header-wrapper">
<div id="header" class="container">
<div id="logo">
<h1><a href="<?=get_current_link()?>"><?=(isset($_title[0]) ? trimlink($_title[0], 50) : $_set['title'])?></a></h1>
<p><?=$_set['tagline']?></p>
</div>
<div id="menu">
<ul>
<?php
if (isset($seo[0]) && strlen($seo[0]))
echo "<li><a href='$_set[url]'>$_locale[home]</a></li>";
?>
</ul>
</div>
</div>
</div>
<div id="page">
<?php
get_errors();
get_infos();
?>
<div id="content">

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,25 @@
<?php
addHead('<script src="/'.get_theme_lib().'/theme.js"></script>');
include get_theme_lib().'/header.php';
echo get_site_body();
?>
<div style="clear: both;">&nbsp;</div>
</div>
<div id="sidebar">
<ul>
<li>
<h2><?=$_locale['navigation']?></h2>
<ul>
<?php get_navigation(); ?>
</ul>
</li>
<?php include 'includes/sidebar/sidebar.php'; ?>
</ul>
</div>
<?php
<?php
addHead('<script src="/'.get_theme_lib().'/theme.js"></script>');
include get_theme_lib().'/header.php';
echo get_site_body();
?>
<div style="clear: both;">&nbsp;</div>
</div>
<div id="sidebar">
<ul>
<li>
<h2><?=$_locale['navigation']?></h2>
<ul>
<?php get_navigation(); ?>
</ul>
</li>
<?php include 'includes/sidebar/sidebar.php'; ?>
</ul>
</div>
<?php
include get_theme_lib().'/footer.php';

View File

@ -1,65 +1,65 @@
/* EXTRA FUCKING VIEW */
var keepTheFuckingSidebarOnTheScreenOkay = false;
function keepThePageAwesome() {
$(document.body).addClass('smallscreen');
if ($(window).width() < 1000)
{
keepTheFuckingSidebarOnTheScreenOkay = true;
$(document.body).addClass('tinyscreen');
}
else
{
keepTheFuckingSidebarOnTheScreenOkay = false;
$(document.body).removeClass('tinyscreen');
}
}
$(window).resize(function() { keepThePageAwesome(); $("#sidebar").css('max-height', $(window).height()); });
/* AWESOMENESS */
var sidebarHeight = 900;
var contentWidth = 690;
$(document).ready(function() {
// MORE EXTA FUCKING FUNCTION
$("#sidebar").css('overflow', 'hidden').hover(function() {
$(this).css('overflow', 'auto');
},
function() {
$(this).css('overflow', 'hidden');
});
// TWEET ANIMS
$("article.tweet").hover(function() {
$(this).find("p.readmore").stop().slideDown();
},
function(){
$(this).find("p.readmore").stop().slideUp();
});
// SIDEBAR MAX HEIGHT
$("#sidebar").css('max-height', $(window).height()-100);
var contentHeight = $("#content").height();
if (sidebarHeight < $("#sidebar").height())
sidebarHeight = $("#sidebar").height();
contentWidth = $("#content").width();
keepThePageAwesome();
/* MORE AWESOMENESS */
var scrollTopLoc = 0;
$(window).scroll(function(){
scrollTopLoc = $(window).scrollTop();
if (!keepTheFuckingSidebarOnTheScreenOkay)
if (contentHeight > sidebarHeight && scrollTopLoc > 100)
{
if (contentHeight > sidebarHeight+scrollTopLoc)
$("#sidebar").stop().animate({"margin-top": ''+($(window).scrollTop() - 100)+'px'});
}
else
$("#sidebar").stop().css("margin-top", '0px');
});
/* EXTRA FUCKING VIEW */
var keepTheFuckingSidebarOnTheScreenOkay = false;
function keepThePageAwesome() {
$(document.body).addClass('smallscreen');
if ($(window).width() < 1000)
{
keepTheFuckingSidebarOnTheScreenOkay = true;
$(document.body).addClass('tinyscreen');
}
else
{
keepTheFuckingSidebarOnTheScreenOkay = false;
$(document.body).removeClass('tinyscreen');
}
}
$(window).resize(function() { keepThePageAwesome(); $("#sidebar").css('max-height', $(window).height()); });
/* AWESOMENESS */
var sidebarHeight = 900;
var contentWidth = 690;
$(document).ready(function() {
// MORE EXTA FUCKING FUNCTION
$("#sidebar").css('overflow', 'hidden').hover(function() {
$(this).css('overflow', 'auto');
},
function() {
$(this).css('overflow', 'hidden');
});
// TWEET ANIMS
$("article.tweet").hover(function() {
$(this).find("p.readmore").stop().slideDown();
},
function(){
$(this).find("p.readmore").stop().slideUp();
});
// SIDEBAR MAX HEIGHT
$("#sidebar").css('max-height', $(window).height()-100);
var contentHeight = $("#content").height();
if (sidebarHeight < $("#sidebar").height())
sidebarHeight = $("#sidebar").height();
contentWidth = $("#content").width();
keepThePageAwesome();
/* MORE AWESOMENESS */
var scrollTopLoc = 0;
$(window).scroll(function(){
scrollTopLoc = $(window).scrollTop();
if (!keepTheFuckingSidebarOnTheScreenOkay)
if (contentHeight > sidebarHeight && scrollTopLoc > 100)
{
if (contentHeight > sidebarHeight+scrollTopLoc)
$("#sidebar").stop().animate({"margin-top": ''+($(window).scrollTop() - 100)+'px'});
}
else
$("#sidebar").stop().css("margin-top", '0px');
});
});