Mod_Rewrite and Accents - Page 3 - eSyndiCat User Forums
eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [FREE] > Modifications

Modifications Simple to complex modifications, made by users or by our team, applied to logic or presentation, all kinds of modifications are discussed and requested here.

Reply
 
Thread Tools Display Modes
Old 09-12-2008   #21
Nikita B.
Guest
 
Posts: n/a
Default

Good work Eduardo! Thanks for that!

Sorry for late answer btw.. (

I have attached script to this post which make paths for 3 and more levels of categories.

If somebody have problems wiith paths you need to run this script, your path will be updated from titles with good structure.

/topcat/subcat1/subcat2/

You need to copy this script to root of the domain and then run
yourdomain.com/dir_from_path2.php
Attached Files
File Type: zip dir_from_path2.zip (758 Bytes, 7 views)
  Reply With Quote
Old 10-12-2008   #22
rexinvn
 
Join Date: Feb 2008
Posts: 15
rexinvn is on a distinguished road
Default

Quote:
Originally Posted by itramways View Post
The solution :

open includes/util.php and find code :
Code:
function convertStr($str)
	{		
		$str = preg_replace('/[^a-z0-9]+/i', '-', $str);
		$str = preg_replace('/\-+/', '-', $str);
		$str = trim($str, '-');
	
		return empty($str) ? "listing" : $str;
	}
change with :
Code:
function convertStr($str)
	{	
		esynLoadUTF8Util('utf8_to_ascii');
		$str = utf8_to_ascii($str);
		
		$str = str_replace('é', 'e', $str);
		$str = str_replace('è', 'e', $str);
		$str = str_replace('ê', 'e', $str);
		$str = str_replace('ë', 'e', $str);
		$str = str_replace('à', 'a', $str);
		$str = str_replace('à', 'a', $str);
		$str = str_replace('ñ', 'n', $str);
		$str = str_replace('ù', 'u', $str);
		$str = str_replace('ú', 'u', $str);
		$str = str_replace('û', 'u', $str);
		$str = str_replace('ü', 'u', $str);		
		$str = str_replace('ç', 'c', $str);
		$str = str_replace('ï', 'i', $str);
		$str = str_replace('î', 'i', $str);
					
		$str = strtolower($str);
		$str = preg_replace('/[^a-z0-9]+/i', '-', $str);
		$str = preg_replace('/\-+/', '-', $str);
		$str = trim($str, '-');
	
		return empty($str) ? "listing" : $str;
	}
Regards

Jc
This is not working for 2.2.06

Any idea?
rexinvn is offline   Reply With Quote
Old 10-28-2008   #23
falsealarm
 
Join Date: Jun 2008
Posts: 42
falsealarm is on a distinguished road
Default

Rexinvn, there are actually two places where you need to make the same change in 2.2.06..

1. includes/util.php (affects sitemap plug-in, etc.)
2. includes/classes/esynSmarty.php (affects the general site links)

Sadly, this information could have been provided in a very clear way but I personally as a new 2.2.06 user had to go around reading multiple threads before I had the full solution. I am still not even fully sure the changes I made covers everything. It's also odd that different folks from the same support team provide different solutions and some even have typos in them. There needs to be a unified front with this.

Last edited by falsealarm; 10-28-2008 at 08:55 PM.
falsealarm is offline   Reply With Quote
Old 10-28-2008   #24
falsealarm
 
Join Date: Jun 2008
Posts: 42
falsealarm is on a distinguished road
Default

Yep, I was right. The changes I made did not cover everything. Feed output still does not display properly. Any ideas?

Update: Resolved by adding the following after line 100 in feed.php (2.2.06)

Code:
esynLoadUTF8Util('utf8_to_ascii');
$value['title'] = utf8_to_ascii($value['title']);

Last edited by falsealarm; 10-28-2008 at 08:54 PM.
falsealarm is offline   Reply With Quote
Old 06-22-2012   #25
neominds
 
Join Date: Feb 2006
Location: Mexico City
Posts: 53
neominds has disabled reputation
Default

Quote:
Originally Posted by itramways View Post
Hello,

I would do the same thing with version 2.2.
I tried, but it does not work.

Thank you for yours answers.

Regards

Jc
How can this be done with the 2.4.1 script?? I need lowercases and to convert á to a in the url and any other accent... The tried the solutions and changing it in the util.php but it didnt work out...
neominds is offline   Reply With Quote
Old 07-02-2012   #26
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,292
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

Greetings,

The script should convert á to a by default. In order to make your URL titles lowecase you need to add the following line to your includes/util.inc.php file in code line #721:

PHP Code:
$aParams['string'] = strtolower($aParams['string']); 
Let us know if it works fine for you. Thanks
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is offline   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 On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us