Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorephraim
    • CommentTimeJan 23rd 2016
     

    so now that I'm giving advertisers access to managing their own ads, I'm discovering two issues:

    1) Some customers think 100% jpgs are better. I am constantly having to login and re qual their jpgs to 75% so my readership isn't having a cow and my bandwidth usage isn't going through the roof.

    2) What happens to the old graphic when the user changes the ad? Does the system ever throw it away? it looks to me like the uploads directory is just continuing to grow.

    is there a way to manage these two issues?

    Thanks

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeJan 23rd 2016 edited
     
    Project Admin

    For the first point, you could add something to OIO's "include/upload.php" file, just after the "chmod" line of code, to automatically compress jpegs:

    //set file name
    $file_dest = $this->upload_dir . $this->name;
    $file_ext = pathinfo($file_dest, PATHINFO_EXTENSION);
    //resize jpg?
    if(function_exists('imagejpeg')) {
    if($file_ext === 'jpg' || $file_ext === 'jpeg') {
    $resource = imagecreatefromstring(file_get_contents($file_dest));
    imagejpeg($resource, $file_dest, 75);
    imagedestroy($resource);
    }
    }

    For the second point, OIO doesn't delete the old image when an edit is made, but I've updated the "include/purchase.php" file to do that. You just need to re-download OIO and upload that file again.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorephraim
    • CommentTimeJan 26th 2016
     

    Simon,

    I've made these changes and they work like a charm. Thanks!

    Is it also possible to have the system toss the image if the entry is deleted from the rejected or expired lists?

    Need help?  Quick start guide | Troubleshooting | All help topics