Viewing 3 replies - 1 through 3 (of 3 total)
  • godrox

    (@godrox)

    Yeah, I have this same problem.

    The URL for the image is:

    http://www.domain.com/?ak_action=api_record_view&id=POSTIDNUMBER&type=feed

    The id= number changes for each post. Any idea how to fix this?

    Here is what I did to fix it.

    1.) Upload a blank 1×1 gif.
    2.) Edit popularity-contest/popularity-contest.php
    3.) Search for function akpc_api_record_view
    4.) Comment out the following line.
    header(‘Content-type: image/jpeg’);
    5.) Just below that line add the following.
    header(“Location: /blank_image.gif”);

    Just adjust the location to wherever you uploaded the blank gif in step #1.

    Here’s a fix that’s all in code:

    replace

    header('Content-type: image/jpeg');

    with

    header('Content-type: image/png'); // set the content type
    $blankimg = imagecreatetruecolor(1,1); // create an image
    imagesavealpha($blankimg, TRUE); // enable transparency saving
    $trans_color = imagecolorallocatealpha($blankimg, 0, 0, 0, 127); // set the transparent "color"
    imagefill($blankimg, 0, 0, $trans_color); // fill the image
    imagepng($blankimg); // output the image
    imagedestroy($blankimg); // clear memory

    The problem is that the php is sending a content type header, telling the browser that the subsequent data is an image… but then it doesn’t send any data, so the browser interprets that as a missing image. The code above simply creates a transparent 1px png and sends the data. That way you don’t need to perform a redirect as in the solution above.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Popularity Contest] popularity contest throwing up “blank image” in RSS Reader’ is closed to new replies.