[1.8/12.0] TheWire links Preview Advanced v1.1

Release Notes

v1.1 Fixed Space Bug

  • There is a conflict between TheWire Links Preview Advanced and TheWire Tools plugin.

     Both the plugin has a common file: mod/< plugin_name >\views\default\river\object\< plugin_name >\create.php

    Now as I place the plugin one after the other, the create file of the later plugin from the list is being used to generate the preview and the above plugins is ignored.

    This is how I fixed the issue:

    I created a the file combining the source code of both the create.php file:

    $object = $vars["item"]->getObjectEntity();
    $excerpt = strip_tags($object->description);
    
    $attachments = "";
    $reshare = $object->getEntitiesFromRelationship(array("relationship" => "reshare", "limit" => 1));
    if (!empty($reshare)) {
        $attachments = elgg_view("thewire_tools/reshare_source", array("entity" => $reshare[0]));
    }
    
    if($attachments==""){
    $excerpt = elgg_preview($excerpt);
    $excerpt = thewire_filter($excerpt);
    }else{
    $excerpt = thewire_tools_filter($excerpt);
    }
    
    $subject = $vars["item"]->getSubjectEntity();
    $subject_link = elgg_view("output/url", array(
        "href" => $subject->getURL(),
        "text" => $subject->name,
        "class" => "elgg-river-subject",
        "is_trusted" => true,
    ));
    
    $object_link = elgg_view("output/url", array(
        "href" => "thewire/owner/$subject->username",
        "text" => elgg_echo("thewire:wire"),
        "class" => "elgg-river-object",
        "is_trusted" => true,
    ));
    
    $summary = elgg_echo("river:create:object:thewire", array($subject_link, $object_link));
    
    echo elgg_view("river/elements/layout", array(
        "item" => $vars["item"],
        "message" => $excerpt,
        "summary" => $summary,
        "attachments" => $attachments
    ));

    Hope the issue will get resolved soon in your next plugin release.

  • There's a conflict between this plugin and The Wire Edit plugin. The Wire Edit plugin cannot work if this is enabled, and I tried re-positioning the two plugins, but it doesn't help

  • The Wire Edit is not working in our installation. we are running 2.2.3. Any help would be appreciated.

    Thanks. Gene

Jackson

My name is Jackson, i have *16* years old, and i am a developer!

Stats

  • Category: Media
  • License: GNU General Public License (GPL) version 2
  • Updated: 2015-12-30
  • Downloads: 975
  • Recommendations: 4

Other Projects

View Jackson's plugins