WordLog

A weblog authored by Carthik about the latest in the WordPress world.

Sunday, May 13, 2007

Displaying HTML Source Code in Your Blog Posts

Filed under: — Carthik @ 2:16 pm

I badly wanted to display the following html code in a blog post that I am drafting:
“<link rel=’archives’ title=’May 2007′ href=’http://wordlog.com/archives/2007/05/’ />”

I tried putting the raw line of html between “code” tags and then even “pre” tags, but it just wouldn’t show up. Turns out you need to encode the html entities, like the “<” by replacing them with their html code equivalents – & lt ; is the equivalent for the left angle bracket.

There is a cute little encoder tool at wordpress.org written by The matt – however it seems to not want to work anymore. So I found a replacement Encode/Decode HTML entities tool at centricle.com. It works, as evidenced by the code displayed in this blog entry.

Tuesday, March 22, 2005

Setup a Local Mirror of your Blog – Mac OSX

Filed under: — Carthik @ 11:28 pm

girtby.net has detailed instructions on how to setup a local mirror of your WordPress blog on a local Mac Os X machine.

This should be useful for tweaking your blog, maintaining a backup etc.

Thursday, February 10, 2005

WP file loading order

Filed under: — Carthik @ 10:53 am

From gnomedia codeworks comes this neat nested list showing the order in which WordPress “loads” files, or, in other words the order in which WP uses the files to generate your blog, upon request.

Also seen at the same site is this set of instrcution as to how to make WP slimmer. But hold on a minute, if you really don’t need feeds, comments and all that you think is “excessive”, don’t link to the feeds (but still leave it in there for someone to use if they want to, and know where to find it), and turn off the commenting options etc through the admin interface. How much server space will you save by deleting 10 files? What utility or ease of use will you really gain by deleting the files?

Sunday, January 23, 2005

Gallery and WordPress in the Same Boat

Filed under: — Carthik @ 4:04 pm

The most comprehensive list ‘o links to tutorials and narratives describing how to get Gallery and WordPress working together.

I’m a hurry, so I’ll run along now. Hope that is useful, to someone.

Tuesday, January 18, 2005

Moving from Manila to WordPress

Filed under: — Carthik @ 1:12 pm

If you have a Manila (Radio Userland) powered blog, and you want to move to WordPress, there is a simpler solution than the one I linked to before.

ahawkins.org tells us that there is now a Manila To MT export script, and since WordPress can import those MovableType import-formatted text files, you can use WordPress’ import-mt.php script to import the entries, and get started with WordPress!

Thursday, January 13, 2005

Customize your blogroll output

Filed under: — Carthik @ 6:40 pm

Gerd Riesselmann, author of the Randomized Blogroll Plugin, which is a plugin that

reads an OPML-file containing your feed supscriptions, extracts a customizable number of items from it randomly, and displays them. OPML-files can be exported from nearly every modern feed reader. For performance purposes, the result is cached and only updated after a user defined time.

has written a detailed tutorial on how to create a functional “Links” page on your WordPress powered blog. With this, you can have a page with links to all the blogs you read on a daily basis. A seperate page may be much better if you have way too many links, and you don’t want to clutter the main page of your blog with that long a list.

Kill Referrer Spam

Filed under: — Carthik @ 3:39 pm

Referrer spam is when folks try to spam your referrers list in the server logs by trying to make it look like they linked to your site. This is not a big issue for most, since only you, the owner of the blog usually sees the referrers list, and so the spammer doesn’t gain any undue advantage, and yet, some people make their referrers list available publicly, and in this case, referrer spam works to the benefit of the spammer.

If you want to kill all referrer spam, or at least most of it, read Caveat Lector’s article on the topic.

While reading that topic, I came across Ann Elisabeth’s Blog, which looks like a mother-lode of information related to comment spammers, and how to trace, and kill them. I haven’t read even half of what’s on the blog, and I must it is a great resource for information.

Saturday, January 08, 2005

Livejournal to WordPress

Filed under: — Carthik @ 4:32 am

Since the Livejournal sale’s been announced, I’ve been reading a little bit of everyone’s reactions. I do not personally think the deal is going to be a disaster for LiveJournal users. A majority of the 14 to 20 year olds wouldn’t be too worried about who owns LJ, or what the terms of service are, anyways.

Regardless, some folks have been thinking about, or already have explored other options, like migrating to WordPress, for one.

