January 07, 2007 | 17 Dhu-l-Hijjah 1427 Hijriah

fast searches with PHP

Here's another one for the "I should have done this a long time ago" list. I had been experiencing some problems with mt-search.cgi on this installation; it was using up too much memory on the server (this is also why I switched to using Tagwire for showing my tags).

Now I'm using the PHP-based Fast Search and it works great. It took me a little while to figure it out but once I got it down, setting it up for each of my blogs was a snap. You can test it out using the search form in the sidebar of the blog.

The one oddity I found, which may be due to something weird on my end, is that it didn't like the "fastsearch" filename for the search template and the Dynamic Pages Error Template would claim "Page not found". This caused me a lot of confusion. However, I found that it worked fine if I used a different output filename for the template. The rest was easy from there.

This is a great plugin and I especially recommend it to anyone who finds that mt-search.cgi is slow or is using up too many server resources.

July 15, 2006 | 17 Jumada al-Akhir 1427 Hijriah

easier management of blogrolls and media

Procrastination is a terrible thing. I've been meaning to write about this for a couple months now but never got around to it.

One of the neat features TypePad has is TypeLists. These allow for easy management of sidebar content including blogrolls and media content from Amazon. Rather than directly editing a template to put code for these items on your blog, you manage the content in the TypePad interface.

Two plugins bring Movable Type closer to this: MT-Blogroll and Media Manager (both for MT 3.2 currently). MT-Blogroll, as the name suggets, allows you to manage your blogrolls or sidebar links generally. You can create categories for your links to better organize them. The interface is much like if you had created a links blog in MT, but customized for just adding links.

Media Manager allows you to search Amazon within its interface, where you can view thumbnails and other information, and then add these items to your collection to display on your weblog. This is a great way to display a list of books or other items from Amazon that you want your visitors to check out.

June 10, 2006 | 12 Jumada al-Awwal 1427 Hijriah

Styles galore

Looking for a new design for your weblog and unsatisfied with what StyleCatcher and the current Style Library have to offer?1 Check out The Style Contest!

Sponsored by Six Apart, among others, this contest has 146 entries. Although the winner hasn't been chosen yet (it just recently closed for voting), you can download and apply the styles now. This blog's new look is Star Crash, courtesy of Mario Carboni. You might notice a few of my other blogs have new designs as well.

I can't design worth a darn, so something like the Style Contest is great for me. If you can't design either but want a great-looking weblog, check it out!

1 After the winners have been selected, all of the Style Contest entries will be fully integrated with StyleCatcher as a library. Now that's cool!

Note: Thanks to Arvind in comments for clarification about StyleCatcher and the Style Library. The entry has been edited accordingly.

March 16, 2006 | 15 Safar 1427 Hijriah

easier tagging

I've talked before about how to set up a tagging system for your blog using entry keywords. If you're using Movable Type 3.2, the Tagwire plugin can make this quite a bit easier. It treats your existing keywords as tags - if you've already been entering tag-like keywords for your entries, you don't have to do anything extra, just start using the template tags to display information about your tags.

Tagwire also integrates with MT-XSearch to easily create individual pages for each tag. On my other set up, I was using MT's built in search script with a few hacks and an alternate search template. Tagwire with MT-XSearch is the same idea, but much easier to implement. As a note, if you have multiple blogs, you will need to create the XSearch Tagwire template module for each one, which also means that you can completely customize it for each blog.

I had been using keywords on this blog for a long time to indicate related entries. In a way, they're really like a secondary set of categories. That's now reflected in the sidebar where the actual categories are listed under the heading "Tips by Type". The keyword/tags/secondary categories are now listed as "Tips by Area".

It's all about making it easier for visitors to find related content, keeping them on your site longer and hopefully helping them with what they're looking to do.

January 10, 2006 | 10 Dhu-l-Hijjah 1426 Hijriah

clean up troublesome characters from copy-n-paste

