Thumbnail picker

awakenedvoice - April 9, 2008 - 01:16
Project:XSPF Playlist
Version:5.x-0.12
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I've got the module up and running in concert with FLV Media Player and SWF Object API. Publishing works fine. The one problem I'm having is that when I try to add a link to the default thumbnail in the "Default thumbnail for playlist items:" field it doesn't work. I add the url to the .jpg file and click the save button. When the page refreshes the path in the field mentioned above is empty. I'm adding the full path to the image and have double checked to make sure it is a valid path.

The place where I'm adjusting these settings is at 'admin/settings/xspf_playlist'.

You can see my example node published here.

Any help you can give is greatly appreciated.

Rob Safuto

#1

awakenedvoice - April 9, 2008 - 13:48
Category:bug report» support request

This was a duplicate entry.

#2

rpmute - April 11, 2008 - 21:48

same issue

#3

arthurf - April 12, 2008 - 00:39

Ah- what's happening here is that since you're using xspf_playlist for the files, the player is expecting the thumbnail to come from there. To date, all the thumbnailing that xspf_playlist does is programatic- meaning you have to either use a module that can create thumbs for you, or write your own. It's not hard, but it should be simpler.

Would the following solution work for the short run:

Have xspf_playlist look for png/gif/jpg files attached to the node and just use those if no other is present?

#4

arthurf - April 12, 2008 - 00:45

Note to self, taking the time to understand the post helps. Ok, so the solution I posted is still viable, but I'll work on fixing the *actual* bug you reported. Back to our regularly scheduled programing.

#5

rpmute - April 12, 2008 - 01:06

that would work perfectly for me. i'm creating all my video nodes as individual nodes related to individual users: one video, one custom image from the vid. this way i can make a image/thumbnail to go with a 'single player' display configuration for that user and then collect all those nodes using views to make a playlist to display anywhere i want. so yeah, that would cut down on a lot of b.s. for me personally.

what i've had to do is override the playlist for each node and add a image=http.... to the flashvars which is annoying because i have to remember the file name, where it went, and type it in each time. i pretty much have no use for a default thumbnail because i'm creating them for a particular frame for each of my vids.

#6

awakenedvoice - April 12, 2008 - 18:47

Thanks Arthur. The situation you propose would work well for me. My thumbnails are going to be like a title slide. The image will be the same each time except for a bit of text that describes the video people will see.

#7

arthurf - April 13, 2008 - 17:34

I have a temprary fix in CVS which should help with this. I'm now going to look at providing a per node interface to deal with this.

#8

arthurf - April 13, 2008 - 18:43
Title:Default Playlist Thumbnail Will Not Save» Thumbnail picker

In process on the code here. I wrote the following:
On admin > settings > xspf_playlist you choose what kinds of thumbnails are accessible to a particular node. These are defined by the xspf playlist thumbnail hook.

On a node edit screen, provided the user has access, they will be presented with a screen like the one attached here. This lists all the options that xspf playlist has found.

All that remains to be written is:
* saving the data to a new xspf table
* writing a xspf thumbnail hook to use the attached images on a node

Sound reasonable?

AttachmentSize
Picture 4.png 35.38 KB

#9

rpmute - April 13, 2008 - 20:07

I like it.

#10

arthurf - April 13, 2008 - 23:33

So here's what I've got:

When you go to node > edit, one of the options is a "playlist builder". Each file that xspf_playlist thinks is a playlist item is queried up. Foreach item, all the possible thumbnails available for this node (set via the admin >settings > xspf_playlist type settings. Each of these thumbnails is presented in a drop down to select form. If you have javascript enabled (please) you get this nice row of thumbnails that you can just select from. See attached image. Note that the missing images are a product of my test environment.

I ripped a bunch of the guts out of video_thumbnailer, but it makes more sense to have it here anyway.

All that's left to do is save stuff to the node and improve default handling.

AttachmentSize
Picture 6.png 69.08 KB

#11

rpmute - April 14, 2008 - 00:17

Most impressive, Skywalker.
so:
1. the image or images you want to use are uploaded first, node is saved, then you go back to edit the node and then select from those images, then resave? or am i wrong
2. does the playlst builder look for all images attached to the node (i.e. with the extension .jpg, .gif, .png, etc ?) if so, does it matter if you use cck or upload.module... i ask because cck lets you organize files/folders.

#12

arthurf - April 14, 2008 - 03:19

Well on:

1) the images may or may not be present- they are being pulled from xspf_playlists hook_thumbnail which allows different kinds of modules to interact- default images for example. Generally the user would upload their content and then return to the edit screen for best results. If it was really schwanky, it'd be ajaxy and would check for newly added files.

