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

1 Video, no gallery


  • Please log in to reply
1 reply to this topic

#1 Nick Christensen

Nick Christensen

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 12 September 2010 - 05:25 PM

So I am new to Tubepress, looking to use it for the first time on a project (and I must say, it's a wonderful thing). I am looking to do something pretty specific:
I want to use a feed from a Vimeo user's videos, but I want it to display only the 1 most recent video. No gallery at the bottom, none of the complications. I was hoping to use the shortcode for a single video embed, but then I realized that it only links to 1 static video, and would need to be updated every time. So is there a way to do that? Just have the video player, and have it display the latest video from a user?

#2 Nick Christensen

Nick Christensen

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 14 September 2010 - 08:51 PM

K guys, I figured it out, and hopefully this helps others too:

Embed the shortcode for a gallery as you normally would if you wanted the gallery, etc. to show up. In your plugins/tubepress folder, navigate into ui/gallery/html_templates. Duplicate the default.tpl.php file, renaming it to whatever you want (remember that you need to call this template file in your shortcode, which you can find directions for in the documentation. In your duplicate, remove everything after the comments and replace it with:

<div class="tubepress_container" id="tubepress_gallery_<?php echo ${org_tubepress_template_Template::GALLERY_ID}; ?>">
  <?php echo ${org_tubepress_template_Template::PRE_GALLERY}; ?>
  </div>

  <?php if (isset(${org_tubepress_template_Template::SHORTCODE})): ?>
     <script type="text/javascript">function getUrlEncodedShortcodeForTubePressGallery<?php echo ${org_tubepress_template_Template::GALLERY_ID}; ?>(){return "<?php echo ${org_tubepress_template_Template::SHORTCODE}; ?>";}jQuery(document).ready(function(){TubePressAjax.initPagination(<?php echo ${org_tubepress_template_Template::GALLERY_ID}; ?>);})</script>
  <?php endif; ?>

  <script type="text/javascript">
    jQuery(document).ready(function(){
        TubePress.centerThumbs("#tubepress_gallery_<?php echo ${org_tubepress_template_Template::GALLERY_ID}; ?>");
    });
  </script>
</div>