Feb 18
23:02
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.
19:02
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. >_>
Dec 16
15:12
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.∞
Dec 01
00:12
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!
About Me
I’m xubz. I’m a lazy moron of sorts and I ♥ to code, watch anime, read, to rock and play games (i.e. Just one of those stereotypical geek kind of guy). I live in Bangalore which is probably the best city in India.
My mail address is subbu [at] xubz.com. Feel free to contact me.
I go by various aliases online: xubzfb (facebook), xubzmusic (last.fm), xubztube (youtube). I’m also on reddit, twitter, flickr, steam and most other “social” websites. So you can usually find me lurking in one of those.