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

Issue 169 - Dynamic meta display w/player


  • Please log in to reply
13 replies to this topic

#1 Paul Franz

Paul Franz

    Member

  • Members
  • PipPip
  • 14 posts

Posted 22 March 2011 - 05:23 PM

Eric,

I've been doing some searching on the forums, and I've noticed some other users clamoring for this to be fixed -- but I couldn't find any resolution to the issue. Has this been addressed in the 2.2.0 RC?

I'm currently trying to get video descriptions to display with the video loaded up in the player. I can't simply change the getTitle function in the tpl.php file to getDescription.

Any thoughts?

-Paul

#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 22 March 2011 - 09:10 PM

Hi Paul,

I'm sorry to say that this didn't make the cut for 2.2.0 (which was officially released last night). That said, I'm going to start immediately working on issues 169, 174, and 51 for TubePress 2.3. Issue 128 also has tons of votes, but will be so complicated that I want to knock off the other issues first.

So if you haven't already, please star issue 169 to track updates. Thanks for your patience, and please let me know what else I can do for you in the meantime.

#3 Kory Mathewson

Kory Mathewson

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 25 March 2011 - 12:14 AM

Hi eric, and seraphicx,

Just wanted to say amazing plugin, I am really enjoying using it on a few different sites. It is very well built, easy to manipulate, and robust cross-browser.
Also, I was able to solve issue 169 with a few lines of code, and I would be happy to share them here if you are alright with that.

I made a few changes to normal.js, normal.tpl.php and gallery.tpl.php...

Added a unique id to the tubepress_meta_description dd's, so now from line 112 reads as follows in the thumbnail gallery in ../tubepress/sys/ui/themes/default/gallery.tpl.php
<dd id="tubepress_description_<?php echo $video->getId(); ?>_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" class="tubepress_meta tubepress_meta_description"><?php echo htmlspecialchars($video->getDescription(), ENT_QUOTES, "UTF-8"); ?></dd>


Added these lines inside of the tubepress_normal_embedded_wrapper, before the final
, in ../tubepress/sys/ui/themes/default/players/normal.tpl.php
<div id="tubepress_embedded_description_<?php echo ${org_tubepress_api_const_template_Variable::GALLERY_ID}; ?>" class="tubepress_embedded_description">
      <?php echo htmlspecialchars(${org_tubepress_api_const_template_Variable::VIDEO}->getDescription(), ENT_QUOTES, "UTF-8"); ?>
    </div>


Added the required jQuery code to change the description in normal.js which is located ../tubepress/sys/ui/static/players/normal/normal.js
function tubepress_normal_player(galleryId, videoId) {
	var videoTitleAnchor	= jQuery('#tubepress_title_' + videoId + '_' + galleryId),
		embeddedTitleId		= '#tubepress_embedded_title_' + galleryId,
		mainTitleDiv		= jQuery(embeddedTitleId),
	    videoDescAnchor  	= jQuery('#tubepress_description_' + videoId + '_' + galleryId),
		embeddedDescId		= '#tubepress_embedded_description_' + galleryId,
		mainDescDiv		    = jQuery(embeddedDescId);
		
	mainTitleDiv.html(videoTitleAnchor.html());
	mainDescDiv.html(videoDescAnchor.html());
}
function tubepress_normal_player_init(baseUrl) { }

I am happy to continue to support this plugin with code fixes like this. Hope this helps some people. And please let me know if you want me to edit this at all, or collaborate on 2.3 ;)

Kory - http://www.madebyflagship.com

#4 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 25 March 2011 - 06:29 PM

Very clever! Thanks for posting your solution, Kory. I have this feature in the roadmap for 2.3, so once I get to implementing it I'll most definitely be revisiting this thread and your code. Stand by for that. In the meantime, I'll certainly direct folks here for a workaround.

Thanks again.

#5 Paul Franz

Paul Franz

    Member

  • Members
  • PipPip
  • 14 posts

