Hi one and all....

I've recently began using Media: YouTube and it is frankly awesome. Now i wish to submit a video sitemap to Google (see http://support.google.com/webmasters/bin/answer.py?hl=en&answer=80472)

I have searched hi and low for a documented method of acheiving this, without success. The closest seemed to be bensnyder's comment. However his plan required writing some PHP and I'm yet to begin my journey into that. I'm pretty sure, i'm not alone...

I have however pieced together a plan, inspired by his idea. However, I've hit a wall with it... Any help would be greatly appreciated...

So far I've:

Then created the 1st view, available to view here, you'll want to view source:
Basic settings

  • Style "XML data document". With both "Views api mode" and "is XML fragment" selected
  • Items to display: unlimited

Arguments

  • Node: Nid

Fields.

  • Content: Video Image Thumbnail (absolute url to thumbnail and label=video:thumbnail_loc)
  • Node: Title (label=video:title)
  • Node: Body (label=video:description)
  • Content: Video URL to original video (label=video:player_loc)
  • Content: Duration (label=video:duration)

The 2nd view, available to view here:
Basic settings

  • Style "XML data document". With "Views api mode" selected
  • Items to display: unlimited

Fields.

  • Node: Nid Nid (exclude from display)
  • Node: Path (label=loc)
  • Global: View (label=video:video. I selected my 1st view, display: defaults, arguments: [nid].)

Hey presto! Almost got it all done...

Unfortunately, the 2nd view doesn't output just xml, it is including html. Also, when i preview the 2nd view, I can see the 1st views "edit,..

Really wasn't sure where to post this but thought it would help other users of "Media: youtube" if we worked out the last steps to this... I'll happily make a video tutorial showing how to do it...

Maybe I'm missing a trick and there's another way that everyone is creating these video sitemaps?

Any guidance at all would be greatly appreciated,

Guy

Comments

gMaximus’s picture

With much thanks and appreciation to Drupaler voxpelli, I now have the missing piece to the puzzle... That is, the "Plain view" module available from here:

https://github.com/voxpelli/drupal-plain-views....

With this small module installed, I was able to go back to my 1st view (above) and add a display called "Plain".

I then went to the 2nd view (above) and changed the "Global View" field display to "Plain".

Job Done... A video sitemap without needing to write PHP.... and no more html being output...

The only thing I can't get right now, is the extra info within the "player_loc" tag, to allow embeds etc... Currently the information is being converted to html...

... The optional attribute allow_embed specifies whether Google can embed the video in search results. Allowed values are Yes or No.

The optional attribute autoplay has a user-defined string (in the example above, ap=1) that Google may append (if appropriate) to the flashvars parameter to enable autoplay of the video. For example: <embed src="http://www.example.com/videoplayer.swf?video=123" autoplay="ap=1"/>...

Another interesting thing i noticed when testing my sitemap is that the youtube thumbnails are blocked by their robots.txt file.... hmm ... Possible requirement on site to acquire custom thumbnails? Possible store them locally...

Anyway, I'll post a link to a video demo of this process as promised early next week...

:)

gMaximus’s picture

I've since realised that i just needed to enable the "Embedded Media Thumbnail" module that comes with emfield.

Then make sure that the field in my content type is set to store thumbnails locally. Finally, re-save the video pages, so as to store the thumbnails locally.

This way Youtube blocking those thumbnails in their robots.txt shouldn't interfere with the videos coming up in search...

gMaximus’s picture

Issue summary: View changes

added links to view the current progress on my site

gMaximus’s picture

Status: Active » Closed (fixed)

I've created a video tutorial of this process/ method on my site....

http://onlinebusinessbuilders.co.uk/video-tutorials/how-create-google-vi...

gMaximus’s picture

I've since installed JW Player Module for Drupal.

I then re-wrote the player_loc field to: http://example.com/sites/example.com/files/jwplayermodule/player/player....

Without doing that it seemed my YouTube embeds would not get indexed....

anandwaft’s picture

Hi

Have any idea for

Video sitemap for drual7

gMaximus’s picture

@anandwaft

They have been working on a drupal 7 route over here: http://drupal.org/node/451234

anandwaft’s picture

Hello

I want image cropping with scaling and resize in drupal7.

It have drupal6 but not working on drupal7.

Please help me.

anandwaft’s picture

Issue summary: View changes

credited bensnyder for his inspiration