While playing with the system, you must have noticed that stories are referred to as /node/3 or /node/5 etc. This is less than optimal. In order to have URLs like /Category/The_articles_title_more_or_less, you will need to:
* Open the file [your_server]/modules/drigg/custom_url_rewrite_function.php. This file came with the drigg module.
* Select all of the text and copy it to the clipboard (all of it, from function custom_url_rewrite($op, $result, $path, $path_language=NULL) to the end of the file
* Paste it right at the end of your settings.php file, which is probably located in sites/default/settings.php
* That's it!Reload a page, and notice that the URLs have drastically changed.
IMPORTANT NOTE: You absolutely have to save the Drigg configuration if you add more categories.
I'm curious why you chose to rewrite urls in your own custom way instead of using the path and pathauto modules?
Comments
Comment #1
robertdouglass commentedFound the answer in your FAQ:
Comment #2
mercmobily commentedHi,
Thanks robertDouglass:-D
Having tons of urlaliases polluting the drupal DB would have also meant that changing ONE category name would have caused a problem which would be hard to manage.
Right now... well, it still causes a problem, because each node has an un=normalised category name in it (for performance reasons), but writing a function which does a mass-recalculation of the category names is trivial (and indeed important - I will add it to the TODO).
Bye!
Merc.
Comment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.