Archive for November, 2010
Fixing Shutter Speed on Autofocus Theme
Nov 23rd
I have installed and activated Autofocus theme for my photo gallery earlier on while setting up this site. The shutter speed was not working when you click on the EXIF information as per described by the author of the theme. I did some online research and I think I have gotten it working. Take a look at this for working example of shutter speed been display as a fraction in the EXIF information.
Below is what you need to do inorder to get yours working.
- Login to your wordpress installation and activated Autofocus theme
- Click on “Appearance” follow by “Editor”
- Select “Themes Functions (functions.php)” under the list of Templates
- Locate the codes for EXIF. It should start with something like below
// Convert the shutter speed retrieve from database to fraction DOES NOT WORK ON THE LIVE SERVER FR SOME REASON >:-|
if ((1 / $imgmeta['image_meta']['shutter_speed']) > 1) {
… …
… …
… …
echo “<li><span class=\”exif-title\”>Shutter Speed:</span> ” . $pshutter.”</li></ul>”;
}
- Replace them with the below codes
// Convert the shutter speed retrieve from database to fraction DOES NOT WORK ON THE LIVE SERVER FOR SOME REASON >:-|if ((1 / $imgmeta['image_meta']['shutter_speed']) > 1){if ((number_format((1 / $imgmeta['image_meta']['shutter_speed']), 1)) == 1.3or number_format((1 / $imgmeta['image_meta']['shutter_speed']), 1) == 1.5or number_format((1 / $imgmeta['image_meta']['shutter_speed']), 1) == 1.6or number_format((1 / $imgmeta['image_meta']['shutter_speed']), 1) == 2.5){$pshutter = “1/” . number_format((1 / $imgmeta['image_meta']['shutter_speed']), 1, ‘.’, ”) . ” second”;}else{$pshutter = “1/” . number_format((1 / $imgmeta['image_meta']['shutter_speed']), 0, ‘.’, ”) . ” second”;}}else{$pshutter = $imgmeta['image_meta']['shutter_speed'] . ” seconds”;}// Start to display EXIF and IPTC data of digital photographecho “<ul><li<span class=\”exif-title\”>Date Taken:</span> ” . date(“d-M-Y H:i:s”, $imgmeta['image_meta']['created_timestamp']).”</li>”;//echo “<li><span class=\”exif-title\”>Copyright:</span> ” . $imgmeta['image_meta']['copyright'].”</li>”;//echo “<li><span class=\”exif-title\”>Credit:</span> ” . $imgmeta['image_meta']['credit'].”</li>”;//echo “<li><span class=\”exif-title\”>Title:</span> ” . $imgmeta['image_meta']['title'].”</li>”;//echo “<li><span class=\”exif-title\”>Caption:</span> ” . $imgmeta['image_meta']['caption'].”</li>”;echo “<li><span class=\”exif-title\”>Camera:</span> ” . $imgmeta['image_meta']['camera'].”</li>”;echo “<li><span class=\”exif-title\”>Focal Length:</span> ” . $imgmeta['image_meta']['focal_length'].”mm</li>”;echo “<li><span class=\”exif-title\”>Aperture:</span> f/” . $imgmeta['image_meta']['aperture'].”</li>”;echo “<li><span class=\”exif-title\”>ISO:</span> ” . $imgmeta['image_meta']['iso'].”</li>”;echo “<li><span class=\”exif-title\”>Shutter Speed:</span> ” . $pshutter.”</li></ul>”;}
- Click “Update File” button.
- It should be working now.
As a precaution, backup the original codes. Perform this at your own risk. I will not bear any responsibilities should you mess up / crash / damaged / screw up your wordpress installation and / or causes any lost of data.
Completed at last
Nov 21st
Finally, after many days of playing around with wordpress, I have completed setting up this site. From now on, all posts regarding my family life will go to http://dear.ly and everything else will come to here. I have also set up a simple photo gallery *click SNIPPETS OF LIFE on menu bar* whereby I will post up photos other than my family members. This blog will be all about ME, I and MYSELF.
If you are interested in finding out what plugins and what settings I’m using, feel free to ask.