Initial commit
This commit is contained in:
19
themes/murkystairwell/components/entries.php
Normal file
19
themes/murkystairwell/components/entries.php
Normal file
@ -0,0 +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>"
|
||||
."<p>$_locale[entry_not_found]</p>\n";
|
18
themes/murkystairwell/components/entry.php
Normal file
18
themes/murkystairwell/components/entry.php
Normal file
@ -0,0 +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>"
|
||||
."<p>$_locale[entry_not_found]</p>\n";
|
7
themes/murkystairwell/components/page.php
Normal file
7
themes/murkystairwell/components/page.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
if ($page->readable())
|
||||
{
|
||||
addTitle($page->data['pageTitle']);
|
||||
echo "<article>".entry_show_all($page->data['pageContent'])."</article>";
|
||||
}
|
45
themes/murkystairwell/components/profile.php
Normal file
45
themes/murkystairwell/components/profile.php
Normal file
@ -0,0 +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="clear"></div>
|
19
themes/murkystairwell/components/tag.php
Normal file
19
themes/murkystairwell/components/tag.php
Normal file
@ -0,0 +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);
|
||||
unset($entries);
|
Reference in New Issue
Block a user