One wrote a long, subjective post describing the move. Now that’s the kind of blogger we dig.

Memorium Victus does a good job listing the backup tools.

For moving to WordPress, there’s Bhansali’s Livejournal importer for WordPress, which goes one step beyond the importer that ships with WordPress by importing the comments for the posts. Of course, you first have to extract the comments from your LJ, using LJArchive or some such program. LiveJournal’s export feature does not export the comments.

Let’s not forget the crschmidt method, which ignores comments, but saves you the pain of having to import entries month-by-month. He actually hacked jbackup (the lj code that backups entries and comments) to not export comments, since the WP importer does not import comments. You don’t need to look far to see why WP does not import LJ comments — the web based LJ export tool, at livejournal.com, available to logged in users does not export comments. What we need is to modify this method to export all of LJ’s comments too, and then use the Bhansali importer, really.

In any case, should you want to know more about moving from Livejournal to WordPress, ask here, and you shall find ;)

Thursday, December 30, 2004

Importing from Radio UserLand to WordPress

Filed under: — Carthik @ 1:06 am

Quentin has been making notes at the wiki with details about his migration from Radio UserLand to WordPress.

The process consists of using the WordPress RSS importer, and requires a few minor modifications for everything to go smoothly. Quentin reports success with importing about 48 months (thats 4 years) worth of posts. The document also deals with preserving links and such.

Thank you, Quentin, for taking the effort to note everything down for those that may follow.

Wednesday, November 10, 2004

Themes in v1.3

Filed under: — Carthik @ 5:12 am

If you are dying to learn more about the “theme”s that wordpress blogs will be able to use, come V1.3, then you should read this article about the “Anatomy of a WordPress Theme“, by Ryan Boren, a leading WordPress developer.

The article explains the various components that come together to create a theme, and you can use it as a handy-dandy guide if you are planning on creating themes for WordPress in the future.

Thursday, September 23, 2004

Importing From Blogger to WordPress – A Detailed Tutorial.

Filed under: — Carthik @ 8:41 pm

BlueChronicles does it again! Earlier I had talked about some interesting tutorials at BlueChronicles.

Now BlueChronicles has a detailed step-by-step tutorial, complete with screen-captures and pictures on how to import your entries from blogger to WordPress. This will be very useful for anyone who wants to move from Blogger to WordPress. Welcome Bloggers!

Monday, September 20, 2004

BlueChronicles Tutorials

Filed under: — Carthik @ 8:06 pm

I see two tutorials at bluechronicles. It’s great that WordPress users take the effort to explain things in a simple no-nonsense fashion to other users.

Right now, there are tutorials on how to post images to the blog, and how to create categories and sub categories.

I will be watching that blog for more tutorials in the future.

If you are interested in writing documentation for wordpress, and make it available for public consumption, post a note on the wp-docs mailing list, and your talent will be used to the maximum extent possible. :)

Saturday, September 18, 2004

Styling and using the <ins> tag

Filed under: — Carthik @ 5:28 pm

There is a tag called ins. It has a companion called del. Both of them are not used too often, and it is not easy to find information about what they do, or how to use them and style them.

The Quicktags available in the WordPress “Write” menu has button for both these tags, ins and del.

In a previous post, I edited the content to reflect some changes. I wrapped the new text, which was “μ , where μ (MU) stands for Multi User. Hopefully, it will soon be available to the public.” within a set of <ins> tags. Now the question was as to how to style this to show my readers that this text had been inserted later, after the post had been originally published.

By default, everything within an ins tag pair is underlined (and for del, the text is struck out).

I did not want the text I inserted to be underlined, since that would look like a link. So I wanted it changed to an dotted underline. Also I wanted to say “(Updated)” after the text so people would know what there is a dotted line, and so that everyone notices that there has been an update.

To change the default underline and create a 1px dotted underline, I used the following in my css stylesheet:

ins {
text-decoration: none;
border-bottom: 1px dotted;
}

To insert the text (Updated) after the relevant portion, I used the following in my CSS stylesheet:

ins:after {
content: "(Updated)";
}

The CSS 2 specification says one can use :before or :after to insert the text before or after the relevant portion. The spec also mentions that several different values can be inserted. I inserted a string, i.e., (Updated).

What is remarkable is that when I first searched google for ins tag css text, I ended up at a WordPress Support page!

