Archive for the ‘DM Albums’ Category

Improved Windows (WAMP) Support in DM Albums April 13th, 2010

Through help from the community, we have been able to improve support for DM Albums™ on Windows-based PHP installations such as WAMP.  The resolution may also alleviate problems experienced by users on non-Windows based PHP installations, so if you have had trouble in the past, this release  may help you as well. Please report any further problems or successes you have in the comment section or email the developer.

WAMP Support Needed February 11th, 2010

Well, the good news is that DM Albums™ seems to be picking up in popularity.  One of the great things about the open-source world and the collaboration it brings is that users give feedback, the developer(s) respond with support, bug fixes, or new features, and the product eventually becomes much better than it ever would have been just through isolated evolution.   Think Galápagos Islands: the weirdness of those animals out there, living according to their own specialized evolution is like software built in a vacuum.  Through your requests, this software has grown to meet a far broader set of needs than it was originally intended for.  I think that’s great.

The bad news is that through the growing exposure, it’s becoming increasingly apparent that DM Albums™ has a big, hairy problem when running on WAMP implementations.  We thought we were headed down the right path to WAMP righteousness and justice, when out of the blue, a user running WAMP revealed an implementation that was completely divergent to what we’d understood WAMP to be and what that meant for providing support on this system.

Here at Productions, we are LAMP people and we are in need of someone with expertise in WAMP and it’s many implementation possibilities to lend some assistance and help get WAMP support implemented in DM Albums.  If you have this background and are willing to donate your time, please contact the DM Development Team.  If you have managed to get the plugin running on WAMP, please let us know what you did so we can incorporate your experience into the knowledge base.

Thanks for using DM Albums, and thanks for continuing to influence it’s evolution.

Vote to Bring DM Albums™ to WordPress 3.0 December 31st, 2009

Dear Community,

We here at Productions have been working hard to respond to your requests to add features that you, our users, would like to see in our products. This is particularly true of DM Albums, which has grown from being a small embed-only album to being a tool that is fully integrated with WordPress, allowing for photo album management directly from within WordPress – giving uploading, caption editing, and even drag-n-drop photo sorting directly via the WordPress post editor. In addition to that, the DM Albums™ Options Panel allows you to customize the tool extensively, while the UI is CSS-driven, allowing for customization of the album’s appearance to fit your blog’s look.

If you like DM Albums, Productions would like to ask you to visit the WordPress forums and vote to have DM Albums™ become the standard photo gallery tool for WordPress 3.0.  Through the added support from the WordPress development community, DM Albums™ would benefit from a larger developer base, more formalized integration and better compatibility with all flavors and versions of WordPress.  This effort would also help bring in the development resources to implement the three most urgently-needed features: vertical thumbnails, a visual UI editor, and internationalization.

Productions would like to thank you for your support, for using our products, and for providing us with your feedback.  Without your support and ideas, the product would not have grown into the mature photo album management system that it is today.

Thank you, and we wish you all a very happy and prosperous New Year.

Productions

DM Albums™ 2.4 Released December 22nd, 2009

DM Albums™ 2.4 has been released. This release adds two often-requested features and one major security update.

Read the rest of this entry »

DM Albums™ and WAMP Fatal Error November 10th, 2009

It has been brought to the Development team’s attention that DM Albums™ does not activate when installing on a WAMP (Apache, MySQL, PHP on Windows) installation.  The plugin will download and install without problem, but when activating, you will get the following error:

Plugin could not be activated because it triggered a fatal error.

