Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Password Protected Vimeo Albums


Best Answer eric , 24 June 2014 - 02:26 PM

My apologies for the delayed response. It took me longer than I thought to work through the solution - mainly due to some misconfiguration in my local dev environment.
 
Switching your solution to albums will not be difficult. Here's a proof of concept that I just built: http://youtu.be/ogcxVMF0ygc. You should be able to extrapolate from this demo
to fit your needs.
 
The "parent" page (the one hosting the Cats and Dogs buttons) is a regular WordPress page with the following content:

<div id="result">[tubepress]</div>

<button id="cats-button">Cats</button>
<button id="dogs-button">Dogs</button>

<script type="text/javascript">
   jQuery(function () {
      jQuery('button').click(function () {
         var prefix = jQuery(this).attr('id').replace('-button', '');
         jQuery('#result').load('/supplier-page/?album=' + prefix);
      });
   });
</script>

There are three important pieces here:

  • A <div> with id="result" that contains a TubePress gallery (though this could be empty if you'd like).
  • Two buttons, each corresponding to a set of videos that we'd like to show.
  • Some jQuery which populates the result div via an Ajax call to /supplier-page/. We tack on an "album" parameter to the Ajax URL.

/supplier-page/ is another regular WordPress page, but I've used a custom template for it. i.e. the file is called page-13.php and sits inside my theme directory. The contents of
page-13.php is:

<?php

include WP_PLUGIN_DIR . '/tubepress/src/main/php/classes/TubePressPro.php';

switch ($_GET['album']) {
    case 'dogs':
        $tagValue = 'dogs';
        break;
    default:
        $tagValue = 'cats';
        break;
}

echo TubePressPro::getHtmlForShortcode('[tubepress mode="tag" tagValue="' . $tagValue . '"]');

As you can see, we read the album parameter and spit back the appropriate TubePress-built thumbnails. In your case, instead of using tag and tagValue, you'll want to use something like

echo TubePressPro::getHtmlForShortcode('[tubepress mode="vimeoAlbum" vimeoAlbumValue="' . $albumValue . '"]')

Make sure to sanitize anything retrieved from $_GET, of course. Does that make sense? Let me know if you need any assistance in implementing, or if anything from this proof of concept is not clear. Hope this helps?

Go to the full post


  • Please log in to reply
17 replies to this topic

#1 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 18 June 2014 - 05:00 PM

I'm wondering if it's possible to pass along the password to a password protected Vimeo Album into a TubePress Pro shortcode via Wordpress, deriving from (except with the right album #):

 

[tubepress mode="vimeoAlbum" vimeoAlbumValue="albumnumberwenthere"]

 

Right now I'm trying to show a password protected Vimeo Album and this is what shows in the thumbnails:

 

 

Vimeo responded to TubePress with an error: Incorrect password

 

 

Thanks!



#2 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 18 June 2014 - 05:32 PM

Also I'll try my best to point out my intention, incase the password protected album can not work with TubePress Pro:

 

I want to display a Vimeo Album with tutorial videos by default on a page. A lot of those videos will not be viewable on Vimeo.com, and as a matter of protection, the album is password protected.

 

What I'm trying to achieve: getting all of the videos contained in this album to show on this page.

What I'm trying to avoid: having users find these videos on Vimeo.com as well, or instead.

 

Thanks so much.



#3 TubePress LLC

TubePress LLC

    Advanced Member

  • TubePress Staff
  • 31 posts

Posted 18 June 2014 - 05:49 PM

This is the first time anyone has asked about this feature - I can't believe it hasn't come up before!
 
We do offer support for private Vimeo videos via Vimeo All Access - which is a paid add-on priced at $59. The benefit of this option is that it's nicely embedded within TubePress/WordPress with easy GUI controls. But as you'll see, this add-on does not currently support password-protected albums as nobody has really asked for that feature. It's also a somewhat redundant when you consider that you can make the videos themselves private (though I can see how it might be convenient to protect access to a bunch of videos at once).
 
If you feel like hacking a little PHP, it's not terribly hard to send a password along to Vimeo. In TubePress 3.x.x, you can simply add a line here. For instance:

$params[self::$_PARAM_ALBUM_ID] = $execContext->get(tubepress_addons_vimeo_api_const_options_names_GallerySource::VIMEO_ALBUM_VALUE);
$params['password'] = 'somepassword';

That might be tricky if you have multiple passwords as you'd have to find a way to map the album IDs to the corresponding passwords.

 

Does that answer your question?


  • brandon likes this

#4 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 19 June 2014 - 05:11 PM

Thanks, this certainly did answer my question. I opted to go without a password protected album, but then the majority of the videos inside that album are private. I purchased that Vimeo All Access add-on, placed in the correct access token info following the instructions in documentation.

 

Two problems I'm running into now:

 

1) All the private thumbnails are showing up just fine (inside that album) display on the page. But clicking to play, I'm prompted with a Vimeo line saying "I do not have permission to watch this video". I'm not sure if there's an additional step involved with Vimeo All Access, but this seems a bit strange.

 

2) I'm also getting the results updated via a search bar, via AJAX as discussed here http://community.tub...egories-w-ajax/. The problem I'm having now is: though all the private video thumbnails are displaying properly, upon search, the private videos are again hidden. Search results are only showing the public videos.

 

