Recent Topics

1 Feb 20, 2007 19:57    

My b2evolution Version: 1.9x

HI,
Is it possible to show a list of previous postsin the sidebar.
Scenario:
Lets say I show 10 posts on my main page. But then i want to show posts number 11 - 20 in the sidebar.

3 Feb 23, 2007 20:30

are you in for some tweaking ?

it will be in the file _main.php from your skin

Look for the line

<?php // ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. -------------


just before you put this

<?php $arc_temp = $Item->issue_date; // pre_dump($Item ) ?>

On the place were you want to show your archives :

<?php // Call the Archives plugin:
$save = $timestamp_max;
$timestamp_max = mysql2timestamp( $arc_temp )-1;
$Plugins->call_by_code( 'evo_Arch', array(	// Add parameters below:
		) );
$timestamp_max = $save;
?>

With many thanks to Yabba for this sollution

4 Feb 23, 2007 20:59

Thank you for trying to help, but this just shows an archive for the month. What I'm interesting in is, to show previous post by title.
if lets say Ihave have made 10 posts in february, and i show 5 on my front page, then want to show in the sidebar is.

Post title for post number 6
Post title for post number 7
Post title for post number 8
Post title for post number 9
Post title for post number 10

5 Feb 24, 2007 00:35

Well, have you set your archives on 'post by post' ?
or are they on 'montly archives' ?
You find that in the tab-page 'settings-general'

6 Feb 24, 2007 04:03

they are set to monthly, but i wouldl like to show both monthly and post by post.

7 Feb 24, 2007 06:36

You might want to look at this plugin Collapsible Archives, which you can find on the extend tab -->plugins. I think it will do what you want.

8 Feb 24, 2007 11:37

Kitt wrote:

they are set to monthly, but i wouldl like to show both monthly and post by post.

Then I can't help you anymore (I have no knowledge of plugins in 1.9.x)

9 Feb 24, 2007 17:12

Thank you very much for the replies. I can't download the plugin as the file has been removed.

But I was wondering (without knowing anything about PHP) if I could just inclue the archive twice, and then owerwrite the archive settings in the _main.php file? for the archive were i want it show post by post.

If not does anybody know who has created this archive plugin and I could maybe copntact that person, for help?

:: Kasper

10 Feb 24, 2007 19:12

mrdav wrote:

You might want to look at this plugin Collapsible Archives, which you can find on the extend tab -->plugins. I think it will do what you want.

When you next take a break from pulling the wings off flies ..... could you send me a copy of the current version of the plugin that you have on your blog? I appear to have misplaced mine in a blonde manner :p

¥

11 Feb 25, 2007 00:09

I tried the Plugin, but i can't get it to wotk with my version of b2evolution. Im trying to ask on another forum for help with the PHP, but will let you know if I get it work. It can't be that difficult? I just want to show two archives on my page.

12 Feb 25, 2007 00:35

For the two different archives aspect try this: make a copy of the archives plugin and save it with a different name. Let's pretend it'll be "_archivesB.plugin.php". Open up your new file and change a few details:

class archivesB_plugin extends Plugin // changed class name
{
	/**
	 * Variables below MUST be overriden by plugin implementations,
	 * either in the subclass declaration or in the subclass constructor.
	 */

	var $name = 'ArchivesB Skin Tag'; // changed name
	var $code = 'my_ArchB'; // changed code


Save it. Now go to your skin's _main.php file and copy the bit that calls the archives plugin, only make it call your new plugin.

<?php
		// -------------------------- ARCHIVES INCLUDED HERE -----------------------------
	// Call the Archives plugin:
	$Plugins->call_by_code( 'my_ArchB', array(	// Change to your new 'code' value, set mode to daily
			'mode'=>'daily',
		) );
	// -------------------------------- END OF ARCHIVES ----------------------------------
?>

Now you should be able to work with Topanga's solution to your initial desire. Untested BTW, so don't be too surprised if it doesn't work for ya. I think it will though. For some reason I think you should have the "real" archives plugin first in your sidebar, but I don't know why I think that.


Form is loading...