Display Recent Entries on external page
Posted: Sun Jul 30, 2006 5:57 am
I noticed the code (shown below) in another post that allows the display of the last x number of entries to be shown on a page outside the actual blog's directory. I'd like to do this as well but without the entry text - only the title (with link) and date as it shows up in the recent entries plugin within the blog.
In the post http://www.s9y.org/forums/viewtopic.php ... &highlight
Garvin gave the following code which works great.
but what I'd like to do is only show the entries in the same format as the Recent Entries show up within the blog. Something like
Is this possible? I've tried the javascript one and it works but it is not as elegant looking.
Thanks.
In the post http://www.s9y.org/forums/viewtopic.php ... &highlight
Garvin gave the following code which works great.
Code: Select all
<?php
chdir('serendipity'); // Or change this to the name of the directory where you installed s9y in!
# Include the s9y framework
include 'serendipity_config.inc.php';
# Initialize Template logic
serendipity_smarty_init();
# Fetch latest entries
$entries = serendipity_fetchEntries();
# Parses the latest entries
serendipity_printEntries($entries);
# Displays the latest entries template
$serendipity['smarty']->display(serendipity_getTemplateFile('entries.tpl', 'serendipityPath'));
chdir('..');
?>
Code: Select all
$entries=serendipity_printRecentEntries... Is this possible? I've tried the javascript one and it works but it is not as elegant looking.
Thanks.