Recent Topics

1 Dec 03, 2005 17:29    

I used this piece of code to show last post's title on sidebar:

<div class="bSideItem">
   <h3><?php echo T_('Ultimi articoli') ?></h3>
   <ul>
   <?php
   $BlogBList = new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', '10', 'posts' );
   while( $BlogBList->get_item() )
   {
   ?>
   <li lang="<?php the_lang() ?>">
   <a href="<?php permalink_link() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php the_title( '', '', false ); ?></a>
   </li>
   <?php
   }
   ?>
   </ul>
   </div>

It worked out very well with Dawn, but doesn't work at all with Phoenix. Is there a method to adapt this code to a Phoenix-compliant version?

Thank you in advance,

Francesco

2 Dec 03, 2005 18:01

  <a href="<?php permalink_link() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php the_title( '', '', false ); ?></a>

the_title() is way old. Try

<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>

Not a bug eh?

3 Dec 03, 2005 18:20

Doesn't solve the issue. Instead of last posts' title it shows (on the sidebar): "Unhandled LIMITING mode in ItemList (paged mode is obsolete)".

I guess it would ask to modify somehow the way I want to limit post number, but I don't know anything about coding this stuff...so, please help me!

Thank you - really! - in advance,

Francesco

4 Dec 03, 2005 18:34

Got link where we can see the problem? I recognized the code used to list recent posts in the sidebar as a small piece of "summary.php", so went to the new summary.php to see what was different. Since summary.php manages to work I thought that would do the trick.

I guess not!

I'll poke around with this one a bit and see what I can come up with.

5 Dec 03, 2005 18:45

<div class="bSideItem">
	<h3><?php echo T_('Recent Posts') ?></h3>
	<ul>
	<?php	// Get the 10 last posts for each blog:
	$BlogBList = & new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', 10, '', '', '', '', '', '', '', 'posts' );
	while( $Item = $BlogBList->get_item() ) { ?>
		<li lang="<?php $Item->lang() ?>">
		<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>
		</li>
		<?php } ?>
	<li><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>"><?php echo T_('More posts...') ?></a></li>
	</ul>
	</div>

Works in the custom skin in a fresh phoenix installation. It is the appropriate bit from the summary.php file from phoenix.

6 Dec 03, 2005 21:39

I ran into that too. I took the part from summary.php.

The one thing I noticed was that the location of the number defining the how many posts to ItemList was in a different place in the array. Old: near the end, new, more in the middle/front.

7 Dec 03, 2005 22:09

revdave wrote:

The one thing I noticed was that the location of the number defining the how many posts to ItemList was in a different place in the array. Old: near the end, new, more in the middle/front.

Cool. I couldn't figure out why it wouldn't work for papzadsl. I keyed in on the old function call but not the different order of the parameters.

8 Dec 03, 2005 23:01

The quoted code worked out like a charm. Thank you all guys!

Mod, for me you can freeze.

Thanks again, you are always so kind :)

Francesco


Form is loading...