special characters (ä,ü,ö,ß) problem

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2007, 08:01 PM
911 911 is offline
Casual Pligger
 
Join Date: May 2007
Posts: 33
I want to run pligg (9.5 Beta) on a german site. So users will tipe in words with german special letters (umlaut: ä,ö,ü,ß).

But if the news title contains such a character the url of the news does not work and I get a blank site. This happens with both url methods 1 and 2, with htacces and non htacces.

For example: The url of newstitle "Bücher kaufen" is rewritten in "story.php?title=b%FCcher_kaufen"

Is there a way to use pligg and clean urls for german (french,etc.) language Sites?

the special letters should be rewritten into two letter combinations (ä->ae,ü->ue,..) in the url. So the title "Bücher kaufen" would show up as "story.php?title=buecher_kaufen".

Would be nice if somebody can help to change/fix the rewrite rules. If you have another solution for this, feel free to post it

Best Regards
Reply With Quote
  #2 (permalink)  
Old 05-09-2007, 09:31 PM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
Please try to download and install the attached module. Then in the _main file you'll see the code for replacing characters. It won't affect already submitted stories unless you 'edit' the story from the 'admin links'. Let us know if that works for you.

thanks
Attached Files
File Type: zip makeFriendly.zip (2.0 KB, 516 views)
Reply With Quote
  #3 (permalink)  
Old 05-09-2007, 09:48 PM
911 911 is offline
Casual Pligger
 
Join Date: May 2007
Posts: 33
Thanks Ash!

I will try this later and give some report. I first have to setup a new clean pligg installation because I fiddled a bit to much on my current testinstall.

Best Regards
Reply With Quote
  #4 (permalink)  
Old 05-09-2007, 10:54 PM
bichopro's Avatar
New Pligger
 
Join Date: Feb 2007
Posts: 9
maybe i can help...
Try to download a lang.conf (lib/ folder)
in a editor pad ( like notepad++ or notepad2) and change the encode (utf, utf-8 etc)

this work for me on Spanish letters like ñ, change the lang.conf to utf format

and sorry for my prehistoric English.

bye... bichopro
Reply With Quote
  #5 (permalink)  
Old 05-10-2007, 02:18 PM
911 911 is offline
Casual Pligger
 
Join Date: May 2007
Posts: 33
Big Thanks! Works great.

I have extended the makeFriendly_main.php with the german special characters so it looks like this know:
PHP Code:
<?php
    
function utils_makeUrlFriendly($output){
    
        
// http://www.php.net/manual/en/function.utf8-decode.php#31815
            
$output html_entity_decode(htmlentities($outputENT_COMPAT'UTF-8'));
        
$replace=array( 
            
'à' => 'a',
            
'â' => 'a',
            
'é' => 'e',
            
'ê' => 'e',
            
'ù' => 'u',
            
'ä' => 'ae',
            
'ö' => 'oe',
            
'ü' => 'ue',
            
'ß' => 'ss'
        
);
    
        foreach (
$replace as $key => $value) {
            
$output str_replace($key$value$output);
        }
            
            return 
$output;
    }

?>
I noticed the "blank page" problem was related on the Admin>>Configure>>OutGoing>>Outgoing links:true Setting (I had to change to false) like it is posted a few times in the Forum.

@bichopro
Thank you for suggestion. I tried it with Ashs Modul first and it works great (exactly what I was serching for).

So for know everything is fine.

@Ash
Just an aditional question. Is it possible to change rewrite style from underlines "_" in dashes "-"?

And btw. Where is the thank you button in this vBulletin Forum? I see the position "Thanks:" in the User Stats but no Botton where I can say Thank you?

Cheers

Last edited by 911; 05-10-2007 at 02:48 PM.
Reply With Quote
  #6 (permalink)  
Old 05-17-2007, 07:23 PM
apostaganha's Avatar
New Pligger
 
Join Date: May 2007
Posts: 18
Quote:
Originally Posted by bichopro View Post
maybe i can help...
Try to download a lang.conf (lib/ folder)
in a editor pad ( like notepad++ or notepad2) and change the encode (utf, utf-8 etc)

this work for me on Spanish letters like ñ, change the lang.conf to utf format

and sorry for my prehistoric English.

bye... bichopro
bichopro how did you change lang.conf to utf-8 or other formats?
Reply With Quote
  #7 (permalink)  
Old 05-18-2007, 04:43 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
What is the correct folder for the makeFriendly files? Do I have to change anything in the admin area?
Reply With Quote
  #8 (permalink)  
Old 05-18-2007, 09:40 AM
911 911 is offline
Casual Pligger
 
Join Date: May 2007
Posts: 33
@tbones
edit the makeFriendly_main.php with the rules you want (like I did this for german chars) and upload all files to

yourdomain.com/modules/makeFriendly/

go in Backend

Admin » Module Management

you will now find the Modul makeFriendly down the Available (but not installed) Moduls. Install it. Thats it.

Cheers
Reply With Quote
  #9 (permalink)  
Old 05-18-2007, 12:56 PM
apostaganha's Avatar
New Pligger
 
Join Date: May 2007
Posts: 18
Doesnt work for me.
Reply With Quote
  #10 (permalink)  
Old 05-18-2007, 02:40 PM
911 911 is offline
Casual Pligger
 
Join Date: May 2007
Posts: 33
Where do you get stuck? Can you install the Modul but it doesnt work or is der an error message while installing or something else?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with translation to czech language due to special characters. stormanx Questions and Comments 6 05-04-2009 10:04 PM
Problem in title, url_title and tags with special characters [svn rev.162] dotx Questions and Comments 4 11-04-2008 04:47 AM
Special characters problem RSS and IE 7 markoi Questions and Comments 1 08-09-2007 01:52 PM
Special Characters "Ñ" "´" - Is a very comented thread mathcv Questions and Comments 7 07-13-2007 08:34 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development