Moving Image Type Metadata and YouTube Import plugin

117 views
Skip to first unread message

pcdigitalservices

unread,
Apr 2, 2015, 12:20:55 PM4/2/15
to omek...@googlegroups.com
Hello all,

Recently we've added the YouTube import plugin in order to display videos in our collection (http://omeka.org/add-ons/plugins/youtube-import/). It works out mostly ok, except that on the show item page, the player gets buried down at the bottom of all of our metadata. I know that there has to be a way to re-order it so that it displays up at the top of the page before the metadata (we have this logic worked out for our images and pdfs) but I can't seem to figure out exactly how to reference the player in order to do this. Does anyone have any experience with this plugin or know how I could go about getting our youtube embedded videos to display first before the metadata? Thanks!

Patrick Murray-John

unread,
Apr 2, 2015, 1:45:28 PM4/2/15
to omek...@googlegroups.com
This is an interesting case, because the player is actually included in the metadata, in the Item Type Metadata set.

The quickest, barebones approach is to make a plugin that uses the display_elements filter. The elements are keyed by element set, so to switch it around so the Item Type Metadata comes first, you'd just need your filter to do:

    public function filterDisplayElements($elements)
    {
        return array_reverse($elements, true);
    }

Of course, that will apply to everything, so if you have other item type metadata, you'd need to do something more fancy.

Patrick




On 04/02/2015 12:20 PM, pcdigitalservices wrote:
Hello all,

Recently we've added the YouTube import plugin in order to display videos in our collection (http://omeka.org/add-ons/plugins/youtube-import/). It works out mostly ok, except that on the show item page, the player gets buried down at the bottom of all of our metadata. I know that there has to be a way to re-order it so that it displays up at the top of the page before the metadata (we have this logic worked out for our images and pdfs) but I can't seem to figure out exactly how to reference the player in order to do this. Does anyone have any experience with this plugin or know how I could go about getting our youtube embedded videos to display first before the metadata? Thanks!
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at http://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

eth...@ucsc.edu

unread,
Apr 3, 2015, 1:38:31 PM4/3/15
to omek...@googlegroups.com

Hi there! I'm Ned with UCSC Library Digital Initiatives, primary developer for the Youtube plugin.

This is an issue we had thought about before, but we had not come up with a good solution that is totally independent of what kind of Omeka theme is being used.
Patrick's suggestion to use the displayElementTexts filter here is a good one, and we plan to integrate it into an update to the plugin in the next few days. If you are not under time pressure, I suggest waiting until we get this new version online, probably early next week. You can then simply upgrade to the newest version of the Youtube Import plugin and your youtube videos will display at the top of the page appropriately (hopefully). You will not have to re-import your videos.

Currently, without using Patrick's solution, you would need to edit a theme template or add a javascript file to configure the player element to display where you want it. I could walk you through this, but waiting for the next update is probably your best bet!

All the best,
Ned



On Thursday, April 2, 2015 at 9:20:55 AM UTC-7, pcdigitalservices wrote:
Hello all,

Recently we've added the YouTube import plugin in order to display videos in our collection (http://omeka.org/add-ons/plugins/youtube-import/). It works out mostly ok, except that on the show item page, the player gets buried down at the bottom of all of our metadata. I know that there has to be a way to re-order it so that it displays up at the top of the page before the metadata (we have this logic worked out for our images and pdfs) but I can't seem to figure out exactly how to reference the player in order to do this. Does anyone have any experience with this plugin or know how I could go about getting our youtube embedded videos to display first before the metadata? Thanks!

Ned Henry

unread,
Apr 6, 2015, 1:16:28 PM4/6/15
to omek...@googlegroups.com
I have just posted an update to the Youtube plugin. Please let me know ASAP if you find any bugs in the upgrade.
The new version displays the "player" element in its own section at the top of the list of metadata elements, using the "display_elements" filter. The Player html is still stored as an Item Type Metadata element. The rest of the Item Type Metadata elements are displayed in their ordinary location.
I hope this is helpful!
Best,

Ned

On Thursday, April 2, 2015 at 9:20:55 AM UTC-7, pcdigitalservices wrote:

pcdigitalservices

unread,
Apr 7, 2015, 10:24:13 AM4/7/15
to omek...@googlegroups.com
I just updated to the new plugin and it seems to work really nicely! Thanks! Ned!

One minor issue (this could very well be something incorrect on my end) is that the title "Player" shows up twice. Not sure you are seeing that on your end or not! I'll have to check back through my show.php/etc and see if there is a reason for that. Thanks again!

Ned Henry

unread,
Apr 7, 2015, 1:25:44 PM4/7/15
to omek...@googlegroups.com
Hi there!
Glad the update helped. I see what you mean about the multiple titles, and issued a quick update to fix that. In case you don't feel like downloading and installing the whole plugin again, all I did was
change line 70 of YouTubeImportPlugin.php

from:
    $newElementSets = array_merge(array('Player'=>array('player'=>$playerElement)),$newElementSets);

to:
    $newElementSets = array_merge(array('Player'=>array(''=>$playerElement)),$newElementSets);

Thanks for the feedback on the plugin! We really appreciate your input.
All the best,
Ned



--
You received this message because you are subscribed to a topic in the Google Groups "Omeka Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omeka-dev/kljgChu3Ajc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omeka-dev+...@googlegroups.com.

pcdigitalservices

unread,
Apr 7, 2015, 3:55:17 PM4/7/15
to omek...@googlegroups.com
Works perfectly, thanks so much for the help!

Bob V.

unread,
Apr 13, 2015, 12:25:39 PM4/13/15
to omek...@googlegroups.com
Hi Ned:

I suppose if you update the plugin everything doesn't appear correct retroactively.  Meaning that if we have 35 youtube imports up already, the video won't appear at the top if we install the plugin. Correct?

bob

Ned Henry

unread,
Apr 13, 2015, 12:53:13 PM4/13/15
to omek...@googlegroups.com
Hi Bob!
Good question, thanks for asking. The changes to the plugin only affect how the video player is displayed, not how the content is stored. Therefore, the changes will affect previously imported youtube items retroactively. The YouTube you already imported should display at the top when you upgrade the plugin.
All the best,
Ned

bob v

unread,
Apr 13, 2015, 1:30:15 PM4/13/15
to omek...@googlegroups.com
Ned:

Wow. That would be really helpful. I'll let you know how it turns out.

Thanks!

bob

bob v

unread,
Apr 13, 2015, 1:33:59 PM4/13/15
to omek...@googlegroups.com
Ned:

Bingo. Works like a charm.  I was running 1.1.7 previously so the new update hit the spot.

bob

On Mon, Apr 13, 2015 at 12:52 PM, Ned Henry <eth...@ucsc.edu> wrote:

Ned Henry

unread,
Apr 13, 2015, 1:35:29 PM4/13/15
to omek...@googlegroups.com
Awesome! It's great to hear that the plugin is helpful. Let me know if you come across any bugs or problems.

bob v

unread,
Apr 13, 2015, 2:10:12 PM4/13/15
to omek...@googlegroups.com
Will do!

bob
Reply all
Reply to author
Forward
0 new messages