Thanks again for all your help & suggestions! Fingers crossed this can get launched by tomorrow morning!



#5 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 19 June 2014 - 05:21 PM

One more thing: I'm assuming password protected videos will not work with Vimeo All Access using the correct API token info. It would only work with private videos, correct?



#6 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 19 June 2014 - 08:18 PM

Hi Shades,

 

I've asked Eric to take a look at your requests, as they are a little advanced for me.

 

In answer to your password protected videos question (last post), no, Vimeo All Access doesn't work with password protected videos, only private videos.

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#7 TubePress LLC

TubePress LLC

    Advanced Member

  • TubePress Staff
  • 31 posts

Posted 19 June 2014 - 08:48 PM

1) All the private thumbnails are showing up just fine (inside that album) display on the page. But clicking to play, I'm prompted with a Vimeo line saying "I do not have permission to watch this video". I'm not sure if there's an additional step involved with Vimeo All Access, but this seems a bit strange.

 
Sounds very much like it's an issue with Vimeo's embedding privacy controls. Do you have it set to "Nowhere" or "Only the sites I choose"?
 

2) I'm also getting the results updated via a search bar, via AJAX as discussed here http://community.tub...egories-w-ajax/. The problem I'm having now is: though all the private video thumbnails are displaying properly, upon search, the private videos are again hidden. Search results are only showing the public videos.


Search results should show your private videos as well. If not, it's either a bug on our end or on Vimeo's end. Can you share a link to the site so I could take a first-hand look? Please make sure that debugging is enabled from WP Content > Settings > TubePress > Advanced. Feel free to PM me if you can't share it with the world.

 

Fingers crossed we can work this out tonight!



#8 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 19 June 2014 - 10:55 PM

 
Sounds very much like it's an issue with Vimeo's embedding privacy controls. Do you have it set to "Nowhere" or "Only the sites I choose"?

 

Could very well be a privacy issue - I'm checking into it with the client, thanks! Sent you a PM on the other question. Cheers.



#9 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 20 June 2014 - 12:02 AM

I've done some testing and research regarding the ability to search private Vimeo videos. From what I have gathered, Vimeo only allows search of public videos:

The last link is to a screenshot of a test I performed. I have a private Vimeo video called "Solar Filament Eruption, Solar Tsunami - Close-up". It appears properly when I use the API to view my uploaded videos, but simply will not show up during search results. I will updated the Vimeo All Access docs to reflect this limitation.

 

I would suggest bugging the Vimeo staff, but I'm not ashamed to say that they clearly don't give a hoot about the people that use their API.

 

So, given that, my first thought is that you should switch your implementation to something album-based, as opposed to search-based. In other words, have an album called "audiovault", one called "lightingvault", etc. Your client would likely have to agree to using the albums, so not sure how feasible that is.



#10 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 20 June 2014 - 12:09 AM

Hey, thanks for staying up late and the prompt replies & tests! Appreciate it.

 

Unfortunately, that's not good news. I'm liking the Vimeo All Access-ability - displaying private videos is great and for small businesses to attract users to watch videos in a specific place it's quite useful.

 

Whenever you have further time, would you happen to have any suggestions for how to get Album displays to swap out the current thumbnails area upon click of a button? jQuery? I'm just not super comfortable digging in and finding where to hack & adjust to make that work. Edit* I'm nervous about destroying any function.

 

I'm not opposed to using albums for these different categories of videos. Ideally though, I'd like it to show up replacing the current gallery every time a user clicks a button (say between different categories) as opposed to having to reload the page. Creating the albums isn't difficult. It's just getting it to work the way I need it, swapping things out.

 

Hope that makes sense - let me know if you have any questions on that. Thanks so much Eric! Have a good night.



#11 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 24 June 2014 - 02:26 PM   Best Answer

My apologies for the delayed response. It took me longer than I thought to work through the solution - mainly due to some misconfiguration in my local dev environment.
 
Switching your solution to albums will not be difficult. Here's a proof of concept that I just built: http://youtu.be/ogcxVMF0ygc. You should be able to extrapolate from this demo
to fit your needs.
 
The "parent" page (the one hosting the Cats and Dogs buttons) is a regular WordPress page with the following content:

<div id="result">[tubepress]</div>

