Drupal 6 Port
mariuss - September 9, 2008 - 03:30
| Project: | Accents |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Can you please port this module to Drupal 6?
| Project: | Accents |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Can you please port this module to Drupal 6?
#1
I wasn't even aware people were still using this :). I'll port it to 6 put I can't promise when. It is not a difficult module to port, I am just not using Drupal 6 yet and I am not too sure when I'll start.
#2
mariuss,
The API that accents uses is actually pretty simple and hasn't changed since it was first release which means the module can be used as is. You'll need to edit the .info file however, due to the changes introduced in 6. The file should now contain:
name = Accentsdescription = "Removes accents from words before searching"
core = 6.x
I haven't tested it. I'll eventually do an official port but this should work for now.
#3
Thanks canen, that's good to know.
I did not port the site using Accents to Drupal 6 yet, just checked the upgrade status (using the Upgrade Status module). There are 3 modules in use that have not been ported to Drupal 6, and Accents was one of them.
At least I know Accents is not a blocker :-)
#4
I'm including support for Accents in one of my modules, so if you decide to scrap this project, I'd like to bum the function I'm currently including, if u don't mind.
#5
subscribing
#6
The module was absolutely needed and nice for me in D5. But as far as I see D6 deals fine with accents in search (ignores them).
You can check here: http://www.budapestindex.com/
Just enter something say Vasarcsarnok or Hosok in the search box and check highlighted search results for ignored accents / umlauts.
But kudos to canen for making the search magic possible back in D5 anyway!
#7
subscribe. Would like to see a 6.0 version.
#8
Attempted a port this module to Drupal 6 using mostly the Coder module. It works on my end, but would like more people to try it out and make sure it's working okay. This is my first port/patch, so be gentle :)
I'm still a newbie at this so I did the info and module file separately and created two patch files. Please do let me know if I did anything goofy, most willing to learn!
thanks all
#9
@soupp in #6:
MySQL supports[1] "Collation" algorithm which is a Unicode standard[2] for comparing unicode strings in a predictable manner for users (i.e. it does things similar to what accent module does). So perhaps collation got turned on for you between your D5->6 upgrade.
When the search module finds a word and wants to index it, it inserts it into the search index. When the word already exists, there are 2 possible scenarios:
So I definitely think the module should be maintained and moved on. But I suggest that a feature would be added to check for the support of collation on the underlying underlying database. If it exists, then it would suggest to the user that they don't need the module. An easy way to check could be to create a temporary table (both MySQL and PostgreSQL support them) with said collations, INSERT normal and accented versions of some word and if the database rejected the second INSERT then it supports collation, if not, then it doesn't.
[1] http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html#id2448887
[2] http://www.unicode.org/reports/tr10
#10
subscribing.
+1 to the feature for detecting collation
#11
+1
I find it necessary with a couple of sites also.