Any way to replace characters in vocab terms?

jvinci - September 5, 2008 - 02:09
Project:Taxonomy Redirect
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

This module is exactly what I've been looking for, except that my vocabulary terms have spaces commas and periods. I'd like to change the spaces into underscores and delete the commas and periods.

So, if my term is "James Madison, Jr." I'd like it to display in the URL as "james_madison_jr" instead of "James%20Madison%2C%20Jr."

Is there any way to do this?

The admin page says "Define the function taxonomy_redirect_custom_term_path($term, $path) to customise further."

Where do I define this function and where would I call it? (You can tell I'm a little new at this.)

Thanks,

JV

#1

qbnflaco - September 11, 2008 - 14:43

I'm having the same issue. It's using taxonomy term, but some of the terms have spaces which get replaced to "Taxonomy+Term" and would prefer a drupal style "taxonomy-term". Is there a patch I can apply to get this working like this?

BTW, I'm running it on drupal 5.

#2

ArjanLikesDrupal - September 21, 2008 - 20:08
Category:support request» feature request

I second this request. It would be great if you could tie the module in with Transliteration to achieve this - this is the only thing keeping me from using it right now :)

(changing to feature request).

#3

Justin W Freeman - September 23, 2008 - 23:51

In the 5.x-1.2 version there is the ability to set a character that will replace all spaces and + characters in the path (eg an underscore or dash).

There is also the ability to specify a list of characters to delete from the path. (For reference the deletion of the specified characters is done before the spaces are replaced)

These changes will be added to the Drupal 6 version asap.

#4

j4 - September 24, 2008 - 14:36

Agileware,

I was thrilled to see that the latest version for drupal 5 will answer my needs, but i am getting an error after installation and after trying to change the settings.

* user warning: Unknown column 'tid' in 'where clause' query: DELETE FROM taxonomy_redirect WHERE vid = '1' AND tid is NULL in /home/roundtr7/public_html/includes/database.mysql.inc on line 172.
* user warning: Unknown column 'tid' in 'field list' query: INSERT INTO taxonomy_redirect (vid, tid, module, path, separator_replace, remove_text, filter) VALUES ('1', NULL, '', '!name', '-', '', '1') in /home/roundtr7/public_html/includes/database.mysql.inc on line 172.

Please help!! My site is to be ready tomorrow for review by client and I desperately need this to work!
Thank you.

Jaya

#5

Justin W Freeman - September 25, 2008 - 00:25

There may be an issue with the install file. I will look into it.

For now try going to yoursite/update.php and running update 3 for taxonomy_redirect.

#6

Justin W Freeman - September 25, 2008 - 00:28
Status:active» fixed

Version 6.x-1.1 is now up with the same changes as 5.x-1.2.

#7

Anonymous (not verified) - October 9, 2008 - 00:34
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#8

drupdruppalpal - November 30, 2009 - 10:18

Hi,
the same problem with Latin characters like (á ü ñ)

#9

drupdruppalpal - December 3, 2009 - 18:06
Status:closed» active

Hi,
any way for replace Latin characters like (á é í ó ú)?

 
 

Drupal is a registered trademark of Dries Buytaert.