2) I wrote a quick implementation of the hook to check for gif, png, jpg on file attachments. I didn't write a cck one though. Obviously, this would be needed.

Back to the drawing board.

#13

rpmute - April 14, 2008 - 20:50

Suggestion: what about having it look for the name of a specific cck field, i.e. any field (like an image or a file field) called xspf_image (field_xspf_image).

A user could create that thru cck and attach it to any content type that they're using for their playlist nodes.

#14

stuffnthings - April 21, 2008 - 20:08

I just installed an updated version of the xspf_playlist.module from http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/xspf_playli...
and I received the following error message:

* warning: Invalid argument supplied for foreach() in /home/.servername/username/domainname.com/drupal5.7/modules/xspf_playlist/xspf_playlist.module on line 374.
( correspondingly my line 374 is   foreach ($all_thumbs as $id => $thumb) {   )
* warning: Invalid argument supplied for foreach() in /home/.servername/username/domainname.com/drupal5.7/modules/xspf_playlist/xspf_playlist.module on line 514.
( correspondingly my line 514 is   foreach ($node->files as $file) {    )
* warning: Invalid argument supplied for foreach() in /home/.servername/username/domainname.com/drupal5.7/modules/xspf_playlist/xspf_playlist.module on line 394.
( correspondingly my line 394 is    foreach($items as $xid => $item) {   )

from http://www.domainname.com/drupal5.7/admin/content/types/page/fields
getting there from Home » Administer » Content management » Content types >> Page >> manage fields

my first question is:
am I supposed to be updating my version of the xspf_playlist.module?

2) is the xspf_playlist.module that i updated for 5.7 which I assume was the latest from http://drupal.org/node/237927 the latest and best xspf playlist to use?

3) is anyone else as confused as the devil as to the correct way to keep up with which version is being commented on, and if we are all talking about the same thing?

4) am I helping to fix bugs or making this more difficult for the developers due to my lack of knowledge about Drupal's support / bug fix system?

humble st8tr of the obvious (to some)

#15

rpmute - April 22, 2008 - 07:35

Arthur: finally figured out what i had to do for my one video with one custom thumbnail. It's much simpler than i thought but I'm posting screenshots to help anyone else. I think the php template stuff creeps me out at first until you just start throwing stuff at it. So...for anyone who wants to do this: you'll need media_mover.module as well.
1. the code listed in the custom thumbnails section of the readme.txt ('this hooks for you') will go in your template.php where you "Override or insert PHPTemplate variables into the node templates".
2. configure xspf playlist with your video cck field.
3. screenshot of my mm overview page.
4. screenshot of my mm config page.
summary:
I have one 'video' content type with two filefields, one's a video field and the other's an image field. The "file" portion of the playlist is taken from the video, via the xspf playlist.module settings. The "image" portion of the playlist is harvested from cck via mediamover. As soon as you run cron MM attaches the image to the playlist. Now you have a single node that's got your file as well your custom thumbnail.

Only thing i need to do now to get this crap over with for my specific purposes is to figure out how to hardcode the php into my panel page (for user profile) so its set up to display the playlist i made (via the 'uid is author' argument). Not necessarily a question for this issue queue but sort of because if you output an xspf views playlist in any page it takes over the entire node. I'd be glad to provide more info on this if anyones interested.

AttachmentSize
overview.png 43.15 KB
config.png 54.66 KB

#16

rpmute - April 24, 2008 - 05:27

stuffnthings: i'm using 5.x-0.12 without any complaints, but i agree with you in that i'm not sure if the changes he's made are available in the latest version yet, which is why i'm still using the latest stable release with a temporary fix for the thumbnails (by using the media mover thumbnail hook) until the next release is ready. wish i had time for bug testing and i will whenever i put what i have online (already).

#17

latte - April 30, 2008 - 20:33

This i exactly what I've been looking for. I already have it all working (except for the thumbnail picker). When do you think the updated mod will be available as a stable release?
If you want I can test it out for you. you can hit me up at w (at) wesnoel.com. Cheers!

#18

arthurf - April 30, 2008 - 20:38

Well, most of the changes are actually in CVS at this point. The picker works and saves the data to the database. The problem is that I think I really need to refactor the data model so that it is a cleaner implementation- I don't feel that what I've got is stable enough to let people use it yet. It's probably 5 or so hours of work away, but it'll get there. Probably by next week or so.

#19

rpmute - April 30, 2008 - 22:58

np. i'll be here with my module update status ready...

 
 

Drupal is a registered trademark of Dries Buytaert.