Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorbrent
    • CommentTimeMar 16th 2006
     
    Hi there,

    I'd like to use plogger for "Photocasting", Apple's new RSS hack for iPhoto. One can already do this with valid RSS feeds by setting up a Feedburner feed and using the feedburner feed as the Photocast URI. You don't get all of the functionality, but enough to keep Mom & Dad happy =).

    One problem that I'm having with the RSS feed in Plogger is that it times out. My webserver is pretty fast. The problem is that my photos are fairly large, and I don't want to broadcast cropped images. I set the RSS thumbnail width to 2048, since that is the full size of the images, and the number of items to 100.

    One solution to this problem would be if generate_thumb() did a check first to see if the image needs resizing before it goes ahead and runs it through GenerateThumbnail(). If the original image is the same size or smaller than the set thumbnail size, it should either copy the file as is to the /thumbs dir, or better yet, skip the I/O altogether and send a link to the original photo.

    Thoughts?
    •  
      CommentAuthormike
    • CommentTimeMar 16th 2006
     
    This may be a bug... the way it is supposed to work is that the RSS feed will only regenerate the thumbnails if you have changed the RSS thumbnail size. After that, it should just use the cached images.

    I checked on the Plogger demo page at http://www.plogger.org/demo/feed and it loads up instantly, using cached RSS images.

    Can you check your /thumbs/ folder for all images starting with rss- and see if the modified date is being updated? If so, there may be a server specific bug that is causing your thumbnails to refresh every time, which isn't good.
    • CommentAuthorbrent
    • CommentTimeMar 16th 2006
     
    It is indeed re-creating the thumbnails; no wonder its timing out. My webserver is running FreeBSD 5.4, apache 2.0.55_2, and mod_php 4.4.2_1,1 (ports). I have had some weird problems with php recently, where php's __FILE__ variable and basename() functions return relative paths, but everything seems to be working fine now.

    The problem is likely in plog-functions.php here:

    if (!file_exists($thumbpath) ||
    ($thumb_config['filename_prefix'] == '' && !$config['square_thumbs'] && $thumb_config['size'] != $height) ||
    ($thumb_config['filename_prefix'] == '' && !$config['square_thumbs'] && $width == $height) ||
    ($thumb_config['filename_prefix'] == '' && $config['square_thumbs'] && $width != $height) ||
    ($thumb_config['filename_prefix'] != '' && $thumb_config['size'] != $width) ||
    ($thumb_config['filename_prefix'] == '' && $config['square_thumbs'] && $thumb_config['size'] != $height && $thumb_config['size'] != $width))
    {
    ...

    One of those conditions is returning true when it shouldn't.
    • CommentAuthorbrent
    • CommentTimeMar 16th 2006
     
    I'll work on debugging this when I get a chance, and I'll report my findings. For now, I'm working around it by commenting out that whole if() block, until I add new photos.

    I'd like to add native "Photocasting" functionality to Plogger as well. There is some info out there about Apple's RSS mutilation, so it should be possible to hack up Ploggers existing RSS functionality to acheive the same results.

    I'll start with a copy of plog-rss.php, say, plog-photocast.php, and try to integrate that into the framework in a non-disruptive way.

    Cheers,
    Brent