Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Is there a plugin to create Twitter style hashtags in headlines, posts, and comments?
TownFish
New
I'd like a plugin that turned #hashtag words into hyperlinks and they become filters, does anyone know of anything like this that's been done on Vanilla?
Tagged:
0
Best Answer
-
hgtonight MVP
I would run the title through the
Gdn_Format::Mentions()
method. It would only work on the individual discussion page (since the title is a link in the discussions list).public function DiscussionController_Render_Before($Sender) { $Discussion = $Sender->Data('Discussion'); $Discussion->Name = Gdn_Format::Mentions($Discussion->Name); $Sender->SetData('Discussion', $Discussion, TRUE); }
Let me know if that works for you.
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
6
Answers
Just answered my own question by posting this, can see they auto hyperlink - nice!
However, what about being able to hyper link them if they are added to the title of the post?
I would run the title through the
Gdn_Format::Mentions()
method. It would only work on the individual discussion page (since the title is a link in the discussions list).Let me know if that works for you.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Great thanks we'll give it a go and report back!