freakedout

Hyphens in article aliases

Hyphens in article aliases

Okay, so got my 7000 articles split into seperate spreadsheets each of 300 lines and good to go...

However, I notice on uploading there are no hyphens in the created article aliases. e.g. Article title "This Is A Test"
appears in the alias as "thisisatest". Horrible to read and I doubt search engines are going to find it friendly.

If I add the same article manually the alias reads "this-is-a-test" as I'd want it to.

Any clues?

Edited By: ag1266
29-03-2012 18:24:05

ag1266
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Hyphens in article aliases

Okay so uninstalled component and re-installed AGAIN since that solved the problem with created date to see if that would fix alias problem, but no and to make things worse it's now no longer picking up the Author Alias whereas it was before.

Is there any way of getting a bit better support than via this forum?

ag1266
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Hyphens in article aliases

Hi ag1266,

You are right. In the current Joomla 2.5 version is a bug causing the alias to be malformed. This will be fixed in the next release. In the meantime you can edit the file:
\administrator\components\com_focontentuploader\
helpers\helper.php

At line 86 you will find the slugify function. Replace the complete function with the following code:

Code:

function slugify($string){

    $string = preg_replace('~[^\\pL\d]+~u', '-', trim($string));
    if (function_exists('iconv')) {
        $string = iconv('utf-8', 'us-ascii//TRANSLIT', $string);
    }
    $string = strtolower($string);
    $string = preg_replace('~[^-\w]+~', '', $string);

    return $string;
}

You can get in contact with me by dropping a mail to This e-mail address is being protected from spambots. You need JavaScript enabled to view it
I'm not sure why the author alias stopped working for you. I just tried it using a column reference with and without curly brackets and both works. If you like you can send me a superadmin login to your site and I will check it out.

Kind regards,
Pete

If you are satisfied with our products please write a review in the Joomla Extensions Directory!

Pete
Site admin
useravatar
Offline
758 Posts
User info in posts
Administrator has disabled public posting

Re: Hyphens in article aliases

Thanks. That fixed the hyphens problem. I'll work round the author aliases problem with SQL scripting.

ag1266
useravatar
Offline
7 Posts
Administrator has disabled public posting