Status plugin image evidence

Plugin Status problems

If I post some items from Video, Image or Status the evidence image is the image of the latest post published.
I tried with 3 different themes (also with Twenty Sixteen standard Wp theme) but nothing change.
If I turn off the Set first imported image as featured image no evidence image is shown.

I think there must to get a choice, publishing article, or other items to show if get from the article and not form latest image in media the image evidence.

If not the plugin is not satisfing my needs.

Fabrizio

  • James Morris

    Hello FabrizioAzzali,

    If I'm understanding your question correctly, when you attempt to link to a video, image, or post from your own website using the Status plugin, it only pulls the latest post's image and not the image from the linked to post. Is that correct?

    When I tested linking to a post using the Twenty Sixteen theme, that had an image that was linked to from a remote site, no image was imported. But, if the image was locally hosted on that site, the image import worked.

    So, if you link to a page that has an externally hosted image, Status won't import that image.

    If you are linking to posts in Status that are on your own site, I suggest you try editing the original post you are linking to and make sure the image is locally hosted, or add a Featured Image.

    If you are linking to posts on an external site that you do not manage, there's not much you can do to force the image download. Their theme may be coded in such a way that Status cannot retrieve the image, or they could be linking to an off-site image. Also, some servers have hotlink protection which prevents remote sites from linking to images hosted on their server.

    Please let me know if this answers your question and if you have any further questions. I'll be happy to help! :slight_smile:

    Best regards,

    James Morris

  • FabrizioAzzali

    I James, you understand perfectly and I know what you say.
    The problem is that I get only 2 choices when publishing post form other sites that have no evidence image:
    1) Get the latest image from media gallery
    2) Get no image
    Will be beautiful if I can choice, from staus panel, an image to get as image evidence (always the same) if the evidence image is not reached.
    Can you think at this proposal for next version?
    If not the plugin is not really usable in these that are based on images evidence.
    Sorry for my english
    Bye Fabrizio

  • Panos

    Hi FabrizioAzzali ,

    I have attached file : class_wdqs_admin_pages.php which you can download, extract (unzip) and replace. This file contains a new filter in which you can hook and set the default image you need. Here are the exact steps you need to follow:

    1. Download file attached and replace at this folder:
    wp-content/plugins/quick-status/lib/class_wdqs_admin_pages.php
    I would recommend to keep a backup of previous file before replacing

    2. Open your child theme's functions.php ( or a mu-plugin ) and paste following snippet:

    add_filter( 'status_import_image', 'wpmudev_status_import_image', 10, 2 );
    
    function wpmudev_status_import_image( $thumbnail, $data ){
    
    	if( $thumbnail == '' ){
    		return 'http://the-path-of-your-default-image.jpg';
    	}
    
    	return $thumbnail;
    
    }

    3. Upload the default image you want to use via Media Uploader. After image has uploaded copy it's URL as in the following image:

    4. Replace the http://the-path-of-your-default-image.jpg in the snippet with the url of the defaut image you copied at step 3.

    5. Save and test :slight_smile:

    Hope this helps!

    Thanks!
    Panos

  • FabrizioAzzali

    Hi Panos
    I tried but still do not works
    May I did something wrong in the theme function file
    This was my original child functions.php

    <?php
    
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 3 );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
    
    ?>
    and this the new one
    <?php

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 3 );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
    add_filter( 'status_import_image', 'wpmudev_status_import_image', 10, 2 );

    function wpmudev_status_import_image( $thumbnail, $data ){
    if( $thumbnail == '' ){
    return 'http://ww2.il-tuo-sito.it/wp-content/uploads/2016/10/evidence.jpg';
    }
    return $thumbnail;
    }
    ?>

  • Panos

    Hi FabrizioAzzali ,

    I would need to have a closer look on this as it works fine in my tests and James Morris . Could you please send in login and ftp info so I can see at which point it doesn't work on your site? You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question?" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:Subject: "Attn: Panos Lyrakis"

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP credentials
    host
    username
    password
    (and port if required)

    - link back to this thread for reference

    Thanks!
    Panos

  • Panos

    Hi FabrizioAzzali ,

    Thanks for sending in your info!

    As I see that instead ftp you suggested using a plugin to edit php files, just a note for future reference. We'd rather not do any changes to any php files through this type of editors (loaded as part of your site), since there is no way to restore a mistake (even a simple typo can break the site) instantly as not even the editor may load. We also avoid using WP's built in editor (Appearance > Editor ). We avoid them only for php files, js and css can be restored.

    Back to our issue :slight_smile:
    It seems you have inserted the code correctly in functions.php.

    I tried the link you mentioned, but it seems that it's not loading now and can't test the import. I have added an additional check in the snipped, so you can replace the one in your functions.php with the following:

    add_filter( 'status_import_image', 'wpmudev_status_import_image', 10, 2 );
    
    function wpmudev_status_import_image( $thumbnail, $data ){
    
    	if( $thumbnail == '' |  !Wdqs_ImageDownloader::is_local_image($thumbnail) ){
    		return 'http://the-path-of-your-default-image.jpg';
    	}
    
    	return $thumbnail;
    
    }

    Please let me know if this changes anything in you side as I don't have a similar post link to check. If you still have issues please share some other post links (you can send them privately if you prefer by replying to the email ) so we can test.

    Thanks!
    Panos

  • FabrizioAzzali

    Hi Panos
    as I told you is a shared server and I've not a cPanel and FTP user & password are the same valid for all the services
    If you need a plugin that fit your needs install it.

    You can do always what you want. All the post present can be deleted.
    I have to present the site to the client next week and content on the site it is only a demo.

    Here are links the do not works properly. (no evidence image)
    I tried for you but you can delete and retry.

    ARPA FVG - Sviluppo Sostenibile: concetti
    http://www.arpa.fvg.it/cms/tema/LaREA/approfondimenti/Sviluppo-Sostenibile_Concetti.html
    There is no image evidence on the orginal post but when published on the site evidence image is missing

    Lo sviluppo sostenibile
    http://www.sogesid.it/sviluppo_sostenibile.html
    There is no image evidence on the orginal post but when published on the site, evidence image is missing.

    If you can I'have another issue:
    The content order of how Status publish post from other sites is
    1) Title
    2) evidence image if present
    3) permalink to post
    4) first image from the post
    5) content
    6) author
    7) meta

    I need to move the post permalink to the end of the content.
    IT is possible?

    Thanks Fabrizio

  • Panos

    Hi FabrizioAzzali ,

    I tried both links in my installation and I get my default image set as featured image. Unfortunately without ftp access there isn't anything more I can do :disappointed:

    In my installation I used the "class_wdqs_admin_pages.php" file which I have attached in this reply and the same snippet as in previous reply, but with a small typografical correction, so you can try once more:

    add_filter( 'status_import_image', 'wpmudev_status_import_image', 10, 2 );
    
    function wpmudev_status_import_image( $thumbnail, $data ){
    
    	if( $thumbnail == '' ||  !Wdqs_ImageDownloader::is_local_image($thumbnail) ){
    		return 'http://the-path-of-your-default-image.jpg';
    	}
    
    	return $thumbnail;
    
    }

    Please make sure you have replaced the image url.

    Regarding your request to reorder the link, you can edit file
    wp-content/plugins/quick-status/lib/forms/link_preview.php

    I have attached a modified file which places the link after the content which you can try.

    Thanks!
    Panos