PictPress 0.99



Update: The newest version is PictPress 1.0.

PictPress is a WordPress 1.2 plugin that automatically generates a post with thumbnails and picture posts for all images found in a directory. Thumbnails and pictures are resized on the fly and stored in a cache directory. For an example see my post with pictures of a Treble concert.

Requirements

  • PictPress needs either the ImageMagick convert program or the GD2 library to resize images.
  • PictPress optionally uses exif_read_data or the rdjpgcom program to read comments from the images.; exif_read_data is also optionally used to read EXIF data like picture date etc.
  • You will need some other means to upload images to subdirectories of the WordPress upload directory.

Installation

  1. Unzip pictpress.zip in the plugin directory of your WordPress site. This creates a pictpress plus a pictpress.php file.
  2. Go to the Plugin admin page and press the install link.
  3. Enable the PictPress plugin on the Plugins admin page.
  4. Make sure that you have configured a valid destination directory for Uploads under Options Misceallaneous and that the web server has write access to the upload directory.

Usage

  1. First upload one or more JPEG images to a subdirectory of the WordPress upload directory according to the setings for pp_image_dir
    (I use %year%/%monthnum%/%postname% myself).
  2. Then create a new post that will use this directory (in my case by maing sure that date and Post Slug are the same as used for the directory).
  3. When pressing Publish, thumbnails for all images will be appended to the post (with a --more-- marker after the first five thumbnails) and for each image a picture post will be generated. The thumbnails have links to the picture posts and the pictures have links to the full resolution images.
  4. Titles for the picture posts are either set to the JPEG comment or to the image filename.
  5. Captions under the thumbnails are set to the corresponding picture post titles and follow updates being made to the titles.
  6. When updating a post, any new images in the image directory are merged with the existing post and the thumbnails are replaced by the new set. This is the way to include new pictures after these have been added to the image directory. Edits to posts between the PictPress comment tags are lost; other edits are kept.
  7. Picture posts are suppressed from the post overview pages and in principle should only appear on pages of their own.

Configuration

There are a number of options that can be confgured via the PictPress options form that can be reached from the WordPress options pages.

  • Location of image directory
  • Location of cache directory for resized images
  • URL used for resized images
  • Size of thumbnails and images on picture pages
  • Maximum number of thumbnails per page
  • Number of thumbnails before more…
  • Image resize method, ImageMagick or GD2.
  • Strings for use in title, alt attribute, captions.
  • Protect images against referrers from other web sites yes/no.
  • Automatically insert CSS header yes/no
  • Generate a single post for all pictures yes/no; this switches back to the behaviour of the previous version, see the PictPress 0.91 description.

The strings used for title etc. can contain the following variables:

  • %aperture%, EXIF aperture setting
  • %comment%, JPEG comment
  • %date%, EXIF DateTimeOriginal
  • %digitized%, EXIF DateTimeDigitized
  • %edited%, edited date
  • %exif%, table with all info returned by exif_read_data
  • %exposure%, EXIF ExposureTime
  • %focallength%, EXIF FocalLength
  • %height%, height of image in pixels
  • %iso%, EXIF ISOSpeedRatings
  • %make%, camera manufactureer
  • %model%, camera model
  • %modified%, file modified date
  • %size%, file size in bytes
  • %sizekb%, file size in kilobytes
  • %sizemb%, file size in megabytes
  • %title%, title of picture post
  • %width%, width of image in pixels

Template Functions

The following template functions can be used in index.php (I put them at the top of the menu section myself):

  • pp_prev_thumb(), generate thumbnail for previous picture post if applicable.
  • pp_next_thumb(), generate thumbnail for next picture post if applcable.
  • pp_navigation(), generate navigation section with link to post with thumbnails, thumbnail for previous picture post, and thumbnail for next picture post, all if applicable.

