| |
|
| :: |
| Author |
Message |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Mon Jun 04, 2007 3:49 pm Post subject: About special characters remplacement |
|
|
I have big problem,I am Slovak and some term he shows amiss.Allowing category is Začiatočníci also is it za-iato-nici-
http://linux.sk-net.sk/
my forum |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Mon Jun 04, 2007 6:02 pm Post subject: Re: About special characters remplacement |
|
|
That's kind of weird č isn't coded as č, since š gives š , but ho well, I guess this is only one more thing that did not get to the mind of w3c.
Anyway, we'll take care of this one separately, should work.
In phpbb_seo_class.php find :
| Code: | | $url = htmlentities($url, ENT_COMPAT, $this->encoding); |
After add :
| Code: | | $url = str_replace( array('č', 'Č'),'c', $url ); |
++ |
_________________ 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 |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Mon Jun 04, 2007 6:35 pm Post subject: Re: About special characters remplacement |
|
|
it's no go!
...
| Code: | function format_url( $url, $type = 'topic' ) {
$url = preg_replace('`\[.*\]`U','',$url);
$url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$url);
$url = htmlentities($url, ENT_COMPAT, $this->encoding);
$url = str_replace( array('č', 'Č'),'c', $url );
$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 = trim($url, '-');
$url = ( empty($url) ) ? $type : strtolower($url);
return $url;
} |
...
 |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
|
| Back to top |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Tue Jun 05, 2007 5:43 pm Post subject: Re: About special characters remplacement |
|
|
ou,this is interesting  |
|
|
| Back to top |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Tue Jun 05, 2007 5:47 pm Post subject: Re: About special characters remplacement |
|
|
| we are all at sea on this subject,please send me adapted phpbb_seo_class.php ... |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Wed Jun 06, 2007 9:59 am Post subject: Re: About special characters remplacement |
|
|
?? What do you mean ?
Aren't you the one to be supposed to test my suggestions ?
Did it work ?
I'm sorry, but until you validate this, I won't be able to go further, as I do not run any Slovak installation.
So the line to add is still :
| Code: | | $url = str_replace( array('č', 'Č'),'c', $url ); |
But we need to figure out where, eg before :
| Code: | | $url = htmlentities($url, ENT_COMPAT, $this->encoding); |
Or even before :
| Code: | | $url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$url); |
And you'll need as well to test using the numerical entities ('& #269;' and '& #268;' without spaces) in case pasting this line is not enough.
++ |
_________________ 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 |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Wed Jun 06, 2007 2:39 pm Post subject: Re: About special characters remplacement |
|
|
omfg,where is problem???
| 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('ͥ', 'ͤ'),'c', $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 = trim($url, '-');
$url = ( empty($url) ) ? $type : strtolower($url);
return $url;
} |
That is bad
| 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('č', 'Č'),'c', $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 = trim($url, '-');
$url = ( empty($url) ) ? $type : strtolower($url);
return $url;
} |
item bad ...
| Code: | function format_url( $url, $type = 'topic' ) {
$url = preg_replace('`\[.*\]`U','',$url);
$url = str_replace( array('č', 'Č'),'c', $url );
$url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$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 = trim($url, '-');
$url = ( empty($url) ) ? $type : strtolower($url);
return $url;
} |
item
| Code: | function format_url( $url, $type = 'topic' ) {
$url = preg_replace('`\[.*\]`U','',$url);
$url = str_replace( array('ͥ', 'ͤ'),'c', $url );
$url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$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 = trim($url, '-');
$url = ( empty($url) ) ? $type : strtolower($url);
return $url;
} |
|
|
|
| Back to top |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Wed Jun 06, 2007 7:00 pm Post subject: Re: About special characters remplacement |
|
|
| whats is new? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Wed Jun 06, 2007 9:17 pm Post subject: Re: About special characters remplacement |
|
|
None of these are working ?
If so, I think we only need to past the utf-8 code for č and Č in your case, not the numerical entity.
From the first piece of code you posted, the one showing here the ?, it looks like it went pasted in another char-set than the one handled here, could be utf-8, but it's not this sure.
Try to find example of č and Č in the phpBB3 lang packs, or form an utf-8 editor, and try the same code changes with the characters pasted from there.
++ |
_________________ 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 |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Thu Jun 07, 2007 2:18 pm Post subject: Re: About special characters remplacement |
|
|
ou,I test č and Č also either numerical entity.Nix no go ...
Try adding you phpbb_seo_class.php ...
Thank  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
|
| Back to top |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Sun Jun 10, 2007 3:30 pm Post subject: Re: About special characters remplacement |
|
|
fú ,ASCII?
What shall accomplish?
My English is soft.Could she would are me fair bang as it judge?
Thank  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
|
| Back to top |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Mon Jun 11, 2007 3:58 pm Post subject: Re: About special characters remplacement |
|
|
| dcz wrote: | Well, I'm just asking your to look in the phpBB3 Czech language files and paste here the full lines of code where a č and Č would be used.
This in order to find out how this is coded, because it's actually quite tricky to find more clues about this particular chars, even with Google
++ |
| Code: | | 'GROUP_IS_HIDDEN' => 'Toto je skrytá skupina, iba členovia môžu vidieť dalších členov tejto skupiny.', |
|
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|