Introducing xubzNv

As you might have noticed, my blog got itself a new theme. It’s named xubzNv and I had started designing it a few months ago (around a week before the great purge), but got the basics to work today. It’s looks simple and slick and I like it, but shitloads of coding is still incomplete (especially comments.php).

It’s the first time where I’ve used serif typeface for the text, I used to prefer sans-serif, but it looks fine I think. It also doesn’t have notable features that can be discussed, so I’ll leave it at that, I mean, it was designed as a simplistic dark theme and nothing more.

*facepalm*

It’s like I suddenly got withdrawal symptoms.. which is essentially FAIL.

facepalm.jpg

I’ll code up a quick theme to replace this ‘default’ one.. Heck, even the new ‘twentyten’ theme in the WordPress SVN is much better than this. Edit: Found the old one in my svn repos, will do with this till new one attains usable levels. Edit-2: Found one more “in development” theme I like.. Still borked though, gotta fix.

I also used to make some rudimentary blog updates on the placeholder page. Archived them here. (again a FAIL moment)

Sad to be back online. HURP DERP. >_>

Reddit’s Top Albums of 2009

Here is a list of albums voted by fellow reddit users who, like me, love non-mainstream & indie music (I had already listened to a few bands there). This list was selected by the number of user upvotes to a particular band. There even is a .torrent file at the end of the post.

Playing with jQuery and WordPress!

So I finally started playing with jQuery.. I know, I know, I’m a slowpoke. But now I’m pretty good at it, atleast at the newbie level! ^_^

I implemented a jQuery based search for my blog theme. Check it out! (You still have to press Enter key, I didn’t want auto search/search as you type)

Here is the main code. It’s kind of n00b-ish, but will optimize it as I learn more. (I’ve also used jquery-highlight plugin)

jQuery.noConflict();
jQuery(document).ready(function()
{
	var is_search_page = 0;
	var current_page = window.location.pathname;
	jQuery("#searchform").submit(function(e)
	{
		e.preventDefault();
		var searchtxt = jQuery("#searchform #s").val();
		jQuery("a#searchreset img#searchloader").show();
		jQuery.ajax(
		{
			url: blogurl + "/search/" + searchtxt,
			dataType: "html",
			type: "GET",
			error: function()
			{
				jQuery("#content").html("Error: Something went wrong.. Refresh Page.");
				jQuery("a#searchreset img#searchloader").hide();
			},
			success: function(data)
			{
				var searchresults = jQuery(data).contents().find("#content").html();
				jQuery("#content").hide();
				jQuery("a#searchreset img#searchloader").hide();
				jQuery("a#searchreset img#searchresetimg").show();
				jQuery("#content").html(searchresults);
				jQuery(".post-text").highlight(searchtxt);
				jQuery(".aside").highlight(searchtxt);
				jQuery("#content").fadeIn("slow");
				is_search_page = 1;
			}
		});
		return false;
	});

	jQuery("a#searchreset").click(function(e)
	{
		e.preventDefault();
		jQuery("a#searchreset img#searchresetimg").hide();
		jQuery("a#searchreset img#searchloader").show();
		if (is_search_page == 1)
		{
			jQuery.ajax(
			{
				url: current_page,
				dataType: "html",
				type: "GET",
				error: function()
				{
					current_page = blogurl;
					jQuery("a#searchreset img#searchloader").hide();
					jQuery("a#searchreset img#searchresetimg").show();
				},
				success: function(data)
				{
					var mainpagecont = jQuery(data).contents().find("#content").html();
					jQuery("#content").hide();
					jQuery("a#searchreset img#searchloader").hide();
					jQuery("#content").html(mainpagecont);
					jQuery("#content").fadeIn("slow");
					jQuery("#searchform #s").val("search..");
					jQuery("#searchform #s").blur();
					is_search_page = 0;
				}
			});
		}
	});
});

All it does is send a GET request to the Search Page, extract the contents from the #content DIV block from the response which replaces the contents in the #content DIV block in the current page. It also shows/hides the Reset icon. Clicking the Reset icon gets back the contents of the previous page. Not a neat way to do it, But it works!

Some random quote…

If we all reacted the same we’d be predictable. And there’s more than one way to view a situation. What’s true for the group is also true for the individual. It’s simple. Overspecialize and you breed in weakness. It’s slow death.

That’s what Major Motoko Kusanagi tells to Togusa in the anime-movie Ghost in the Shell. Pretty much the truth! If everyone in your group is exactly the same (the same way you think that is), you lose your uniqueness and you’ll never know if you’re doing the right thing!

Snowing in namma bengaluru?

…atleast that’s what MSN Weather and Weather Gadget in Windows 7 said.

Weather FAIL!

Though one could wish it really would snow in the super awesome tropical city. ^_^

WordPress Upgrade.

Finally upgraded the WordPress installation from 2.7.x to 2.8.x. Hopefully, the current theme does not seem to be borked. More later.