Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to create custom bbcode tags? Thanks!
Is there a way to create custom bbcode tags? Thanks!
Comments
Comment #1
naudefj CreditAttribution: naudefj commentedUnfortunately not (see the TODO section of the README file).
What tags do you want to add?
Comment #2
pnikosis CreditAttribution: pnikosis commentedFor example, a youtube tag, like [youtube]Y70aJn7fb9Q[/youtube] or using it with the Hovertips module for [Hover="hover this"]some text[/hover] :)
Great module by the way, I love it :)
Comment #3
naudefj CreditAttribution: naudefj commentedIf you send me the HTML for these tags I will send you the code.
Comment #4
pnikosis CreditAttribution: pnikosis commentedThanks a lot, for example for youtube:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/Y70aJn7fb9Q"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Y70aJn7fb9Q" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
Where Y70aJn7fb9Q is the movie ID
For Google Video:
Where 3636478429299171266 is the movie ID
(I prefer using this than the video module, because this way I can let users in the forums post videos with bbcode)
Or in the case for the hovertips and clicktips plugin (http://drupal.org/project/hovertip):
or
Thanks a lot!
Comment #5
Xabi CreditAttribution: Xabi commentedCould this be done not based on video IDs, but un video URLs? Video IDs are a bad approach from the user side. It's better to paste the full URL into the bbcode and then transform it to a valid embed code.
Comment #6
naudefj CreditAttribution: naudefj commentedTo add a youtube tag, add this code to your bbcode-filter.inc file:
The tooltip and clicktips would be more difficult to add as it required JavaScript coding as well.
Comment #7
pnikosis CreditAttribution: pnikosis commentedGreat, thanks!
I'll use this as an example to add more tags if I need to :)
Comment #8
naudefj CreditAttribution: naudefj commentedGreat - that is the spirit!
When done, please post your expressions here. Other people would also be able to benefit from them.
Comment #9
(not verified) CreditAttribution: commentedComment #10
hanief84 CreditAttribution: hanief84 commentedCool! youTube filter there! Thumbs UP!