0

Can anyone give me some advice/tips on how to get this working? I have a content type called "reviews", and in that i have two fields, called "pros" and "cons". Both fields have values defined in the Drupal admin interface.

In the front-end of the site, users can add new reviews and select values from the field list, until here no problem, everything work, but now i need to allow users (the registered users) to add new values to the fields (pros & cons).

Beside that, the values submitted by the users that don't exists yet in the database, must be approved by the admin before shows on the front-end.

Any suggestions for resolving this 2 questions?

Thanks in advance for your help.

1 Answer 1

1

I will try and provide you a general direction which I think might serve you well:

  1. Create a text field, with label something like this "Please add tags of your choice if you dont find adequate options".(purpose is explanatory from the label)
  2. Create a content type, "Proposed Taxonomy Terms". Let it have only title and body field.
  3. Now on saving a node of the content type in which we had the suggestion field, grab the value of the proposed taxonomy terms from it, create a node of type "Proposed taxonomy term" and clear the value of the field in the first content type.
  4. Now the nodes in the content type "Proposed taxonomy Term" will be your basis which you need to set up such moderation. it will initially remain unpublished. Upon validation, write custom code, to grab the title on its save and create a taxonomy term in the vocabulary(which was used as term referance field in the first content type), and delete the node (or you may choose to keep it).

So next time when user tries to create the node of the first content type, they will have it as an option. this is a complex workflow. The logic parts you can do custom code better, employing drupal hooks or you may choose to use rules module (not sure it will serve the purpose exactly though).

Hope this long answer did not confuse you.

5
  • cool!, @neo how about keeping freetagging field on content type which is allowing to add more options and open the same vocab to other content type as select list? yes code will require to remove terms on the unpublished nodes from the select list on other content type and delete the tagged term if not having reference to other nodes except the node being deleted.
    – arpitr
    Commented Oct 7, 2013 at 19:20
  • @arpitr Reasons I suggested this approach over freetagging mechanism: 1. Freetagging mechanism will be difficult to be moderated. It is meant for users to add terms without any moderation.Here the requirement is admin needs to approve the term before it is published. 2. Node publish (workflow setup) is more easily achievable than term creation workflow (not that sure about thisthough). Can you mould youur approach to include this cases and provide a solution? I think, freetagging approach will face the above mentioned shortcomings
    – Neo
    Commented Oct 7, 2013 at 20:00
  • true, this is the reason I added codes will be needed to remove terms which are on unpublished nodes.we are still having node publish workflow, while having a check to have select list of taxonomies on other content type referenced node of which are publsihed
    – arpitr
    Commented Oct 7, 2013 at 20:06
  • @Neo thanks for your answer, i am a little confused with your answer, can you give me your gtalk or skype so i can discuss this better with you since i don't have access yet to chat? Meanwhile let's see, i have the content type "reviews", in this i add a new text field...Then i create a new content type "proposed terms" with title and body and set it to unpublished by default? A didn't understood the next part, saving the node and creating a new node. Thanks a lot.
    – Mambley
    Commented Oct 8, 2013 at 11:02
  • Hi @Neo, i followed your tips in conjunction with arpitr tips and i think i have a workaround. When the user submits the reviews form (in the front-end), two nodes are created, one with the review and other with proposed terms. When i approve the proposed terms, they are moved to taxonomy term. Until here, i think its working well. Now my "problem", i need to do this, when i approve the "proposed terms" content type, i need the term to appear also in the "review" content type, any idea on how to do this? Thanks a lot again for both.
    – Mambley
    Commented Oct 9, 2013 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.