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

Trying to get Description below Playing Video myself


  • Please log in to reply
2 replies to this topic

#1 Kermit Woodall

Kermit Woodall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 12 December 2010 - 12:38 PM

My programmer buddy and I have been poring through the TubePress code this weekend but we're still missing something. As you know I greatly desire getting the description of the currently playing video to show below it. We've been looking in tubepress\video\factory\impl\YouTubeVideoFactory.class.php and tubepress\classes\org\tubepress\gallery\GalleryTemplateUtils.class.php trying to puzzle out how to make it also extract the description for the currently playing video. We're not quite seeing the connection.

Are you close on adding this and should we stop or can you draw the line for us to show us where we should be looking more precisely? Nothing wrong with your code, in fact it's amazingly elegant and readable, but you code in a style unlike ours.

Thanks Eric.

Kermit

#2 Kermit Woodall

Kermit Woodall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 19 December 2010 - 08:30 PM

This code here allowed us to have a description below the playing video in our gallery...

$bob = 0;
foreach (${org_tubepress_template_Template::VIDEO_ARRAY} as $video):

if ($bob == 0) {
echo $video->getDescription();
$videolink = $video->getId();
}

$bob = $bob + 1;
endforeach;
?>


All this does is scan the grid and grab the ID and Description for the first video (which is also the playing video above) and make use of them. This requires that you turn on the descriptions in the meta tags and if you don't want those to show in the grid, hard code the theme to not show those.

The other trick is that I DON'T use the DOM code for switching videos. I replaced that code with this (thumbnail example)...


<?php echo htmlspecialchars($video-></span>getTitle(), ENT_QUOTES, " src="getThumbnailUrl(); ?>" width="" height="" />


I also try not to use DD, DL or DTs in my theme. I prefer DIVS myself.

The reason for not using the DOM code for switching videos is that you have to reload the page to the video being played. Which is perfectly fine for our site.

http://advocate.kerm...ti...ideo-test/

Kermit

#3 James Han

James Han

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 22 December 2010 - 02:19 PM

HI Kermit,

Can you tell me where you've added your codes to make it work?
Thank you.