Recent Topics

1 May 18, 2007 01:21    

My b2evolution Version: 1.8.x

I set my blog up to generally use the long version of URLs with the title (mostly) included in it. There is a shorter version with just a page number available. It seems that both are actually available all the time, but that the blog uses the long one in many links. The full index feature which I added in from someone's advice uses the page number.

Because long URLs are generally a pest, I was thinking of changing my blog settings to use the short ones by default. That also would mean just one type being used as I am getting those on the index.

Are there any considerations on this when making the change? I don't want all my old posts to suddenly vanish without trace. Is it possible to make the permalink use the short URL with page reference? I thought there was a tick box for that but now that I look I can't see one.

2 May 18, 2007 03:22

You may be interested in this HACK that sweetens article short version title URL's by removing the date
http://www.deadbeef.com/index.php/b2evolution_remove_dates_from_permalinks

The "full post index" page that I created also reflects these urls instead of the post number ones you generate.
eg: http://wow-factor.com/index.php?disp=postindex

For the full post index page I use.. (Note: example is limited to 400 posts but I see no reason why it can't be any number)

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

			while( $Item = $BlogBList->get_item() )
			{
			?>
			<li><a href="<?php $Item->permanent_url() ?>" rel="bookmark" title="<?php echo T_('Permanent link to ...') ?><?php $Item->title(); ?>"><?php $Item->title(); ?></a>&nbsp;<span class="dimmed"><?php
			$Item->issue_date('d F y');
			?></span>
</li>
			<?php
			}
			?>

3 May 18, 2007 05:20

In general I like the idea of shorter URLs, and so this is an improvement on the standard method. Can this one get ride of the long description too and just use the page number reference like p123?

I presume that this does not affect the existing structures but is purely for display purposes - is that right?


Form is loading...