95 Responses to “PictPress 0.99”

  1. Stephen says:

    I just finish installing the plugin and it’s working fine. A few notes…

    1 - You will need to add “position: relative;” to the .thumbnail section of the pictpress.css file. Explorer has a CSS bug (a lot of them, really) and the pictures will not display without this fix. This line will not affect how the pictures appear in other browsers.

    2 - Your docs make no mention of having to execute the install.php file for the new plugin. I’m not sure what they install, but after doing so it brought me to a new options menu where I could configure numerous options. All users should execute this before attempting to upload pictures.

    3 - Users must configure the line in Wordpress under options/miscellaneous to allow file uploads, even if you don’t normally want to allow them. The defualt /home/your/site (…) URL will cause pictures to fail to load.

    4 - The script drawns upon the address in #3 and merges it with the address in options/pictpress/pp_image_dir to form the address where the pictures are kept. It’s easy to accidently duplicate a directory or a slash by accident. If your pictures aren’t loading, check on this.

    Otherwise, the script is now working fine on my end. Thanks for taking the time to write this plugin.

  2. Stephen says:

    One more thing. You must also add the “position: relative;” line to the .image (not .image img) section of the pictpress.css file.

  3. Stephen says:

    I found one unusual side effect of this plugin. When adding pictures, the plugin creates a new entry for each picture. So uses can click on a thumbnail and automatically reach the page with the individual picture on it. The entry that is created for each picture is done so on the photograph date as recorded within the .jpg file, not the date of the file itself. So if you upload old pictures you may suddenly find yourself with archives going back to past months before you even had a blog.

    Oddly, when clicking on a given month’s archive it only shows the single-picture entries if there are no blog entries for that month. I assume this holds true for days on the calendar but haven’t tested it on there as I don’t use the calendar on my site. So for example, I am currently designing a blog for a new site. It will go online later this month and so all entries will begin in September. One of my pictures was taken in August, so it automatically created an August archive with an August entry for that picture. If I change the timestamp on a legitimate message to August though, clicking on the August archive will no longer reveal the picture entries, but only the legitimate entry.

    The count function of how many entries were made in August counts the picture entries regardless of whether or not you see them when you click on the archive. So if I have two pictures from August and one legitimate message in August, I will only see one message if I click on the August archive. But the site will still list the archive as having three entries inside it.

    Ideally, I would like to see…

    - the new entries created for each picture be created with the same date as the initial blog entry, not the date the picture was taken.
    - the entries not be included in the count function for how many entries exist within that month.

    One more thing. Going to the “edit” function in the administration area finds a similar issue as the old archives. It won’t list the new message entriesies except in months where there are no “legitimate” messages. I assume that whatever solution can be devised for the above issue will also fix this as well.

  4. Curioso says:

    Stephen,

    1. I will add the position: relative

    2. Pressing the install link on the Plugin admin page was mentioned in the doc.

    3. I will mention configuring the upload dir in the doc

    You can disable the filtering out of picture posts by commenting out the line “add_action(”wp_head”, “pp_filter_children”);” in pictpress.php
    I am still uncertain myself about the best way of handling this.

  5. Stephen says:

    You’re right on the install link. I missed that while looking over the instructions. If others miss it you might need to make it more idiot-proof, like write, “run install.php” or something. Never underestimate the power of people to ignore important directions. :)

    As for the individual picture entries, what I would like to see is the program create them using the current date rather than the date the picture was initially created. I’ll go tinker with your program to see if I can figure out how to do that (as it’s not your job to do my custom programming), but you might want to create it as an option for future use. Otherwise it’s extremely awkward to have old archives that serve no useful purpose except for holding a message or two with the individual picture. Better the entries go within the month the regular blog entry was created.

  6. Stephen says:

    Found another issue. pp_image_size (as defined in the options/pictpress area) says it is the maximum image size on the pictire pages. It appears to actually be the minimum image size as well. Meaning that while larger picture are shrunk down, smaller pictures are blown up to that size as well.

    You may want to allow smaller pictures to display normally instead of being forced to blow up where they will appear more blurry.

  7. Stephen says:

    After four hours of pouring over Curioso’s excellent plugin I figured out how to tweak the plugin so that all new picture pages created are marked with the same date.

    Inside pictpress.php, look for the “create new post” routine within function pp_add_picture_posts. It’ll be start on line 341 or so. Look about ten lines below for two places with the phrase: $image->time. Replace them with time().

    That should solve it. I have not experimented with the single entry format option (whereby it doesn’t create individual entries for each picture), so this may have no effect on that.

  8. Curioso says:

    I will prevent resizing to a larger size in the next version.

    I will make it optional to set the date of the picture posts to that of the image.
    If chosen not to, the picture post will have the same date as the post with the thumbnails.

  9. Stephen says:

    Thanks for hearing me out. I was able to edit your code to accomplish that in this version.

    In chass.image.php, look around line 170-175 (not sure of the exact #) for this bit:

    $html .= $this->GetImgRef($this->GetURL(),
    get_settings(’pp_image_size’));

    Comment it out, and replace it with:

    if ($this->width > $this->height)
    $largeside = $this->width;
    else
    $largeside = $this->height;
    $originalmaxsize = get_settings(’pp_image_size’);
    if ($largeside < $originalmaxsize)
    $maxsize = $largeside;
    else
    $maxsize = $originalmaxsize;
    $html .= $this->GetImgRef($this->GetURL(), $maxsize);

    That’ll cause the pictures to be displayed so that the pictures never blow up beyond the picture’s original size.

    Note that it will affect thumbnails too on the off chance you add a picture to a posting that is less than your thumbnail size. I believe (but am not sure) this also overrides the plugin’s natural “fail safes”, whereby an image is always at least 16 pixels in size and never more than 1000.

    Thanks for making such a useful script. It’s working well for me now so I hopefully won’t need to comment again. At least until your next version. ;)

  10. Stephen says:

    So much for not posting any more. Somehow only half the additional code was posted. Tack this on right after the above addition.

    $maxsize = $largeside;
    else
    $maxsize = $originalmaxsize;
    $html .= $this->GetImgRef($this->GetURL(), $maxsize);

  11. Wayne Colby says:

    Thanks so much for the plugin. I’m planning on installing it this afternoon but your demo post looks great so I’m excited.

  12. John Sahl says:

    I have tried installing PictPress, but no matter what I do, I cannot get it to create any thumbnails. Do you have any idea what I am doing wrong? I must admit to be a total geek when it comes to Linux/Apache, so I am having a hard time understanding your desscription of the URL’s.

    In the article “Test” there should be 3 images, but it simpley dont generate any thumbails, even though it finds the pictures I have uploaded.

    Any help?

    Greetings from Denmark

    John

  13. hairmare says:

    THX for a really great plugin… Being able to use scp/ftp for upping pics is what really makes me trust it!

  14. Curioso says:

    John, you have a problem with writing to the image cache directory. The resize.php script gives the following error message on your system:

    Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 539 is not allowed to access /home/websetter.dk/public_html/wordpress/wp-content/images/cache/100 owned by uid 80 in /home/websetter.dk/public_html/wordpress/wp-content/plugins/pictpress/resize.php on line 61

    You can see these error messages when you open the image in a separate window (View Image in Firefox).

  15. John Sahl says:

    So basically I cannot use it on a webserver thats setup with safemode on? :-(

  16. John Sahl says:

    I created the folders manually, setting them up with CHMOD 777 and its now generating the images, but it does not show them inside wordpress/pictpress.

    It does how ever show them here:
    http://www.websetter.dk/wordpress/wp-content/images/cache/500/2004/09/test/109-0924_IMG.JPG

    Is it some sort of error in the wordpress URL to the thumbnail?

  17. Curioso says:

    John, I have no clue what is going on.
    The resize.php script does return the full image with size=0, and that works on your system. However for the scaled images, it returns some kind of garbage, maybe a directory entry, I can only recognize a string ‘2004′ in there…

    So your readfile($image) is working, while readfile($cache) returns garbage.
    Maybe you can dump the variables $image and $cache to see if they are correct.

    I have no experience with safe mode, but my understanding is that safe mode should still allow read/write access to your site directory from your own scripts.

  18. John Sahl says:

    Could you be a bit more specific about $image and $cache? Where do I find it? (Sorry for bugging you like this, but I like your system very much ;-)

  19. Curioso says:

    Just before ‘// Resize image’, you add the two lines

    echo “image: ‘$image’, cache: ‘$cache’\n”;
    exit;

    and then you do a View Image on one of your thumbnails (open it in a separate window). You can then check if these two point to the right file.

  20. John Sahl says:

    Done, and it puts out this:

    image: ‘/home/websetter.dk/public_html/wordpress/wp-content/images/2004/09/test/109-0925_IMG.JPG’, cache: ‘/home/websetter.dk/public_html/wordpress/wp-content/images/cache/100/2004/09/test/109-0925_IMG.JPG’

  21. Curioso says:

    This looks OK, and I have checked that I can access the files in the cache directory…
    I have no clues left…. sorry.

  22. Kevin says:

    It looks like your plug-in will do exactly what I want and is very well-written - but I don’t understand the directions for using it at all.
    Please take a few minutes to clarify the instructions rather than make every user go line-by-line through your code.

    I have a default directory where WordPress upload files are placed, but I don’t understand where you say I should upload the pictures. Do I change the WordPress upload directory to year/month/slug every time I want to upload a picture? I tried creating a number of different folders, but PictPress could never find the images no matter what folder-naming format I tried.

    Could you please explicitly describe the steps involved? I’m sure your app works correctly, but I’m just not understanding the steps needed to create a PictPress post.

    In my case, my default WordPress image directory is tmp/images. Does your app create the year/month/slug directories or do I need to do that? Do I need to change the WordPress image upload directory to that y/m/s format or does your app place the thumbnails there appropriately? When I create a post, how do I link it to the thumbnails (the slug)? How do I create a post that does not involve a photo - I’m getting error messages now with every post because WP is trying to find the appropriate picture(s) for it.

    Thanks for a bit more direction…

    you are assuming that users will understand what you are thinking rather than actually describing what is needed.

  23. geek and proud says:

    […] 3, 2004 Gallery The gallery is back up, thanks to PictPress. PictPress is a WordPress plugin that makes it easy to set up a reasonable looking galler […]

  24. Brian says:

    I just got your pluging working and I love it. But I did come across one thing I would like to mention, I don’t know if it can be fixed.

    My site is set to show the last 20 posts, and I put up a photo posting that had about 58 pictures. There are only about 3 unique posts that should show, (a fourth is hidden with ViewLevel) but when I view the default site, it only shows me the last post I put up. I figure Wordpress is counting the 50 or so pictures that will not show up in such a view. Is there anyway around this? I can set my site to show the last 14 or so days, but I may not update my site that often.

    You can see the difference here (only 9 days span the 3 posts)
    http://www.binarynomad.com/blog/
    http://www.binarynomad.com/blog/2004

  25. Curioso says:

    Kevin, you have to create the subdirectories in the upload directory yourself. I can write directly to the upload directory on the server from my iMac, so I have no need for the WordPress upload functionality. If you have no other means of uploading, you should probably look for some other plugin that allows creating subdirectories in the WP upload directoy and uploading to them…

    Brian, you are correct, the picture posts are included in the count, and then removed by a PictPress filter. I currently do not know a way around this, except hacking the wp-blog-header.php file, which I haven’t done. WP 1.3 will probably have better hooks to control this.

  26. Brian says:

    Ok, so my examples in comment (24) probably will not work anymore, I switched from multipost picts to single post pics.

  27. Jeremy Cherfas says:

    Next and previous: did anything get done about implementing Next and Previous navigation? i cannot seem to find anything.

    Thanks for a great lug-in.

    Jeremy

  28. Fuat says:

    For some reason, there are no images created in the cache dir. I read the previous comments and tried a few suggestions, but no thumbnails are created. The links work to get the original file.

  29. Fuat says:

    It appears that it doesn’t grab the Image size, so none of the Thumbnails show up. Not sure how to fix this, any help would be appreciated.

  30. Fuat says:

    Well I think I figured out the problem, the install.php script only adds the first 3 options, the others are left out for some reason…any ideas?

  31. Fuat says:

    Fixed my problem.

  32. Fuat says:

    Me again, I ran into a similar problem as Brian did. It seems that if there are more that 50 pictures in a folder, it doesn’t want to do anything at all. Been trying to look through some of the code, but have found anything, if you could please help me out with this, i would really appreciate it.

  33. John says:

    I think there should be an option to not allow users to access the original picture. It takes up a lot of bandwidth since I have 4 megapixel images.

  34. ferg wide web » Site News says:

    […] D and picture pages. I’m also working on getting a Wordpress plugin set up called PictPress. This plugin allows you to post an album of pictures in one post. An example is here. I […]

  35. Shoeb Omar says:

    Hey all,

    Love the plugin but need a little help on trying to understand what JPEG comments are, and how to add them to pictures. I have a series of jpegs I’d like to add comments to using windows xp. I thought I did it by going into Image properties -> Summary and editing the comments, but the plugin doesn’t seem to be reading that info - where should I be looking?

    Thanks

    - Shoeb Omar

  36. Mats says:

    Maybe i’m stupid but i can’t figure out how to get the images into the posts?

  37. Philippe Frizé says:

    I finally managed to properly install Pictpress, as you can see at http://www.frize.de/.

    However, I cannot get the right text displays : the thumbnails always show the file name instead of the JPEG comment (I did set that option), and the image posts show an empty exif data list.

    Is it because “PictPress optionally uses exif_read_data or the rdjpgcom program…” ? And is there anything to do in order to convert this “optionally” into “actually” ?

    Thanks for your help, and for this great plugin.

  38. Curioso says:

    Philippe, your images do not appear to contain JPEG comments, so PictPress falls back to using the filename. I am not sure what is wrong with the EXIF data. PictPress calls exif_read_data if this function exists. Is it available on your PHP installation?

  39. Philippe Frizé says:

    Curioso,
    I realized that the exif_read_data function is not available at my host. I have another question: I need to do some serious clean-up, but I cannot delete the ‘cache’ directory and subdirectories created by Pictpress, and I cannot either ‘chmod’ the files that they contain - probably because they are owned by the server. I tried to run a cleanup script that I found in the Singapore photo gallery tool, but it did not work. Is there a workaround ? (by the way, your sample gallery is a bliss, Vermeer is one of my favorites painters)

  40. Curioso says:

    Philippe, you might try to install a file manager script, I have no experience myself, so I cannot give any pointers.

  41. frogbrain says:

    Hi Curioso,

    I’m liking your plugin so far! Just a few questions though:
    1. image place holders show up but the url is still /%postname%/thumb/ instead of replacing it with the actual postname. I implemented the mod rewrite as well as placing %postname%/thumb as the pp_resize_url and pp_cache_dir. Am I missing something?

    2. Is there a way to prevent linking to the fullsize image?

    Thanks for letting me post ;) not all developers have to time to help answer questions… so thank you!

  42. frogbrain says:

    oop, forgot to post: my test post is the Toronto Zoo

  43. Curioso says:

    Frogbrain,

    1. pp_chache_dir is currently a static directory, with limited substitutions, so %postname%/thumb will not work. You might try something like %path%/thumb/%size% for pp_cache_dir…

    2. Preventing linking to the full size image will be an option in a future version. In the current version you might edit the resize.php script to change the behaviour when size==0 is asked for, change the line
    if (!is_numeric($size)) {
    to
    if (!is_numeric($size) || $size == 0) {

  44. frogbrain says:

    Thanks Curioso, I had assumed that the thumbnails would be stored rather than dynamically generated every time (which would be a nice feature :) (or, is there a quick way I can get it to store thumbnails in my %postname%/thumb directory?)

    One more problem: the url linking the thumbnail to the full size image is incorrect -> /?p=14&page=2. Where can I change this to include my blah.php everytime it generates?

  45. Paul V says:

    Well sensational install set up no bugs at all.

    I am stuck on posting the link to what directory.

    Please read my question at wordpress support.
    http://wordpress.org/support/topic.php?id=5292

    cheers
    Paul V

  46. Paul V says:

    i get this when i place a link to image as i normally would in a new post.

    <!–pp-thumb-start–>
    <!–PictPress found no dir /home/vanderwe/public_html/somethin-tropical/images/wp-images/crayfish/2005/01/and-another-photo-test–>

  47. Paul V says:

    <!--pp-thumb-start--><!--PictPress found no dir /home/vanderwe/public_html/somethin-tropical/images/wp-images/crayfish/2005/01/and-another-photo-test-->

  48. Paul V says:

    arrrhhhggg i cant get the code to paste even with the code tag

  49. Paul V says:

    ok I post a comment with a pic in it and the pic shows but no thumb - it says in the post when I go to edit it - directory does not exsist images/blah/blah….

  50. Paul V says:

    It says this

    PictPress found no dir /home/vanderwe/public_html/somethin-tropical/images/crayfish/2005/01/testing1

  51. Curioso says:

    Paul, does this directory exist?
    I saw there is a directory Crayfish and your server’s file system seems to be case-sensitive (as it should be ;-) )

  52. Paul V says:

    yep is sure does - i created the directory images - crayfish and also put 2005 and 01 just to be sure

  53. Paul V says:

    ok you got the first mistake lol well done I have been pooring over this for the last 10 hours the directory was case sensative and i was calling it crayfish and the directory is Crayfish. deerrrrrr

    But nothing happens.

    I usually upload my images through the cpannel

    So do I just upload a image to the crayfish directory than insert an image in a post as I normally do?

  54. Paul V says:

    still saying

    PictPress found no dir /home/vanderwe/public_html/somethin-tropical/images/Crayfish/2005/01/clyde-river-crayfish-euastacus-clydensis-

  55. Curioso says:

    Paul, PictPress looks for images in a directory associated with the postname, so I assume you set the upload directory to images/Crayfish and had a postname like “Clyde river crayfish - Euastacus Clydensis”, and then it will construct the above directory name, which does not exist. So if you upload to that directory and re-publish your post, you should get further.

    I am aware that lots of things can go wrong, next will be the availability of GD2 or ImageMigick and being able to create a writable cache directory….

  56. Paul V says:

    Ok

    I uploaded an image called Clyde-River(Euastacus-clydensis).jpg

    Into the directory /public_html/ somethin-tropical/ images/ Crayfish /2005 / 01/

    Then wrote a test post titled “Clyde River Crayfish Euastacus clydensis”

    In the post I used the image code to call that image from that directory.

    The image shows as it normally does and that is it.

    When I edit the post at the bottom it has the same message;
    –pp-thumb-start—pp-thumb-start—PictPress found no dir /home/vanderwe/public_html/somethin-tropical/images/Crayfish/2005/01/clyde-river-crayfish-euastacus-clydensis—pp-thumb-end-

    the < has been removed as I can not seem to paste code…

  57. Paul V says:

    The upload directory set in pictpress is
    Crayfish/%year%/%monthnum%/%postname%

    The cache directory set is
    /cache/%size%/%path%

    The resize directory set is
    http —-somethin-tropical.epaulv.com/wp-content/plugins/pictpress/resize.php?size=%size%&path=%path%
    ignor the http—-

  58. Alexander C. says:

    I just tried to install your plugin on a fresh WP 1.5 installation. It fails to execute several SQL commands when I run the setup-script. It looks like the variable containing the table names has changed in the new WP version. Can you fix this?

    Errors:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE group_name = ‘PictPress'’ at line 2]
    SELECT group_id FROM WHERE group_name = ‘PictPress’

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(group_name, group_desc) VALUES (’PictPress’, ‘Settings]
    INSERT INTO (group_name, group_desc) VALUES (’PictPress’, ‘Settings used by PictPress plugin.’)

  59. Curioso says:

    There is a 1.0 alpha version at http://svn.wp-plugins.org/pictpress/trunk/pictpress.zip that should work with 1.5.

  60. bic says:

    Thanks for this great plugin Curioso!

    I’m having a problem with setup though - I don’t seem to be getting the PictPress options under WP>Options. So I can’t really set my preferences. When I try to use the plugin it works except that the image tags in the posts (thumnail and image) have src=”" in the source code. Any ideas?

    Thanks everyone,

    bic

  61. bic says:

    oops - I should say that I’m using WP 1.5 and the 1.0 alpha PictPress plugin

    Thanks again,

    bic

  62. Jason says:

    Hi Curioso,
    Thanks for the plugin. But I have a problem after upgrading to 1.5. I already install to the pictpress 1.0 alpha. Still have problems.
    I find that it directly goes to the file directory when I click the postname link:
    http://www.deluvor.com/project/2005/01/19/black-and-white/
    While the thumbnails are created correctly here:
    http://www.deluvor.com/project/2005/01/19/black-and-white/1/

    How to fix the problem?

    By the way, how to create nice URL for resized images?? You mentioned providing a RewriteRule in .htaccess to the resize.php script. What does that mean?

    Thanks!!
    Jason

  63. Curioso says:

    Jason,

    1. I suppose the rewriterules WP is generating do not work if a directory exists with the same name. You will have to move your pictures to a different directory.

    2. You can specify your own URL for resized images, but then you have to add your own rewriterule for it, e.g.

    RewriteRule ^resize/([0-9]+)/(.*) /wordpress/wp-content/plugins/pictpress/resize.php?size=$1&path=$2 [QSA]

  64. Jason says:

    Curioso,
    I have moved the pictures to http://www.deluvor.com/project/2005/01/19/ and change pp_image_dir to %year%/%monthnum%/%day%/, but the same problem still occur!!!!

    Jason

  65. Curioso says:

    The directories that you are using are the same as the permalink structure WP is using. WP generates rewriterules for these permalinks, but these do not work if a directory or file exists with the same name as a permalink.
    I suggest you use something like pictures/%year%/%monthnum%/%day% for your picture directory.

  66. Jason says:

    Thanks Curioso. It works now. Surprisingly, there is no such problem before WP 1.5.

    But I still have one problem. For pp_resize_url, should it change it to “cache/%size%/%path%” and add
    RewriteRule ^resize/([0-9]+)/(.*) /wordpress/wp-content/plugins/pictpress/resize.php?size=$1&path=$2 [QSA] to the .htaccess??

    Thanks for your help again!!!

    Jason

  67. Curioso says:

    For pp_resize_url you should use “resize/%size%/%path%” with this rewriterule.

  68. Jason says:

    Thanks Curioso!!!

  69. Christine says:

    Thanks for the plug-in, it works well. Just one thing had me going crazy and that was the datestamp of the posts.
    I have an old site that I want to convert and I have picture galleries that are time depedent (events that happened in the past) and I wanted to set the timestamp of the post in the past. It kept ignoring my efforts to update the timestamp of the main (thumbnail) post (I had it set to a thumbnail post and separate posts for each picture). It kept on using the current time. Then after about 2 hours I realised that I had to set the option on the timestamp of the picture posts (pp_use_picture_time) to OFF. Only then did it accept my edited timestamp. So even when pp_use_picture_time was ON, it wasn’t using the picture time, it was using current time.

    Anyway, I’ve solved the problem for myself for now, so I am happy!

    Thanks again for the great script
    Christine

  70. Curioso says:

    Even with pp_use_picture-Time to on, you shouls have been able to adjust the timestamp of the main post, I have been doing this regularly, so I am puzzled…

    But in the most recent version at http://svn.wp-plugins.org/pictpress/trunk/pictpress.zip pp_use_picture_time is also used for the main post, it will take the timestamp of the first thumbnail.

  71. Jason says:

    hey man,

    I really want to get this script to work!

    I’ve done everything I can think of. I’ve added some test images to a post here: http://www.jasonlevis.com/wordpress/?p=6 following your instructions to the “T”.

    I’ve tried both GD2 and ImageMagick, added the line to the .htaccess file, made sure the upload directory is writeable and run the rebuild update every time, but i I can’t get it to work! The actual images are there when you click through. It’s just the thumbnails that aren’t getting created. No errors appear either. I’m lost.

    Can you take a look?

    Thanks,
    Jason

  72. Jason says:

    I just tried removing the comment line from the pictpress.php file like you suggested to another person and I get this error when I try to make a new post with a photo attached:

    Warning: Missing argument 2 for pp_get_image_path() in /home/jasonl/public_html/wordpress/wp-content/plugins/pictpress.php on line 153

  73. Curioso says:

    Jason, if you open the thumbnails in a separate window you get this error messages:

    Warning: mkdir(/home/jasonl/public_html/wordpress/wp-content/cache): Permission denied in /home/jasonl/public_html/wordpress/wp-content/plugins/pictpress/resize.php on line 64

    Apparently the /home/jasonl/public_html/wordpress/wp-content directory is not writable.

  74. Mick says:

    Cool plugin! How much work would be involved in displaying the IPTC information of an image?? I use iView to organise all my pics and it allows you to add all kinds of IPTC info which would be great to display on a page.

  75. Curioso says:

    I have no experience with IPTC.

  76. John Minnihan says:

    (Please forgive the double post - can’t tell which one of the threads you’re more likely to see… both?)

    Hey Curioso,

    This plugin looks great, but I am having trouble getting the thumbnails produced. So far, I can create a new post, supplying the pre-made directory full of images (and the matching postslug). PictPress generates the post, creates the cache dir but doesn’t create the thumbnails (or at least doesn’t place them anywhere I can see)

    I have allowed for echoing of $image and $cache per your suggestions in above comments, and it looks like the cache directory is null - see below message from my browser when I click on what should be the full-image link:

    PictPress loaded image: ‘/usr/local/apache2/htdocs/wordpress/wp-content/2005/06/hawaii/john-and-boys-hawaii.jpg’, cache: ‘’

    While this is probably a smoking gun, where can I look to ensure that it isn’t simply a symptom of another issue? I have set cache dir in the options, but have also noticed there is no “Save” or “Update Options” button on the pictpress options page… maybe the options aren’t really set?

    I am using:

    - Fedora core 3
    - PHP 4.3.11 ‘./configure’ ‘–with-apxs2=/usr/local/apache2/bin/apxs’ ‘–with-mysql=/usr/local/mysql’ ‘–with-gd’ ‘–with-zlib’ ‘–with-jpeg’
    - Wordpress 1.5
    - Pictpress 1.0alpha plugin from subversion
    - Firefox 1.0.4 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4)

    The server is under my full control, so I can make any edits suggested.

    Thanks in advance,

    John Minnihan
    Founder, https://freepository.com

  77. Curioso says:

    John, the WP 1.5 pictpress options form was indeed missing the submit button, fixed now.
    I did not notice this because I am still running WP 1.2.
    Please try again with the new form.

  78. John Minnihan says:

    Thanks for the quick fix on the ‘Update Options’ button. I’m sorry to report that my issue remains - the cache directory is created, but no thumbnails are produced. This isn’t a showstopper for me, so you needn’t spend any more time on it unless you are bored or curious…

    Any suggestions for things to review are welcome, however. I’ve tried using both ImageMajick and GD2 with the same results.

  79. John Minnihan says:

    Thanks for the quick fix on the ‘Update Options’ button, but… unfortunately the problem persists. I have tried using both ImageMagick and GD with the same results.

    I have an “Image Testing” post on my site for review that has various image sizes. Interestingly, the one image that *appears* to be presented as a thumbnail was already that size, so perhaps PictPress used it unmodified? No way that I can see to determine that, but the cache dir continues to get created (i.e. cache/2005/06/100/image-title/ ) but is empty.

    Any additional insight you can provide is appreciated,

  80. Curioso says:

    John, it appears to work now on your site.
    I have no idea what happened…

    One additional hint if thumbnails are not appearing: if you load the URL for the image in your browser, you should see any error mesages that are generated by the resize.php script that is generating the thumbnails.

  81. paul says:

    Is it possible to NOT use permalinks in my wordpress configuration ???
    Thank you very much. I’m french and i can’t find a clear answer.

  82. Curioso says:

    Paul, you do not need permalinks enabled to use PictPress.

  83. joe davidson says:

    hey guys.. i need some help.. i want to use this great plugin, i installed the alpha, installed perfectly.. but nothing i read in the read me or comments answers teh simple question of how do i make a post with images from a folder… when i’m creating a new post i dot see any option to add images or add a folder of images so i’m really confused.. can anyone help.

  84. Ted says:

    Hi - I have downloaded and installed the plugin on a wp 1.5.1.3 installation. Produces thumnails and posts, but I get this error

    Warning: main(ABSPATH/wp-admin/auth.php): failed to open stream: No such file or directory in /home/……./public_html/wp/wp-content/plugins/pictpress/edit-subtitles.php on line 8

    Fatal error: main(): Failed opening required ‘ABSPATH/wp-admin/auth.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/………/public_html/wp/wp-content/plugins/pictpress/edit-subtitles.php on line 8

    edit-subtitles seems to be looking for a file “wp-auth” that doesn’t exist in my 1.5.1.3 installation. Any ideas? Thanks - looks like a great plugin. I assume this is for editing subtitles…would be great to have this functionality.

  85. Curioso says:

    The problem with edit-subtitles.php should now be fixed.

  86. Ted says:

    Unfortunately, I am still getting this error, even after downloading the 8/31/05 distribution:

    Warning: main(/home/…../public_html/wp/wp-admin/auth.php): failed to open stream: No such file or directory in /home/……/public_html/wp/wp-content/plugins/pictpress/edit-subtitles.php on line 9

    Fatal error: main(): Failed opening required ‘/home/……/public_html/wp/wp-admin/auth.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/…../public_html/wp/wp-content/plugins/pictpress/edit-subtitles.php on line 9

    It appears that there is no such file “auth.php” in the Wordpress 1.5.2 distribution.

    The post is created correctly as are the thumbnails, just no ability to edit subtitles due to this problem. Thanks for working on this!

  87. gratzo says:

    Hello - this looks like a great plugin, wondering if anyone is out there for a quick (hopefully) hand at getting pictpress properly configured. Couple of items I’m having trouble with;

    1. I’ve created an image directory that looks like this “../wp-content/ppimages/2005/09/mia”, and when I try and make a new post (that’s dated in this month, 09/2005), it pulls all of the pictures in the image file. Is there any secret to naming the file something completely different so this doesn’t occur?

    2. I’m getting the same error message as comment #86, I uploaded the PictPress file this evening, 1.0 alpha, running it on WP 1.5.1.2 There is no auth.php file in the wp-admin folder. Is it looking for a different file?

    thanks in advance for your help!

  88. Curioso says:

    Gratzo,

    1. Is mia the postname?
    PistPress will pull in all pictures from the directory associated with the post.
    The way I work is to divide pictures over many directories.

    2. I still have to fix this, I am aware of the problem.

  89. gratzo says:

    Curioso, mia was not the postname, the postname was “Baby Mia Pics”. The folder that the images are in is called mia, the path is “../wp-content/ppimages/2005/09/mia”. What I can’t figure out is why when I do a post with a completely different subject, such as “The Housing Bubble”, which of course is posted this month (09), and this year (2005), it pulls all of the pictures out of the mia folder again. I’m wondering if I need to call the mia folder something different, rename the pictures…don’t know!

    This plugin looks by far the best photo/blog tool out of all of them, I’d really like to make it work!

    thanks again!

  90. Curioso says:

    Gratzo, you must include %postname% in pp_image_dir (or something else that makes the directory unique for each post).

    What PictPress does is for each post you do, it looks at the corresponding image directory (according to the settings of pp_image_dir), and if it exists, it includes all images in that directory. So you have to make sure that each post will have a different image directory.

  91. Terry Gregory says:

    Hello

    I just installed PictPress at http://gregoryology.com and have receieved the following results:

    The thumbs and the images are not positioned correctly. I am aware that the images are not sharp - that is because I uplodsed 250pixel - wide images as original resolution.

    I have this error but I have no clue what this means. I am a novice in php so don’t worry if you want to explain to me as you would to a child.

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND comment_approved = ‘1′’ at line 1]
    SELECT COUNT(comment_ID) FROM wp1_comments WHERE comment_post_ID = AND comment_approved = ‘1′;

    What did I do wrong?

    Thanks for your help.

  92. Curioso says:

    Terry, the error message looks like a call to comments_popup_link outside the post loop, nothing to do with PictPress on first sight.

    The positioning might have to be tweaked in your CSS files, depending on the theme you are using.

  93. gratzo says:

    Curioso - I’ve had mixed success with the PictPress plugin w/WP 1.5.x.x, but looking for the latest version. I have a 1.0alpha, 1.0beta, and your site list’s the latest as the .99a. I’m trying to get rid of the “cannot modify headers error” when you hit the thumbnail title rename button - it only errors if you try to rename it, all else works fine, and wanted to make sure I’m looking at the latest plugin code.

    thanks, this is a great plugin, trying to get it totally dialed in!

  94. Curioso says:

    I still have to look into the cannot modify headers error. It is harmless, it worked in WP 1.2 to switch to the updated post, but stopped working in WP 1.5.

  95. Curioso says:

    The modify headers error is fixed not, I bumped the version to 1.0 and will post a full announcements.

    I will close comments here.