/* BeejBlog */

Zenphoto – Hide ‘Dot’ Files

Pretty annoying there’s no easy built in way to not show images based on hidden file attribute. Best I could determine, one must implement dos “attrib” command or equivalent from PHP “exec” on every file in order to respect hidden file attribute (that sounds like way too much overhead to add on to my already pokey image gallery). I’m floored file attribs aren’t part of a more robust PHP file object but I guess this kind of stuff is hard to support in an OS neutral way.

I decided to run with renaming to .file.jpg and then hide those. Using ‘dot’ to represent hidden is very standard and pretty straightforward to accomplish the hiding via Zenphoto’s image_filter plugin API.

Zenphoto team provides generic image_filter sample to start with here: http://www.zenphoto.org/news/filter-file_searches

My dot file specific implementation (zero rocket science here): https://docs.google.com/open?id=0B5htuLP66oWlOFRnSElPVktlVTA

Drop php file in your zenphoto\plugins folder and enable via admin > plugins tab.

Add Video overlay Icon to Zenphoto Thumbnails

  • Edit \zp-core\template-functions.php, look for printCustomSizedImage() function and edit it to switch to using style=”background:url(‘’)” as shown below.
  • Configure overlay image:
    • Start with a completely transparent png the same height and width as your thumbnails (168 pixels in my case)
    • Find a preferred icon for the image (perhaps via Google Image Search) and paste that into your transparent background…
    • downsizing and hiding it in a corner is a nice effect
    • as well as adding a little bit of transparency
For example:
Video_Overlay

function printCustomSizedImage($alt, $size, $width=NULL, $height=NULL, $cropw=NULL, $croph=NULL, $cropx=NULL, $cropy=NULL, $class=NULL, $id=NULL, $thumbStandin=false, $effects=NULL) {
    global $_zp_current_image;
    if (is_null($_zp_current_image)) return;
    if (!$_zp_current_image->getShow()) {
        $class .= " not_visible";
    }
    $album = $_zp_current_image->getAlbum();
    $pwd = $album->getPassword();
    if (!empty($pwd)) {
        $class .= " password_protected";
    }
    if ($size) {
        $dims = getSizeCustomImage($size);
        $sizing = ' width="'.$dims[0].'" height="'.$dims[1].'"';
    } else {
        $sizing = '';
        if ($width) $sizing .= ' width="'.$width.'"';
        if ($height) $sizing .= ' height="'.$height.'"';
    }
    if ($id) $id = ' id="'.$id.'"';
    if ($class) $id .= ' class="'.$class.'"';
    if (isImagePhoto() || $thumbStandin) {
                      /* $html = '<img src="' . pathurlencode(getCustomImageURL($size, $width, $height, $cropw, $croph, $cropx, $cropy, $thumbStandin, $effects)) . '"' . */
        $html = '<img src="' . VideoOverlayIcon(pathurlencode(getCustomImageURL($size, $width, $height, $cropw, $croph, $cropx, $cropy, $thumbStandin, $effects))) . '"' .
            ' alt="' . html_encode($alt) . '"' .
            $id .
            $sizing .
            ' />';
        $html = zp_apply_filter('custom_image_html', $html, $thumbStandin);
        echo $html;
    } else { // better be a plugin
        echo $_zp_current_image->getBody($width, $height);
    }
}
 
function VideoOverlayIcon($url)
{
    if (isImageVideo()) return '/Photos/albums/Video_Overlay.png" style="background:url(' . $url . ')';
    else return $url;
}

Windows 8 Search Drops Outlook :(

Nutshell:
  • Windows 8 Metro search doesn’t include Outlook indexed items at all.
  • Windows 8 Explorer can be told to search Outlook items but only with Outlook 2010 (or older).
  • If you want to search Outlook 2013 in Win8, you must use Outlook 2013’s search.
References: