I am intergrading my blog into a new site.
It will be 2 catogories on different pages.
I want to intergrated the archives to but on category.
I could not find this in the api documentation so i was wondering if this is manageble.
i intergrated this code so it only takes category 13 on this page.
- Code: Select all
<?php
if (!defined( "PLOG_CLASS_PATH" )) {
define( "PLOG_CLASS_PATH", "../../blog2/" );
}
// necessary classes
require_once( PLOG_CLASS_PATH."class/bootstrap.php" );
lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
//
// id of your blog, you need to know this one before starting and can easily
// be found out in the admin interface
//
$blogId = 1;
// Load the blog articles. This method call returns an array of Article objects
// or an empty array if there is none
// See http://lifetype.net/api/class_articles.php#aee20e131c51a6fdbd4f0d24e16e3c76
$articles = new Articles();
$blogArticles = $articles->getBlogArticles(
$blogId, // our blog id
-1, // date, we don't care
10, // amount of posts to fetch, increase this if needed
13, // category id, but we don't care
POST_STATUS_PUBLISHED // only the ones that are published
// this method can take more parameters but we don't need them
);
Does it already take the archives only from this channel ?
I dont want to refer to the blog itself but gonna load it into a div.
Can somebody telle me how t intergrated the archives ?
