Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: CapriSkye - toukokuu 15, 2005, 03:27:18 IP

Otsikko: calling $context['character_set'] in Post.php
Kirjoitti: CapriSkye - toukokuu 15, 2005, 03:27:18 IP
There is a problem with utf-8 encoding when quoting, the popup window will not set itself to utf-8 encoding, but manually adding <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> to QuoteFast function will make it so.
but i don't think that's the best way to do it, so is it possible to call $context['character_set'] in meta like this? <meta http-equiv="Content-Type" content="text/html; charset='$context['character_set']'" />
thanks!
Otsikko: Re: calling $context['character_set'] in Post.php
Kirjoitti: [Unknown] - toukokuu 15, 2005, 07:42:49 IP
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />

-[Unknown]
Otsikko: Re: calling $context['character_set'] in Post.php
Kirjoitti: CapriSkye - toukokuu 15, 2005, 08:04:59 IP
that works, thanks [unknown]
would the dev consider adding this to future release?
Otsikko: Re: calling $context['character_set'] in Post.php
Kirjoitti: farhaddad - marraskuu 27, 2005, 08:56:18 IP
where can i find this to edit it ? i have the same problem

thanks
Otsikko: Re: calling $context['character_set'] in Post.php
Kirjoitti: CapriSkye - marraskuu 27, 2005, 10:16:33 IP
/Sources/Post.php
Find:

<title>', $txt['retrieving_quote'], '</title>


Add below:

<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
// if above doesn't work, consider hardcoding the encoding
// <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Otsikko: Re: calling $context['character_set'] in Post.php
Kirjoitti: farhaddad - marraskuu 28, 2005, 09:51:52 AP
thanks for replying I added this but i get this error when i try to post or reply

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/content/c/r/e/creations4d/html/anadeal/forum/Sources/Post.php on line 1759

any i dea

EDIT: never mind solved i forgot to comment the other line

thanks alot
Otsikko: Re: calling $context['character_set'] in Post.php
Kirjoitti: Sheepy - marraskuu 29, 2005, 01:16:56 AP
I've made things easier for everyone with a mod... that I didn't border to release before.

http://mods.simplemachines.org/index.php?mod=184

(Now?  Now I'm recycling redundent mod request I made before.  And I quote the recycled link more then others...)