How to enable HypeScraper in Wysiwyg editor

I am using HypeScraper and I can see it's working in the hypeWall, but the links are not rendering in the Wysiwyg editor like the news form and blog form. What else I need to do to enable HypeScraper in pages? Thank you.

  • I did read the readme, but I still couldn't figure out how to use it. Sorry. 

    Developer notes
    
    Card
    
    To display a URL card with an image preview, title and brief description, use output/card view:
    
    echo elgg_view('output/card', array(
        'href' => 'https://www.youtube.com/watch?v=Dlf1_vuIR4I',
    ));
    Player
    
    To dipslay a rich media player use output/player view:
    
    echo elgg_view('output/player', array(
        'href' => 'https://www.youtube.com/watch?v=Dlf1_vuIR4I',
    ));
    

    This is the developer note, but even in HypeWall I didn't find anywhere that uses any of these two views. Would you please give me some example of how to use it?

  • Read on. Last section is for you

  • Oh there it is. Sorry. was bewildered by the term Linkify and was a little bit impatient. Thank you, Ismayil

  • We live in the post-truth era of obscurity, ambiguity and oxymorons :)

  • Sadly, still couldn't get it working. I have add the output/linkify to the news object: 

    // /mod/news_custom/views/default/object/news.php
    if ($full) {
        // full view
        $body = elgg_view(
            'output/longtext',
            [
                'value' => $news->description,
                'class' => 'news-post',
            ]
        );
    
        if (elgg_view_exists('output/linkify')) {
            $body = elgg_view('output/linkify', array(
                'value' => $body,
            ));
        }
    
    

    This didn't work, so I checked on HypeWall, the scraped video links are output as attachments, so I add a same format_attachment function to it: 

    $body .= formatAttachments($news);
    

    and also in my plugin function:

    // /mod/news_custom/lib/functions.php
    function formatAttachments($news) {
    
        $attachments = array();
    
        if ($news->address) {
            $attachments[] = elgg_view('output/wall/url', array(
                'value' => $news->address,
            ));
        }
    
        $attachments[] = $news->html;
    
        $attachments[] = elgg_view('output/wall/attachments', array(
            'entity' => $news,
        ));
    
        return (count($attachments)) ? implode('', $attachments) : false;
    }
    

    but it's still not working unfortunately. can't get my head around it. 

  • Read the last paragraph of the readme

  • It works. I feel so ashamed. Thank you, Ismayil