JerresonJ / File-Cabinet

File Cabinet is a WordPress plugin which adds special functions to a custom post type designed for managing a library of files, YouTube videos, Vimeo videos and remotely hosted files.
0 stars 0 forks source link

Add checkbox to supress video suggestions on YouTube #9

Open ryanburnette opened 11 years ago

ryanburnette commented 11 years ago

@Jonathan-Garber There is a way to suppress video suggestions on YouTube, I believe it amounts to adding rel=0 to the iframe or something like that. Let's make sure we have a checkbox where users can turn this option on when adding YouTube videos.

This update is part of the new 1.3.0 version we're going to push out as soon as possible.

JerresonJ commented 11 years ago

You add a 0 flag to rel in the url itself for the iframe (src url)

I am adding this tonight.

ryanburnette commented 11 years ago

Good. I was pretty sure that this did not conflict with the FC template system, but this confirms that. Sounds like it's a pretty easy upgrade.

JerresonJ commented 11 years ago

This actually required a large portion of code being re-written. The original setup simply allowed customizing "Width" and "Height"

This used the exact same elements no matter what video host you used.

Now that we are adding customization more in depth. We needed to separate them on the interface which in turn caused a need to separate the incoming input to the code as well. Youtube and Vimeo do not use the same commands/parameters in their API. So separation was a must.

This should be done and working properly now. I am uploading a test to github for you to play with

ryanburnette commented 11 years ago

I just cloned and installed the plugin from Github and I don't see this feature. Hit me up when you can.

JerresonJ commented 11 years ago

The option is in "custom" settings for the video.

When adding a YouTube or Vimeo video if you use "Custom" settings you will be presented with a list of all custom options for those players.

In our case "YouTube" custom settings now include the option for "Hiding Related Videos"

ryanburnette commented 11 years ago

That forces me to set custom dimensions to be able to suppress video suggestions in YouTube. Those two things have nothing to do with one another. That checkbox needs to be outside the custom checkbox. Change the checkbox to say "custom dimensions" rather than custom settings.

The idea is ... don't force a user to set custom dimensions just because they want to check the box for suppressing YouTube suggestions.

JerresonJ commented 11 years ago

If the option is labeled "Custom or Default Settings" and the user clicks "custom" then it is only logical to show ALL customization options. Including the ability to adjust width and height.

You are not thinking wide range use. You assume the only customization option is and will only ever be "Hiding related videos"

However. I have re-arranged the display and changed the function around like you requested.

There is no longer a "custom or default settings' option - That option is now marked as "Width & Height" and the user can select Custom or Default.

The other custom option "Hide Related Videos" and any future customizations we offer will simply show up in line/list with the new "Width & Height" selection.

Please see latest Commit for better understanding.

There is some Jquery work that needs done. You will need to adjust your Jquery to properly handle the new Interface Setup.

ryanburnette commented 11 years ago

Checking it out.

On Mon, Feb 25, 2013 at 5:29 PM, Jonathan-Garber notifications@github.comwrote:

If the option is labeled "Custom or Default Settings" and the user clicks "custom" then it is only logical to show ALL customization options. Including the ability to adjust width and height.

You are not thinking wide range use. You assume the only customization option is and will only ever be "Hiding related videos"

However. I have re-arranged the display and changed the function around like you requested.

There is no longer a "custom or default settings' option - That option is now marked as "Width & Height" and the user can select Custom or Default.

The other custom option "Hide Related Videos" and any future customizations we offer will simply show up in line/list with the new "Width & Height" selection.

Please see latest Commit for better understanding.

There is some Jquery work that needs done. You will need to adjust your Jquery to properly handle the new Interface Setup.

— Reply to this email directly or view it on GitHubhttps://github.com/ryanburnette/File-Cabinet/issues/9#issuecomment-14080268.

Ryan Burnette

TechStudio #TECHSEO

http://techstudio.co http://techseo.co

+1 (877) 793-0670 office (voice) +1 (323) 546-7926 direct (voice, sms)

ryan@techstudio.co service@techseo.co

ryanburnette commented 11 years ago

I installed the latest version from Github. When I check off the box and click "update," either "update" button, the settings are not retained.

Screen Shot 2013-02-25 at 7 15 13 PM

JerresonJ commented 11 years ago

Check newest commit.

ryanburnette commented 11 years ago

Alrighty. When I check the box there is a custom field called related_video that reads on. Are you sure that's how it's supposed to be? Seems a little bit illogical. Maybe it works I just figured I'd ask.

Screen Shot 2013-02-25 at 7 33 21 PM Screen Shot 2013-02-25 at 7 33 29 PM

JerresonJ commented 11 years ago

When you check a radio button HTML sends that data in post as a single word "on" indicating the button was checked. The plugin is just using the post data for the field value.

could rename the custom field to "hide_related_video" the average user doesn't use the custom fields alone they will simply apply the changes via the button on the player settings.

ryanburnette commented 11 years ago

Sounds like it will function, it just might confuse another developer if they were to read the code and the stored key/value pair.

On Mon, Feb 25, 2013 at 7:37 PM, Jonathan-Garber notifications@github.comwrote:

When you check a radio button HTML sends that data in post as a single word "on" indicating the button was checked. The plugin is just using the post data for the field value.

could rename the custom field to "hide_related_video" the average user doesn't use the custom fields alone they will simply apply the changes via the button on the player settings.

— Reply to this email directly or view it on GitHubhttps://github.com/ryanburnette/File-Cabinet/issues/9#issuecomment-14085706 .

Ryan Burnette

TechStudio #TECHSEO

http://techstudio.co http://techseo.co

+1 (877) 793-0670 office (voice) +1 (323) 546-7926 direct (voice, sms)

ryan@techstudio.co service@techseo.co

ryanburnette commented 11 years ago

Please double-check what you have committed to Github latest. I need to post a working version to Extend as soon as possible.

ryanburnette commented 11 years ago

And the latest version I've gotten from Github doesn't appear to have this new functionality in it. At least it's not appearing for me.