Ejemplo n.º 1
0
function __article_array($vars, $variable)
{
    $resource = array();
    if ($variable) {
        $articleApp = iPHP::app("article");
        $vars['category_lite'] = true;
        foreach ($variable as $key => $value) {
            $value = $articleApp->value($value, false, $vars);
            if ($value === false) {
                continue;
            }
            if ($vars['page']) {
                $value['page'] = $GLOBALS['page'] ? $GLOBALS['page'] : 1;
                $value['total'] = $total;
            }
            if ($vars['archive'] == "date") {
                $_date = archive_date($value['postime']);
                //var_dump($_date);
                //$_date = get_date($value['postime'],'Ymd');
                unset($resource[$key]);
                $resource[$_date][$key] = $value;
            } else {
                $resource[$key] = $value;
            }
        }
    }
    return $resource;
}
if ($GLOBALS['wp_arc_display_keyword']) {
    show_keyword();
}
?>
<input type="submit" name="submit" value="<?php 
echo _LANG_NKA_ACTION_SORT;
?>
" />
</form>
<?php 
post_count_exceeds();
if ($posts) {
    foreach ($posts as $post) {
        start_wp();
        archive_header($post, '<h3>', '</h3>');
        archive_date($post, 'Y/m/d H:i');
        ?>
 : <a href="<?php 
        echo get_permalink($post->ID);
        ?>
" rel="bookmark" title="Permanent Link: <?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a><br />
<?php 
    }
}
?>
            }
        }
        usort($posts, "cmp");
    }
    ?>

    <?php 
    if ($posts) {
        foreach ($posts as $post) {
            start_wp();
            ?>
    <?php 
            archive_header('<h3>', '</h3>');
            ?>
    <?php 
            archive_date('Y/m/d H:i:s');
            ?>
: <a href="<?php 
            echo get_permalink($post->ID);
            ?>
" rel="bookmark" title="Permanent Link: <?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a><br />
    <?php 
        }
    }
}
Ejemplo n.º 4
0
<?php

get_header();
?>

<div class="blog-header archive" style="<?php 
echo the_blankimage() ? 'background-image: url(' . the_blankimage()->getUrl() . ')' : '';
?>
">

</div>

<div class="container blog-main">

<span class="value archive"><?php 
echo archive_date();
?>
</span>

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
    <?php 
        get_template_part('content');
    }
} else {
    ?>
    <p>Sorry, no posts matched your criteria.</p>
<?php