Beispiel #1
0
require_once "includes/blogger.class.php";
if (file_exists($basepath . "/plugins/blogger/language/" . $language . "/general.php")) {
    require_once $basepath . "/plugins/blogger/language/" . $language . "/general.php";
} else {
    require_once $basepath . "/plugins/blogger/language/" . $default_language . "/general.php";
}
$blogger = new Blogger();
$perpage = 10;
if (!isset($blog_page)) {
    $blog_page = 1;
}
$posts = $blogger->getPosts($blog_page, $perpage, array("language" => $language));
if (!count($posts)) {
    $posts = $blogger->getPosts($blog_page, $perpage);
    $total_posts = $blogger->getPostCount();
    $max_pages = ceil($total_posts / $perpage);
} else {
    $total_posts = $blogger->getPostCount(array("language" => $language));
    $max_pages = ceil($total_posts / $perpage);
}
if (count($posts)) {
    foreach ($posts as $key => $val) {
        $content = $val['content'];
        $content = str_replace("<br />", "\n", $content);
        $content = str_replace("<br/>", "\n", $content);
        $content = strip_tags($content);
        $content = explode("\n", $content);
        $excerpt = '';
        foreach ($content as $content_id => $chunk) {
            if (strlen(trim($chunk)) > 50) {
Beispiel #2
0
$blogger_license_key = $settings->getSetting("blogger_license_key");
if (empty($blogger_license_key)) {
    $blogger_license_key = '';
}
$blogger = new Blogger($blogger_license_key);
if (!$blogger->valid) {
    print "<script> window.location = 'index.php?menu=plugin&plugin=blogger&plugin_menu=blogger_config'; </script>";
    exit;
}
if (isset($_REQUEST['delete_post_id'])) {
    $blogger->deletePost($_REQUEST['delete_post_id']);
}
if (!isset($page) || !$page || !is_numeric($page)) {
    $page = 1;
}
$total = $blogger->getPostCount();
$posts = $blogger->getPosts($page);
?>

<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li>
                <a href="index.php"><i class="icon-home"></i></a>
            </li>
            <li>
                <a href="index.php?menu=plugins">Plugins</a>
            </li>
            <li>
                Blogger
            </li>