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

ash0815’s picture

I 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.

ash0815’s picture

Status: Active » Closed (fixed)

So, 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.

soup1977’s picture

I 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?

benanne’s picture

It 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

kmonty’s picture

Version: 6.x-2.4 » 7.x-3.x-dev
Status: Closed (fixed) » Active
minnur’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

No 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).