Text editors

Link transformed automatically

 
photo ulrrrike
Link transformed automatically
 

Hallo,

I try to send a message which contains a link to a You Tube video. In the editor everything's fine, but when I click on "preview", it tries to transform the link and the following code appears:

undefinedVidéo You Tube: "J\'ai besoin de la lune" de Mano Chao<\/font>" class="mediaplugin mediaplugin_youtube" type="application/x-shockwave-flash" data="

" width="425" height="344">

I don't want an embedded video, just a link, but Moodle seems to be trying to create one... do you know a way to avoid this ?

Thank you...!

Ulrike

 
Average of ratings: -
Mary Cooch
Re: Link transformed automatically
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

Hi there. There might be some help in the docs here: http://docs.moodle.org/en/Nolink_tags

 
Average of ratings: -
photo ulrrrike
Re: Link transformed automatically
 

Hallo Mary smile

Oops, I put a video...hope you like Mano Chao...

Thank you for your answer, that's interesting !
But actually, I do want a link; I put some usual code, but it gets converted... I can't even put it here any more, even with this editor and using the button "prevent linking"....

Cheers,

Ulrike

 

 
Average of ratings: -
photo ulrrrike
Re: Link transformed automatically
 

Hallo Mary and everyone,

Maybe I haven't explained this problem in a clear way, really: I would like to put a link to a video but just the link not an embedded video. How can I do that -can you help me ?

Thanks !

Ulrike

PS: I cannot use the link-button which doesn't work when there are already other links

PPS: Trying again to paste the code appearing in PREVIEW

undefinedVidéo You Tube: "J\'ai besoin de la lune" de Mano Chao<\/font>" class="mediaplugin mediaplugin_youtube" type="application/x-shockwave-flash" data=GRRRRR width="425" height="344">

 
Average of ratings: -
moi!!! it is what is is...
Re: Link transformed automatically
Documentation writersParticularly helpful Moodlers

Ulrike, what you are trying to do is to display the link to the video, and what you are getting is the video itself. You would prefer the symbol that we used to get indicating a video? I ran into this problem but as I have been authouring the videos I started placing them into their own web page then linking to the web page. Later videos I have just been linking to the swf files. I have tried to link to YouTube videos but get the same result as above so the work around is to establish a link in another page and link the page back to your course. Not efficient, but it is workable.

 
Average of ratings: -
Mary Cooch
Re: Link transformed automatically
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

Hi Ulrike. Yes - I know what you mean - you just want the hyperlink to the video and you don't want the video itself to be embedded on the page? I tried the nolink feature in the docs page I sent you but I can't get it to work in Moodle 2.0 on this forum - trying to think of other ways..thoughtful

 
Average of ratings: -
photo ulrrrike
Re: Link transformed automatically
 

Hallo Mary ! Yes, exactly ! But even if you could use it, you would loose the link too, wouldn't you ?
Actually, I'm trying to create a newsletter that I create first and paste as htm, so it will look nice and can be sent to the members - but there must be lots of users who would like to decide wether to put a link or a video, in a message for instance.

Hallo Colin sorry I don't quite understand... if you mean creating a page with an embedded Youtube Video, and linking to that page can be a solution, thank you, yes, in my case that's what I'll do approve !!!
But more generally, it seems a bit costly, maybe there's a way to prevent code from changing by itself or at least, editing it afterwards ?

Thanks to both of you !

 
Average of ratings: -
Mary Cooch
Re: Link transformed automatically
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

Hi Ulrike - in 1.9 I have used that feature and it stops an automatic player  -video or mp3 -from appearing. You just get the blue hyperlink , which is what you want.  It is quite useful because in 1.9 you if you have the multimedia filter enabled it has to be for everyone, and sometimes it is not convenient to have a video player appear - you just want the link. That documentation does the trick. But I can't see how to get that in 2.0sad

 
Average of ratings: -
Picture of Glenys Hanson
Re: Link transformed automatically - how to stop a video embedding
 

Hi Ulrike,

Adding ?forcedownload=1 to the end of the link will keep the clip from embedding.

No, I haven't suddenly become technical wiz - somebody posted this a while ago and I noted it down.

Cheers,

