Recent Topics

1 Aug 20, 2007 02:59    

My b2evolution Version: 9.1

Hi!

How can I get this to work?

<?php posts_nav_link( " <a href="http://www.homepage.com">Home</a>, '< '.T_('Previous'), T_('Next').' >' ); ?>

The seperator is not rendered as HTML.

2 Aug 20, 2007 04:14

Try:

<?php posts_nav_link( ' <a href="http://www.homepage.com">Home</a> ', '< '.T_('Previous'), T_('Next').' >' ); ?>

Good luck

3 Aug 20, 2007 10:53

Does the same, Actually, this was what I tried in the first place.

4 Aug 21, 2007 03:40

Nasty. This is the default:

void posts_nav_link( [ $sep = ' :: '], [ $prelabel = '#'], [ $nxtlabel = '#'], [ $page = '']  )

I played with it and
a) it didn't seem to have any impact in 1.10, as if I replaced it in the wrong file
b) It echoes anything you write in 1.9.3 alhough I had some luck when replacing h*tp://www.homepage.com by $Blog->disp( 'url', 'raw' ). Still it echoes <a href=" etc and doesn't create a link.

I found $sep in ../blog/inc/MODEL/item/_item.funcs.php:

function posts_nav_link($sep=' :: ', $prelabel='#', $nxtlabel='#', $page='')
{
	global $p, $Settings, $MainList;

	if( !empty( $MainList->sql ) && empty($p) )
	{
		$max_paged = $MainList->total_pages;
		if( $max_paged > 1 )
		{
			previous_posts_link( $prelabel, $page );
			echo htmlspecialchars($sep);
			next_posts_link( $nxtlabel, $max_paged, $page );
		}
	}
}


and the link works fine if you replace:

echo htmlspecialchars($sep);


by:

echo $sep;


but do use:

<?php posts_nav_link( ' <a href="http://www.homepage.com">Home</a> ', '< '.T_('Previous'), T_('Next').' >' ); ?>


and not yours.

Problem solved. Now back to the real world.

Good luck


Form is loading...