Link transformed automatically

Link transformed automatically

by Ulrike Albers -
Number of replies: 41

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: -
In reply to Ulrike Albers

Re: Link transformed automatically

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

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

In reply to Mary Cooch

Re: Link transformed automatically

by Ulrike Albers -

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

 

In reply to Ulrike Albers

Re: Link transformed automatically

by Ulrike Albers -

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">

In reply to Ulrike Albers

Re: Link transformed automatically

by Colin Fraser -
Picture of Documentation writers Picture of Testers

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.

In reply to Colin Fraser

Re: Link transformed automatically

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

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

In reply to Mary Cooch

Re: Link transformed automatically

by Ulrike Albers -

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 !

In reply to Ulrike Albers

Re: Link transformed automatically

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

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

In reply to Ulrike Albers

Re: Link transformed automatically - how to stop a video embedding

by Glenys Hanson -

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)
In reply to Glenys Hanson

Re: Link transformed automatically - how to stop a video embedding

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

 

In reply to Mary Cooch

Re: Link transformed automatically - how to stop a video embedding

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

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

In reply to Mary Cooch

Re: Link transformed automatically - how to stop a video embedding

by Glenys Hanson -

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

In reply to Glenys Hanson

Re: Link transformed automatically - how to stop a video embedding

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

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.

In reply to Mary Cooch

Re: Link transformed automatically - how to stop a video embedding

by Colin Fraser -
Picture of Documentation writers Picture of Testers

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

In reply to Colin Fraser

Re: Link transformed automatically - how to stop a video embedding

by Ulrike Albers -

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)
In reply to Ulrike Albers

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Link transformed automatically

by Ulrike Albers -

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 ?

In reply to Ulrike Albers

Re: Link transformed automatically

by Andrew Simpson -

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

In reply to Ulrike Albers

Vastus: Link transformed automatically

by Tõnis Tartes -

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: Useful (1)
In reply to Tõnis Tartes

Re: Vastus: Link transformed automatically

by rob smith -

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

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

In reply to rob smith

Vastus: Re: Vastus: Link transformed automatically

by Tõnis Tartes -

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

In reply to Tõnis Tartes

Re: Vastus: Re: Vastus: Link transformed automatically

by Danilo Scuderoni -

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

In reply to Tõnis Tartes

Re: Vastus: Link transformed automatically

by Sam Mudle -

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)
In reply to Ulrike Albers

Re: Link transformed automatically

by Zak Garofolo -

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.

In reply to Ulrike Albers

Re: Link transformed automatically

by Viktor Dörfler -

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 (8)
In reply to Viktor Dörfler

Re: Link transformed automatically

by Marc Couture -

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)
In reply to Marc Couture

Re: Link transformed automatically

by George Missonis -

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.

In reply to George Missonis

Re: Link transformed automatically

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

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)
In reply to Viktor Dörfler

Re: Link transformed automatically

by Rob Beckett -

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.

In reply to Ulrike Albers

Re: Link transformed automatically

by Mike Vienna -

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)
In reply to Mike Vienna

Re: Link transformed automatically

by Ulrike Albers -

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

In reply to Ulrike Albers

Re: Link transformed automatically

by Ulrike Albers -

Like this one for instance:

http://raccourcir.w1p.fr/

In reply to Ulrike Albers

Re: Link transformed automatically

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
I was looking for a solution and gave up. See " A tag in the forum?" https://moodle.org/mod/forum/discuss.php?d=218330.
In reply to Visvanath Ratnaweera

Re: Link transformed automatically

by Anna Lagos -

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)

In reply to Ulrike Albers

Re: Link transformed automatically

by Philip Templeton -

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.

In reply to Ulrike Albers

Re: Link transformed automatically

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

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 (2)
In reply to Michael Milette

Re: Link transformed automatically

by Tom Cotton -

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.  

In reply to Tom Cotton

Re: Link transformed automatically

by Stefan Meier -
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.