Glenys

 
Average of ratings: Useful (1)
Mary Cooch
Re: Link transformed automatically - how to stop a video embedding
 
Average of ratings: -
Mary Cooch
Re: Link transformed automatically - how to stop a video embedding
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

Darnsad I can't get that to work in Moodle 2.0 - at least on this forum I will keep trying again... Glenys  -you are a Genius  - I had totally forgotten that one and kept thinking it was the "nolink" one but in fact's it's the ?forcedownload=1 one -except - it doesn't seem to work... But Ulrike - if you are using 1.9, that will work fine therewink

 
Average of ratings: -
Picture of Glenys Hanson
Re: Link transformed automatically - how to stop a video embedding
 

Some genius I am! I can't even get it to work on 1.9.

What does "end of the link" mean exactly?

Cheers,

Glenys

 
Average of ratings: -
Mary Cooch
Re: Link transformed automatically - how to stop a video embedding
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

It means -if I recall correctly- I haven't done it in a while - that you add those words after the path-to-your-video.flv, either directly in code view or if you have the link in the URL box, at the end of there.

 
Average of ratings: -
moi!!! it is what is is...
Re: Link transformed automatically - how to stop a video embedding
Documentation writersParticularly helpful Moodlers

No I cannot get it to work either and I have tried to position it in a number of places, even added a param string <param name="forcedownload" value="1" /> And I have tried a number of different things and it has not worked. Is this a bug? Or a setting that can be reset to either display it in player mode, or as a text string? And Mary, advocacy is a wonderful thing and that is a very clever that music video..smile

And Ijust found this.. and unbelievably it works... from Moodle docs

 
Average of ratings: -
photo ulrrrike
Re: Link transformed automatically - how to stop a video embedding
 

Hallo Colin, Mary, Glenys !

I tried to do it with "forcedownload", just to try, but no way - Colin, what exactly should we see in your Moodle docs' link ? I do have activated the YouTube filter, but it embeds videos anyways (without [youtube])... Thank you !

Ulrike

I've got a solution for YouTube : click on share >> short URL, on You Tube site >>

 
Average of ratings: Useful (1)
Felicia Berryman Profile Picture
Re: Link transformed automatically
 

See if you have the setting enabled to automatically convert youtube links to embedded video. You can get to this setting in 2.0.1 at:

Site Administration -> Plugins -> Filters -> Manage filters. Clicking "Settings" link in the row for multimedia plugin. Uncheck "Enable Youtube Links Filter" if it is checked. I just verified that this worked for me. Note that it changes the default for your entire Moodle Site.

 
Average of ratings: Useful (2)
photo ulrrrike
Re: Link transformed automatically
 

Hallo,

Thank you for your help, Felicia ! It works in 1.9.9 too. The only thing is that after, you can't embedd YouTube videos any more (with YouTube code).

So I suppose we have too choose between ALWAYS AUTOMATICALLY embed or NEVER embed ?

 
Average of ratings: -
Picture of Andrew Simpson
Re: Link transformed automatically
 

Dear All

I was having this same problem - which is highly frustrating - but I have added ?forcedownload=1 to the end of the link and hey presto, it worked!

So my link looks like this:

<a href=".../archived_files/51955886.mp4?forcedownload=1">

I am not the administrator for my server, but I will try to find out what the embed YouTube setting is on our set up.

Best wishes

Andrew

 
Average of ratings: -
asd
Vastus: Link transformed automatically
Core developersPlugin developersTestersTranslators

Embedded video

http://www.youtube.com/watch?v=I4mmMeMDMic

Not embedded video..
Just remove the watch from the link..

Like http://www.youtube.com/?v=I4mmMeMDMic then it wont embed the video

PS! This trick works in Moodle 2.0 too..

 
Average of ratings: -
Picture of rob smith
Re: Vastus: Link transformed automatically
 

Your second link doesn't take me to the video.

The URL shortner method is the one I'm using.

 
Average of ratings: -
asd
Vastus: Re: Vastus: Link transformed automatically
Core developersPlugin developersTestersTranslators

Yes, Youtube has changed and this workaround doesnt work anymore...

 
Average of ratings: -
Picture of Danilo Scuderoni
Re: Vastus: Re: Vastus: Link transformed automatically
 

