Hot answers tagged

8

You can do this without editing the Wygwam source. First you need to create a custom config file for CKEditor. Create a JavaScript file called something like 'ckeditor_config.js' and then set Wygwam to use it. You can do this by adding an advanced setting to your Wygwam editor configuration. Add the 'customConfig' setting and enter the path to the JavaScript ...


6

As far as I'm aware there isn't a free plugin available currently that allows for this feature and it's not catered for out-of-the-box. However it would be possible for a tool to be developed and added to the tool library - I've just taken a quick look though the link plugin - this could easily be adapted to work for YouTube / Vimeo links if you feel so ...


4

Channel Videos 3.1.0 introduced a Module Control Panel where you can control all of those available parameters from a central point. There is no need to use template parameters.


4

I've analysed the source code of Channel Videos and saw that there was a template tag parameter available named youtube:url_params that does add the parameters to the video but again added the questionmark at the end. I rewrote/hacked the code to provide a solution that if there are parameters in the direct URL they will be placed correctly without question ...


4

In your templates you can wrap any custom fields that might contain a non-https embed code with Low Replace, finding and replacing any non-https embed sources. For example: {exp:low_replace find="http://www.youtube.com/embed" replace="https://www.youtube.com/embed" } {your_custom_field} {/exp:low_replace} Low Replace will allow you to ...


4

If you have a vimeo plus account, you can set the video as private and only allow the embedding on one site (yours). Pretty sure youtube has similar options (although not tested). This has worked very well for us. If you want to host videos on site and use HTML5 / Flash playback I recommend mediaelements.js. Making the videos accessible to a single member ...


3

I believe to do so, you would need to create a Custom Style Set for Wygwam. See the Wygwam Docs over a Pixel & Tonic. Though, I recommend creating a class instead of an id. Since someone will most likely add more than one media embed sometime in the future. Additionally, this StackExchange post deals with editing the Wygwam .js for custom sets.


2

EDIT: Please see the accepted answer above from Dylan as an approach for handling this type of functionality. nonprofit_tech's suggestion to try using a custom style set does work, but it involves a two-step process: the content administrator must first add the custom wrapper from the style set dropdown, and then embed the media via the toolbar's media ...


2

Channel Videos is a great solution for simplifying the process of embedding videos for clients.It has a visual interface so that the client can see a thumbnail of the video prior to publishing. You can search videos by keyword from the CP or just add the Youtube url - which is a lot easier than customising the embed code and copy/pasting. Additionally you ...


2

One alternative would be to create a text fieldtype in which the client could simply enter the video ID, which you would then parse into the Vimeo embed code within the template. It's not perfect, but it's a potential solution. You might simply have to do an element name lookup to distinguish it from any other textfield options you have provided as an ...


2

Solved the issue thank you everyone, I only discovered what was happening after using: <a href="{ee_video_url}">{ee_video_url}</a> This ended up displaying my link with added p tags like so as: <p>http://www.youtube.co.uk/exampleurl</p> It seems that within the channel field for the video URL, it had a default formatting of XHTML....


2

Finally found the origin of the problem, which comes from an old bug with the Vimeo API. Short version is that there is a bug happening when you have only one Vimeo album. Long version is that the Vimeo API was requested for a list (array) of your albums, and if you had only one album created, was returning the album object, straight, instead of an array ...


2

You could take a look at Google Tag Manager. I use it to inject GA code into our website pages and for click tracking purposes.


1

I've got an answer, but it's not exactly a solution: Don't. Channel Videos maintains its own separate table in the database, with all sorts of metadata pulled from the video. From a future maintenance point of view, keeping things as a simple stored URL in a text field would be better... I've learned that less is more when it comes to DB structure. I'd ...


1

You can edit mimes.php to add the mime type that you need. It is located system/expressionengine/config/mimes.php For a complete list of mime types that you can add to that file go here: http://www.sitepoint.com/web-foundations/mime-types-complete-list/


1

I had a client mention it a couple of days ago. That code is actually coming directly from Youtube's embed code. I reported it to Google yesterday but they don't seem to care. If you go to any Youtube video > Share > Embed you'll see it right after the closing iframe tag.


1

You'll notice it's also adding paragraph tags around the content of your text area - double check to ensure that when you have it set as a textarea fieldtype you also have formatting set to "none". It seems you have have XHTML formatting on the field currently. One thing you might consider, if you won't want to have users inserting embed code (at least for ...


1

I would just setup a video channel with DevDemon's Channel Video fieldtype so the client can post videos after uploading them to YouTube. Then in the video template just use a conditional to show/hide videos to a certain field group: {if member_group == "5"} show video {if:else} hide video {/if}


1

Have you considered using jQuery for this? This answer on StackOverflow has a code example that might do the trick. Here's my quick untested code attempt for your specific case: $('iframe').each(function() { var src = $(this).attr('src'); if (src.indexOf('http:') > -1) { src = src.replace('http:', 'https:'); $(this).attr('src', ...


1

You should select "None" for "Default Text Formatting" under the field options. It would work for you.


1

Another option is to just have the client enter the video ID and you hard code the iframe embed code into your template. I do this when I need finite control over the video code. In the field's description, I link to a screenshot showing them how/where to get the video ID from the video URL. Something like this: Obviously, this will only work if the video ...


1

Since you are using videos coming from vimeo and using iframes embeds, I would suggest you have a look at this technique: detailed article on A List Apart. The technique is usually used in the framework of responsive sites but it will help your videos fill any container you put them in while preserving their aspect ratio. Another tool that might help you ...


1

You could use a small plugin to make them all fit here


1

I've done multiple sizes responsively using the Zurb Foundation framework, which has an excellent flex-video class to allow a single video to simply fill whatever container you put it in. Then if I want to present it differently, I don't have to do anything as far as the video embed code is concerned, I just wrap it differently. I also rather like DevDemon'...


1

I know you don't want to use a plugin, but just for info, there is a great free plugin Antenna which makes embedding YouTube/Vimeo videos at any size very easy - you just supply the URL. You also get access to the image for each video which can also be handy for using thumbnails to link to video embeds in pop-ups etc.


Only top voted, non community-wiki answers of a minimum length are eligible