1 koramado Oct 02, 2007 18:59
3 koramado Oct 04, 2007 03:13
Thanks for the tip, Afwas. I had started looking there and it is nice to be told I'm at least looking in the right spot. :D
Here's what I ended up with. It was actually much easier than I had expected. I just removed the for loop and then listed the posts from my blog all ($blog = 1).
<ul>
<?php // --------------------------- BLOG LIST -----------------------------
$blog = 1;
$BlogBList = & new ItemList( $blog, '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', 'posts' );
while( $Item = $BlogBList->get_item() ) {
?>
<li lang="<?php $Item->lang() ?>">
<?php $Item->issue_date() ?>:
<?php $Item->permanent_link( '#title#' ) ?>
<span class="small">[<?php $Item->lang() ?>]</span>
</li>
<?php
}
// ---------------------------------- END OF BLOG LIST --------------------------------- ?>
</ul>
This works fine, but it will only display the number of posts that you have set to be displayed in Admin under App Settings. I also wrote a funky bit of code that would allow me to ignore some blogs which I didn't want included in the list. I'm sure someone else could come up with something prettier, but this is what I did.
<ul>
<?php // --------------------------- BLOG LIST -----------------------------
$blog = 1;
$BlogBList = & new ItemList( $blog, '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', 'posts' );
while( $Item = $BlogBList->get_item() ) {
// Insert lines below to keep some blogs from being included in the list.
$Item->get_creator_User();
if( $Item->assigned_user_ID ) {
$the_author = $UserCache->get_by_ID( $Item->assigned_user_ID );
} else {
$the_author = $Item->Author;
}
$who = $the_author->get_preferred_name();
$left_out = array( "username1", "username2", "username3", "etc..." );
if ( in_array( $who, $left_out ) ) {*/
// Insert lines above to keep some blogs from being included in the list.
?>
<li lang="<?php $Item->lang() ?>">
<?php $Item->issue_date() ?>:
<?php $Item->permanent_link( '#title#' ) ?>
<span class="small">[<?php $Item->lang() ?>]</span>
</li>
<?php
}
}
// ---------------------------------- END OF BLOG LIST --------------------------------- ?>
</ul>
[/php]
I didn't test, so that part is up to you. ;)
Try editing this line of code (issue_date):
You find the (technical) doc for this line of code [url=http://doc.b2evolution.net/v-1-9/evocore/ItemList.html#methodItemList]here[/url] (version 1.9), which ables you to toy with it even more.
Good luck