CSS for code block
If you're wondering how do I actually get the nicely boxed code block in my blog as this;
then the answer to it is just to have this in my CSS:
pre {
padding: 10px 15px;
margin: 5px 0 15px;
border-left: 5px solid #666666;
background: #222222;
font: 1em/1.5 "Courier News", monospace;
color: #bbbbbb;
overflow : auto;
}
and later I would just wrap whatever text I want to be in the box with the pre tag in my HTML codes, like this;
<pre> This is a code example </pre>
and should get this output (including the dashed-box):
This is a code example
and that's all. It's just so easy..
Installing Smiletag Shoutbox in Wordpress
Smiletag Shoutbox is the shoutbox that I have on my website’s sidebar. I’ve been using it since I was using Joomla for my website, and now that I moved to Wordpress, Smiletag is still my shoutbox of choice.
Installing it in Joomla is very straightforward, while it’s not really the case with Wordpress, as it requires a little bit of coding.
The application can be downloaded from Hivemind’s website (requires free registration) and it can then be installed as any other Wordpress plugin. The shoutbox however doesn’t immediately show up in the page, and there’s no option in the admin console for that.
To add it to the page we must add some codes, and in our case, to the sidebar’s code. Edit it from the admin panel;
Presentation -> Theme Editor -> sidebar.php
or can be edited with any editor;
/path/to/current/template/sidebar.php
This is an example of a very simple Wordpress template with widget support;
The sidebar uses <ul> for its items, and so we need to add <li> element to add our shoutbox (and probably any other static stuff) to it. We also need to add a header (<h2> probably) for the item’s title, and add the shoutbox’s code to it. The final sidebar should look something like this;
This might not exactly be the case with every template, but the idea is about the same. Happy blogging!
Connect with me
What I'm Doing (via twitter)...
- is applying for US visa. The website is not helping at all http://twitpic.com/16hvxp 5 days ago
- @abumuaaz want to focus on my wireless project (yes, I get paid for that) and some development work. Ada job to pass ka? :) in reply to abumuaaz 6 days ago
- is running 'sudo dd if=/dev/zero of=/dev/sda' on his laptop. Will it work, my computer forensic friends? 6 days ago
- is on his first day of being jobless, hahaha. 1 week ago
- finished reading Crowdsourcing: Why the Power of the Crowd Is Driving the Future of Business, in 32 hours. Next, Wikinomics. 1 week ago
- is on his way to island hopping. Woohoo! 1 week ago
- is leaving on a jetplane, don't know when he'll be back again... 1 week ago
- missed his flight to KK. Will need to take the first flight tomorrow and pray he'll make it for his 9am meeting. 1 week ago
- More updates...











