Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-13-2007, 01:35 PM
New Pligger
 
Join Date: Feb 2007
Posts: 11
Thanks: 3
Thanked 1 Time in 1 Post
URL method 2 & CE characters

Hi,

I know this might be too much to ask, but if someone can help me, please do. In croatian language there are characters : čćđ (I hope you see them).

Now when I switch to method 2 titles containing this characters go crazy(they get changed into their codes or something like that) . It would be best if čćđ could be replaced with cczsd in link, or if it is more simple just to exclude them.

Pls Help.

Tnx.
N.
Reply With Quote
  #2 (permalink)  
Old 03-13-2007, 01:40 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Look in /libs/utils.php towards line 228. http://pligg.svn.sourceforge.net/vie...hp?view=markup

You'll see a list of characters that cause problems with URL method 2. In your utils file all you have to do it add the characters that are causing problems for you.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 03-13-2007, 02:22 PM
New Pligger
 
Join Date: Feb 2007
Posts: 11
Thanks: 3
Thanked 1 Time in 1 Post
As I can see this characters are already included , also added
PHP Code:
  'Ž' => 'Z'
  
'ž' => 'z'
  
'đ' => 'd',
  
'Đ' => 'đ',
  
'č' => 'c',
  
'Č' => 'c',
  
'ć' => 'c',
  
'Ć' => 'c'
but It didn't help... :(

I left the first video vith this symbol so you can see it live...
Reply With Quote
  #4 (permalink)  
Old 03-13-2007, 02:48 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
I think you were looking at the wrong section. It should be the section that starts with
Code:
$output = str_replace("_", "-", $output);
and I forgot to mention, this will only take affect for stories submitted after the changes.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
The Following User Says Thank You to kbeeveer46 For This Useful Post:
  #5 (permalink)  
Old 03-13-2007, 04:52 PM
New Pligger
 
Join Date: Feb 2007
Posts: 11
Thanks: 3
Thanked 1 Time in 1 Post
Tnx!!!!!

Ok, I've found out that the problem was the way it was written into DB and now it looks like this:

PHP Code:
    $output str_replace("š""s"$output);
    
$output str_replace("đ""d"$output);
    
$output str_replace("č""c"$output);
    
$output str_replace("ć""c"$output);
    
$output str_replace("ž""z"$output);
    
$output str_replace("""S"$output);
    
$output str_replace("Đ""D"$output);
    
$output str_replace("Č""C"$output);
    
$output str_replace("Ć""C"$output);
    
$output str_replace("Ž""Z"$output); 
And the thing I found out
Quote:
! & ?
are also making problems so for the others that may encounter this problem also add:

PHP Code:
    $output str_replace("?"""$output);
    
$output str_replace("!"""$output);
    
$output str_replace("&"""$output); 
Reply With Quote
The Following User Says Thank You to Cacademy For This Useful Post:
  #6 (permalink)  
Old 04-02-2007, 05:35 PM
New Pligger
 
Join Date: Mar 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
version 9.0

Does anyone know how to do this on version 9.

I insert the similar lines after
Quote:
// $output = preg_replace( '/(_a_|_an_|_the_|_and_|_or_|_of_|_for_)/i', '_', $output );

$output = str_replace("_", "-", $output);
$output = str_replace("--", "-", $output);
but it does not work.

Thanks
Reply With Quote
  #7 (permalink)  
Old 04-02-2007, 05:38 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Quote:
Originally Posted by jango View Post
but it does not work.
Thanks
Are you testing it with new stories or stories that were submitted before you changed the code? The changes will only take effect on new stories.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #8 (permalink)  
Old 04-13-2007, 01:11 PM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
I have this happen as well, but I can't figure out what the character is suppoe to be:

http://www.newsdots.com/story.php?ti...ngers--CNN-com

its the diamond shaped icon with a question mark in it. It's the only one I get from time to time.

Geoserv
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Search Method 4 - Tags will not work hotsitez Bug Report 11 11-29-2008 07:54 PM
URL Method 2 Bug w/ Turkish Characters tasmaniac Bug Report 1 07-28-2008 10:16 PM
Incorrect Links with Admin User Management Page Numbers with URL Method 2 NewsHeatDotCom Bug Report 0 06-17-2008 02:41 PM
Special Characters "" "" - Is a very comented thread mathcv General Help 7 07-13-2007 08:34 AM
FIX for gzip compression troubles, no .htaccess gzip compression method required Daniel Modification Tutorials 8 02-16-2007 03:16 PM


Search Engine Friendly URLs by vBSEO 3.2.0