My name is Vasi CHINDRIS and I am a Drupal developer for about 2 years. Recently, I had to implement a feature in a project that would generate tags from certain text input fields of a content type. This is the main idea of the module that I want to share on drupal.org. It's name is "Node Tags Generator". It's main feature, as I said before, is to generate tags from the text that a user enters in certain text input fields of a node. The fields that can be used are: title, body and any other cck field that is a textfield or a textarea.
The module has an administration page from where the admin can set up for each combination of ("node type", "category that represents tags") what fields of the "node type" should be used to generate the tags in "category that represents tags". Also, the admin can decide on which forms (add and/or edit) the tags should be generated. For example: if I make a tags category and assign it to the page node type, then assign some cck fields to the page content type, I can choose that the tags to be generated on the add form, but not on edit form. In this case, when the user will add a new node, he will not see the input field for tags, but when he edits the node, he will be able also to edit the tags.
The module uses a list with stop words, that will be eliminated from the text that is entered by the user, so that words like "the", "is", "a" etc. are not considered. I took the list of words from here: http://members.unine.ch/jacques.savoy/clef/index.html and I used the English, French, German and Italian stop words.
Until now I didn't find any other module that can do this thing and I consider it useful because of at least 2 reasons:
1) The process of creating new nodes with tags becomes a bit faster, because the user does not have to enter data also for the tags field.
2) From my experience, many times the users do not consider tagging their content when possible, or introduce a small number or words (because usually the tag field is at the end of the forms and the user wants to finish the process as quickly as possible). Also, being generated from the content itself, the tags may have a stronger bound with the node that is created.
Currently, I have implemented the module for the versions 5 and 6 of Drupal. I have tested them on versions 5.20 and 6.16 and I plan to not add any new feature for the current version of the module. I will fix only the bugs in them.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | node_tags_generator.zip | 10.91 KB | vasi1186 |
| #1 | node_tags_generator-5.x-1.0.zip | 10.29 KB | vasi1186 |
| #1 | node_tags_generator-6.x-1.0.zip | 10.84 KB | vasi1186 |
Comments
Comment #1
vasi1186 commentedComment #2
vasi1186 commentedComment #3
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
The module description reminds me of http://drupal.org/project/int_meta. We review a module / theme per applicant; let us know which one you want reviewed.
Comment #4
vasi1186 commentedHi,
thanks for your fast response!. I had a look over the http://drupal.org/project/int_meta module and from what I have seen in the description, the module is capable of generating metatags that are usually useful for SEO. Now, the tags that my module generates are not this kind of tags. They are in fact taxonomy terms in the end. You can use these tags to create for example a tag cloud, with tagadelic module from what I remember... It's the same thing as if you would assign a taxonomy to a content type, a taxonomy that generates terms from a comma separated string (it has the "tags" flag on). Just that these terms are generated from the data entered by the user.
But the decision if this module brings something new to the Drupal community is yours, so if you think that this module should be reviewed, then I would want to be reviewed the module for Drupal 6.
A demo page can be found here: http://drupaldemos.net/?q=node/3
Regards,
Vasi CHINDRIS.
Comment #6
dawehnerPlease use spaces instead of tabs.
Comment #7
vasi1186 commentedHi,
I replaced the tabs with spaces and I attached the new module.
Regards,
Vasi.
Comment #8
avpadernoI will review the code within 6 days; for sure, I will not review it in the next 2 days.
Comment #9
avpadernoThat code is looking for the file in the Drupal root directory. There is a Drupal function that should be used in such cases.
The code is still in style Drupal 5; apart that, the queries are the same.
That condition is not enough to verify if the form is the node form (there could be other forms with an ID ending in .
That code is useless; as the module requires taxonomy.module, it cannot be enabled without to enable first taxonomy.module.
Comment #10
vasi1186 commentedok, thank you very much, I will review the code and submit a better version.
Comment #11
avpadernoComment #12
avpaderno