Page 1 of 1

Calling up the Recent Entries PHP

Posted: Tue Feb 13, 2007 12:04 am
by MyPersianBay
Hello,

How can I call it up so I can embed it somewhere in my website?

Here is my website:
http://www.mypersianbay.com/serendipity1/articles.php

I like to move the recent articles to the left side in the empty spot.

Thanks a lot.

Sorry for a dumb question! my php knowledge is limited.

Re: Calling up the Recent Entries PHP

Posted: Tue Feb 13, 2007 10:30 am
by garvinhicking

Posted: Tue Feb 13, 2007 5:56 pm
by MyPersianBay
Thanks Garvin.

I think this helps a lot http://www.s9y.org/206.html . However, how can I get it to print only the titles?

Thanks

Posted: Wed Feb 14, 2007 9:27 am
by garvinhicking
Hi!

You can simply copy the 'entries.tpl' to something like "myentires.tpl" and then change the $serendipity['smarty']->display() call to use that template.

Inside this template file you can make changes so that only titles are displayed!

Best regards,
Garvin

Posted: Wed Feb 14, 2007 8:40 pm
by judebert
I'm gratified to see that the Expert's solution actually helped someone! The last bit of customization, where you change step 6 to call a specific template, is the one you'll have to use along with Garvin's recommendation.

As for the template editing itself, just remove all the stuff that gets printed except for the template titles and URLs from 'myentires.tpl' (or whatever you decided to call it; I'd go with 'entry_titles_only.tpl' myself). And you'll want to put it in your templates/default/ directory, so it'll still be findable no matter what template you use.

Posted: Thu Feb 15, 2007 11:18 pm
by MyPersianBay
Many Thanks to both of you. I think I found a clue what to do. :)

I'll keep you posted.

Posted: Fri Feb 16, 2007 2:32 am
by MyPersianBay
I finally figured that out, here it is: http://www.mypersianbay.com/serendipity1/latest.php

I also made a template of my own here:
http://www.mypersianbay.com/serendipity1/articles.php

But the thing I can't figure out is that how I can define a style sheet in the latest.php file.

Posted: Fri Feb 16, 2007 4:22 am
by abdussamad
If you want to use the same style sheet as the template then you echo $serendipity['smarty_vars']['head_link_stylesheet']:

Code: Select all

  <link rel="stylesheet" type="text/css" href="<?=$serendipity['smarty_vars']['head_link_stylesheet']?>" />
Check out functions_smarty.inc.php in the include dir to lookup php equivalents of some of the smarty s9y functions.

BTW you have a very nice header design on your main site :) .

Edit: you'l probably have to do the includes and smarty init stuff before the inserting the above code.