flickr plugin

photo:1383151351 I’ve installed the flickr tag plugin and am testing it.

eta: yes, well, that went well, eventually. Only took minor rewriting of the plugin to make it work. (It apparently was written for PHP5 and this server has 4.4.7.) Still, it is pretty cool, this plugin. The only problem I have is that I would like to be able to select which size of image I use on a case by case basis, whereas the plugin assumes to show the square thumbs for sets and tags and the medium size for single photos. (Which I changed to the square ones. I am thinking I could perhaps reasonably easily modify the script to allow choosing when you are writing your entry but I don’t know if that’s allowed, can’t seem to see anywhere what the license on it is.)

flickr plugin

2 thoughts on “flickr plugin

  1. Sure..

    The only problem I had with it was that it used file_put_contents which is new to PHP5 and not available on my server. It was simply a matter of replacing that section, which was right at the end of the file flickr.php, with the relevant fopen, fwrite, fclose functions.

    #### file_put_contents(FLICKR_PLUGIN_CACHE_DIR . "/" . $cache_key . ".cache", $r, LOCK_EX);
    # apparently file_put_contents() is a php 5 function. i don't have php 5.
    # int file_put_contents ( string $filename, mixed $data [, int $flags [, resource $context]] )
    # This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file.
    # If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flags is set.
    $jade = fopen(FLICKR_PLUGIN_CACHE_DIR . "/" . $cache_key . ".cache",'w+');
    fwrite($jade, $r);

    I see that the author has actually updated the plugin since I installed it and the file structure is a little different, I am not sure if this problem will still apply. If it does you probably just need to find the relevant place in the new files for it.