I am looking to change a few things in the urls generated :
- stop using _ and replace with -
- replace ' by a -

example: I'LL DO THAT changes to I-LL-DO-THAT instead of ILL_DO_THAT

I really looked into the custom_url_rewrite_function.php file where I was sure it would be, but unable to see the _ character being used as a separator, so I don't know where the magic happens.

Also, I'd like the categories to follow the same format as the titles:
MY CATEGORY => MY-CATEGORY instead of MYCATEGORY

at the moment if the category is 2 words, there's no space in between, not even an underscore char.

Comments

mercmobily’s picture

Hi,

For Google, underscores and dashes are exactly the same.
However, I changed Drigg so that both of them are configurable.

I committed the change to the -dev branch - can you take it out via CVS, and let me know if it works 1000%?

This change was sponsored by James Colin. He kindly offered a bounty to enhance Drigg. Without his contribution, this enhancement would most likely be planned for a future release of Drigg. Thanks Colin!

Merc.

mercmobily’s picture

Status: Active » Fixed

Hi,

I tested the fix and it works 1000% on Drigg and fsdaily. So, rolling it out along with a new version of Drigg.

Bye,

Merc,

alliax’s picture

Thank you, by looking at CVS messages I can now see that if I want to replace ' with a separator I have to edit the file drigg/i18n-ascii.example.txt

mercmobily’s picture

Hi,

I need to add this bit in the documentation...
I stole this outright from pathauto - I need to credit them!
Basically, you will need to rename that file to i18n-ascii.txt . That's to translate "funny" characters to normal ones.
To change what the separator character is, you can just go to Admin -> Settings -> Drigg and reconfigure what the separator is. I apologise for not crediting you in the CVS messages - I am soooo sleep deprived at the moment...

Give me a shout if it doesn't work (or even if it works :-D )

Merc.

alliax’s picture

It works yes, the separator can now be selected. But for tags, there's no separator, when one input 2 words the url then have this format : /tag/keyword1%2Bkeyword2
Also the ' of I'd do that is not replaced by a separator, so you end up as id-do-that
I know this last thing is not important, only a tiny bit for SEO, but sometimes it will add an S like when you write SONY's latest gadgets you end up with SONYs in the url.

bkoopmans’s picture

Opps. Wrong subject - delete me

mercmobily’s picture

Hi,

Sorry, while I developed the patches necessary to satisfy the original request, I must say thatI am not really willing to change the tags system because:

* Fsdaily has _many_ tags which would break

* I spent a whole day getting this to work right. Tags now work right with the extra settings.php aliasing function, and within drigg. Touching it would be madness.

So, while the whole Drigg system is _very_ CEO friendly, tags won't be. Sorry.

Merc.

P.S.
Unless you come up with a _complete_, _working_, _tested_ patch that does the job. Beware, it's going to be a pain...

mercmobily’s picture

Status: Fixed » Closed (fixed)