1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Post Images 1.8

Add thumb images to your posts

  1. UncleDanger

    UncleDanger New Member

    Sure thing, I'll PM you now.
     
  2. valMETNG

    valMETNG Administrator Staff Member Admin

    So the problem is actually with the media-body class in the bookmarking plugin. (I remember seeing this problem ages ago during a Bootstrap upgrade but don't remember which one.) Specifically, you'll want to modify the following files as such:

    Remove the media-body class by changing line 57 in \content\plugins\bookmarking\templates\bookmarking_list.php, line 51 in \content\plugins\bookmarking\templates\bookmarking_list_profiling.php, and line 50 in \content\themes\custom\bookmarking_post.php to:
    Code:
    <div>
    In later versions, Bootstrap also fixed a bug that had to do with 100% widths being required. So you'll also likely want to remove the 100% width by changing line 20 in \content\plugins\bookmarking\css\bookmarking.css to:
    Code:
    .show_post_content { margin: 0.4em 0 0.4em 0; overflow: hidden; }
    I believe those changes should solve the problem. (However, you seem to have a bunch of additional custom styles and classes in the post cotent that will likely also cause other problems. You might try removing all those as well if it still looks off.) Please let me know if it doesn't.

    @shibuya246: I believe these files will need to be updated in core for the next release.
     
  3. UncleDanger

    UncleDanger New Member

    I made these changes, and cleared the site cache, and nothing seems to have happened?

    Do you have any idea which of the custom styles this might be, if any of them?
     
  4. valMETNG

    valMETNG Administrator Staff Member Admin

    It doesn't seem that the changes took as I still see the class in there. (You can see for yourself by right-clicking on the image and choosing Inspect. This will pull up a window where you can see the actual HTML.) You did FTP the changes to your site, correct? You might want to look on your hosting provider and make sure the changed files are there.
     
    Last edited: Jun 8, 2016
  5. UncleDanger

    UncleDanger New Member

    You are extremely helpful. It was just the bookmarking_post.php file which didn't transfer properly.

    Thank you so much for your help!
     
    valMETNG likes this.
  6. robin007

    robin007 Well-Known Member

    how to hide post images on small devices. where can i add hidden class?
     
  7. valMETNG

    valMETNG Administrator Staff Member Admin

    The plugin doesn't have an option to do that so you'd have to build it. The post_images template display_image.php is the code that shows the image (specifically lines 15 - 25). So you'd probably want to create code earlier to decide what devices/size of devices not to show and if it's one of those devices, you could hide the whole div or just do a PHP return. Having said that, Hotaru - including this plugin - works on small devices because it uses Bootstrap (which is responsive). You might want to first try adding the img-responsive class to the image on line 11 like this:
    Code:
    $img = '<img class="media-object img-rounded img-responsive" src="'.$img.'" alt="Image of '. $h->post->title.'" title="Image of '. $h->post->title.'" width="' . $h->vars['post_images_settings']['w'] . '" height="' . $h->vars['post_images_settings']['h'] . '" />';
     
    robin007 likes this.
  8. robin007

    robin007 Well-Known Member

    Error Log
    PHP Warning: get_meta_tags(http://example.blogspot.com/2016/02/blog-post_18.html): failed to open stream: HTTP request failed! HTTP/1.0 503 Service Unavailable in /home/..../public_html/content/plugins/submit/libs/SubmitFunctions.php on line 823

    my post image showing black color.
     
  9. valMETNG

    valMETNG Administrator Staff Member Admin

    I assume you've changed your SubmitFunctions.php code because I believe get_meta_tags is on line 815. Although it showed up in your error log, this is a warning and nothing to be concerned about. A 503 service unavailable warning just means that the example.blogspot.com website was temporarily down when your Hotaru site went to get the meta tags.

    As far as the post image showing black, if it was just for that post with the 503 error code, that might be a temporary problem and if you try to edit the post_image for that post, it might now be OK. However, there's been much discussion in this thread about the black box (e.g., see here) as well as other threads (e.g., see comment in code here and referenced URL here). More than likely, it has something to do with the particular image you're trying to use is a transparent PNG file. There are a few posts (starting with this one) that describe potential fixes you can try. If the post_image showing black is only for that particular image but shows properly on others, you might not find it worth the effort to try to modify the code and, instead, might want to just select a different image for that post submission.
     
    robin007 likes this.

Share This Page