Posted 07 April 2011 - 10:59 AM

Kory,

This is great, thank you! I'm noticing one issue with this workaround, however: The descriptions aren't dynamic. I'm currently using the default gallery template (single video player at the top, with thumbnails below). And while it correctly displays the description text below the first video, it does NOT change when you switch to other videos.

Any thoughts on that? I figured it would just change like the title normally would on video switch.

#6 Kory Mathewson

Kory Mathewson

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 14 April 2011 - 12:05 AM

Hey eric! I am glad that I could help, I think it is always great when the strong user base gives back to the community by contributing to the code base. Though I would love a Tubepress Pro subscription for a year ;)

Let me know if there is anything I can do to clarify once you get to smashing this into 2.3.

seraphicx: My fix does address the changing description, as you can see on the first page I implemented this exact fix on http://highwirefilms.com/films/

I must say this is an amazing plugin, and I continue to be impressed with it.

#7 Bryce Flory

Bryce Flory

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 18 April 2011 - 11:09 AM

I would like to 2nd seraphicx's point that the description does not load for anything other than the first video. Once you click on another thumbnail, the DIV is empty.

I have uploaded a screenshot of the DIV in Firebug to show that its empty.
[attachment=0]tubepress.png[/attachment]

Any resolution to this would be very welcome. Thanks in advance.

#8 Bryce Flory

Bryce Flory

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 18 April 2011 - 11:17 AM

**EDIT**
Sorry, for all the quick posts, as I try to get this working as I would like. While my statement below is correct, it still doesn't provide me with the result I would like. What I would like is to show the Video description below the currently loaded video (the one loaded in the player), but NOT showing in the thumbnail gallery area. Is this possible? Seem that if I remove the "description" from the Meta Display tab in Tubepress, it removes it in both places.
**/EDIT**

All apologies to Kory, as the work around works as suggested. I had forgotten that I was using my own custom created theme that looks very similar to the default. Once I added the ID to the
within my custom gallery.tpl.php file the descriptions work as expected.

Great plugin Eric! And thanks Kory for the stellar (and easy) workaround. Hope to continue to see this plugin growing!

#9 Kory Mathewson

Kory Mathewson

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 18 April 2011 - 02:13 PM

Yes, actually the dynamic description relies on the description being present, at least in the markup, for the thumbnail gallery.

I just used a simple CSS code, display: none; to hide all the thumbnail gallery descriptions, while still allowing the main gallery to pull the description from the markup.

Does that make sense?

#10 Paul Franz

Paul Franz

    Member

  • Members
  • PipPip
  • 14 posts

Posted 26 April 2011 - 10:01 PM

Nailed it.

All Hail korymath.

#11 Mohamad Ali

Mohamad Ali

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 10 May 2011 - 02:25 AM

Ok I can't seem to get this to work.

I have followed the directions to the letter without any success. Does anybody mind sending me their 3 customized files? Maybe I'm doing something wrong.

#12 Marcos Myara

Marcos Myara

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 05 August 2011 - 12:50 AM

Kory, could this be done by loading the videos estatically? I still need every video on their own url, so the social media share buttons will work properly, you know?

I did get this to work by using the "load pages dynamically" option tho... thanks.

#13 stephen Pickering

stephen Pickering

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 29 November 2011 - 12:22 AM

I know this is an old thread, but thank you so much for your helpful information here!
-Stephen

#14 Chris Love

Chris Love

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 13 December 2011 - 11:44 AM

I just used a simple CSS code, display: none; to hide all the thumbnail gallery descriptions, while still allowing the main gallery to pull the description from the markup.



Kory,

Thanks again, very helpful. Embarrassing question: where do you insert the simple CSS code, "display: none;" to stop the description from appearing on the thumbnails? I only know how to copy, paste, and follow instructions. I don't pretend to actually know what I'm doing.

Thanks.

Chris