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.
I needed this for a client's project, and here it is:
Enable it for one of the input formats, say filtered html or whatever. It allows you to enter:
[brightcove:1330545631001]
in your node's body and it will use the module's theme functions to display the player with the video "1330545631001".
I believe this is the way to go for providing wysiwyg integration properly (no need to worry about flash markup etc being filtered (see #1342754: Add WYSIWYG embed support)
Comment | File | Size | Author |
---|---|---|---|
#2 | brightcove-input-filter-1388264-2.patch | 2.92 KB | Manuel Garcia |
brightcove-input-filter.patch | 2.48 KB | Manuel Garcia |
Comments
Comment #1
Manuel Garcia CreditAttribution: Manuel Garcia commentedI forgot to mention this adds a new submodule, so people needing it would have to enable it.
Comment #2
Manuel Garcia CreditAttribution: Manuel Garcia commentedHere's a revised version of the patch above.
It seems that
theme_brightcove_cck_formatter_default
callsdrupal_set_html_head
to add the brightcove external js file, and since filters are only ran once when saving a node and its results cached, we have to add it directly into the output inline ourselves.We might want to consider adding this file to the page using hook_init perhaps, to avoid these problems and increase reusability of current code.
You can see this filter being used in production here (bottom of the article):
http://www.autobild.es/noticias/muere-Jorge-Mart%C3%ADnez-Boero-dakar-20...
Comment #3
meba CreditAttribution: meba commentedI like this. What is clear from this patch is that the formatter might need refactoring as you had to implement crazy fake $element in order to be able to print the content. Maybe we should refactor that, split out a real easy theme fnuction and reimplement that? Do you think you could look at that (maybe in a separate issue)?
THanks!
Comment #4
Manuel Garcia CreditAttribution: Manuel Garcia commentedI'd be very much interested in making progress in that direction, sure!
I've created a meta issue to discuss the necessary changes, let's discuss it there:
#1392474: [META] Refactor cck formatter & related theme functions for flexibility
I'm changing the status to postponed, as I think this should be implemented properly once the rest is done. Of course you're welcome to make the commit and then after make the adjustments so that people start using it, your choice.
Comment #5
k.dani CreditAttribution: k.dani commentedWe are working on the 7.x version of the module, but as soon as we have chance to check it, we review it.
Comment #6
jedihe CreditAttribution: jedihe commentedComment #7
k.dani CreditAttribution: k.dani commentedComment #8
k.dani CreditAttribution: k.dani commentedWe don’t maintain the Drupal 6 version of the module, but apply patches (if it is in RTBC status) until the stable version of Drupal 8 is released.
Comment #9
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commented