Hari's Corner

Humour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and then

A website which uses my script

Filed under: Bits and Bytes by Hari
Posted on Fri, Oct 26, 2007 at 09:33 IST (last updated: Wed, Jul 16, 2008 @ 20:46 IST)

It's been a long time since I've made a post here. It's been a busy month for me due to a variety of reasons and I've also been down with a cold in the last few days, but I just found a new mail in my inbox which attracted me. I'm glad to see that the script which powers harishankar.org which I shared a long time ago has actually been used by a few people. Here's a website which uses my script. I thank the website owner who brought it to my notice along with his appreciation. It feels good to be of some use. :)

I've made a lot of enhancements to the script since the time when I first released it. I will probably share the newest version of that script (which also features a changelog with Atom 1.0 feeds).
Comments (5)  

b2evolution 2.0.2 alpha released

Filed under: Site management by Hari
Posted on Mon, Oct 15, 2007 at 15:54 IST (last updated: Wed, Oct 29, 2008 @ 22:39 IST)

Well, it's been a couple of days since I've been online but I've found that b2evolution 2.0.2 alpha has been released while I've been busy elsewhere.

Since I've been helping with testing out b2evolution, I was already up-to-date with this version beforehand, but for those who are interested, this version has bundled my WordPress 2.3 importer along with the download, so go ahead and give it a try. :)
Comments (4)  

My web development toolkit

Filed under: Software and Technology by Hari
Posted on Wed, Oct 10, 2007 at 13:39 IST (last updated: Thu, May 7, 2009 @ 21:14 IST)

Since I tinker with PHP, XHTML, CSS and programming as a hobby, I use quite a lot of development tools which make my life easier. Here I'll share this information with you and hopefully you'll find it useful as well. Note that my primary OS of choice is Debian GNU/Linux which packages quite a large bundle of Free Software and makes life much easier thanks to its fantastic package management system.

Platform: Linux, Apache, MySQL, PHP with firewall

On my Debian system, I've installed Apache 2.0 web server, along with MySQL and PHP 5. This makes for a fairly standard web setup and although my router acts as a firewall, I've also installed and configured guarddog which acts as an excellent graphical front-end to iptables, the Linux kernel firewall. This makes up a good "sandbox" setup which is great for development and local testing before uploading content to the web.

Web editor of choice: Quanta Plus

Quanta Plus is an excellent web development editor for KDE. Optimized for PHP development with syntax highlighting, code auto-completion and function parameter tooltips, this resource is great for editing HTML, XHTML and CSS along with PHP and other code. I cannot imagine writing PHP code without this editor and it has served me well in editing, creating and optimizing my website offline.

It has a large set of tools which automate creation of HTML forms and tables as well as a fully integrated style editor which allows you to create CSS in an integrated GUI environment.

It has many more features which make life easier for developers, but I'll just say that this is one tool that every PHP programmer needs to check out before using commercial, proprietary web editors.

Graphic designer: GIMP

GIMP is another tool I really over-use for creating cool web graphics. It has many scripts which make this easy, but I generally like to experiment with this tool to try out new effects. In fact, the current theme for this blog was designed using GIMP. Once again, for those who cannot paid, proprietary tools like Photoshop, GIMP is the way to go, particularly for web graphics design.

Miscellaneous development aids

Here are a list of other programming tools which I find useful in my web development work.

Finally of course, I have installed all the relevant documentation including PHP documentation on my hard disk which allows me to browse them without an internet connection. That's about it. If I remember any other tool which I use regularly I will update this post.
Comments (8)  

GIMP tutorial - creating a Kubrick-like website theme

Filed under: Tutorials and HOWTOs by Hari
Posted on Mon, Oct 8, 2007 at 13:18 IST (last updated: Sun, May 10, 2009 @ 16:41 IST)

Kubrick is the default theme used by WordPress and it's a quite popular theme to build upon, but the plain blue header image used is quite unattractive. Here I'll show you how easily you can create web headers which look like Kubrick but with header graphics of your own choosing. All you need is to choose a decent image to use as a header and you can prepare it in GIMP to use with your style sheets. A good header looks extremely attractive in a curved, fixed width theme and here's how you can get the images you need to create your style sheet.

Step 1: Get a good header image

Screen 1

Open a good header graphic you want to use in GIMP. I've chosen a simple blend effect as a background image, but you can use cross-sections of good photos or any other background image which you think fits in well with your theme.

Click on a page number to continue the tutorial. :)

Step 2: Round the corners

Choose the menu option Script-Fu -> Decor -> Round Corners....

Screen 2 Disable Add drop shadow and Work on copy. Choose the radius as 10. If you prefer you can experiment with this value to get the effect you want.

Step 3: Add a border

Now create a white border around our header graphic. Choose Script-Fu -> Decor-> Add border...

Screen 3 Make sure the border colour is white and ensure that the border width is slightly higher than the round radius value you chose earlier. This will allow you to "cookie-cut" the theme images from the base image we're creating.

Step 4: Flatten the image

