2 problems with "Latest Entries with PHP"

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

2 problems with "Latest Entries with PHP"

Post 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?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 2 problems with "Latest Entries with PHP"

Post 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
# 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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: 2 problems with "Latest Entries with PHP"

Post 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!
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 2 problems with "Latest Entries with PHP"

Post 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
# 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