If you copy and paste a lot while blogging, either from web articles you are quoting or because you compose in Word and paste in, you've probably run into problems with curly quotes, em-dashes, and other "smart" characters, discovering that these don't always display correctly and may result in odd characters on your blog.

NaughtyWordChars to the rescue! If you're using UTF-8 encoding for your blog, it can automatically convert these Word characters to their plain ASCII equivalents when you save a new entry, or when you load an existing entry for editing (this requires BigPAPI). Sweet!

Note: This plugin seems to conflict with the smilies plugin; when I installed NaughtyWordChars, the smilies bar disappeared. When I disabled NaughtyWordChars, the smilies bar reappeared. Update: A new version of the plugin fixes this bug.

December 11, 2005 | 9 Dhu-l-Qidah 1426 Hijriah

using the right fields for the job

This weekend, I installed RightFields, a plugin that allows you to customize the display of standard fields like Entry Body and to add custom fields. The plugin requires MT 3.2 and the BigPAPI plugin.

The plugin is very powerful with a ton of features that I am only beginning to explore. It is currently in beta and may contain bugs. To make full use of its features, you should also know how to add and modify MySQL tables in your MT database. So it's definitely not for every one. But if you're a power user, it may be just what you're looking for to greatly expand your use of MT.

RightFields is particularly helpful for non-standard blogs, when you're using MT almost like a database and putting unusual data in different fields. For instance, I use MT to produce links pages on my static website where I put the URL in the Entry Body field. Using RightFields, it is very easy to change the label that appears on the Create New Entry page, so that it says URL instead of Entry Body. You can make even further customizations than that. Plus you can add custom fields if you have more data than there are standard fields. I am not yet using this for the blog that manages my link pages.

The other feature that I am using is the Linked Entry. This is a special type of custom field that allows you to designate the entry as being linked to another entry, either in that blog or in another blog. I am using this here on the Tips blog. If you go to RSS feeds for tags, you'll see a section called "Related" and it says "This tip is built on the following tip(s)" and it lists another entry there. That is the linked entry. If you click through to using keywords and tags to help visitors find related content, you can see that it links back to the RSS feeds entry and to several other entries.

So this is a great way to show how some of your content is related to other content and direct visitors to that related content.

I am investigating a possible bug with this feature in which it appears to blank out a couple of the other entry fields (which I will be reporting to the developer once I have all the data), so you may want to hold off on implementing it if you don't have time to be a beta tester. Update: See bug report and patch to resolve it.

But it's worth it, in my opinion. And there's much more that RightFields can do.

Update: A release version, RightFields 1.02, is now available. Enjoy!

December 04, 2005 | 2 Dhu-l-Qidah 1426 Hijriah

smilies for your entries

One of the joys of MT 3.16 and above is the BigPAPI plugin, which allows other plugins to easily modify the Movable Type interface. Now instead of hacking templates, you just upload a plugin and you're good to go.

A light-hearted but much-longed-for example is the Smilies plugin which creates a "smilie bar" above your Entry Body and Extended Entry fields inside of MT. Just click on the smilie and it is inserted in your entry.

I hacked this plugin to use my own favored smilies, and I also had to adjust the paths in the code because my mt-static directory is on a different domain than my blog(s), but that was pretty simple to do.

biggrin.gifcool.gifsmile.gifwink.gif

Aside: This plugin seems to conflict a lot with other BigPAPI plugins. It did with NaughtyWordChars until the developer of that plugin updated it, and it does with RightFields 1.02. There is a much expanded, but shareware version of this plugin called Icon-o-matic that may work better for most people.

November 29, 2005 | 27 Shawwal 1426 Hijriah

RDF versions of your blog entries

I seem to be on an XML kick lately, lol. The latest thing I've been playing around with is semantic weblog posts. This involves creating an RDF version of your blog entries to support the Semantic Web.

Basically, it involves creating an alternate format of the entry that presents the data in a structured way that is meaningful to computers, similar to RSS feeds. An example of how this can be useful is Piggy Bank, a Firefox extension that allows you to view RDF data in a nice format in your browser and do things with it.

