| |
|
| :: |
| Author |
Message |
Siljo
Joined: 25 Jan 2007 Posts: 22
|
Posted: Thu May 31, 2007 10:40 pm Post subject: GYM Sitemaps & Windows 1250 |
|
|
Hi i have a problem with GYM Sitemaps it doesent want to use the Windows 1250 encode in phpbb_seo_class.
We are using letters like čćžšđ
and they are not recognised.
Help please. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
Siljo
Joined: 25 Jan 2007 Posts: 22
|
Posted: Fri Jun 01, 2007 8:51 pm Post subject: Re: GYM Sitemaps & Windows 1250 |
|
|
I did setup windows-1250 in GYM but there it says this:This setting will be overridden by the phpbb_seo class settings when applicable (phpBB SEO mod rewrite installed).I think that here is the problem because in phpbb_seo_class.php i cannot set windows-1250 because it give me an error.
| Code: | | Warning: htmlentities() [function.htmlentities]: charset `windows-1250' not supported, assuming iso-8859-1 in D:\website\xampp\site3\phpbb_seo\phpbb_seo_class.php on line 150 | I put the iso-8859-1 in and anithing i change in GYM it doesent take effect because of the htmlentities.
I already done this in phpbb_seo_class.php
| Code: | function format_url( $url, $type = 'topic' ) {
$url = preg_replace("`\[.*\]`U","",$url);
$url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$url);
$url = str_replace (array('ö','Ö'), 'oe', $url);
$url = str_replace (array('ä','Ä'), 'ae', $url);
$url = str_replace (array('ü','Ü'), 'ue', $url);
$url = str_replace (array('ľ ','Ľ'), 'l', $url);
$url = str_replace (array('č','Č'), 'c', $url);
$url = str_replace (array('š','Š'), 's', $url);
$url = str_replace (array('ž','Ž'), 'z', $url);
$url = str_replace (array('ć','Ć'), 'c', $url);
$url = str_replace (array('đ','Đ'), 'dj', $url);
$url = htmlentities($url, ENT_COMPAT, $this->encoding);
$url = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i","\\1", $url );
$url = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $url);
$url = ( $url == "" ) ? $type : strtolower(trim($url, '-'));
return $url; |
And in ggs_functions.php
| Code: | //Short url
$url = preg_replace("(\[.*\])U","",$url);
$find = array('"','&','<','>','\r\n','\n',);
$url = str_replace ($find, '-', $url);
$url = str_replace ('ß', 'ss', $url);
$url = str_replace (array('ö','Ö'), 'oe', $url);
$url = str_replace (array('ä','Ä'), 'ae', $url);
$url = str_replace (array('ü','Ü'), 'ue', $url);
$url = str_replace (array('č','Č'), 'c', $url);
$url = str_replace (array('š','Š'), 's', $url);
$url = str_replace (array('ž','Ž'), 'z', $url);
$url = str_replace (array('ć','Ć'), 'c', $url);
$url = str_replace (array('đ','Đ'), 'dj', $url);
$find = "ŔÁÂĂĹŕáâăĺŇÓÔŐŘňóôőřČÉĘËčéęëÇçĚÍÎĎěíîďŮÚŰůúű˙Ńń";
$replace = "aaaaaaaaaaooooooooooeeeeeeeecciiiiiiiiuuuuuuynn";
$url = strtr($url,$find,$replace);
$url = preg_replace("`[^a-zA-Z0-9]`", "-", $url);
$url = preg_replace("`[-]+`", "-", $url);
$url = trim($url, '-');
$url = ( $url == "" ) ? $type : strtolower($url);
return $url; |
|
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Sat Jun 02, 2007 11:43 am Post subject: Re: GYM Sitemaps & Windows 1250 |
|
|
All right, I get it now, so you're in the not handled case
GYM sitemaps does support more char-sets than htmlentites for post formatting, and since you managed to adapt the format_url() function, then you only need to replace this line in phpbb_seo/phpbb_seo_class.php :
| Code: | | $this->encoding = "iso-8859-1"; |
with :
| Code: | | $this->encoding = ""; |
So that the GYM sitemaps settings in acp as far as char-set will take back the control over again.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
Siljo
Joined: 25 Jan 2007 Posts: 22
|
Posted: Sat Jun 02, 2007 8:19 pm Post subject: Re: GYM Sitemaps & Windows 1250 |
|
|
Did try this i put windows 1250 in GYM and used phpbb3 for Char-set conversion method and all the letters are correct,but i get a lot of errors in header
| Code: | | Warning: htmlentities() [function.htmlentities]: charset `1250' not supported, assuming iso-8859-1 in D:\website\xampp\site3\phpbb_seo\phpbb_seo_class.php on line 150 |
You can see it here http://siljo.game-server.cc/index.html
If i delete this line from php_seo_class.php everithing seem to work normaly.
| Code: | | $url = htmlentities($url, ENT_COMPAT, $this->encoding); |
Can anything be wrong if i delete this line? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
Siljo
Joined: 25 Jan 2007 Posts: 22
|
Posted: Sat Jun 02, 2007 10:23 pm Post subject: Re: GYM Sitemaps & Windows 1250 |
|
|
Yes that did the trick.Thank you  |
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|