phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
About special characters remplacement
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: 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
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

About special characters remplacementPosted: 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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: 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;
   }

...
Confused
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

About special characters remplacementPosted: Mon Jun 04, 2007 6:50 pm    Post subject: Re: About special characters remplacement

Did you use the htmlentitie code '& #269;' and '& #268;' without the spaces between & and # ?

If not enough, try adding this line before :

Code:
$url = htmlentities($url, ENT_COMPAT, $this->encoding);

Or even before :

Code:
$url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$url);

These char-set things can really get tricky, but in the end, will do Wink

++

_________________
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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: Tue Jun 05, 2007 5:43 pm    Post subject: Re: About special characters remplacement

ou,this is interesting Very Happy
Back to top
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: 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
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

About special characters remplacementPosted: 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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: Wed Jun 06, 2007 2:39 pm    Post subject: Re: About special characters remplacement

omfg,where is problem??? Evil or Very Mad Evil or Very Mad

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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: Wed Jun 06, 2007 7:00 pm    Post subject: Re: About special characters remplacement

whats is new?
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

About special characters remplacementPosted: 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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: 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 ...
Confused
Try adding you phpbb_seo_class.php ...
Thank Very Happy
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

About special characters remplacementPosted: Sat Jun 09, 2007 10:56 am    Post subject: Re: About special characters remplacement

This one is really tricky, I think we need to find out the ascii code for this and filter directly the ascii code, rather than the numerical entity.

So could you search a bit in the phpBB3 Czech language files, to find out how this char is coded in there, and just post here the full line of code where it is used in the language pack.

++

_________________
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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: Sun Jun 10, 2007 3:30 pm    Post subject: Re: About special characters remplacement

Very Happy ,ASCII?
What shall accomplish?
My English is soft.Could she would are me fair bang as it judge?
Thank Crying or Very sad
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

About special characters remplacementPosted: Mon Jun 11, 2007 1:30 pm    Post subject: Re: About special characters remplacement

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 Wink

++

_________________
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
Visit poster's website
Ľubor
PR0
PR0


Joined: 13 Feb 2007
Posts: 52
Location: Slovakia,Bratislava

About special characters remplacementPosted: 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 Wink

++

Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad
Code:
   'GROUP_IS_HIDDEN'               => 'Toto je skrytá skupina, iba členovia môžu vidieť dalších členov tejto skupiny.',
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 4 Goto page 1, 2, 3, 4  Next

Navigation Similar Topics

Jump to: