Форумы / Cotonti / Extensions / Create Alias From Title

musiconly
#18398 05.11.2009 06:00
Hey guys, I got stuck... again.. :(

Here's the thing, since I have 10,000+ pages and around 50 of them have alias, I want to auto create alias from page title.

I want to do this because of few reasons:
1. Improve current SEO
2. Prepare database for Cotonti(yep, still using Sed125) - my nice urls will look like site.com/category/alias

Anyways, I'm not even a mediocre PHP programmer so don't laugh at my approach. It's almost working :D

Basic idea (since my titles consist of croatian letters like č,ć,š,ž,đ):
Turn: Đorđe Balašević - koncert u Šibeniku
into: Dorde_Balasevic_koncert_u_Sibeniku


What's wrong? Well, I get this kind of output:

Đorđe Balašević opet u Kerempuhu - Đorde_Balasevic_opet_u_Kerempuhu_22
Šta ćeš bez mene? - Šta_ces_bez_mene_28

And it should be
Đorđe Balašević opet u Kerempuhu - Dorde_Balasevic_opet_u_Kerempuhu_22
Šta ćeš bez mene? - Sta_ces_bez_mene_28

As you can see, output IS case sensitive, and it shouldn't be since I'm using str_ireplace. Right?

I don't get it :O

And second thing, has anyone created this "plugin" already and is willing to share it :D I'm sure lots of people could use it.

Thanks in advance!