Full image size: 12299 x 2806
I’ll post more Buffalo pictures soon.
I need to find a good full screen or full page zoomable image viewer for my site. I would write one, but I don’t have time…
Full image size: 12299 x 2806
I’ll post more Buffalo pictures soon.
I need to find a good full screen or full page zoomable image viewer for my site. I would write one, but I don’t have time…
I have finally created an OpenPGP public key for my email address (andre at area256.com). It is a 2048-bit RSA key for those who want to know.
If you want to send me an encrypted message, but do not have PGP setup for your system, I would recommend you check out GNU Privacy Guard and Enigmail for Thunderbird. Start with this tutorial: Enigmail Quick Start Guide
There are tons of other OpenPGP options available if you don’t like Thunderbird or GNU Privacy Guard, but many of them cost money (and are not open source).
I would like to sign all my messages with this key, but currently too few people have the software setup to be able to use the signature. So I’ll only sign messages for people who I know can make use of it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.10 (MingW32) mQENBEyAd78BCADlgOwHdG2nKzCOxNQQIwKwpzWv96aq2OG16nOdwZ74t4Z2C9E0 vh/YtxEUVTGmnsGTFLIHgE24LkOoeMF+A7DtVP99TRjUA6KnG6NE/8WsDwggjCJR f6SGt5IVQ1uhBPDsgX4ioytfroMW1/iAYzLJaGY5rLWEi82PJkg4PYbPyyRRTreT 6e/rDEwJxH9FNm7bMsvy+QeFdHDOaLciPSZAW0B13YbMhtm7yaBGkp8Bo2DGyjfq gP9q//bKebxJEQJPtHYNtui43QG0hwxII0V2uT+3FZO6Hk2BiSAvBSRr0/JxY85V krL4Y9dSKhXsv173ZVmEJ3GmJ2CvO4aaDUG5ABEBAAG0IEFuZHJlIFJlY25payA8 YW5kcmVAYXJlYTI1Ni5jb20+iQE+BBMBAgAoBQJMgHe/AhsjBQkJZgGABgsJCAcD AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRD+kgJTlX0sg+2+B/9r05VwkJxYEaB5VbqR TnSJi376HCILy1xd2HO/hTgiYaaHNouQINVFucz7pYeTYX79pVfMBBEnaxQrq8K8 pOU9JUyiScNsVu52+P4gDLSWZLxQHPqUuWk6NLt8NB0ph3oGEuIylUBNBW7KIlIX 9hq8BD+m+cuDis/6jP+i9peWYKmrPuG4NBUE7asaibROzI0vnkHJCnXlb2iKQi7o lbzzR7J4peuBgjXB6K1A7bfgpDMMuPNJm0Or6jw47c34hI2o2vTjNAM+eHo8rg/5 isl8ZIYjZ+Tpo3ii/25UyjrUANt0AnS1Max80D1RhNxSXdgycKCxNHNCwGffOQCL v4mQuQENBEyAd78BCACXF+1fxOEm/UwUIgFAbQnIrWJPa3trivK2L9Ex+Us2fURZ uAlaySA4vGa06xLCIN6+FjzXChUGlO99bniOm7SGPtGTJzgQ1StuVWL1avKZ6ZtK rNiLqKsPp39OSOT7aE53Qj9OANyI9259jnXjLeMq2+N3602sX6LoABM5W7U3NkRH bIM9flYVM8jHspnCFukKhVCDQLNoThoIM8EKNqIMQPclCR4ngJn1IHtCNXr3ip1f SnEX2fLgqCOFiGb82c9WGkIG1bgOzh/k1zl7BY+uz198jShA7c0CEqOF2w4BmaJi AfeqPP6CReqHLCUT+p+XYKkQH0+8e5FkgnTa7/X5ABEBAAGJASUEGAECAA8FAkyA d78CGwwFCQlmAYAACgkQ/pICU5V9LIOd/ggAveMFsgAMmHAxRSEAxMeGs5yN2ON8 xuJktUoqpQXeEo+dmrC6EGMhlXCdhlA83Q9rvF6t+GLJj1gz/YJjPBeHiGUFhCWH x6SF8QuqfldMlAgsnRPKYCDvWYkG9E4Vm03oSviJ2tWb9x46X1FEV1RwgTUoBvaA k5WbkuIHMcH/N2L3eMX3o1fPOefBo3+jZukLElXwb0Ibk2v82cOfbphJmx9yQKJx EavRm4f0wP+yWfEbZaT3T/z6Y53HxHSnB2sMNwLgjxjQsYdPz9TqRNOzkjqqwhn6 j28Zh+0n1aiQXavN5nUnRg87AJHu77E2VjBBIUjt2Qw2316GaTZfzgyiEQ== =45vV -----END PGP PUBLIC KEY BLOCK----- |
Download My Public PGP Key – andre at area256.com
I will try to post something with my views on encryption when I get some more free time.
The combined monitor resolution is 4096×1152, and still that’s not enough to work on all the code I want to some days…
In my blog posts I use the NextGEN singlepic fairly often to show my photos. However I noticed that the Facebook share system was not picking up my photos, or post descriptions. To fix this problem I added the Open Graph Plugin, and made a few code changes. The Open Graph Plugin is a very basic, but well coded, and extendable solution to adding Open Graph meta data. Hopefully WordPress will add this, or something like it, to the code base in a later release.
This solution doesn’t work out of the box, and I did have to make two modifications:
By default the Open Graph Pulgin uses the blog description:
1 2 3 4 | function opengraph_default_description( $description ) { if ( empty($description) ) $description = get_bloginfo('description'); return $description; } |
However I wanted it to use the post excerpt (if it was available), so I changed it to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function opengraph_default_description( $description ) { if ( !empty($description) ) { return $description; } // Use the blog description if we are not looking at // a single page, or no excerpt exists. $description = get_bloginfo('description'); global $post; if ( is_singular() && !empty($post->post_excerpt) ) { $description = $post->post_excerpt; } return $description; } |
At first I thought of using the post content ($post->post_content); however, facebook has issues if there are non standard tags (like short tags) in the description, and it doesn’t look nice when you try and encode that content, so I had to use the excerpt.
If you are using the build-in “Media” feature of WordPress, then the code provided in the plugin works fine:
1 2 3 4 5 6 7 8 9 10 | function opengraph_default_image( $image ) { global $post; if ( is_singular() && empty($image) && has_post_thumbnail($post->ID) ) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail'); if ($thumbnail) { $image = $thumbnail[0]; } } return $image; } |
However this relies on the wp_get_attachment_image_src function, and there is no hook in WordPress to override it in NextGEN. While you can use NextGEN images as the “Featured Image”, most of the functions that access the featured image don’t have hooks, so I suspect that this is more a WordPress limitation than a NextGEN limitation.
The solution I came up with was to attach to a hook in the Open Graph plugin from the NextGEN plugin. I added the following code to the nextgen-gallery/nggfunctions.php file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | function ngg_og_image( $imageURL ) { global $post; if ( is_singular() && empty($imageURL) && has_post_thumbnail($post->ID) ) { $thumbnailID = get_post_thumbnail_id( $post->ID ); // If the post thumbnail id has the form ngg-<number> then it is a NextGEN image. if ( is_string($thumbnailID) && substr($thumbnailID, 0, 4) == 'ngg-') { $thumbnailID = substr($thumbnailID, 4); $image = nggdb::find_image($thumbnailID); if ($image) { // Safety check for null pointer. $imageURL = $image->thumbURL; } } } return $imageURL; } add_filter( 'opengraph_image', 'ngg_og_image' ); |
That code will check if the featured image is from the NextGEN Gallery, and return the NextGEN thumbnail URL.
With these changes the Facebook share button works correctly. If you want to see how it works, click on the Facebook icon below. (this post has a desktop screen shot as its Featured Image.)