Adding rules for the del and ins tags in your stylesheet, and using the tags responsibly can make for a better experience for your readers.

Wednesday, September 08, 2004

Upgrading from b2 to WordPress 1.2

Filed under: — Carthik @ 10:27 pm

Finally, a solution, or rather a set of instructions to upgrade successfully from b2 to WordPress 1.2. (Thanks to wild-mind.net)

It’s not exactly clear why it is essential to follow exactly these steps as opposed to the prescribed upgrade or import procedure, and that might require some looking into. This is a solution that seems to work, and information regarding methods that work is indispensible.

I have a strange affliction for importing and exporting things from WordPress. It has just come to be that way. It is not a choice I made, but now that I have started out on this path, I find it impossible to quit. It maybe the Ph.D. mentality — wanting to know everything about a little well demarcated area in a “field”, and be the “expert” in that — at work here.

How to Install Multiple Copies of WordPress Swiftly

Filed under: — Carthik @ 10:11 pm

Stephanie had to install a bunch of WordPress blogs, and it wouldn’t have been practical to waste the time and effort required to install them by hand, one by one. Lucky us, she actually figured out a way to install a whole lot of WordPress blogs using a few tricks, some shell commands, and about 10-15 minutes.

Scripts for a WordPress blog farm details her adventure. It is in short, a solution for when you have to install, say 50 wordpress blogs on the same server, each differing from the other in it’s URI. Each of the blogs thus installed will allow the user to edit the templates, customize the design, etc.

May a million WordPress blogs bloom in a thousand farms! (Okay, I’ll take thousands and hundreds, if that sounds like too much of a wish)

Sunday, August 29, 2004

How to Display Links in Your Link Roll in the Order Updated

Filed under: — Carthik @ 3:35 am

Today, your’s truly brings to you a guide to showing links in your link manager ordered by the most recently updated weblogs. This is useful when you have a lot of blogs in your link roll, and you want to show the links in the order of “freshness” of the blogs, that is, with the most recently updated blog appearing first in the list.

Ok, I am bored. No one has anything interesting to say about WordPress today. Today being a Saturday (early Sunday already, actually), and all that. So I thought I will write a long tutorial for you.

You can see this in action at Molly’s blog, where the links in her Blogroll are in the order updated — “freshest to mustiest“, as she so eloquently puts it. Matt’s Portal page is also a good example of this.

Steps:
1) Get a plugin and update it.
2) chmod a file.
3) Set the right options.
4) Add the right template tag.

Now, for a detailed blow-by-blow account :

Step 1:
a) Save the Update Linkroll plugin which was Carthik’s first ever plugin ;) .
b) Rename the file as updatelinkroll.php
c) Upload it to your wp-content/plugins folder.
d) Activate the plugin from the plugins page visible at the administration interface after you log in.

Step 2:

a) CHMOD the links-update-cache.xml file in the wp-content folder to 766 (so that it is writable by wordpress)
b) Notice the existence of a file called link-update-cache.xml (link, not links) in wp-content and pat yourself on your back for not getting confused between this imposter and the real file that does all the work, which you CHMOD’ed. You don’t need the link-update-cache.xml file at all, so go ahead and delete it, if you like. Helps avoid confusion, you know.

Step 3:

a) Tweak the options in wp-admin/options.php?option_group_id=8 (The link manager options)

The following options are the ones related to displaying updated links:

  • weblogs_xml_url – You won’t need to change this. This specifies the URL of the xml file with the list of recently changed weblogs.
  • weblogs_cacheminutes – Specify the number of minutes WP waits before it updates the cached list of recently updated blogs it got from weblogs.com (something like 30 or 60 should be fine, really)
  • links_updated_date_format – The date format for the updated tooltip, leave it the way it is, if you are not too particular about minutae.
  • links_recently_updated_prepend – The text to prepend to a recently updated link
  • links_recently_updated_append – The text to append to a recently updated link
  • links_recently_updated_time - The time in minutes to consider a link recently updated

Step 4:
Add a suitable template tag to your index.php where you want the list of links to appear. The following template tag works, so it’s a good place to start, when in doubt:
<?php get_links('-1','<li>','</li>',' ','true','_updated','false','false','-1','1','true'); ?>
More details about that template tag are available at the get_links wiki page.

