Finally, an update to my most popular plugin. Here is what’s happened:

If you’re writing a post and you upload an image, The (Insert CFI) button will be there. This is probably the most expected feature. Unfortunately, if you’re using the flash uploader, the button won’t appear immediately.

There is now a single admin page, with two boxes: one for settings and one for importing / exporting / deleting.

Last but not least, the plugin is now fully translatable.

All plugin features should work fine with WP versions older than the newly released 2.8, except for the CFI Loop widget.

PS: There’s also a new template tag: get_custom_field_image(). You can find out more about it in template-tags.php in the plugin dir.

Comments (43)

  • Hello, I have just updated Wordpress to 2.8 and CFI to 1.9 and now I am getting this error when using both the get_custom_field_image() and custom_field_image() tags:

    Fatal error: Call to a member function generate() on a non-object in [...]wp-content/plugins/custom-field-images/template-tags.php on line 26

    Does anybody know what is this?
    Thank you.

  • elvis says:

    Hi, does this work in the new wordpress 2.8?
    I have a fresh wordpress install with only CFI plugin installed.
    I don’t get the CFI button appearing in the ‘add image’ box.
    thanks
    elvis

    • scribu says:

      Yes, version 1.9 should work with WP 2.8.

      What browser are you using? Do you get any JS errors?

      Does the Insert CFI button appear if you go to another tab like Gallery?

  • elvis says:

    Hi, have tried ff3 & safari (on mac)
    don’t get any errors, can’t get CFI button at all, on just uploaded image, on previously uploaded image, on gallery/media library, tried using non-flash uploader, and going back to it after 5 mins, resaving preferences, still no button :(

  • elvis says:

    just tried on pc too, IE8 and FF3.
    same, no button.

  • mongushu says:

    Small bug found with WP 2.8 and the image file extension.

    For example, if I upload an image called ‘image.jpeg’ and then try to insert the medium sized image into the CFI field using the CFI button, I get ‘image-350×350x.jpeg’ .

    this doesn’t work. When Wordpress resized the image during upload it gave the new images an extension of .jpg, not .jpeg as the original file is.

    Safari 4, Firefox 3 Mac.

    Quick fix?

    • scribu says:

      I will fix just as soon as you run this little test for me:

      Upload a .png file and then tell me the extension of the generated thumb.

  • elvis says:

    Hi, sorry am still not getting my CFI button. Is there any other thing i can check?

    thanks
    elvis

  • Hannah says:

    on the settings page, any time I click the Save Changes button, my changes aren’t saving and I am getting:

    Warning: Invalid argument supplied for foreach() in /home/synotac1/public_html/wordpress/wp-content/plugins/custom-field-images/inc/scb/AdminPage.php on line 95

    I’m running on PHP5 and I just downloaded your plugin today. It’s happening on a 2.7 and a 2.8 installation.
    Ideas?

  • Bernhard says:

    Hi, I installed the plugin on WP2.7.1 but when I try to activate an error accure:
    Parse error: syntax error, unexpected T_CLASS in /kunden/169747_80807/wordpress-2.7.1-DE/wp-content/plugins/custom-field-images/custom-field-images.php on line 26.
    I have deactivated all other plugins – same happens.
    Any idea?
    Thank you! Bernhard

  • Bernhard says:

    the same happens with a WP2.8 installation:

    Parse error: syntax error, unexpected T_CLASS in /kunden/169747_80807/wordpress-2.8-DE/wp-content/plugins/custom-field-images/custom-field-images.php on line 26

    Both are using PHP5.

    • scribu says:

      If they were using PHP5, you wouldn’t be getting that error.

      Do a phpinfo() and tell me the exact version of PHP you’re using.

      • Bernhard says:

        sorry – you are right! It´s php4.48. The provider uses for *.php-file this version. To use php5 the extension should be .php5.
        Do you now an easy solution for that? maybe it works with something in the .htaccess in the WP-folder?

        • scribu says:

          The extension of the files shouldn’t matter.

          You have to ask your provider to upgrade, without you having to change the file extensions.

          • Bernhard says:

            Hi scribu – thanks a lot for your fast response and the hint to php-version! I just found a solution using .htaccess

  • Mike says:

    This is super..!
    I was looking for a plugin like this, that can use images from media library..
    And the (Insert CFI) button is just great..

  • soporte7 says:

    saludos
    tengo 5.2.9
    wordpress 2.7.1

    sale este error
    Parse error: syntax error, unexpected T_CLASS in /home/pranju2/public_html/wp-content/plugins/custom-field-images/custom-field-images.php on line 26

    cual sera la solucion de este problema
    gracias

    • scribu says:

      Add this line to wp-config.php and tell me what you get:

      var_dump(PHP_VERSION);
      • soporte7 says:

        saludos..esto es lo que aparece al colocar el codigo var_dump(PHP_VERSION);

        string(5) “4.4.9″
        Warning: Cannot modify header information – headers already sent by (output started at /home/pranju2/public_html/wp-config.php:65) in /home/pranju2/public_html/wp-includes/pluggable.php on line 850

        • soporte7 says:

          encontre la solucion..
          entre al cpanel de mi hosting..y me fije que la configuracion php estab standart
          active que sea configuracion php 5
          y se activo sin problemas el plugin..

          gracias…

  • elvis says:

    Hiya
    just to note here that the problem was that my plugin files had incorrect permissions. so on your advice chmod’ed the plugins directory to 755 and everthing was fine!
    thanks again for speedy help!
    cheers

  • Mike says:

    I’m looking for a new feature,don’t know if it is doable:
    what about assigning images to posts by image ID,So for example I can show medium sized images for each post on the home page.. and use the thumbnail sized images on a posts reel somewhere else..

  • juliane says:

    does this plugin work for multiple images? or just one?

  • I’m using this plugin on several sites but am now wanting to use it with timthumbs resizing script, however it requires the path to the image and not the url. Is there a way for cfi to give me the path to the image?

    • scribu says:

      In version 2.0 of CFI, you will be able to store the image ID, instead of the URL. Having the image ID, you can get the path using get_attached_file();

      You can try out 2.0rc1 by downloading the development version.