NoELab Media Embedly v1.4

Release Notes

Version 1.4 - Tested on Elgg 1.7.8/Firefox 4/ Chrome

  •   * Fixed edifice categories input in wrap function if is_plugin_enabled
  •   * Improved Media Library Widget on profile with media icon 
  •   * Fixed,Improved and Added jsSupport for Riverdashboard and Messageboard
  •   * Improved Media Library on river tabs
  •   * Improved languages items
  •   * Improved css
  •   * Added group media widget
  •   * Added support for noelab_media_embedly >>> read NOTES in readme
  •   * Added Media Sharing

ElggFiles overwrited: riverdashboard/nav.php && widgets/messageboard/view.php

  • @ghumaz can you do a test for me?

    if the script fails in IE8/9 with a red X being displayed instead of the video or black screen, try this work-around:

    use the following in metatags.php and in jssupport.php:

    $("a").embedly({wrapElement:'span'});

    Replacing the default spanning <div /> with a <span /> tag. if you see the player I will fix it with this method.

  • Hello Lord,

    I just don't get it. My links are identical in structure to other links but embed.ly won't recognise it as an object.

    embed.ly example link: 

    http://www.metacafe.com/watch/4376131/easter_lay/

    My link:

    http://www.metacafe.com/watch/6545025/mc_example/

    The quality on metacafe isn't good anyway as you'll see with the given link.

     

    Thank you for your patience.

  • I tested it , not works for me, I will test it again after few hous and let you know if I found any thing.

  • Finally it works in IE 8 I didi not test in IE 9 I only changed a Metatags file and full working code is below , it is not a final code , I am trying to test it in some different ways:- it show full player not a icon in blogs but riverdash borad has no effect of this.

    <?php
      /**
       * NoELab Video Embedly
       * @author NoELab.com
       *
       * metatags
       */
    ?>

    <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/noelab_media_embedly/vendors/jquery.embedly.min.js"></script>

    <script type="text/javascript">

    $(document).ready(function() {
    $("a").embedly({wrapElement:'span'}); 

     $('a').embedly({}, function(oembed, dict){
        $this = $(dict.node);
        $this.html(oembed.title)
             .after('<div class="clearfloat" style="margin:5px 0 0 20px;"></div><a class="embed-thumbnail" href="#"><img src="'+oembed.thumbnail_url+'"/><img class="embed-PlayButton" src="<?php echo $vars['url']; ?>mod/noelab_media_embedly/graphics/play-button-1.png" height="30" width="30" border"0"></a><span class="infoembedly"><a href="'+oembed.url+'">'+oembed.title+'</a><p>via '+oembed.provider_name+'</p></span><div class="clearfloat"></div');
      });

      var anchors = $("a");  anchors.embedly();  anchors.filter("[href*=flx.me]").addClass("custom_embed");
       $('a.embed-thumbnail').live("click", function(e){
         e.preventDefault();
        
         $(this).parent().find('.embed').toggle("slow");
         $(this).parent().find('a.embed-thumbnail').hide("slow");
        
      });
     
    });

    </script>

    <?php
    // Media Sharing
    $sharing = get_plugin_setting('sharing', 'noelab_media_embedly');
    if (get_context() == "media" && $sharing != 'no'){
    ?>

        <!-- AddThis  -->
        <script type="text/javascript">
            var addthis_config = {"data_track_clickback":true};
        </script>
        <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=[YOUR PROFILE ID]"></script>


    <?php } ?>   

  • Here is afinal code I remove Image part from Fly media add for blogs according to my site contents so you may also copy same code. to metatags.php

    <?php
      /**
       * NoELab Video Embedly
       * @author NoELab.com
       *
       * metatags
       */
    ?>

    <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/noelab_media_embedly/vendors/jquery.embedly.min.js"></script>

    <script type="text/javascript">
    $(document).ready(function() {
    $("a").embedly({wrapElement:'span'}); 
     $('a').embedly({}, function(oembed, dict){
        $this = $(dict.node);
        $this.html(oembed.title)
             .after('<span class="clearfloat" style="margin:5px 0 0 20px;"></span><div class="clearfloat"></div');
      });

      var anchors = $("a");  anchors.embedly();  anchors.filter("[href*=flx.me]").addClass("custom_embed");
       $('a.embed-thumbnail').live("click", function(e){
         e.preventDefault();
        
         $(this).parent().find('.embed').toggle("slow");
         $(this).parent().find('a.embed-thumbnail').hide("slow");
        
      });
     
    });

    </script>

    <?php
    // Media Sharing
    $sharing = get_plugin_setting('sharing', 'noelab_media_embedly');
    if (get_context() == "media" && $sharing != 'no'){
    ?>

        <!-- AddThis  -->
        <script type="text/javascript">
            var addthis_config = {"data_track_clickback":true};
        </script>
        <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=[YOUR PROFILE ID]"></script>


    <?php } ?>   

  • Thanks for the code, ghumanz. It seems that there's quite a lengthy delay between posting videos and them becomming available.

    Another question: How can we minimise an image from Picasa after it's been expanded in embedly?

    Thanks,

    Lee.

  • @Lee point you mouse on thumbnail, click, and move it out thumbnail, it load fast enaught.

    for minimise , use width and heith in css

  • is there a way i can select specific sites that videos comes from? lets say i only want youtube and dailymotion videos to be the only videos that show in my site?

  • @jek it is possible, in next version I will say how

  • @lord55 I am not sure what this code in metadata.php is for

    anchors.filter("[href*=flx.me]").addClass("custom_embed");

    but I had to comment it out to stop a conflict with the top_bar.php, not displaying the Tools drop down. 

    I am running elgg 1.7.8 with hyperStyle theme. I tested it in Google Chrome, IE9 and FireFox 

    Let me know if you need or want more information.

    Steve

  • Smith

    Hello guys,

    When i post a video from You Tube on Messageboard i get the same video TWO times!

    When i post a link in any textarea it not renders the video immediately but i need to reresh the page!

    Any Help PLease ?

     

  • @steve I putted it to allow anchors to be embedded in custom way...but if it causes conflicts, it is good to remove it. thanks for report

    @smith use the last version and upgrade.php your site... 2 times video in messageboard it is fixed (I hope). this versione is good for 1.7.7+ .let me know.

  • Smith

    There is a z-index problem, the tools menu is behind the thumbnail. It's not possibile to adjust the z-index in the css.

    Someone knows hot to set it in another way?

  • Smith

    Mozilla FIrefox v.5.0

    Z-index issue solved

    In the css.php

    find   .embed-thumbnail and set  z-index to 0.

     

     

    .embed-thumbnail {
        border: 1px solid #CCCCCC;
        cursor: pointer;
        float: left;
        margin-right: 10px;
        max-width: 150px;
        padding: 0;
        position: relative;
        z-index: 0;
    }


  • @lord55    I am very happy to recommend your plugin. It has been working great for me thus far on 1.7.10  .... As of last night my wire post have stopped being embedded and just the media in the media library will show the returned data. After trying to sort out the issue it seems that embedly is requesting an api key. I have registered to their site to get an api key and I entered that into lib but I still have no returned data. Any help or suggestion would be greatly appreciated.

    The following is a jsonp error returned

    <script src="http://api.embed.ly/1/oembed?callback=jsonp1311270566693&_=1311270568344&urls=http%3A%2F%2Fyoutu.be%2FNrSiPYQ5pjM&wmode=opaque">

    <html><title>403: Forbidden - Embedly has blocked your referrer. Sign up for an API key at http://embed.ly.</title><body>403: Forbidden - Embedly has blocked your referrer. Sign up for an API key at http://embed.ly.</body></html&gt;
    </script>
  • @kevin for me it still works. I don't know what usage you did, to take this message. I will see if I find something on this error.

  • Thanks for looking into it. I found on github today that there was a lot of updates being done to embedly-jquery due to some errors that they may have had. They have released with that a new jquery.embedly.min script and it looked like some other updates to the .php scripts so I am looking at those now. I will also try the plugin on a new elgg install and see if the same error replicates. Will update anything I may find out

    Thanks again for the great plugin

  • Ok I have got it woking again. Solution was to insert api key into jquery.embedly.min where it says  key= null   replaced null with the 'key' and now all is great. This will be great for me as I am running a small site and will never get past the request limitations with embedly's free account. still not sure how or why they locked me out as i have such a small site but oh well I do not expect it to happen again. Thanks

  • From last night my embed videos not working in blogs it is only showing a link to youtube instead of any video player or image. I think something is changed by empledly. As above mention comments I am also going to add api key from embedly . free one has limit for 10000 which is also sufficient for me.

    Thanks Kevin for your effort.

  • @ghumanz    Hope it works for you as well. I was missing on the fly embeds on the wire and with blogs as well. With the embedly account I can now see the number of embeds being done on the site which is also great. The callback with the account now looks like this

    <script src="http://pro.embed.ly/1/oembed?.............. instead of http://api.embed.ly/1/oembed?

    the thing that I do not like is that on the callback the api key is exposed in the source of the page as well so It looks like it will be a good idea to change the key from time to time


  • api key not work for me , I am in same situation. Any suggestions ????

  • @ghumanz  If you have firebug look at the header of your site and toward the bottom of the header you should see the callbacks from the api. Expand those and it should show if there is an error message. I am not sure what is going on cause mine is working with the key but when I just checked on the free account my request have spiked from about 200 to over 6000 within the past few hours which I think is impossible but thats what their api is telling me. This could be a reason why my request were being blocked. It is showing in my firebug that I currently have 4 callbacks for one single wire post each with a seperate callback id from the api so I would check yours as well. I would think that there should only be 1 and not 4 for a single post

  • I tried everything you mention. What happen last night with original plugin no key inserted and everything was again working fine but right now it again stop showing embed videos in blogs.

  • @ghumanz Did you try making a new api Key? My embedly works with no issues.

Stats

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

Other Projects

View lord55's plugins