Now your image should look like this (if your border isn't entirely white, fill the non-white regions with white). Flatten the image using the menu option Image -> Flatten image.

Screen 4 Your image should now appear like the one shown in the screenshot above.

Step 5: Create a shaded outer border

Now you need a shaded outer border which will enclose the header, the body and the footer images to use for your theme. Choose the menu option Script-Fu -> Decor -> Round Corners... once again.

Screen 5 Let the shadow offset for x and y be 0 and choose a blur radius of 8 (you can experiment with this value to get different results). Adjust the background colour to whatever you want for your body background before you apply this script. Your image should now look like the one in the screenshot below.

Screen 6

Fantastic, you now have the base image from which you can "cut out" your theme.

Step 6: Cookie-cutting the theme images

From the base image above, you can now cut out suitable images for header, body and footer for the theme to use. Here is an example (select the portion from the base image, use Edit -> Copy visible and paste the results into new files. Remove the inner image clippings from the content background and footer images. Here are the results from the above base image.

Header image:
Header image

Content background image:
Content background image

Footer image:
Footer background image

That's all.

Step 7: Relevant CSS attributes in style sheet

Assuming that the DIV IDs for header, content body and footer will be header, content and footer respectively. Make sure that you've also set the HTML BODY background attribute to the exact colour as the background colour used (grey, in this instance).

#header {
    background-image: url('result-header.png');
    background-repeat: no-repeat;
    width: 340px;
    height: 143px;
}

#content { background-image: url('result-content.png'); background-repeat: repeat-y; width: 320px; padding: 10px; }

#footer { background-image: url('result-footer.png'); background-repeat: no-repeat; width: 340px; height: 45px; }

Here's a sample screenshot of a website with a Kubrick-like web header. Much nicer than a plain header, isn't it? ;)

Sample screenshot

You should, of course, customize the above CSS code to ensure best results. Your theme is now ready to use.
Comments (13)  

Where it all began

Filed under: Bits and Bytes by Hari
Posted on Sun, Oct 7, 2007 at 21:18 IST (last updated: Wed, Jul 16, 2008 @ 20:47 IST)

If you ever wondered where it all began, here is the secret, hidden away deeply in the mists of time! :oops: As an event, I personally rate it as next in importance to the Big Bang itself. :p

Almost makes me nostalgic to think of the days before blogging became the common man's platform of self-expression and Web 2.0 (ingenious version numbering scheme, don't you think?) the mantra of the Internet so on and so forth.
Comments (2)  

Evolve your thinking

Filed under: Life and Leisure by Hari
Posted on Sun, Oct 7, 2007 at 19:43 IST (last updated: Wed, Jul 16, 2008 @ 21:12 IST)

One of the things I notice in a lot of people's behaviour is the fear of expressing a straight opinion without a lot of "ifs", "buts" or "ands". Another is the fear to contradict oneself after expressing a definitive opinion or viewpoint on an issue or taking a decision on a matter.

Without doubt, these two tendencies are the biggest impediments to evolving in one's thinking, one's attitude and ultimate one's life as a whole. Let me explain.

First, it is important to realize that these two tendencies are inter-related. A lot of people hesitate to express their views openly. Even in communication we see this in everyday life. People cannot say "No" to your face straight even if they disagree or cannot say "yes". They put you off in one way or the other and either communicate indirectly or not at all. A simple question will not bring out a straight "yes" or "no" answer. It's because they fear to commit themselves either way. It's not just on the big issues either. It's the minor, insignificant ones as well. I must admit that I'm guilty of this as well on some issues. I cannot say otherwise because that would be cheating myself. But a lot of people seem to think this is diplomacy at it's best. Forget it! Diplomacy is not the equivalent of hedging. It means communicating in a manner that is appropriate and in keeping with a certain situation. It doesn't mean hiding behind a cloak of indecision and covering it up with a lot of words.

The second problem that people seem to have is in acknowledging that a particular position/opinion or viewpoint that they've expressed in the past might be wrong. They see it as a sign of weakness to admit openly to a mistake in judgement. They fail to realize that a certain perspective might have been clouded by circumstances and that a change in circumstances might affect the perspective and possibly lead to a different conclusion. Unfortunately, this kind of stubbornness in thinking is worse than indecision in a way. It is failure to acknowledge a problem or a mistake. It is clouded thinking further confused by a static mind.

How many people communicate in a certain manner and never improve themselves (or even acknowledge that there is a problem in their manner/attitude)! How many people stick to a stand that they've stuck to for years and even forget the reasoning behind that stand! How many people continue sitting on the fence, not because of honest introspection, but because their mind fears reality!

I won't bore you further with this. But I just want to say one thing in relation to this issue to my blogging friends: never fear to contradict yourself. I don't say change your stance every single day because that would indeed border on the ridiculous, but don't think that it's necessary to defend a change of stance. Don't think that because you said such-and-such two or three years ago (and it can be found on your blog and held against you) that you cannot express a totally different opinion now. Don't tie your own hands by clinging on to useless ideas and thoughts or values you've found that you can safely discard in the rubbish bin of your past. In short, evolve your thinking and evolve yourself. If somebody else calls you out on your contradictions, just remember that it's a closed mind trying to judge a constantly evolving mind. ;)

If you've read this fully, my apologies for the lecture (blame the Papa Hari University of Advanced Thinking and Logic). Regular programming will commence shortly :))
Comments (2)