I didn't try, but I guess is possible, you can simulate a link with javascript

<span onclick="javascript:document.location.href='www.youtube.com?...'">visit the link</span>

Sorry if I said before to try it but I'm a beginner and I have other troubles smile

 
Average of ratings: -
Picture of S Moodle
Re: Vastus: Link transformed automatically
Particularly helpful Moodlers

PS! This trick works in Moodle 2.0 too..

Well kinda, it only works because the link uses a format different than the one expected by the filter. So it won't work for mp3's.The main problem is that Moodle 2.0 ignores the forcedownload=1 parameter

Your choices:

  1. Figure out an alternative link like you did.
  2. Use a URL shortner like Bitly, TinyURL, etc. (which is prob the easiest way to prevent the filter from embedding.)
  3. Disable the multimedia plugin.
 
Average of ratings: Useful (1)
Picture of Debbie McDonald
Re: Vastus: Link transformed automatically
 

Thank you!! This works. I used bitly to shorten

 
Average of ratings: -
Picture of Zak Garofolo
Re: Link transformed automatically
 

I was having similar issues. The following corrected it:

Site Administration > Plugins > Filters > Multimedia Plugins > deselect YouTube checkbox.

By deselcting the YouTube checkbox I was still able to embedd YouTube videos or simply provide a link to the video.

 
Average of ratings: -
Picture of Khaison Duong
Re: Link transformed automatically
 

Thanks. That did the trick for me.

 
Average of ratings: -
Picture of Viktor Dörfler
Re: Link transformed automatically
 

Ulrike,

I had exactly the same problem and could not find a solution - amongst other places I was trying in this forum. As you, I was only able to find solutions for preventing linking, not one for keeping the link, but not embedding the video. To make it more tricky, on the same page I wanted to embed some, but keep some as links. The 'forcedownload' works, but only if the URL you use it for is the actual file, so for mp4, mpg and other video and audio links it should be OK. Finally, I have talked to a programmer, who looked into the code generated by Moodle - I don't want to go into technical details beyond my competence, but here is the solution: you need to use a 'nomediaplugin' class in your link. This means that your html code will look like this:

<a title="Viktor'sTube" class="nomediaplugin" href="http://www.youtube.com/playlist?list=PLdKPpvImKHxGhOVO2F-VatVLunDItzwdd">Viktor's Playlist on YoutTube</a>

I hope this helps.

 
Average of ratings: Useful (6)
Picture of Ludovico Sassarini
Re: Link transformed automatically
 

Thank you, using  class="nomediaplugin" it worked (2.5.2)

 
Average of ratings: -
Marc Couture
Re: Link transformed automatically
 

Viktor's solution (e.g. adding class="nomediaplugin" before the URL) also works for us.  We are currently using Moodle 2.6.5.

 
Average of ratings: Useful (1)
Picture of George Missonis
Re: Link transformed automatically
 

Wouldn't it be nice if Atto just generated HTML that worked as expected instead of deciding what's best for us?  The faculty I work with are not going to edit links or generate URL shorteners, alas.

 
Average of ratings: -
Picture of Richard Oelmann
Re: Link transformed automatically
Core developersParticularly helpful MoodlersPlugin developersTesters

And the staff I work with love the fact that videos get embedded simply by copying and pasting the url, so I guess 'HTML that worked as expected' means defining what is expected first smile

If you feel the 'expected behaviour' is simply to keep the links and not embed the videos themselves (and by the same logic all embedded media files),  then presumably you feel that is the expected behaviour throughout your site, in which case its easy to achieve - simply turn off the multimedia filters at a site wide admin level. http://yourmoodle.com/moodle/admin/filters.php

PS. This isn't an Atto issue - it happens exactly the same in TinyMCE. Its related to the filters not the editor.

 
Average of ratings: Useful (1)
Picture of Rob Beckett
Re: Link transformed automatically
 

Thanks you I wish I had seem this a long time ago it would have saved me so much research and time.  Thanks you so much.

 
Average of ratings: -
Picture of Xavier Molina-Schenk
Re: Link transformed automatically
 

Trying with moodle 3.3: Yes, it workes like a charm!

Thank you!


 
Average of ratings: -
Picture of Mike Vienna
Re: Link transformed automatically
 

