Photopress 0.8.5
This version is still mostly bug fixes, so I’m sticking with 0.8.x. It should work well with both WordPress 2.0 and 1.5.2.
New features and fixes:
- Fixed a bad bug in the duplicate renaming function. Also added a maintenance function to clean up filenames if you’ve uploaded a few with bad names.
- Fixed the bug Nonni found where ampersands in category names messed things up. Photopress should now handle ampersands in category names just fine.
- Fixed a few problems with permalinks. They work differently in WP 2.0, so I’m handling it with some version-specific code, which sucks.
Download Photopress 0.8.5: photopress.zip OR photopress.tar.gz
As usual, let me know what’s broken or needs work. Thanks again for all the bug reports and feature ideas!
January 3rd, 2006 at 11:55 pm
For me everything works !!!
WP 2.0 / PP 0.8.5
January 4th, 2006 at 5:38 am
The permalinks is all right, all works for me too.
But I have a problem, when I active the Photopress plugin dissapear the image upload by defect of WordPress 2.0, can I have the two things simultaneously?
January 4th, 2006 at 9:20 am
Sorry, I have problems with Permalinks when there are more than one pages of photos, I only can see the first page.
January 4th, 2006 at 10:41 am
the insert photo at write page still isn’t working for me after the upgrade.. any solutions?
January 5th, 2006 at 4:30 pm
Please note that in line 120 for the photopress.php file there is a mistake in the XHTML formatting.
You incorrect put
$random_alt_text . ‘” />’ . $random_thumb .
which was followed by a close anchor tag
When you should have put
$random_alt_text . ‘” >’ . $random_thumb .
I haven’t had more time to find other bugs yet, but otherwise GREAT job on the 2.0 update -and fast too!
January 5th, 2006 at 10:11 pm
I”m getting the following error whenever I try to use the upload option:
tinyMCE object reference not found from popup
It’s annoying as hell….I downloaded the latest version of PhotoPress and that didn’t seem to do anything for me.
January 6th, 2006 at 2:03 am
Indeed, permalinks do not work for multiple pages
January 6th, 2006 at 6:16 am
This release works better with my WP2 than the previous (Dec 28). Previously, clicking on the thumbnail/image in the blog entry would not take you to the album entry, but simply reload the blog page.
Now, clicking on the thumbnail/image, I do get to the album … yay! But - the album page has no styling (stylesheet not applied).
Any idea? What should I check?
January 7th, 2006 at 9:14 am
works perfect!!
January 7th, 2006 at 10:36 am
try reinstalling your PP release by deleteing the old files and uploading them again (not overwrite the old files).
It should be plug and play.
January 7th, 2006 at 12:16 pm
Have change thumbnails size to larger value AND made them “square” -> Mass resize doesn’t resize them. Says 0 images 0 thumbnails.
January 7th, 2006 at 3:36 pm
Thanks, Shrikee - but I had already installed a fresh, latest copy of PP.
Isaac was so kind to email me, suggesting that I probably need to edit the two album files; which is what I’ll look into.
January 7th, 2006 at 4:38 pm
Update: I have now identified the problem, and it’s unfortunately the permalinks option.
January 8th, 2006 at 12:46 am
Hope everything works now for you Britta.
I noticed Isaac does quite a big deal of personal support
A vert nice touch if you ask me! Not many do that…
January 8th, 2006 at 2:16 pm
Req:
Update photo file. (Overwrite the old one and take all parameters of old one: name, description etc…)
IF the new file has different name THEN rename it in to the old file name.
I think update functionality should be on photo edit screen + during new file upload (if same name then optional OVERWRITE or RENAME)
BTW. switched to WP 2.0 Everything works fine!
January 8th, 2006 at 3:09 pm
My fixes:
pp_mass_resize() function works not with ORIGINAL files but with resized. Actually it will be useful to start work FROM originals. My code is:
— First I have fix the pp_folder_contents() and add a new parameter $include_originals=true So the final function is:
function pp_folder_contents($include_originals=true) {
global $pp_options;
$allowedtypes = trim(strtolower($pp_options['allowedtypes']));
$allowedtypes = preg_replace(”/ /”,”|”,$allowedtypes);
$fileglob = ‘@\.(’ . $allowedtypes . ‘)$@i’;
$handle = opendir($pp_options['photospath']);
$list_array = array();
while (false !== ($folder_contents = readdir($handle))) {
$image_name = substr($folder_contents, strlen($pp_options['thumbprefix']));
$is_original = strpos($pp_options['origprefix'], $image_name);
if (($include_originals || !$is_original) && (preg_match($fileglob, $folder_contents)) && (strstr($folder_contents, $pp_options['thumbprefix'])) && is_file($pp_options['photospath'] . ‘/’ . $image_name)) { // make sure both thumb and regular image are there
$list_array[] = $image_name;
}
}
@closedir($pp_options['photospath']);
if (count($list_array) > 1) {
sort($list_array);
}
if (count($list_array) > 0) {
return $list_array;
} else {
return FALSE;
}
}
There are 2 new strings in fuction:
$is_original = strpos($pp_options['origprefix'], $image_name);
if (($include_originals || !$is_original) && (preg_match($fileglob, $folder_contents)) && (strstr($folder_contents, $pp_options['thumbprefix'])) && is_file($pp_options['photospath'] . ‘/’ . $image_name)) {
— Second. pp_mass_resize() Gets files from folder WITHOUT originals. THEN takes originals and copies them to resized ONLY if resized need to be REresized ( thumbs can be done from resized). And only then resizes the files. It also checks IF originals option is enabled in options. IF not enabled then works as usual. Final:
function pp_mass_resize() {
global $pp_options;
$images = pp_folder_contents(false);
$thumbsdone = 0;
$imagesdone = 0;
foreach ((array)$images as $image) {
$pathtoorig = $pp_options['photospath'] . ‘/’ . $pp_options['origprefix'] . $image;
$pathtoimage = $pp_options['photospath'] . ‘/’ . $image;
$pathtothumb = $pp_options['photospath'] . ‘/’ . $pp_options['thumbprefix'] . $image;
$imginfo = getimagesize($pathtoimage);
$thumbinfo = getimagesize($pathtothumb);
if ($imginfo && $thumbinfo) {
if (($imginfo[0] != $pp_options['maxsize']) || ($imginfo[1] != $pp_options['maxsize'])) {
if ($pp_options['originals'] == ‘1′ && !copy($pathtoorig, $pathtoimage)) { echo “failed to copy $pathtoorig TO $pathtoimage\n”;}
}
if (($imginfo[0] != $pp_options['maxsize']) || ($imginfo[1] != $pp_options['maxsize'])) {
if (pp_resize($pathtoimage, $pp_options['maxsize'], 0, ”, 0)) {
$imagesdone++;
}
}
if (($thumbinfo[0] != $pp_options['thumbsize']) || ($thumbinfo[1] != $pp_options['thumbsize'])) {
if (pp_resize($pathtoimage, $pp_options['thumbsize'], $pp_options['thumbsize'], $pp_options['thumbprefix'], 1)) {
$thumbsdone++;
}
}
}
}
return array($imagesdone,$thumbsdone);
}
January 8th, 2006 at 6:20 pm
Another useful addon for edit image page - link to EDIT posts which use the image. Addon for pp_album_management():
echo ” . __(’Posts with this image:’,'photopress’) . ‘
‘;
while ( have_posts() ) : the_post();
echo ‘‘;
the_title();
echo ‘ | ‘;
edit_post_link();
echo ”;
endwhile;
echo ”;
January 9th, 2006 at 3:06 pm
Just found. Photopress disables standart file upload panel in WP 2.0 Write. Why?
January 9th, 2006 at 6:29 pm
@Roge
WP 2 changed the button API a little bit. Based on Owen Winkler button snap class it’s easy to fix that.
@Jedi Rory
tinyMCE object reference not found from popup
On the popup.php
if (get_user_option(’rich_editing’) == ‘true’) {
include_once(ABSPATH . ‘wp-includes/js/tinymce/tiny_mce_popup.js’);
}
The Problem: the if – it’s better to add an extra option (variable) for the upload click.
January 10th, 2006 at 4:10 am
nekkarcity: already fixed But I’m really sure “File Uploader” on/off should be optional. Many users might be confused.