1

I am building a Social Networking site in drupal. My client requirement is to tag users and taxonomies using a '$'. For example "$john" will tag a user john with that post. and "$Arts and Entertainment" should tag the Taxonomy term to the post.

I tried hashtags module. But it is for tagging the words in body with a "#". The words are tagged under a separate vocabulary called "Hashtags".

My functionality needs twitter OR facebook like tagging of both users and Taxonomies(with a autocomplete Dropdown).

For tagging the taxonomies, I have created a separate field called Industry Tags of type Term Reference in that content type. This field will store the mapping of that particular node to the Industry Terms(Taxonomy Terms). Iam not going to display this Industry Tags field in the frontend. Instead of that i have to save the terms that user enters in the Body field prefixed with "$" to in this field. Example: "$Education".

Also for tagging users i can use "User Reference" in the same manner i mentioned above for industry tags. But i need the functionality to be something similar to twitter / facebook.

Please suggest me some ideas for implementing this.

3 Answers 3

1

It will be interesting logic to figure out whether $art is a user or the start of the $art and entertainment taxonomy term, but, regardless, what you are most probably looking for is an input filter that can recognize a pattern in the text and then both create a link to either the user or taxonomy term as well as actually tagging the node with that taxonomy term if it is one.

A start might be to take a peek at the Hashtags Module and change its use of # to $ for the taxonomy portion and then extend it to include users.

4
  • Thanks for your reply. I think the hashtags module is for tagging the words in body with a "#" and those words will be tagged under a separate vocabulary called "Hashtags". My functionality needs twitter / facebook like tagging of both users.
    – Manojkumar
    Commented Jul 8, 2013 at 9:57
  • Also i have tried Rules Autotag Module to extract the terms out of body. But that does not support the prefixing of the term with "$". I have added some more points to my question. Should i go for a custom module for this.? Please advice.
    – Manojkumar
    Commented Jul 8, 2013 at 10:16
  • 1
    your need for a different token ($ vs #) plus the need for it to be able to link in users as well as taxonomies (plus autocomplete dropdowns) dictates in my opinion a custom module.
    – Jimajamma
    Commented Jul 8, 2013 at 12:54
  • @Manojkumar Is it possible to have hashtags functionality in D8?
    – Umair
    Commented Jun 26, 2017 at 19:02
0

For taxonomy terms you can use Active Taxonomy Links...I'm not sure for users...

0

The mention module can do this

"The Mentions module offers Twitter like functionality, recording all references to a user's username - using the [@username] or [@#uid] filter format - from various locations, providing a centralized page to track all mentions."

https://drupal.org/project/mentions

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.