Video Submission

anilrgowda - January 8, 2008 - 07:21
Project:Drigg
Version:5.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I just installed the latest ver of drigg..it rockz and appreciate the hard work.I knw hard 2 code a bugs free cms..so i just registered @ drigg.org and started posting.so it helps 2 find out more bugs.and also we can check the load of the site....

i really love the way youtube works..can we embed more sites 2 it
for example
metacafe
Revver
ifilm
googlevideo
msnsoapbox
vimeo
dailymotion
Guba
yahoo videos

#1

mercmobily - January 8, 2008 - 15:52
Status:active» closed

Hi,

I am absolutely happy to add as many videos as you like - the system is there and ready to go!
However... I need help with those.
For each video format, I need:

* A regular expression to decide that the URL is a video. For example, for youtube it is:

if(preg_match('|^http://www.youtube.com/watch\?v=([^\&]+)|', $url, $matches)){

* What to show for the teaser AND for the full article view. It NEEDS to be possible to work out the HTML from the URL.

I updated Drigg's web site here:

http://www.drigg-code.org/pages/help_drigg

Thanks a lot!

Merc.

#2

funana - January 8, 2008 - 16:12

Maybe there is already done a lot of work here in the .inc files: http://drupal.org/project/emfield

#3

mercmobily - January 9, 2008 - 08:03

Hi,

That is sooooo true!
I am very torn, I must say. The module "emfield" seems great, but it requires CCK. One of the main goals I have is to keep Drupal query-happy, and avoid using sql-intensive modules such as cck (required my emfield).

At the same time, code duplication leads to regret...

I had a look at the code. I think you are right: "stealing" the regexps and the showed code for this module does indeed seem like a good idea (at least initially).

If anybody with some PHP skills is able to offer help... there isn't too much thinking involved. Just a lot of "porting" and testing.

Bye!

Merc.

#4

mercmobily - January 11, 2008 - 23:00
Status:closed» active

Hi,

Reopening this, and treating it as the official feature request for supporting more video formats.

Merc.

#5

silvanov - January 12, 2008 - 08:15

Would love it, if zshare.net video, and audio streams could be integrated.

#6

rek2 - January 13, 2008 - 06:53

dido, I think the same.. audio and pictures.. sometimes there are good cartoons on png that artist do.. and will be nice to post them.

Also to add videos not in the URL ...

#7

humaneasy - February 1, 2008 - 16:47

Hi Merc.

It is already done the easy way: http://an-archos.com/anarchy-media-player/

Anarchy Media Player 2.0 for WordPress, WordPressMu and Standalone Javascript will play any simple href link to mp3, flv, Quicktime mov, mp4, m4v, m4a, m4b, 3gp as well as Windows wmv, avi and asf files, in the appropriate player on your web page. The WordPress versions also add buttons to the Rich Text Editor for embedding Flash swf and Director dcr movies as well as YouTube, Google Video, iFilm, DailyMotion, Revver, Metacafe, MySpace, Apple iTunes iMix, and GoEar players.

Download: http://an-archos.com/wp-content/uploads/File/anarchy_media_js.zip
Extras (FLA, PSD): http://an-archos.com/wp-content/uploads/File/anarchy-source-files.zip

Instalation:

For the Standalone Javascript on non-WP pages edit the anarchy_url variable in anarchy.js then you can manually add the script to your web page header:

<script type=”text/javascript” src=”http:// PATH TO PLAYER DIRECTORY /anarchy_media/anarchy.js”></script>

Usage:

Simple href links: Upload your mp3, flv, mov, mp4, m4v, m4a, m4b, 3gp, wmv, avi or asf file via the WordPress editor’s upload browser then “send to editor” - or make a hypertext link to any external file on the web - and you’re done!

Rich text editor: Flash swf (including Google Video, YouTube etc., players via the “A” for anarchy button) or Director dcr use the respective rich editor buttons. To embed the various media players supported by AMP enter the full HTTP address (url) to your YouTube, Google Video, iFilm, Revver, Metacafe, MySpace or GoEar web page. For DailyMotion video and Apple iTunes iMixes just copy and paste the code from their embeddable players.

Support forums at http://fora.an-archos.com/

Don't reinvent the wheel :)

You can always donate to Zeug at Paypal.

#8

rek2 - February 1, 2008 - 16:52

Hi humaneasy, I like your site. check out:
http://www.dailyradical.org

#9

mercmobily - February 2, 2008 - 01:57

Hi,

Good hint. I will look into it.

Bye!

Merc.

#10

silvanov - February 2, 2008 - 04:44

I'm using this for my wordpress blog @ www.silvanov.com and it seems to work perfect, if its easy to integrate, I might give it a try on my drigg site to see how it does.

#11

mercmobily - February 2, 2008 - 05:54

Hi,

That would be _great_ Silvano!!!

Merc.

#12

humaneasy - February 3, 2008 - 00:03

@rek2

I don't know which site are you talking about but it is not mine for sure :)
Thanks, anyway, in the name of the owner, eheh ;)

@merc

Always available to give an hint ;)

By the way, neat to see that there are already a few Drigg around rolling nicely.

#13

silvanov - February 3, 2008 - 10:22

Ok, I'm working on trying to get this up and running now. I've added the call to page.tpl.php, to call the anarchy script, added the location of the player files to the script itself, and uploaded the script to the root of my public directory. Not sure what else I need to do to enable it, but attempted to add a scoop with a url pointing towards a mp3, and it will not allow me to, giving an error "Story's URL: The URL is not functioning!" Any thoughts? And not sure if its needed, or should be thought about ahead of time, but will the youtube integration into drigg already present, interfere, or be interfered with the anarchy youtube implementation. I looked at the java script to see if there was any references to youtube itself, but didnt see any, as I was planning on commenting them out to begin with, just in case. I'd love to be the "test dummy" to get this working, unfortunately, I'm not a programmer, so I really don't 'understand' what I'm looking at as far as the code, and what needs to be changed to make it work, if anything.

At this point though, the script should be installed properly, its being called when I view the source, but I have no way of knowing if its working or further testing quite yet.

#14

humaneasy - February 4, 2008 - 02:59

I think you should put the <a /> tag with the url in the body of the message and not in the place you are doing it.

From their site at http://an-archos.com/anarchy-media-player/#usage

So anyways … for all the href linked files such as mp3:

<a href=”http://PATH TO AN MP3/audio.mp3″>Download Link</a> Ghost Troop - Captain Eric May 666 Red Alert

becomes

Go to the page referenced above to see the result.

Of course, the correct thing to do would be to build a Drupal module based on the Wordpress plugin :)

#15

Babblin5 - February 7, 2008 - 08:03

In the meantime, I HAVE tried out EMFIELD, and it does seem to work with Drigg, with the following issue:

Adding the embed video field in the scoop submission and pasting the code is properly accepted, HOWEVER:

Embedded videos and thumbs DO NOT show up unless the admin goes into content management and the Reload Embedded Media Data is updated. No scoops have to be checked, as it reloads embed data for any scoop which contain embed data. Is there a call being made when the update is used that needs to be added to the scoop submission php? If we can figure this out, I would be MORE than happy to provide a step-by-step that would allow people to use this until the feature is added.

Merc, if you'd like to play around, I'd be more than happy to give you admin rights...

You can see the actual embed DOES work (after the silly Embed Code Update) by going to http://www.subbitt.com

AttachmentSize
Capture.JPG47.87 KB

#16

mercmobily - February 7, 2008 - 08:16

Hi,

One note is that the only thing that should be embedded, in a Drigg site, is the video linked in the "link" section of the site.
Embedding every single link in the story would be unmanageable.

So, really, what needs to happen is to get Anarchy to ONLY take into account the story's URL. It's easy to get that URL from node-drigg.tpl.php

Is that possible? If so, all we really need is a new node-drigg.tpl.php.

Sorry, but I won't be able to accept into the main package something that renders every single link in the story description...

Merc.

#17

silvanov - February 7, 2008 - 09:54

It does look like you can embed, within the body, using this method. It doesnt look like we can use the scoops submitted url though. I'm thinking that this might have something to do with the page.tpl.php as well, but I'm not experienced enough to figure it out, or build a drupal module based on your code. Merc, if you need an enviroment to play with this, email me at silvano A T silvanov D O T com and I'll give you admin access, and access to the ftp as well if needed. I'd really like to help, but I just don't know enough. Sorry.

Silvano

#18

mercmobily - February 7, 2008 - 13:01

Hi,

OK I will look into this.

Merc.

#19

Babblin5 - February 9, 2008 - 10:04

In the meantime, I've ALMOST got collegehumor.com's code figured out. Using the Youtube_embed, with the appropriate changes for collegehumor's player and embed code, I get the player to come up in the node page (using a "dummy" generic video thumbnail in place of a grabbed thumbnail from their site for the teaser view).

The only problem I'm having (and I DON'T claim to be a php expert, I'm still learning) is that the proper information is not being passed to the $matches variable, as it does not show the proper video reference when I view the page source ( http://www.subbit.com/node/107 ). I'm sure it's something silly, due to my limited experience in php so far, but here's what I have:

<?php
   