Or, you can use wp_get_links()
to display the links. You can order the list by “recently updated” by clicking the “Links” tab in the admin interface, and then link-categories (wp-admin/link-categories.php). There, for each category, you can decide the order of display of links. The whole idea is that you use the wp_get_links to display the list of links, and you use the “Links” menu in the admin interface to adjust everything about how the links are displayed.
The link manager in WordPress is largely the effort of Mike. He was extremely helpful in understanding how the links manager works. Thanks, Mike :)

Saturday, August 28, 2004

About Blogging Successfully

Filed under: — Carthik @ 3:49 pm

Simon’s Everything You Wanted to Know But Were Afraid To Ask attempts to be a complete round up of essential and practical blogging knowledge.

There are obvious contradictions: Be Original(#19) Vs. Plagiarism is Encouraged(#22), but he probably does not expect to be taken seriously(#4).

I wish he extended (#49) to include padding between items of the list. The current format of the article makes for difficult reading, thus emphasizing (#29)

All said, I spent a long time following the links at the end of the post. Just what you need for a perfect weekend — a long article, and a lot of links that lets you waste more of your time reading up on how to waste time efficiently and effectively :)

Happy reading!

How to Add a Paypal Donate Link

Filed under: — Carthik @ 3:35 am

After searching, I found this Guide to Paypal donations (.pdf), which turns out to be all you need to know about how to put a “Make a Donation” button on your weblog or website.

I haven’t got paid in a month, and the pocket is feeling the pinch. Then I got renewal notices for two old domain names I had registered, which is when I thought I probably should help you help me, if you so desire. So this site now has a Paypal “make a donation” button in the menu.

I have made a sum total of Zero dollars through my website and all this work so far, so let’s see if we can change that. On a side note, I tried to donate myself some money, just to test if everything is working fine, and also to see if I can give myself 2 cents ;) , but Paypal told me,”You cannot email money to yourself. Please enter another user’s email address if you would like to send money to someone.

Monday, August 23, 2004

Cellphones, Email and WordPress

Filed under: — Carthik @ 8:25 am

Dr. Dave has released Wp-keitai-mail* , a hack for posting articles to your WordPress powered blog using a cellphone (keitai == cellphone in Japanese). He calls it a plugin, but I think it’s not one, since it can be installed outside of your WordPress directory. A plugin is something that plugs in like a plug plugs into a socket. Excuse me if that sounds obvious, but a lot of the “plugins” out there are more like Appliances. You probably have to plug them in, but that alone will not get them to work. You have to read the manuals that come with the Appliance and probably add/tweak a few things. That said, wp-keitai-mail has a few cool features, and once you get it working, posting using a cellphone, or through email should be easier.

I wrote a tutorial on how to blog by email a while ago. Of course, if there is something wrong with the tutorial, you can can edit it quite easily, at the wiki. The WordPress way of blogging by email is very simple, but requires a cron job to check for new mails periodically. wp-keitai-mail does not need a cron job. It does need a few extra things though, but if you can’t do without moblogging, then go get it.

One of the other blog-by-email developments I have noticed is the improved wp-mail.php from John Blade.

It has all the abilities of the current wp-mail.php plus:

* Allows image attachments (posts inline)
* Checks if user email address is in the database (otherwise discards message)
* Allows other file attachments (zip’s, exe’s, etc)
* Fairly good cleaner for removing excessive line breaks

I should say that if it does all that it says, John Blade’s enhancement to wp-mail.php should be an useful addition to a WordPress blog.

Also of note is this fix for an error that seems to be quite common when using the blog by email feature.

* seen at BloggingPro

Friday, August 20, 2004

Displaying Titles on Category Pages

Filed under: — Carthik @ 12:58 am

Stuart again.

This time, he writes a neat little tutorial to explain how to display the name of the category as the title on category pages.

He writes :

There are a few “functions” that already exist in WordPress which can be put to good use if you know about them.

Oh yes. There are are quite a few Template Tags that I have rarely, if ever, seen used. The reason could be that most users, including your’s truly, are, for the most, satisfied with what’s in the default WordPress weblog, in terms of template tags.

This tutorial, by Stuart, does a good job of explaining how to check if the page displayed is of a kind (a category page in this case) and to display something only on those pages. The forthcoming version of WordPress will have more “markers” like $cat, for pages, to help in the identification of the kind, or type of page being displayed. Just so you can customize your pages all you want.

 

Powered by WordPress

eXTReMe Tracker