undefined function: my_serendipity_printentries

Having trouble installing serendipity?
Post Reply
jande

undefined function: my_serendipity_printentries

Post by jande »

Hi,

I set up Serendipity and it works fine. It seems there is only one problem left: I installed Serendipity to http://www.muenster.org/amnesty/blog. You can see the weblog and change to categories and subcategories.

But there is one problem: I would like to show the five newest entries of the complete blog on www.muenster.org/amnesty/index.php and, on other pages, the newest entries of one categorie. But these entries should only be part of a page; other information should be added.

For testing, I created a file called indexneu.php (see http://www.muenster.org/amnesty/indexneu.php):

Code: Select all

<html>
<body>
<?php 
chdir('blog'); // Change current directory to s9y 
include_once('serendipity_config.inc.php'); 
// Get the 5 most recent entries 
$entries = serendipity_fetchEntries(null, true, 5); 
// Print them 
My_serendipity_printEntries($entries); 
?>
</body>
</html>
But this gives an error message: undefined function: my_serendipity_printentries

Is there any way to realize my ideas? The code above is a solution from this forum; but how can I "extract" entries from special categories?

Thanks,

Jan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: undefined function: my_serendipity_printentries

Post by garvinhicking »

Of course this prints an error.

You cann My_serendipity_printEntries() but did not define this function? What is the function supposed to do, you must create it. :-)

I'm afraid without PHP knowledge it will not become possible for you to get what you want. You can dig into our include/functions_entries.inc.php, and get clues how to write your own functions. Or you could hire a PHP programmer to code the functions you'll need. Like me for example. :-)

In any case, it is possible with PHP skills, our functions are quite well structured and allow to use Serendipity as a kind of API.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply