Example #1
0
echo numeral(article_number(article_id()), true);
?>
 oldest. It is <?php 
echo count_words(article_markdown());
?>
 words long<?php 
if (comments_open()) {
    ?>
, and it’s got <?php 
    echo total_comments() . pluralise(total_comments(), ' comment');
    ?>
 for now.<?php 
}
?>
 <?php 
echo article_custom_field('attribution');
?>
</p>
			</section>
		</section>

		<?php 
if (comments_open()) {
    ?>
		<section class="comments">
			<?php 
    if (has_comments()) {
        ?>
			<ul class="commentlist">
				<?php 
        $i = 0;
Example #2
0
function get_author()
{
    if (!article_custom_field('metadata_wtf')) {
        return '';
    }
    $metadata = parse_wtf(article_custom_field('metadata_wtf'));
    $autori = array();
    if (!empty($metadata['.']['creator'])) {
        $autori = array_merge($autori, $metadata['.']['creator']);
    }
    if (!empty($metadata['.']['contributor'])) {
        $autori = array_merge($autori, $metadata['.']['contributor']);
    }
    if (count($autori) == 0) {
        $autori[] = '<i>anonymní autor</i>';
    }
    return implode(', ', $autori);
}
$pageTitle = article_title() . ' - DownloadMii Blog';
$buffer = ob_get_contents();
ob_end_clean();
$buffer = str_replace("%TITLE%", $pageTitle, $buffer);
$buffer = str_replace("%DESCRIPTION%", article_title(), $buffer);
$buffer = str_replace("%SOCIAL_TITLE%", $pageTitle, $buffer);
$buffer = str_replace("%SOCIAL_URL%", article_url(), $buffer);
$buffer = str_replace("%SOCIAL_DESC%", article_description(), $buffer);
echo $buffer;
if (article_custom_field('appnameField1', 'null') != 'null') {
    ?>
						App: <a href="https://www.downloadmii.com/apps/view/<?php 
    echo article_custom_field('appnameField1_GUID');
    ?>
"><?php 
    echo article_custom_field('appnameField1');
    ?>
</a>
						<br />
				<?php 
}
?>
				<br />
				<div class="well clearfix">
					<article>
						<?php 
echo article_markdown();
?>
						<a href="https://www.downloadmii.com">Return to DownloadMii's homepage </a>
					</article>
				</div>
Example #4
0
File: 404.php Project: silviuu/blg
<div id='bump'>
<?php 
theme_include('header');
?>
	<section class="article" id="article-<?php 
echo article_id();
?>
">
      <div class="overlay"></div>
      <div class="featured-image" style="background-image: url(<?php 
echo article_custom_field('featured-image', 'themes/balzac/img/soft-trees.jpg');
?>
);"></div>
      
      <article class="wrap post">
        <header class="post-header">
          <hgroup>
            <h1>We're lost!</h1>
            <p class="date">404 - Page Not Found</p>
            <p class="intro">Seems like we've stumbled into No Man's Land.</p>
          </hgroup>
        </header>
    
        <p>It looks like this isn't actually a page. Why not wander back <a href="<?php 
echo base_url();
?>
">home</a>?</p>
    
      </article>
    </section>
</div>
Example #5
0
<?php

defined('IN_CMS') or die('No direct access allowed.');
$home = is_postspage();
$url = isset($url) && !$home ? $url : article_url();
$title = isset($title) && !$home ? $title : article_title();
$time = isset($time) && !$home ? $time : article_time();
$excerpt = isset($excerpt) && !$home ? $excerpt : trim(article_description());
$excerpt = $excerpt == "" ? false : $excerpt;
$content = isset($content) && !$home ? $content : article_html();
$image = isset($image) && !$home ? $image : article_custom_field('img', false);
$isArticle = isset($isArticle) && $isArticle;
$uurl = urlencode(full_url());
$utitle = urlencode($title);
$tags = array("theme_url" => theme_url());
foreach ($tags as $s => $r) {
    $content = str_replace("{" . $s . "}", $r, $content);
}
?>
<li class="<?php 
if (isset($first) && $first) {
    echo "showContent";
}
if (!$time) {
    echo " noFooter";
}
echo is_single() ? " single" : " multiple";
?>
">
	<header tabindex="-1">
		<!--<a href="<?php 
Example #6
0
<?php

theme_include("header");
?>

<?php 
if (has_posts()) {
    while (posts()) {
        ?>
    <article class="article article-preview">
        <h2><?php 
        echo article_title();
        ?>
</h2>
        <?php 
        $image = article_custom_field("image");
        if (!empty($image)) {
            ?>
            <img src="<?php 
            echo $image;
            ?>
" class="img-responsive" alt="<?php 
            echo article_title();
            ?>
">
        <?php 
        }
        ?>

        <aside class="article-info">
            <span class="time">
Example #7
0
<?php

theme_include("header");
?>

<article class="article article-single">
    <h2><?php 
echo article_title();
?>
</h2>

    <?php 
$image = article_custom_field('image');
if (!empty($image)) {
    echo "<img src=\"{$image}\" class=\"img-responsive\" alt=\"", article_title(), "\" itemprop=\"image\">";
    //if there is image show it
}
?>

    <aside class="article-info">
        <span class="time">
            <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
            <?php 
echo article_date();
?>
        </span>
        <span class="author">
            <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
            <?php 
echo article_author();
?>
Example #8
0
echo article_id();
?>
">
			<h1><?php 
echo article_title();
?>
</h1>
			<article>
				<?php 
echo article_markdown();
?>
			</article>

			<section class="footnote">
				<?php 
$tagsstring = article_custom_field('post_tags');
if (!empty($tagsstring)) {
    $tags = explode(',', $tagsstring);
}
if (!empty($tags)) {
    ?>
				<div class="tags">Tags:
					<?php 
    foreach ($tags as $tag) {
        echo "<a href=\"" . base_url() . "?tag=" . $tag . "\">#" . $tag . "</a>, ";
    }
    ?>
				</div>
				<?php 
}
?>
    <meta name="generator" content="Anchor CMS">

    <meta property="og:title" content="<?php 
echo page_title('Page not found');
?>
 - <?php 
echo site_name();
?>
">
    <meta property="og:type" content="website">
    <meta property="og:url" content="<?php 
echo current_url();
?>
">
    <meta property="og:image" content="<?php 
echo article_custom_field('featured-image', 'http://s13.postimg.org/w3p4tc5pz/article_img_default.jpg');
?>
">
    <meta property="og:site_name" content="<?php 
echo site_name();
?>
">
		<?php 
if (is_article()) {
    ?>
			<meta property="og:description" content="<?php 
    echo article_description();
    ?>
">
		<?php 
} elseif (is_homepage()) {
	<article class="article-post">
	
		<?php 
if (article_custom_field('featured-image')) {
    ?>
		<div class="featured-image" style="background-image: url(<?php 
    echo article_custom_field('featured-image', 'http://s13.postimg.org/w3p4tc5pz/article_img_default.jpg');
    ?>
);">
			<div class="overlay"></div>
			
				<?php 
    if (article_custom_field('featured-image-credit')) {
        ?>
				<div class="featured-image__credit"><?php 
        echo article_custom_field('featured-image-credit');
        ?>
</div>
				<?php 
    }
    ?>
			
				<header class="post-header">
					<div class="container">
						<h1><?php 
    echo article_title();
    ?>
</h1>
						
						<div class="article-meta">
							<time class="article-meta__time" datetime="<?php 
Example #11
0
theme_include('header');
?>
<section class="content wrap" id="article-<?php 
echo article_id();
?>
">
    <article>
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <h1><?php 
echo article_title();
?>
</h1>
<?php 
$featuredimage = article_custom_field('featured-image');
if (!empty($featuredimage)) {
    ?>
    <div class="featured-image">
        <img src="<?php 
    echo $featuredimage;
    ?>
" alt="<?php 
    echo article_title();
    ?>
" />
    </div>
<?php 
}
?>
                    
Example #12
0
                    if ($format == 'external') {
                        echo '<a href="' . $url . '" class="btn"><span class="glyphicon glyphicon-link"></span> Přejít na stahování</a><br/>';
                    } elseif ($format == 'html') {
                        echo '<a href="' . $url . '" class="btn"><span class="glyphicon glyphicon-eye-open"></span> Číst online</a></br>';
                    } else {
                        echo '<a href="' . $url . '" class="btn"><span class="glyphicon glyphicon-save"></span> Stáhnout jako ' . strtoupper($format) . '</a></br>';
                    }
                }
            }
        }
    }
    ?>
					<?php 
    if (article_custom_field('metadata_wtf')) {
        $dc = get_dc_fields();
        $metadata = parse_wtf(article_custom_field('metadata_wtf'));
        echo '<hr>';
        echo '<strong><span class="glyphicon glyphicon-info-sign"></span> Informace o díle</strong>';
        echo '<dl>';
        foreach ($dc as $field => $label) {
            if (!empty($metadata['.'][$field])) {
                echo '<dt>' . htmlspecialchars($label) . '</dt>';
                foreach ($metadata['.'][$field] as $name) {
                    echo '<dd>' . dc_format($field, $name) . '</dd>';
                }
            }
        }
        if (!empty($metadata['.']['s:tag'])) {
            echo '<dt>Tagy</dt>';
            echo '<dd>' . implode(', ', $metadata['.']['s:tag']) . '</dd>';
        }