Archive of November 2008
Flickr Badge & Akismet Widget W3C Validation problem & solution
Today I was playing around with my blog, updating theme, WP engine and plug-ins, and also implementing some changes in CSS styles. As it is already stated in the footer of this blog I use HemingwayEx theme by Nalin, which I’ve slightly ((Emphasis on slightly)) modified. This theme is really nice and clean, and Nalin did a really good job with it. I did two (visually) notable changes in CSS: I changed link and link hover styles and I changed alignment of post and page text to justified. Wordpress is updated to 2.6.3, I added WP-Footnotes plug-in and I enabled WP related posts plug-in (still not not sure I will keep it). Suggestions and comments to this changes would be appreciated. But back to the point..
After I was done, I tried to validate my page with W3C Validator and validation failed with over 30 errors. Quick review of the errors however pointed out two mayor problems: Flickr badge and Akismet widget.
1. Flickr badge
As you probably already noticed I use Flickr badge to show random 10 photos from my publick Flickr photoset on this blog. Flickr has a tool that allows you to create this kind of badge and insert it into your page. Actually the badge Flickr produces is almost useless so you will have to do some cleaning ((Use Google if you don’t know how to do it yourself.)) of unnecessary code and styles first, but that is not my point. After the cleanup I was left with this code:
<
p style=“text-align: left;”><div class="flickr_badge_image">
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=10&display=random&size=s&layout=h&source=user&user=22500348%40N03"></script>
</div>
This code however still won’t validate. I found answer on this blog. For this code to be valid XHTML 1.0, we need to change ampersands (&) to XHTML entities as explained here. After that we get this code
<
p style=“text-align: left;”><div class="flickr_badge_image">
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=10&amp;display=random&amp;size=s&amp;layout=h&amp;source=user&amp;user=22500348%40N03"></script>
</div>
that validates flawlessly.
2. Akismet widget
Second problem I faced was connected with Akismet widget and was a little bit harder to trace and eliminate. I use 2.2.1 version of plug-in and I don’t guarantee that this instructions ((I found solution here, but the line is different.)) will also work on any other version.
2.1. FTP to your server and edit akismet.php file in your WP plugins folder.
2.2. Go to the line 835 where you will find code like this:
<div id="akismetwrap"><div id="akismetstats"><a id="aka" href="http://akismet.com" title=""><?php printf( __( '%1$s %2$sspam comments%3$s %4$sblocked by%5$s<br />%6$sAkismet%7$s' ), '<div id="akismet1"><span id="akismetcount">' . $count . '</span>', '<span id="akismetsc">', '</span></div>', '<div id="akismet2"><span id="akismetbb">', '</span>', '<span id="akismeta">', '</span></div>' ); ?></a></div></div>
2.3. and change it into this:
<div id="akismetwrap"><div id="akismetstats"><span id="akismet1"><span id="akismetcount"><?php echo $count; ?></span> <span id="akismetsc"><?php _e('spam comments') ?></span></span> <span id="akismet2"><span id="akismetbb"><?php _e('blocked by') ?></span><span id="akismeta">Akismet</span></span></div></div>
This will somehow cripple the widget by making it static to show only the number of spam comments cleaned, but it still is a solution.
And that’s all folks! Now my blog validates again. I really hope this helps someone, because I lost quite some time before I found those solutions.
— Regards, Milan
11:19 PM | 0 CommentsI ate Wolves, Wolves ate Dogs
Wolves Eat Dogs is a crime novel written by Martin Cruz Smith and featuring Arkady Renko – a detective from Russian capital. It’s the fifth — and for the time being also my favorite — novel in Renko series. I’ve already read Gorky Park and Stalin’s Ghost, and although I was positively impressed with both of them, Wolves Eat Dogs is the one I almost literally fu***n ate. Delicious!
Arkady Renko is a smart, resourceful and persistent, but — after the death of his beloved wife Irina, also lonely and somehow depressed Moscow detective. In Wolves Eat Dogs he’s called in to investigate a death of a rich Russian businessman in, what appears to be, a simple suicide case. But Renko wouldn’t be Renko if he’d buy the suicide story and sets to investigate the plot behind it. The more this case seems unsolvable, the more Renko tries to dig deeper and despite the heavy opposition he’s facing from his boss and other powerful characters in the story, he has no intention of stopping before he solves the case. This time the plot leads him to the Chernobyl Zone of Alienation where even the most radioactive zones don’t stop him from passing through, just to uncover the truth.
The story is tense, dramatic and includes many turn overs which will make you hold your breath while reading. But apart from one of the best crime stories I’ve read, reader also gets familiar with events during and after the Chernobyl disaster, what additionally makes this novel is a real winner to buy.
— Regards, Milan
06:13 PM | 0 CommentsBarrack Obama’s Barcelona portrait on Google Earth?
2008-11-05, 18:55: Added link (below) to an AP article on the story which includes images of the actual portrait.
Let see how long will it take for Barrack Obama’s (newly elected presidents of USA) massive portrait on Barcelona beach to show up on Google Maps (sattelite view) or Google Earth (if ever).
The portrait should show up here (if it shows up). Who knows how often does Google update satellite views of Earth?
You can read AP article with images of the actual portrait here.
— Regards, Milan
01:37 PM | 0 Comments1Password on Windows or Linux machine (powered by Firefox)
Who among you Mac users, still hasn’t heard of 1Password – a password manager & auto-fill app for MacOS X? Well, if you haven’t heard of it, or you’re still considering to use it – stop being ignorant and start using it! Check out this screencast to see it in action. Believe me, this is one of the best apps I encountered in my computing history (and I’m not exaggerating at all) and it is well worth of ~40 $ license price. It will safely store all your password, credit card info and web-forms and consecutively make your life on the Web much much much easier. You should think of it as a Web Wallet —, and believe me you need a Web Wallet nowadays. Btw. 1Password supports virtually all know browsers for MacOS X (except Opera). The only thing I personally miss with 1Password, is that it has no Windows cousin, which I would like to see very much, as I use Windows at my job. And that takes us to the topic of this post..
Surfing the web and searching for a solution to somehow incorporate 1Password on my Windows machine, I came across this post which explains how this is possible using 1Password iPhone sync option. Priceless! However following instructions in that post I came across some problems, which I will warn you about here:
<ul>
<li><strong>When copying 1Password bookmark from Safari to Firefox, you will encounter truncation issuses.</strong> Even direct copy from Safari to Firefox, — as described in that post —, didn't work for me. When I synced bookmarks between my Mac and Windows Firefox using Foxmarks, I was able to get 1Password page on my Windows, but login didn't work. <del datetime="2008-11-04T11:07:51+00:00">What I finally did was that I exported Safari bookmarks using "<em>File > Export Bookmarks</em>" option, manually transferred that file to my Windows machine, manually edited it using <a href="http://www.scintilla.org/SciTE.html">SCiTE</a>, and copied out 1Password bookmark location field to Firefox. This finally did the magic.</del> Manually transfering bookmarks described before wasn't a good solution, because the bookmark created in Firefox worked only until I restarted Firefox, after that bookmark failed me again and I wasn't able to login into 1Password page. I was however again successful avoiding this problem using a little bit different approach. What I did was that I took <em>Safari Bookmarks.html</em> file I previously exported from Safari and deleted everything before
a href="*"
and after
/a
tags containing 1Password bookmark in the original file. Than I save this file as 1Pass.html on my TrueCrypt encrypted drive and made a bookmark in Firefox, pointing to that HTML file. Now I first have to open this 1Pass.html page using bookmark, and after that I follow 1Password link in it.
So, there is an answer to the million dollar question – “How to use 1Password on my Windows (or Linux) machine“! Using Foxmarks you may be able to half-automate this job transferring 1Password bookmark from one Firefox to another, but you You will still have to sync 1Password.app to Safari manually, and also manually transfer bookmark from Safari to Firefox. So it’s not a perfect solution, but — at least for me — the idea of having my 1Password database on my Windows machine makes it well worth. One setback is also that you can’t upgrade 1Password.app on your Mac anymore if you want to use this function (at least till we get some other and maybe better solution). Also I should warn you to consider security: make sure to use strong encryption password when you sync your 1Password database to Safari bookmark and — when using Foxmarks — keep in mind that your 1Password database will be transferred to Foxmarks sync server, prior to reaching your other Firefox copies.
— Regards, Milan
12:20 PM | 0 CommentsBledorama
Panoramic shot of my home town — Bled, I took yesterday while enjoying “the Sunday walk”.
— Regards, Milan
07:57 PM | 0 Comments







