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.
Hi
I am just wondering wether it is possible to change the syntax used for this module? I would most people who use forums will be more comfortable with bbcode like code.
(This should be used in addition to the current syntax - to cover those more comfortable with it, and for legacy purposes.)
Good idea?
Comments
Comment #1
ash0815 CreditAttribution: ash0815 commentedI found the code in video_filter.module in line 78 but I don't know yet how to change the code.
I must try to change the code for other syntax to [video]URL[/video].
ps: sorry for my bad english.
Comment #2
ash0815 CreditAttribution: ash0815 commentedSo, I tried to change the code and it's ready, but I don't know because the safty,
##############################################################
## SNIPPED Description: BB-Code [video]URI[/video]
##
## Files To Edit: [PathToModules]/video_filter/video_filter.module
##
## Edit Level: Easy
##############################################################
## Before Adding This SNIPPET To Your File, You Should Back Up All Files Related To This SNIPPET
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
[PathToModules]/video_filter/video_filter.module
#
#-----[ FIND (usually line 78 ) ]------------------------------------------
#
if (preg_match_all('/\[video(\:(.+))?( .+)?\]/isU', $text, $matches_code)) {
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (preg_match_all('/\[video]((.+))?( .+)?\[\/video]/isU', $text, $matches_code)) {
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Maybe somebody can optimise the code.
Vielleicht kann jemand den Code optimieren.
Greets from Germany / Grüße aus Deutschland.
Comment #3
soup1977 CreditAttribution: soup1977 commentedI know this is pretty old, but how would one go about adding the option to use the [video]url[/video] tags as well as the original way?
Comment #4
benanne CreditAttribution: benanne commentedIt would be great if this could be made configurable, I want to use [media]url[/media] as it goes better with the rest of the filters I'm using (and also because I'm going to attempt to implement codecs for services like SoundCloud and Bandcamp - 'video' makes no sense there). Right now the only option is to hack the module, which is kind of nasty. I don't like the idea of having to reapply patches every time I upgrade :p
Comment #5
kmontyComment #6
minnur CreditAttribution: minnur at Chapter Three commentedNo activity here for the last 3 year. Closing this ticket. No need to support two formats. I am planning to implement something new for D8 version (better UI and better CKEditor integration).