<button id="cats-button">Cats</button>
<button id="dogs-button">Dogs</button>

<script type="text/javascript">
   jQuery(function () {
      jQuery('button').click(function () {
         var prefix = jQuery(this).attr('id').replace('-button', '');
         jQuery('#result').load('/supplier-page/?album=' + prefix);
      });
   });
</script>

There are three important pieces here:

  • A <div> with id="result" that contains a TubePress gallery (though this could be empty if you'd like).
  • Two buttons, each corresponding to a set of videos that we'd like to show.
  • Some jQuery which populates the result div via an Ajax call to /supplier-page/. We tack on an "album" parameter to the Ajax URL.

/supplier-page/ is another regular WordPress page, but I've used a custom template for it. i.e. the file is called page-13.php and sits inside my theme directory. The contents of
page-13.php is:

<?php

include WP_PLUGIN_DIR . '/tubepress/src/main/php/classes/TubePressPro.php';

switch ($_GET['album']) {
    case 'dogs':
        $tagValue = 'dogs';
        break;
    default:
        $tagValue = 'cats';
        break;
}

echo TubePressPro::getHtmlForShortcode('[tubepress mode="tag" tagValue="' . $tagValue . '"]');

As you can see, we read the album parameter and spit back the appropriate TubePress-built thumbnails. In your case, instead of using tag and tagValue, you'll want to use something like

echo TubePressPro::getHtmlForShortcode('[tubepress mode="vimeoAlbum" vimeoAlbumValue="' . $albumValue . '"]')

Make sure to sanitize anything retrieved from $_GET, of course. Does that make sense? Let me know if you need any assistance in implementing, or if anything from this proof of concept is not clear. Hope this helps?


  • brandon likes this

#12 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 14 July 2014 - 01:00 PM

Thanks so much, again Eric. I'm marking this as solved, though I haven't implemented it yet it seems like this solution works. Forgive me for not replying sooner, I was away in northern Alaska without internet access! Cheers.



#13 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 16 July 2014 - 07:38 PM

Welcome back to civilization! And feel free to post back here with any other questions.



#14 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 08 October 2014 - 09:24 AM

Hey Eric / TubePress team,

 

I've noticed that we're in Beta now for TubePress 4.0, which I'm very excited about. Given what I've been trying to accomplish with these questions related to searching hidden Vimeo content within albums using the "All Access" add-on from TubePress Pro - is there any way this would become natively possible with the pending release of TubePress 4.0?

 

So on a page, by searching within a linked Vimeo user's public Vimeo album, it displays hidden Vimeo videos as well as public ones to play from? Just to reiterate, currently TubePress 3.0 can display hidden Vimeo videos with the All Access plugin but upon search, the results are limited only to the public videos, not private as well. The refresh via AJAX hides the hidden ones. It would be great if this was natively possible instead of these work arounds!

 

I remember we discussed that Vimeo's API may be the limitation here, but I thought I would ask incase there were further thoughts on this functionality.

 

Thanks so much.



#15 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 09 October 2014 - 12:31 AM

Hello again!

 

Good news and bad news. The bad news is that, wrt to the limitation you described above, TubePress 4 will behave the same as TubePress 3. This is due ultimately to the Vimeo API, as you have surmised.

 

The good news is that Vimeo decided to roll out a new version of their API, and it appears that this new version indeed supports searching within albums. In fact it looks like they'll let us filter pretty much any feed from them. Cool!

 

More bad(ish) news - we haven't written the code for TubePress to interface with this new API. Vimeo will certainly be discontinuing their support for their old API, so one way or another this code will need to be written ASAP.

 

I wish I had all good news to report :/  Does that answer your question?



#16 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 09 October 2014 - 08:41 AM

Hey wbirmingham, that is indeed both good & bad news. But I'd like to think the pros outweigh the cons in this scenario.

 

1) That's pretty incredible that Vimeo has rolled out a new API, from a function stand point that opens a lot more possibilities.

2) That does create a lot of work for the TubePress team - not fun! (if they discontinue old API usage)

3) Have you had a chance to take a look at Vimeo's API to determine how complicated it is to tap into their new API? Is it a lot of work, coming in a later version or is it possible to roll into V4.0?

 

It finally solves what I've been trying to accomplish, which is to have a website show videos only available on a certain website and not viewable on Vimeo.com. TubePress's player is incredible and I'm really looking forward to the updates in V4.0.

 

Cheers.



#17 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 09 October 2014 - 11:25 AM

FYI that post from "wbirmingham" was actually me. I had logged in as a customer for testing purposes and forgot to log out. D'oh!



#18 shadesofgraywpg

shadesofgraywpg

    Member

  • Members
  • PipPip
  • 21 posts

Posted 09 October 2014 - 12:59 PM

:) No worries.

Thanks Eric.