Page 1 of 1

2 problems with "Latest Entries with PHP"

Posted: Sun Dec 24, 2006 1:23 am
by stm999999999
Hello,

I have two problems with "Printing the Latest Entries with PHP" as described on http://www.s9y.org/206.html

1) The links to the articles have a "/" to much:

I got something like http://blog.example//archives/1-test.html

my tpl for this external entries has a

Code: Select all

<a href="{$serendipityBaseURL}{$entry.link}">{$entry.title|@default:$entry.id}</a><br />
What variables can I use to have only one "/"?

2) my blog is UTF-8

the entries on the external page are shown not "Ö" but the plain UTF-8. Any idea?

Re: 2 problems with "Latest Entries with PHP"

Posted: Sun Dec 24, 2006 11:42 am
by garvinhicking
Hi!

Are you using s9y 1.2? I believe a bug in the permalink pattern creation was introduced in there.
the entries on the external page are shown not "Ö" but the plain UTF-8. Any idea?
You'll need to use Javascript or PHP to utf8_decode() or entries to display in ISO-8859-1, or you need to make your other webpage UTF-8 as well?

Regards,
Garvin

Re: 2 problems with "Latest Entries with PHP"

Posted: Mon Dec 25, 2006 5:22 pm
by stm999999999
garvinhicking wrote:Hi!

Are you using s9y 1.2? I believe a bug in the permalink pattern creation was introduced in there.
yes, it is 1.2 - but IIRC it was the same with previous versions.

Should one of {$serendipityBaseURL} or
{$entry.link} be without the "/"?

Merry XMas to all!

Re: 2 problems with "Latest Entries with PHP"

Posted: Thu Dec 28, 2006 8:30 pm
by garvinhicking
Hi!

If you can, test it with a 1.1 version, it should be unrelated. I'll try to take care of that 1.2 problem somewhen.

Best regards,
Garvin