= 0) { $contents[$i] = $file; $i++; } } closedir($dir); natcasesort($contents); $contents = array_values($contents); return $contents; } function dm_get_caption($photo) { $caption = “”; if(file_exists(dirname($photo) . “/browse.cap”)) { $lines = file(dirname($photo) . “/browse.cap”); foreach($lines as $line) { //line starts with the image name, remove image name and leading whitespace, display caption $matches = array(); $matchcount = 0; $matchcount = preg_match_all(“/(^” . basename($photo) . “:\s)(.*)/i”, $line, $matches); if($matchcount > 0) { $filename = $matches[0][1]; $caption = trim($matches[2][0]); if(strlen($caption) > 0) return trim(“$caption”); else return trim($caption); } } } return $caption; } function dm_put_caption($photo, $displaycaption) { $directory = dirname($photo); $picturename = basename($photo); $captionfilename = $directory . “/browse.cap”; if(!file_exists($captionfilename)) { fopen($captionfilename, “x+”); } $lines = file($captionfilename); if(count($lines) == 0) $lines = array(); $foundcaption = 0; $linecount = 0; while($linecount < count($lines)) { $line = $lines[$linecount]; //line starts with the image name, remove image name and leading whitespace, display caption $matches = array(); $matchcount = 0; $matchcount = preg_match_all("/(^$picturename:\s)(.*)/i", $line, $matches); if($matchcount > 0) { $foundcaption = 1; $filename = $matches[0][1]; $caption = $displaycaption; $lines[$linecount] = “$picturename:\t$caption\n”; } $linecount++; } if($foundcaption === 0) { $lines[$linecount] = $picturename . “:\t$displaycaption\n”; } $linecount = 0; $captionfilecontents = “”; while($linecount < count($lines)) { if(preg_match("/^\s$/", $lines[$linecount]) != 1) $captionfilecontents = $captionfilecontents . $lines[$linecount]; $linecount++; } $fh = fopen($captionfilename, "w+"); $captionfilecontents = html_entity_decode($captionfilecontents); $captionfilecontents = stripslashes($captionfilecontents); fwrite($fh, $captionfilecontents); } function dm_get_title($photoalbum) { $ablum_title = ""; if(file_exists($photoalbum . "/browse.cap")) { $lines = file($photoalbum . "/browse.cap"); foreach($lines as $line) { //line starts with the image name, remove image name and leading whitespace, display caption $matches = array(); $matchcount = 0; $matchcount = preg_match_all("/(^DM_ALBUM_TITLE:\s)(.*)/i", $line, $matches); if($matchcount > 0) { $filename = $matches[0][1]; $ablum_title = trim($matches[2][0]); if(strlen($ablum_title) > 0) return trim(“$ablum_title”); else return trim($ablum_title); } } } return $ablum_title; } function dm_put_title($album, $displaycaption) { $directory = $album; $captionfilename = $directory . “/browse.cap”; if(!file_exists($captionfilename)) { fopen($captionfilename, “x+”); } $lines = file($captionfilename); if(count($lines) == 0) $lines = array(); $foundcaption = 0; $linecount = 0; while($linecount < count($lines)) { $line = $lines[$linecount]; //line starts with the image name, remove image name and leading whitespace, display caption $matches = array(); $matchcount = 0; $matchcount = preg_match_all("/(^DM_ALBUM_TITLE:\s)(.*)/i", $line, $matches); if($matchcount > 0) { $foundcaption = 1; $filename = $matches[0][1]; $caption = $displaycaption; $lines[$linecount] = “DM_ALBUM_TITLE:\t$caption\n”; } $linecount++; } if($foundcaption === 0) { $lines[$linecount] = “DM_ALBUM_TITLE:\t$displaycaption\n”; } $linecount = 0; $captionfilecontents = “”; while($linecount < count($lines)) { if(preg_match("/^\s$/", $lines[$linecount]) != 1) $captionfilecontents = $captionfilecontents . $lines[$linecount]; $linecount++; } $fh = fopen($captionfilename, "w+"); $captionfilecontents = html_entity_decode($captionfilecontents); $captionfilecontents = stripslashes($captionfilecontents); fwrite($fh, $captionfilecontents); } function dm_get_album_datecmp($a, $b) { return ($a[1] > $b[1]) ? -1 : 1; } function dm_get_album_alphacmp($a, $b) { return (strtolower(basename($a[0])) < strtolower(basename($b[0]))) ? -1 : 1; } function dm_get_album_delete($album) { $handle = opendir($album); while (false!==($item = readdir($handle))) { $type = filetype($item); if($item != '.' && $item != '..') { if($type != "link" && is_dir($album.'/'.$item)) { dm_get_album_delete($album.'/'.$item); } else { unlink($album.'/'.$item); } } } closedir($handle); rmdir($album); } function dm_sanitize($folder) { $bad_chars = "/[^\w\s\(\)\:\.-]+/"; $replacement_chars = ""; $folder = trim(preg_replace($bad_chars, $replacement_chars, $folder), '/\\'); $folder = str_replace("..", "", $folder); $folder = str_replace("/", "", $folder); $folder = str_replace("\\", "", $folder); return $folder; } function dm_getuploaddirectory() { global $blog_id; if(get_option('DM_ALBUMS_UPLOADDIR') == "" || get_option('DM_ALBUMS_UPLOADDIR') == "/") { update_option('DM_ALBUMS_UPLOADDIR', get_option('DM_ALBUMS_CORE_DEFAULT_UPLOADDIR')); } return str_replace("{BLOG_ID}", $blog_id, get_option('DM_ALBUMS_UPLOADDIR')); } function dm_user_uploaddirectory() { $DM_UUP = get_option('DM_ALBUMS_UUP'); if($DM_UUP == 1) { global $current_user, $_POST, $_GET; get_currentuserinfo(); $user_upload_directory = $current_user->user_email; if(!isset($user_upload_directory) || empty($user_upload_directory)) { $user_upload_directory = isset($_POST["dm_uud"]) ? $_POST["dm_uud"] : $_GET["dm_uud"]; $user_upload_directory = str_replace(“../”, “”, $user_upload_directory); $user_upload_directory = str_replace(“/”, “”, $user_upload_directory); $user_upload_directory = str_replace(“\\”, “”, $user_upload_directory); $user_upload_directory = str_replace(“‘”, “”, $user_upload_directory); $user_upload_directory = str_replace(“\”", “”, $user_upload_directory); $user_upload_directory = trim($user_upload_directory, ‘/\\’); } //$user_upload_directory = str_replace(“@”, “_at_”, $user_upload_directory); return $user_upload_directory . “/”; } } function dm_is_wpmu() { if(is_dir($_SERVER['DOCUMENT_ROOT'] . ‘/wp-content/mu-plugins’)) return true; else return false; } function dm_isUserAdmin() { global $blog_id; // NON WPMU AND ADMINS if(!dm_is_wpmu() && current_user_can(‘level_10′)) return true; // WPMU AND BASE BLOG if(dm_is_wpmu() && $blog_id == 1) return true; return false; } ?>

We have been able to reproduce the error and are working on a resolution. Check back for further updates.

UPDATE @ 11/10/2009 2:30 Pacific
The cause of this error has been identified as being the opening shorthand PHP tag in /wp-content/plugins/dm-albums/php/includes.php. To resolve the issue, change the first line of this file from <? to <?php.

Productions is correcting all shorthand PHP tags and will be issuing a service release after testing is complete. As always, thank you for your support and feedback.

UPDATE @ 11/16/2009Pacific
As a temporary work around, the performance issue can be resolved by adding the directory, wp-content/uploads/dm-albums/. Once we have full functionality verified on WAMP, we will be issuing an update with full WAMP support.