Live and Relax

7 Jan 2009 Autum Color#2

Filed under: Photoblog — ghorse@8:07 PM

Photo taken on the way from Hemu to Hanas, Xinjiang. [lang_en]Autum Color#2[/lang_en][lang_cn]秋色#2[/lang_cn]

Click here to view EXIF data.

7 Jan 2009 Autum Color#1

Filed under: Photoblog — ghorse@8:07 AM

Photo taken on the way from Hemu to Hanas, Xinjiang. [lang_en]Autum Color#1[/lang_en][lang_cn]秋色#1[/lang_cn]

Click here to view EXIF data.

6 Jan 2009 Receive the Polaroid PoGo

Filed under: Personal — ghorse@8:59 PM

Thanks for Jasmin for sending this little gem to me.   The Polaroid Pogo is a tiny portable printer using Polaroid ZINK technology.  It could be connected directly to my DSLR and print.  That’s it, so simple and elegant.   Let me show your how it looks like.


kfl_1845

I think if Polaroid hired me to help them with product photography, they will not go bankrupt. :-P

(more…)

6 Jan 2009 Morning at Hemu

Filed under: Photoblog — ghorse@8:07 PM

Photo taken at Hemu, Xinjiang. [lang_en]Morning at Hemu[/lang_en][lang_cn]禾木之晨[/lang_cn]

Click here to view EXIF data.

5 Jan 2009 Under the clouds

Filed under: Photoblog — ghorse@10:33 PM

Photo taken at Hemu, Xinjiang [lang_en]Under the clouds[/lang_en][lang_cn]云之下[/lang_cn]

Click here to view EXIF data.

5 Jan 2009 Upgraded to Wordpress 2.7

Filed under: Site Notes & News — ghorse@4:15 PM

This website have been upgrade to latest wordpress release in 2009.  So there is a good start very everything new.  The user experience this still same as the theme in wordpress 2.6 is still working in wordpress 2.7.  The nextgen gallery have been update to ver 1.02 also.  The highslide is working well with the new nextgen gallery and no modification is needed. The photo2post need some modification as the new nextgen have some changes in coding .  The manage.php and mange-images.php need to have some modification.  In manage.php, the following code is added right before the “case ‘import_meta’” line for the photo2post functionality:


case ‘photo2post’:
// refer to begining of file for reference of $post
$post_status = ‘open’;
$post_author = 1;
$post_category = array(9);    //check and adjust for the post category ID for post created
$post_content = ”;
$post_status = ‘publish’;
$post_title = ”;
$post_type = ‘post’;
$tags_input = array(’x1′,’x2′);

$time_difference = get_option(’gmt_offset’) * 3600;
if ( is_array($_POST['doaction']) ) {
$post_count = 1;
foreach ( $_POST['doaction'] as $imageID ) {
$post_title = $wpdb->get_var(”SELECT alttext FROM $wpdb->nggpictures WHERE pid = ‘$imageID’ “);
$post_content = $wpdb->get_var(”SELECT description FROM $wpdb->nggpictures WHERE pid = ‘$imageID’ “);

$tags_input = wp_get_object_terms($imageID, ‘ngg_tag’, ‘fields=names’);

if ( is_array($tags_input) ) $tags_input = implode(’, ‘, $tags_input);

$post_content .= ‘<p>[SinglePic not found]</p><a class=”highslide”  href=”http://ghorse.org/wordpress/wp-content/plugins/nextgen-gallery/admin/showmeta.php?id=’.$imageID.’” onclick=”return hs.htmlExpand(this, {objectType: \’iframe\’, wrapperClassName: \’exif\’} )” >Click here to view EXIF data.’;
// copied from wp-mail.php/
$ddate_U = time(); //get current unit time stamp add by KF
$ddate_U = $ddate_U + ($post_count*12*3600); //set post 12 hours apart starting 12 hours from now
$post_count = $post_count+1;
$post_date = gmdate(’Y-m-d H:i:s’, $ddate_U + $time_difference);
$post_date_gmt = gmdate(’Y-m-d H:i:s’, $ddate_U);

// copied from wp-mail.php/
$p2post = compact(’post_content’,'post_title’,'post_date’,'post_date_gmt’,'post_author’,'post_category’,'post_status’,'post_type’,'tags_input’);
$post_ID = wp_insert_post($p2post);
if ( is_wp_error( $post_ID ) )    echo “\n” . $post_ID->get_error_message();
}
nggGallery::show_message(__(’Photo to Post Finished ‘,”nggallery”));
}
break;
case ‘import_meta’:
// Import Metadata

The new version of nextgen gallery have merged its tag handling with the wordpress tags database, so the method of retrieving tags related to an image is changed as indicated in the red lines of codes above.  Other than that, the photo2post code remains the same.


In manage-images.php, the following line of code is added to triggering the photo2post function right after the “move_to” action line:


<option value=”copy_to” ><?php _e(”Copy to…”,’nggallery’)?></option>
<option value=”move_to”><?php _e(”Move to…”,’nggallery’)?></option>
<option value=”photo2post”><?php _e(”Photo2Post”,’nggallery’)?></option>       

The ablum display is still not working with language switcher plugin and the modifcation in the following post is still needed:


http://ghorse.org/wordpress/2008/10/fix-the-nextgen-gallery-album-display-with-language-switcher/


5 Jan 2009 Along the river#4

Filed under: Photoblog — ghorse@10:33 AM

Photo taken at Hemu, Xinjiang [lang_en]Along the river#4[/lang_en][lang_cn]沿河一景#4[/lang_cn]

Click here to view EXIF data.

4 Jan 2009 In a woods#11

Filed under: Photoblog — ghorse@10:33 PM

Photo taken at Hemu, Xinjiang [lang_en]In a woods#11[/lang_en][lang_cn]白桦林#11[/lang_cn]

Click here to view EXIF data.

Older Posts »

Blog powered by WordPress