Integrated Video gallery plugin (beta) v2.1

Release Notes

Hi all,

Took a while to upload the beta version. Hope you'd find it more useful.

New Features added are as follows:

  • Enables users to browse videos from youtube, metacafe and vimeo and embed them to their profile or groups.
  • Video tagging enabled.
  • Enabled for group videos.
  • Users can comment on videos.

Any suggestions and bug reporting is welcome.

 

Requirements : You need to have the php cUrl extension.

 

Credits : Adrian Rudnik at http://code.google.com/p/php5-simplevimeo/ for his vimeo search class.

Screenshots :

image

fig 1 : The video search Interface(youtube/metacafe/vimeo)

 

image

Fig 2 : Search results from youtube

 

image

Fig 3 : Search results from metacafe

image

Fig 4 : Group videos

 

Cheers

  • Very nice plugin! It works fine, just a one thing. I can add(submit) videos using only option of entering video url. When I use search  videos option I cannot add them using "Add" button. Add button doesn't work. How can I fix it? Thanks

  • Hello, I need help please. Why do i get this:


    Fatal error: Cannot redeclare video_url() (previously declared in /home/brdaidol/public_html/playkanal.eu/moj/mod/video/start.php:175) in /home/brdaidol/public_html/playkanal.eu/moj/mod/videolist/start.php on line 143

  • Nice work, but it really needs a "recently added videos" widget.

  • @Play! kanal

    The videolist plugin' s  video_url() function is interfering with another plugin as you have mentioned you need to either disable the video plugin or in case if you wish to keep it, simply rename all instances of  video_url() inside start.php for videolist plugin.

  • super think to add.. thanks a million..

  • same here - error: 

    String could not be parsed as XML

    any help to resolve?

  • youtube search doesn t work with 1.6

    Fatal error: Call to a member function children() on a non-object in mod/videolist/actions/tubesearch.php on line 48

  • The reason for the "String could not be parsed as XML" is because youtube changed its API, so the page that the function file_get_contents pulls is blank. Instead, change it to:

    $buffer = file_get_contents('http://gdata.youtube.com/feeds/api/videos/'.$videoid);

    and change

    $vidDataTitle = $xml_buffer->title;

    $vidDataDesc = $xml_buffer->content;

    That's been working well for me so far.

  • luckyDissonance ... u r my hero lol.  How did you know youtube changed its api? can I subscribe to something so next time i wont be scratching my head for weeks?

  • Hello, Prateek.. Great plugin if I may say so.. I just have one issue.. I hope you or some one else can help.. I am getting these errors:

    [error] [client 127.0.0.1] WARNING: 2009-11-19 16:18:27 (UCT): "include(/opt/lampp/htdocs/site/videolist/search/index.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory" in file /opt/lampp/htdocs/site/engine/lib/pagehandler.php (line 115), referer: http://site/pg/videolist/owned/User


     [error] [client 127.0.0.1] WARNING: 2009-11-19 16:18:27 (UCT): "include() [<a href='function.include'>function.include</a>]: Failed opening '/opt/lampp/htdocs/site/videolist/search/index.php' for inclusion (include_path='.:/opt/lampp/lib/php')" in file /opt/lampp/htdocs/site/engine/lib/pagehandler.php (line 115), referer: http://site/pg/videolist/owned/User

    I am using elgg 1.5 and php 5.2.6.. Thanks in advance for your help. I'll keep looking through the code in hopes of finding the problem..  If I am able to sovle the issue I will report my solution.

  • In continuing test I found another error related to groups:

     [error] [client 127.0.0.1] WARNING: "parse_url(/pg/videolist/owned/group:6) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL" in file /opt/lampp/htdocs/site/engine/lib/pagehandler.php (line 27), referer: http://site/pg/groups/6/development-group/

    I also found an empty file named ~/mod/videolist/views/default/videolist/videoprofile.php ..

    I am finding these errors in my server error-log file.. Back to testing and code reading I go..

  • any chance to get it work with elgg 1.6.1 I love it but didn t get your explication how to modify files to make it work.

  • How toinstall php cUrl extension?

    this is what i found in google... 

    extension=curl.so in php.ini

  • Okay. I've tried and tried, but I can't figure it out.

     

    How do I add a "Recent videos" to the main page? I managed to add recent photos (with tidypic) with this code:

     

    <!-- display latest photos -->
        <div class="index_box">
                <h2><?php echo elgg_echo("Latest photos"); ?></h2>
            <?php
                    if (!empty($vars['area7'])) {
                        echo $vars['area7'];//this will display photos
                    }else{
                        echo "<p>" . elgg_echo("No photos available") . "</p>";
                    }
                ?>
            </div>

     

    Is there a similar code for the videos I could use? Please excuse my horrible noob-ness. I am VERY new to Elgg.

  • @LuckyDissonance

    Thanks a million for pointing this out.

  • @Samanthavv

    You need to find where exactly $vars['area7'] gets populated and how? If you wish to customize this in the same way as tidypics does it, you need to see how $vars['area7'] is getting populated.

    or else you can simply extend view for list_entities($type, $subtype, $owner_guid, $limit, $fullview, $viewtypetoggle, $pagination) which will return you last $limit videos. replace $type by 'object', $subtype by 'videolist', $owner_guid by 0, and rest as per your requirement.

  • Thanks for a really nice plugin. It worked perfectly until yesterday. When I tried to use the tool "My videos" today i'm just returned to the external page. Any Idea why?

    The other tools are all ok and everything else seems to be unchanged. I have a working version on another server and i've tried to remove the old module and install a copy of the working catalog, but still no change.

    I'm very curious how to debug it since i receive no error or warning.

  • Don't worry. I've solved it. Settings.php contined lots of undefined characters. The video gallery was the only module affected by some strange coincident.

  • @Prateek  are you still developing this great plugin?  I'm looking forward to the next release with hopefully some of my and other users suggestions.

    TIA

  • @Gunnar,

    Wonderful. I had the same problem sometime back when one my plugins start.php file had some strange characters and it wasn't allowing me to enable new plugin I created. Took some time to figure out which start.php file had been corrupted.

    Cheers

  • @elgg_noob,

    Well as of now I am preoccupied with a lot of prior commitments, have to take care of these first. But yes go ahead, you can definitely give your valuable suggestions improvements. Will definitely look into it as and when I find some time.

    Cheers

  • In this mod ther's a bug, that not permit  mod to write on river(activity) when a user add a video.

    I solve the problem in this mode:

    Open file /videolist/views/default/river/object/videolist/create.php

    change this line:    $statement = $vars['statement'];

                                  $performed_by = $statement->getSubject();

                                     $object = $statement->getObject();

    whit:                       

                                    $performed_by = get_entity($vars['item']->subject_guid);
                                    $object  = get_entity($vars['item']->object_guid);

     

    Open file:       /videolist/actions/addvideo.php

    Change line :      // add to river
                       add_to_river('river/videolist/create', 'create', $_SESSION['user']->guid, $videolist->guid); 

    whit :                  // add to river
            add_to_river('river/object/videolist/create', 'create', $_SESSION['user']->guid, $videolist->guid);

     

    This is two big bug that i solve succesfully;

     

    Also i do a customitation : open file  /videolist/views/default/river/object/videolist/create.php

    After all line of file(at the end of file), so after  " ?>" add this and view the result:

     

    <br /><br /><br /><br />
    <div class="groupicon" style="float:left; margin:0px; margin-bottom:10px;padding:7px;margin-right:30px;">
    <b><?php echo $object->title; ?></b><br /><br />
    <div style=" float:left; widht:230px;border:solid 1px; ">
    <object width="225" height="170"><param name="movie" value="http://www.youtube.com/v/<?php echo $object->video_id; ?>&hl=it_IT&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/<?php echo $object->video_id; ?>&hl=it_IT&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="225" height="170"></embed></object>
    </div>
    <div style="float:left;width:350px; "><p > <?php echo substr(strip_tags($object->desc),0,300)."...."  ?> </p></div><br /><br /><br /><br />
    </div>

     

    Please say to me your result;

     

     

  • @citella

    I've modified your extra code to handle vimeo and metacafe :

    $videos = $object;

    $url = $videos->url;

    $videoid = $url;

    $width = 225;

    $height = 170;

     

    if($videos->videotype == "youtube"){

            $videodiv = "<div align=\"left\" style=\"margin-top:20px;\"><object width=\"$width\" height=\"$height\"><param name=\"movie\" value=\"http://{$url}&hl=en&fs=1&showinfo=0&auoplay=0\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://{$url}&hl=en&fs=1&showinfo=0&autoplay=0\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed></object>";

    }

    else if($videos->videotype == "metacafe"){

            $videoid_id = $videoid;

            $path = explode("/", $videos->thumbnail);

            $path = array_reverse($path);

            $thumbnailArray = explode(".", $path[0]);

            $videoid = $videoid_id."/".$thumbnailArray[0].".swf";

            $videodiv = "<div align=\"left\" style=\"margin-top:20px;\"><embed src=\"http://www.metacafe.com/fplayer/".$videoid."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\" name=\"Metacafe_".$videoid_id."\"></embed>";

    }

    else if($videos->videotype == "vimeo"){

            $videodiv = "<div align=\"left\" style=\"margin-top:20px;\"><object width=\"$width\" height=\"$height\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\"></embed></object>";

    }

    ?>

    <br /><br />

    <div><b><?php echo $object->title; ?></b><br /><br />

    <div style="float:left;"><?php echo $videodiv; ?></div>

    <?php echo substr(strip_tags($object->desc),0,300)."....";  ?></div>

    </div><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

     

  • I have a problem with the Internet explorer to give him to the button to add there does not go out for me that I can do thank you very much for his(her,your) help.

  • Please HELP!!!

    String could not be parsed as XML

    any help to resolve?

Stats

  • Category: Media
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 9389
  • Recommendations: 5

Other Projects

View Prateek's plugins