if(preg_match('|^http://www.collegehumor.com/video:([^\&]+)|', $url, $matches)){

      if(
$teaser){
       
$return = '<div style="embedded-youtube teaser"><a href="'.$node_url.'"><img src=http://www.subbitt.com/video.jpg width=80 height=60 border=1 alt=""></a></div>';
      } else {
       
$return = '<div style="embedded-youtube"><object type="application/x-shockwave-flash"  data="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id='.$matches[1].'&fullscreen=1"  width="400" height="220" ><param name="allowfullscreen" value="true" /><param name="movie"  quality="best" value="http://www.collegehumor.com/moogaloop/moogaloop.swf? clip_id='.$matches[1].'&fullscreen=1" /></object></div>';
      }
      return
variable_get('drigg_embed_before', '').$return.variable_get('drigg_embed_after', '');
?>

the url for the video is http://www.collegehumor.com/video:1713385 but the 1713385 isn't getting passed to the $matches var.

What do I need to put in the () after video: to make this work?

#20

Babblin5 - February 9, 2008 - 18:30

Let me guess, the variable is passed earlier in the PHP code, and this is merely a check function for the valid URL....

#21

mercmobily - February 10, 2008 - 01:50

Hi,

Nope, as I told you by email, you were basically there.
I completed the code for you. Please let send me a valid thumbnail for the video, and I will release a new version of the module.

Bye!

Merc.

#22

mercmobily - February 10, 2008 - 03:01

Hi,

Nope, as I told you by email, you were basically there.
I completed the code for you. Please let send me a valid thumbnail for the video, and I will release a new version of the module.

Bye!

Merc.

#23

Babblin5 - February 10, 2008 - 06:16

Ack! Haven't gotten the email yet... by valid thumbnail, do you mean a generic "dummy" thumbnail that can be used? The issue with the majority of embed sites is that, unlike youtube, they have very obscure references to their thumbnail image storage locations, and in many instances, will store their thumbnails in different paths on their server. In this way, it differs from inserting the embed code for a specific video, which contains the exact url for the thumbnail for THAT particular video.

#24

mercmobily - February 12, 2008 - 05:27

Hi,

HEre is an update on this.
Thanks to the fantastic help of babblin, I am actually implementing the most impo0rtant video storage services out there.
In the next weel, I will have the top 10 or 15 ones, PROBABLY including the Anarchy player.

At that point, I will close this bug and will accept patches for extra players.

Bye!

Merc.

#25

silvanov - February 16, 2008 - 06:47

Glad to hear this Merc, anxiously awaiting the update, and sorry I couldn't have been more help. I tried the best I could, but because of this I'm working through some tutorials learning php and html, so hopefully in the near future I could contribute more. Once again, thanks for your excellent and devoted work. I really appreciate the opportunity that drigg has given me to step into the world of webmastering, and giving me a place to focus one of my passions.

#26

mercmobily - February 16, 2008 - 07:29

Hi,

No worries :-D

Merc.

#27

mercmobily - February 19, 2008 - 01:13

Hi,

OK, I want to close this issue soon because it has become a little messy and because it's being implemented.
The decision is simple: I will stick to what I was doing beforehand, extending Drigg's ability to figure out which format it is.

The new version of Drigg already allows _lots_ of different embedded videos:

* Youtybe
* Collegehumour
* Revver
* Veoh
* Metacafe

Other ones I would like to see:

ifilm
googlevideo
yahoo videos

Ones I am not so sure about:

msnsoapbox
vimeo
dailymotion
Guba

Are we missing anything _important_?
If so, please let me know. I will open a new, fresh request with the missing video formats.

Bye,

Merc.

#28

silvanov - February 19, 2008 - 07:06

Theres megavideo, megaupload.com 's video service. Trying to get more information on a niche site for embeddable video as well, rapspace.tv I'll see what else I can come up with for popular video services

Silvano

#29

mercmobily - February 19, 2008 - 09:25

Hi,

While I am happy to support the important video services, I will be able to accept minor ones only if they come with a patch.
I am just about to roll out the code to support:

* IFILM
* Google Video:
* YAHOO - Damn them

If you want to support minor ones, you're most welcome. However, I will need a working patch. Otherwise, I will mark the request as "Won't do".

Bye,

Merc.

#30

mercmobily - February 26, 2008 - 13:37
Status:active» closed

Hi,

Alright, this is done.
Drigg now supports the most common movie formats.
There is no point in having a generic issue called "movie submission". If there is a missing format (but I doubt it), please open a new feature request *precisely* for that format.

I am happy with the number of formats Drigg supports right now though...

THANK YOU Babblin5 -- And I mean THANK YOU. Babblin5 provided all of the instructions to implement tons of formats, and did a lot of debugging.

Bye!

Merc.

 
 

Drupal is a registered trademark of Dries Buytaert.