Recent Topics

1 Jun 16, 2006 02:15    

Hello there,

HELP!! I've created a linkblog and there is only 1 blog that's ever going to be used in the web site. However, I want the linkblog just to show links and not the entire posting. This is what we have currently:

http://plateauresearch.com/blog/

Look at the linkblog, it lists the posts but what we would like to do is just have the title (e.g. post1, post2, etc) be hyperlinked and we wouldn't want the rest of the information. So we'd end up with just a list of links. Sorry if this issue has already been addressed. I can't find any info!

Your help is much appreciated!!!!!!!!!!!

2 Jun 16, 2006 05:12

Do you want a linkblog or a list of recent posts? If your linkblog and actual blog are the same thing then you would need to hack skins/_linkblog.php to remove the content, but after 20 posts you'll find the list doesn't change anymore. You can change that to whatever number you like, but you'll also find the linkblog is alphabetical.

Anyway the edits to skins/_linkblog.php is pretty simple. Find this:

echo $linkblog_item_before;
$Item->title(); 
echo ' ';
$Item->content( 1, 0, T_('more'), '[', ']' );	// Description + more link 
?>
<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><img src="img/icon_minipost.gif" alt="<?php echo T_('Permalink') ?>" width="12" height="9" class="middle" /></a>
<?php
echo $linkblog_item_after;


Now make it be this:

echo $linkblog_item_before;
$Item->title(); 
echo $linkblog_item_after;

For the record: a linkblog is a list of links, typically to other websites. "Recent Posts" have been created in a couple of different ways, but generally speaking using linkblog isn't one of them. Using a wee bit out of summary.php is a good one, though I don't do this so don't be too surprised if it doesn't work for you. In your skins/skinname/_main.php file find where the linkblog bit is called for and add this instead:

<ul>
<?php	// Get the 3 last posts for each blog:
	$BlogBList = & new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', '3', 'posts' );

	while( $Item = $BlogBList->get_item() )
	{
	?>
	<li lang="<?php $Item->lang() ?>">
		<?php $Item->issue_date() ?>:
		<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>
		<span class="small">[<?php $Item->lang() ?>]</span>
	</li>
	<?php
	}
	?>
	<li><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>"><?php echo T_('More posts...') ?></a></li>
</ul>

It'll take a bit of tinkering to make it be exactly what you want, but it's a good beginning IF you want a list of recent posts that is. BTW this will give you three recent posts. You can change that to whatever you want with this line:

$BlogBList = & new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', '3', 'posts' );

--------------------

Want a small piece of free advice? Upgrade to 0.9.2 long before you get comfortable in your new skin. Your server will love you for the way it handles spammers.

3 Jun 16, 2006 14:54

Thanks for the swift response!
Yeah i just want to show recent posts, like the last 20 or something. Like www.taleo.com/blog

So I will experiment with the code you've given you and hopefully I can get it to work!!! Cheers!


Form is loading...