Recent Topics

1 Jun 22, 2004 23:35    

i stumbled across this when i ported my blog template (no skin) to b2evo 0.9 from 0.8.

the code for and the location of _archives.php moved and somehow while making updates i managed to make links to 2 different _archives.php
i could make one post view and the other month view.


<?php include( dirname(__FILE__)."/_archives1.php"); ?> //post view 
<?php require( get_path('skins').'/_archives.php'); ?> //month view

dirname(__FILE__) came up to be the directory of my blog main page
get_path('skins') is the root of the skins folder

changing lines 12 and 38 of each _archives.php page will allow differing # of links to show


# number of archive entries to display:
	if(!isset($archive_limit)) $archive_limit = 8;

		$ArchiveList = & new ArchiveList( $blog, $Settings->get('archive_mode'), $show_statuses,	$timestamp_min, $timestamp_max, $archive_limit );



# number of archive entries to display:
	if(!isset($archive1_limit)) $archive1_limit = 4;

	$ArchiveList = new ArchiveList( $blog, $archive_mode, $show_statuses,	$timestamp_min, $timestamp_max, $archive1_limit );

so thats how i did it. but simply copying _archives.php and renaming the copy to _recent.php and editing the approprate lines would work too.

2 Jun 24, 2004 20:20

That definitely works.

Personally, I prefer the flexibility of the _recent.php evoSkin file that I created, but that's just me. (Available in "moonrise" and the soon-to-be-released batch of Topanga skins on [url=http://skins.b2evolution.net]the evoSkins repository[/url].) I considered going the "two archives" route, but I wanted a bit more flexibility, like always pulling from a certain blog for the sideitem, so you see recent posts from blog 2 while you're viewing blog 3, etc.

3 Jun 24, 2004 22:46

both are really good solutions it really just depends on your level of coding ability as to which hack to use.

Again i stumbled across this by accident.


Form is loading...