[SOLVED] Mangled accents in the 'link_title' field of the 'links' table

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 12-25-2007, 12:39 AM
wwwSENSERELYcom's Avatar
Casual Pligger
 
Join Date: May 2007
Location: Tianjin, China
Posts: 67
So, this thread along with Make Friendly URLS Lowercase and Separated With Hyphens Hack - Pligg Template Forums is solving the problem of accentued letters in url and title submissions process?

Good, thanks, I'm testing it now.
Reply With Quote
  #12 (permalink)  
Old 04-28-2008, 03:29 PM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Teknikim
 
Join Date: Apr 2008
Posts: 43
I am trying to change special Turkish chars with the possible one. Some of the chars change but the others don't.
Example:
$output = str_replace("ş", "s", $output);
$output = str_replace("ğ", "g", $output);
$output = str_replace("ı", "i", $output);
These codes don't work properly for "ş, ı, ğ, Ş, İ, Ğ"
But it works correctly for "Ç, ç, ü, Ü, ö, Ö"
I am using UTF-8 encoding.
How can I solve this problem?I need your help urgently
Reply With Quote
  #13 (permalink)  
Old 04-28-2008, 03:32 PM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Teknikim
 
Join Date: Apr 2008
Posts: 43
Also there is no problem while working on localhost
Reply With Quote
  #14 (permalink)  
Old 04-29-2008, 05:48 AM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Teknikim
 
Join Date: Apr 2008
Posts: 43
Any help? I have to solve this problem to make sef urls.
Reply With Quote
  #15 (permalink)  
Old 04-29-2008, 05:30 PM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Teknikim
 
Join Date: Apr 2008
Posts: 43
If I save the file that I configured as UTF-8 ş,ı,ğ are replaced with s,i,g as desired but ç, ü, ö are not replaced with c, u, o and if I save the file as ANSI vice versa happens. I am dealing with this problem for several days and unfortunately I could'nt reach a solution.
Please help me
Reply With Quote
  #16 (permalink)  
Old 05-01-2008, 01:39 PM
New Pligger
Pligg Version: 9
 
Join Date: Apr 2008
Posts: 6
Quote:
Originally Posted by liotier View Post
Reflecting on that solution I thought that it would not work : the function I am talking about is named makeUrlFriendly() whereas my problem is sanitizing the title, not the URL.

But then more grepping led me to discover that this function is used in templates/yget/submit_step_3.tpl at line 58 to sanitize the title so that it can be used in the story's URL :

PHP Code:
$linkres->title_url makeUrlFriendly($linkres->title); 
So I modified libs/utils.php so that makeUrlFriendly() supports my problematic accents :

PHP Code:
276a277,281
>    $output str_replace("é""e"$output);
>    
$output str_replace("è""e"$output);
>    
$output str_replace("ç""c"$output);
>    
$output str_replace("ù""u"$output);
>    
$output str_replace("à""a"$output); 
A few tests later I confirmed that I have solved my problem.

Now, can anyone add that in the dev tree ?
Je ne trouve pas
PHP Code:
$linkres->title_url makeUrlFriendly($linkres->title); 
dans le fichier
templates/yget/submit_step_3.tpl

Doit on le rajouter?
Reply With Quote
  #17 (permalink)  
Old 08-29-2008, 09:29 PM
Casual Pligger
Pligg Version: 9.6
Pligg Template: yget, molli
 
Join Date: Jul 2007
Posts: 30
Send a message via MSN to sadegazoz
Quote:
Originally Posted by ozlegolas View Post
If I save the file that I configured as UTF-8 ş,ı,ğ are replaced with s,i,g as desired but ç, ü, ö are not replaced with c, u, o and if I save the file as ANSI vice versa happens. I am dealing with this problem for several days and unfortunately I could'nt reach a solution.
Please help me

same problem for me too for turkish characters. any help?
Reply With Quote
  #18 (permalink)  
Old 08-31-2008, 01:47 PM
amsy's Avatar
New Pligger
Pligg Template: TheMissingpiec
 
Join Date: Jul 2007
Location: İstanbul
Posts: 20
hey people ...anyone help the turkish people...We need the source about the pligg...Someone help us ?? Turkish Pligg users sites down...because we don't know anything about the pligg...

We are trying the learn everything from the here but this is not enough...

Please help us...

especially turkish character problem...

Our tag is not working...

for example:
özlem , çimen, üzüm

Thats tags not work..especially "ö" "ç" "ü" character

I was do this:

PHP Code:
>    $output str_replace("ç""c"$output); 
>    
$output str_replace("ü""u"$output); 
>    
$output str_replace("ö""o"$output); 
and this :


PHP Code:
// function makeCategoryFriendly has been moved to admin_categories.php

function remove_error_creating_chars($chars) { 
    
$replace=array( 
    
'ç' => 'c',
    
'ü' => 'u',
    
'ö' => 'o',
    
'Ç' => 'c',
    
'Ü' => 'u',
    
'Ö' => 'o'

"ı ğ ü ş" character is work our tags but this "ç ü ö" characters not work in the tag...

Please help US PLİGG TEAM...
Reply With Quote
  #19 (permalink)  
Old 01-30-2009, 09:20 AM
Donor
Donation Level 2 
 
Join Date: Jan 2007
Posts: 29
Quote:
Originally Posted by liotier View Post
Reflecting on that solution I thought that it would not work : the function I am talking about is named makeUrlFriendly() whereas my problem is sanitizing the title, not the URL.

But then more grepping led me to discover that this function is used in templates/yget/submit_step_3.tpl at line 58 to sanitize the title so that it can be used in the story's URL :

PHP Code:
$linkres->title_url makeUrlFriendly($linkres->title); 
So I modified libs/utils.php so that makeUrlFriendly() supports my problematic accents :

PHP Code:
276a277,281
>    $output str_replace("é""e"$output);
>    
$output str_replace("è""e"$output);
>    
$output str_replace("ç""c"$output);
>    
$output str_replace("ù""u"$output);
>    
$output str_replace("à""a"$output); 
A few tests later I confirmed that I have solved my problem.

Now, can anyone add that in the dev tree ?
Thank you, that worked great!
Now we just have to solve tags as well.

Tags containing special characters does not show up when it's category is viewed.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning: Table 'tucknet_newqian_digg.pligg_groups' doesn't exist in seanli Questions and Comments 0 04-23-2009 03:35 AM
installed successfully but one table is not exist oodbqpoo Questions and Comments 2 03-16-2007 03:22 PM
Upgrading problem GurillaNET Questions and Comments 4 01-19-2007 11:56 AM
Creating the links table with InnoDB gilshwartz Questions and Comments 0 05-23-2006 04:08 PM
beta 5 and 6 install but can not create table links mtmdali Questions and Comments 0 01-20-2006 03:21 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