I started with the template at HubLog, but then decided to modify it based on an article about adding more metadata with Movable Type. I made a few tweaks because of an issue with dynamically-generated pages in MT 2.661. Because I'm using MT 2.661, I used this method for dynamically generating the RDF files. The template is at "rdf" here.

Check out the finished product. To get the full effect, you would need to be using Piggy Bank in Firefox (note: what you would need to do is go to the regular entry page in Firefox and click the data coin icon in the status bar. For me, the data from the RDF file is on page 4).

Later: I made a few more modifications after looking up the RSS 1.0 specs, especially the modules. Check the template file for the latest.

November 24, 2005 | 22 Shawwal 1426 Hijriah

RSS feeds for tags

So you've got your blog set up with tags. A neat way to expand this is to offer RSS feeds for each of your tags. Visitors can subscribe to these feeds and be updated when any new entries are posted that are tagged with that particular keyword/subject.

You'll need to make another alternate search template. My template for an RSS 1.0 feed is at "Keyword RSS Template" here.

Link to it in your templates with <$MTCGIPath$><$MTSearchScript$>?Template=rss&IncludeBlogs=<$MTBlogID$>&SearchField=keywords
&search=<$MTSearchString$>
where "rss" represents the name of your template in mt.cfg (for some reason, I found that putting the items in the URL in a different order produced a feed that didn't display properly as RSS in the browser; however, this order works). I link to it on each tag's page. If you're linking to it elsewhere, replace <$MTSearchString$> with the template tag that you use to call the particular keyword tag.

I also created an Index of Tag Feeds to list all the available feeds. I did this by hacking the code for the tag cloud page; this requires PHP. I'm not sure why there's a blank tag at the beginning or why the feed for it is empty. I'll have to look into that further.

November 06, 2005 | 3 Shawwal 1426 Hijriah

allow people to import lists of links from your blog

Suppose that you wanted to display a list of links to all the entries in Al-Muhajabah's Islamic Blogs. Given that there are well over 3000 entries, you would probably not actually want to do this. But suppose that you did.

I've created a file that allows you to do this: OPML List of Entries. To create this, I modified template code from Niall Kennedy. I removed my email address from the template. I also had to add the title attribute after testing with TypePad (see below) to get it to play well there. You can remove the MTOtherBlog tags since that's a quirk of my own installation with multiple blogs. To see my code, scroll down to "OPML List of Entries" here.

So, how do you display this? If you're using Movable Type, install the Outliner plugin. The following code works to create a list of links from the OPML file:

<MTOutliner opmllink="http://www.muhajabah.com/islamicblog/index.opml">
<MTOutlinerItems>
<p><a href="<$MTOutlinerItemHTML$>"><$MTOutlinerItemText$></a></p>
</MTOutlinerItems>
</MTOutliner>

With TypePad, you can import the OPML file into a TypeList. I had to add the redundant title attribute to each item to get it to import the title of each entry, otherwise it came in blank.

That wasn't so difficult after all, was it? If you use Outliner, every time that you rebuild the template with the Outliner code, it will pull the latest list of entries from the OPML feed. However, if you import the OPML into a TypeList, it will not update automatically, you'll just get what is in the feed at the time that you do the import.

Now that I've figured out how to do this and what it can be used for, I'll look into adding some other OPML feeds for Al-Muhajabah's Islamic Blogs, ones that are hopefully more useful than a list of links to more than 3000 entries.

Later: A list of OPML feeds I have created is available at the Index of Feeds.

About This Blog

  • Disclaimer: This is a personal site and is not connected with Six Apart, Ltd, the makers of Movable Type
  • Contact me:
  • Readme: What this blog is and is not
  • Reference: Templates for Al-Muhajabah's Islamic Blogs

February 2007

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28      

Tips by Type

Tips by Area

Other ways to read this blog

Feed Subscribe to this blog's feed
(default is RSS 2.0, I also have RSS 1.0 and Atom)

Text-only version
Powered by
Movable Type 3.2