To be honest: I dislike most of the solution presented here. I also dislike the "official" way of using nolink - sorry, but it feels ugly to me!

To suppress  youtube video embedding I suggest using

http://www.youtube.com/watch?embed=no&v=MtHbX-MniFk

instead of

embed=no can be replaced with any parameter YouTube does not recognise, like beer=free or less=more. Whatever your choice: don't forget the ampersand separating the arguments.

This works for me (Moodle 2.2), it is quick, NOT dirty and you do not even need to switch to source Code view.

Mike

 
Average of ratings: Useful (2)
photo ulrrrike
Re: Link transformed automatically
 

Hallo everybody,

I came here again and realized that I had not put the solution I found for this !!! Sorry- I was sure I had posted it sad

So here is one (amateur one, still it does work): Instead of copiing the YouTube URL in the address bar, I copy the URL that YouTube publishes when you click on "share" below the video. Then Moodle does not recognize it's a video or at least does not embed it. I remember it also works with URL shorteners.

Ulrike

PS I just tried it here, and it does NOT work here, with the code YouTube generates, but it does with an URL shortener: test

 
Average of ratings: -
photo ulrrrike
Re: Link transformed automatically
 

Like this one for instance:

http://raccourcir.w1p.fr/

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Link transformed automatically
Particularly helpful Moodlers
I was looking for a solution and gave up. See " A tag in the forum?" https://moodle.org/mod/forum/discuss.php?d=218330.
 
Average of ratings: -
Picture of Anna Lagos
Re: Link transformed automatically
 

I was able to fix this (i'm using moodle 2.6), using 2 methods.


1. Add "embed=no” to your youtube link.

So if your youtube link was https: // www. youtube.com /watch?v=gi_ixf7YxCo you would have to make it read https: //www. youtube. com/ watch?embed=no&v=gi_ixf7YxCo in moodle

 

2.Run the youtube link through a URL shortener and use this code instead.

So get your youtube link and go to Bitly.  Paste your URL in the field and click 'shorten'

Click copy to copy your new, much shorter link.

Use this as the link in Moodle.


(sorry I've had to add spaces into the links so that I can post this, otherwise it thinks it's spam)

 
Average of ratings: -
Picture of Philip Templeton
Re: Link transformed automatically
 

I had a  similar problem with the MOV files we link to on an external server, the video files were trying to embed.  I turned off the autolinking in site administration->plugins->filters->Manage filters because some issues it was causing however, I noticed on one of the video's that were being embeded that the autolinking icon in the editor was still enabled. I turned it off and the link was restored as opposed to the embed.  That might work in your situation too.

 
Average of ratings: -
Picture of Michael Milette
Re: Link transformed automatically
Core developersParticularly helpful MoodlersPlugin developers

So far, there have been 3 recommendations:

  1. Disable the multimedia filters: If you want to prevent YouTube videos from automatically embedding on your Moodle site, this is the solution for you. People who still want to embed YouTube videos can do so by adding the HTML code provided by YouTube. This requires people to have some knowledge of HTML which is not always the case.
  2. Add class="nomediaplugin": While an approach that might work (haven't actually tried it), it requires people to have some knowledge of HTML which is not always the case.
  3. Insert "embed=no&" in the YouTube video link: This is my preferred solution as it doesn't require any knowledge of HTML. Just change the link...
    From:
    https://www.youtube.com/watch?v=0M7J0jTwFjc
    To:
    https://www.youtube.com/watch?embed=no&v=0M7J0jTwFjc

I've tried both options 1 and 3 on Moodle 3.1 and confirm that they both still work.

Michael Milette

 
Average of ratings: Useful (1)
Picture of Tom Cotton
Re: Link transformed automatically
 

While plain text link does work there is one (annoying) caveat - if you use :

<a href="https://www.youtube.com/watch?embed=no&v=0M7J0jTwFjc"><img src="x.jpg">Clip Name</a> 

the filter will still fire and the YouTube clip will appear.  

 
Average of ratings: -
Picture of Stefan Meier
Re: Link transformed automatically
 
Another way to do it is using the goo.gl shortener.
Moodle does not recognise that as a Video either so you can just use the link it provides.
 
Average of ratings: -