PHP in content

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
cyberman

Re: PHP in content

Post by cyberman »

wientanz wrote: Now the tag works, but what I don't understand is why the umlaute like äüö and other characters like ß,é,è and the likes are displayed wrong. You'll find it here.
You must set the encoding of your template to ISO-8859-1 to show the umlauts right.
wientanz

Re: PHP in content

Post by wientanz »

THX cyberman, you're my hero. Will try it this Sunday.
wientanz

Re: PHP in content

Post by wientanz »

Won't work, still have the same troubles. My HEAD ist here:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" >
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Ballkalender</title>
<link rel="stylesheet" type="text/css" href="http://www.bugovsky.com/stylesheet.php?templateid=7" />

<!--[if IE]>
<__script__ type="text/javascript" src="http://www.bugovsky.com/modules/CSSMenu/CSSMenu.js"></__script>
<![endif]--></head>
cyberman

Re: PHP in content

Post by cyberman »

Hmm  ??? ...

Please try to set the wished encoding once again in "Administration - Layout - Templates - Template bearbeiten". There you will find an option "Kodierung".
Last edited by cyberman on Mon Jan 23, 2006 8:12 am, edited 1 time in total.
wientanz

Re: PHP in content

Post by wientanz »

Surprise, surprise, it worked! But only partially...

The content from the script is displayed correct. All the umlaute and other special characters are there. But what's wrong now are the umlaute in the CSSMenu. Now THEY are displayed incorrect:

http://www.bugovsky.com/index.php?page=Ballkalender

Ah yes, the breadcrumbs also display them wrong. Strange... I eliminated the head-tag I inserted manually before and just chose the right encoding as cyberman suggested. Don't wonder. The content of other articles should be correct, because they are already HTML entities since they were imported from Dreamweaver source.

*sigh*
cyberman

Re: PHP in content

Post by cyberman »

wientanz wrote: Surprise, surprise, it worked! But only partially...
Wow, what have you doin' on this page :o - 1282 (!) xhtml warnings ...
The content from the script is displayed correct. All the umlaute and other special characters are there. But what's wrong now are the umlaute in the CSSMenu.
Don't know if I can call this a bug. The admin section has utf-8 encoding by default so menu data will written with this encoding. But if your menu entries has umlauts and your homepage is displayed with another encoding it's showing wrong.

Now you have two options. To the first you can correct the database manually (table cms_content). The other option is setting the admin encoding to iso-8859-1. It works cause I had translate the most of umlauts with entities (ä instead ä).

Don't forget "Clear cache"  ;).
wientanz

Re: PHP in content

Post by wientanz »

I think I'll do a database dump from my DB (where all the Balltermine are stored), do a quick "Replace all ä with ä" and the llikes and switch back to utf... That's better than to change the whole system's encoding just for 1 article...

And the warnings? Weeeeell, warnings are no errors, right? :-) Seriously, I have no idea. The DB script was written by somebody else, who left us, so I can't just ask him what he did. And the script itself is only part of a 10+ scripts system. Nothing big, but too much just to read through for me now.
cyberman

Re: PHP in content

Post by cyberman »

wientanz wrote: That's better than to change the whole system's encoding just for 1 article...
You are the boss  ;D ...
wientanz

Re: PHP in content

Post by wientanz »

Utf8 IS my preferred encoding. The content from my script is not older than the 0.11, it was just created using Excel, saving to .csv-format and then uploading to the database. The person who entered the data didn't know anything about ASCII character sets or Unicode and didn't think about it. I know see the reason to adapt the data to ensure CMSMS compliance, but thanks for your answer nethertheless Patricia. Any input is appreciated :-)

Sorry for not making sense. Too much studying, too little sleep. In short: I figured that out from the above posts from cyberman and my trials and errors.

Good night now....
wientanz

Re: PHP in content

Post by wientanz »

haven't got it working yet, but know how to deal with it. Thanks to all of you out there!
Post Reply

Return to “Developers Discussion”