A painting of me

Friendly Time Plugin

   5 January 2005, the wee hours

I’ve written plugin implements the idea discussed by Dunstan on his personal blog about displaying the time a post was published in a friendly manner. Simply place the <txp:rsx_time_of_day /> tag in an article template form and it will print out the time in a friendlier manner. For example, 12:00 will get turned into “lunch time”. I’ve basically copied his code verbatim. You can go and change what is output by editing the switch statement.

Download the plugin: rsx_time_of_day.txt

update: Bug Fix, $timeoffset was not declared as a global variable.

Comment [9]  

Import Moveable Type Export File into Textpattern

   18 December 2004, early afternoon

I’ve modified the Wordpress Moveable Type import script so that it will import posts, comments, and primary categories from a moveable type export file into a textpattern database. I think that under the GNU license my changes are OK.

Read the rest of this post. (413 words)

Comment [16] |  

Referrer Spam

   15 December 2004, the wee hours

In an attempt to clean up my referrer logs which have become inundated with spam, I have blocked requests to this page from referrers with at least 2 dashes in their name that are .info domains. If you notice any problems please let me know. Of course, the problem here is that if you do have any problems, you probably won’t see this post.

I am blocking the spam using the following commands in my .htaccess file:

  1. RewriteEngine on
  2. RewriteBase /
  3.  
  4. RewriteCond %{HTTP_REFERER} ^.*(-).*(-).*(-).*$
  5.  
  6. RewriteRule ^.* � [F,L]
  7. Download this code: /static/code/5.txt

This will turn on mod_rewrite, check if the referrer URL has 2 dashes and ends in .info, and if it does send back a forbidden error.

Comment [1]  

Boring Comments

   1 December 2004, early evening

I’m not one to erase comments, but I will if someone posts something I think is thoroughly uninteresting, on a post I made several months ago. For example “o brother where art thou wasn’t that good either” made by an anonymous coward on my post about the Ladykillers qualifies as a thoroughly uninteresting comment made on a post I made several months ago. You can’t find the comment itself anymore because I erased it.

Comment [4]  

Internet Explorer

   16 November 2004, lunch time

Sometimes I wonder why people who visit my site are still using Internet Explorer. Of course, not everyone out there is aware that Netscape has been reborn as Phoenix Firebird Firefox. However, I expect people who read this site must be aware of Firefox’s existence; I’ve mentioned the browser several times here. There are of course plenty of reasons why people are not using Firefox: people browsing at work who are not allowed to install Firefox; people who love getting spyware; people who aren’t allowed to install new software on their own computers; I actually can’t think of other reasons.

I have noticed the following bugs in the way my site is displayed when viewed in Internet Explorer 6:

  • Margin/Padding at the top of each link-log entry is too big. I suspect this is a first-child bug.
  • Dashed borders instead of dotted borders separate posts and link-log blocks. Internet Explorer can’t display dotted borders.
  • There is no margin at the bottom of the page. The box white box my posts are all inside rests right against the bottom of the browser window.
  • There are two borders displayed at the top of the definition list used to display my archive listing. This is another first-child bug.
  • The way the lists display on my links page is strange.
  • The way recent comments display is ugly to say the least.

I hope to fix these bugs shortly. Have you noticed any other quirks? No, of course you haven’t, because you use a good web-browser; Nice job!

Comment [11]  

Comments

   28 October 2004, the wee hours

I usually promise people I will start working on various hacks or plugins for Textpattern, but then promptly forget what it was I am supposed to be doing. So, instead of working on such a request I fixed something that has been bugging me about my site, which is how comments are displayed.

Read the rest of this post. (187 words)

Comment [2]  

Building a 404 Error Page in Textpattern

   29 July 2004, evening time

This is a concise outline of what I did to get a custom 404 page working with Textpattern. You can read my earlier post on such pages for background.

Read the rest of this post. (550 words)

Comment [6] |  

Request Count

   26 July 2004, early evening

I’ve written a Textpattern plugin to count the number of times an individual article is requested. This isn’t the most accurate way to gauge the popularity of an article, but it is probably the simplest.

Read the rest of this post. (184 words)

Comment [5]  

Building a Links Log in Textpattern

   23 July 2004, the wee hours

Here are the very gory details on how I went about merging my del.icio.us links into my textpattern site, and how I intend to post links hence forth. A horrible account of what I did follows…

Read the rest of this post. (1437 words)

Comment [23] |  

Del.icio.us Links on the Front Page

   22 July 2004, terribly early in the morning

I believe I’ve mentioned a few times I wanted to display my del.icio.us links on the front page of this site. I’ve grown quite fond of this layout, and really don’t want to add another column of text where the links could go. I experimented with listing the ten most recent links at the top of this page, but was unhappy with the result. Kottke and Plasticbag displays links and posts in a fashion I found most appealing; both sites list their interesting links inbetween their posts. I set out to duplicate Jason Kottke’s style in textpattern.

The details are long and boring. The way I store the links in textpattern is essentially what sencer describes in this textpattern forum thread.

The next step will be to import all my del.icio.us links into textpattern, and from here on out post to both del.icio.us and textpattern. I’ll probably write my own form to do this. Or something.

The question to ask now is, does this layout work? How do the links look on the page? What are your opinions on this whole endeavour?

Comment [4]  

404 Pages

   20 July 2004, early evening

I’ve made a custom 404 / Not Found page for my web site. I felt inspired after reading an interesting write up about them at GraphikJunkie.

Because of my use of mod_rewrite rules and some holes in textpattern, my site is a bit wonky when you stray off the beaten path. Some requests that should return a 404 will not because textpattern will simply complain the requested section does not have a corresponding page template (example). Similarly, some requests for non-existent categories will return blank pages, instead of a 404 (example). Have you guys come across other instances of pages not showing up as you would expect. I hope to fix all these issues at some point in time.

Update: I fixed the problems I was having with 404 pages not showing up for bad section and bad category requests. As it stands a 404 should be correctly served up in all cases where one is required. I will write up a short how-to on the subject shortly since this is probably useful information.

Comment [4] |  

My Textpattern Install

   10 July 2004, mid-afternoon

I’ve been asked a few times how I went about modifying Textpattern to end up with the URLs I have. I was planning on writing it all up in a tutorial of some sort, but I have been lazy.

Read the rest of this post. (282 words)

Comment [8]  

Accessible Comment Forms in Textpattern

   6 July 2004, late evening

A question was posed on the textpattern forum on how one can set up the comment forms in textpattern so they are more accessible. What follows is how I went about doing so.

Read the rest of this post. (265 words)

Comment  

A New Style

   25 June 2004, terribly early in the morning

I am experimenting with an alternate style for the site. You can see what I have done so far by clicking on the Stripes. I haven’t tested it out much, but it should look alright in Safari. I’ll be mucking around with colours and fonts next, the layout should basically remain the same. I’m using the PHP style switcher that was written up at A List Apart. The PHP code in the article is way out of date however, so read the forum posts if you are interested in doing something similar.

I’m using Goudy Old Style as my font for this new layout. I don’t know if that’s something only other Mac users can enjoy. Someone in the PC world is going to have to let me know. I’m still not sure about the colours for text, links and what have you. What do people think of the other layout?

Comment [9]  

Oh How I Love My URLs

   22 June 2004, terribly early in the morning

I’ve decided to change the name of one of my sections, the one I post my entries to, from immaculate to blog. So, the URLs for my entries will now contain the word blog instead of the word immaculate. When the site was called The Not So Immaculate Conception, having immaculate in the URL made more sense. As it stands, blog is shorter, and people who see the URL will understand what it is they are linking to—nothing of substance.

All your old links should still work, as far as I can tell.

Comment  

Open Comments in Textpattern after an Import

   15 June 2004, terribly early in the morning

Here is a script you can run after the fact to open up commenting on posts imported by my script.

open-comments.php.txt

Place the script in your textpattern directory, rename it from open-comments.php.txt to open-comments.php, and run it by browsing to the page in your web browser. I’ve ran it on my install at home, and it seems to work fine. It will run the following query:

update textpattern
set annotate = 1;

This will open up commenting on ALL your posts. This script is meant for people who don’t have access to phpMyAdmin, or don’t want to run a SQL query themselves.

Comment [1]  

More Upgrade News

   9 June 2004, evening time

I’m experimenting with a new URL scheme. There should no longer by IDs in the permanent URLs to my articles. You can still link to stuff using the ID, so older links you may have to my posts should still work. So, don’t expect links to work properly for the next little while.

Comment [2]  

Upgrade

   9 June 2004, the wee hours

I’ve just upgraded the site to the new version of Textpattern. Please let me know if you come across any problems with the page?

Comment [2]  

A Blog is a Book you Read Backwards

   27 May 2004, late evening

Weblogs are usually formatted so that the most recent post is the first thing you read, with posts being displayed in reverse chronological order. So, when you assign page numbers to the pages in your weblog, in a sense you are assigning them all backwards. Worse still, after a few posts, entries that used to be on page 1 will now be on page 2, those on page 2 on page 3, and so on and so forth. For this reason, I’m not sure how worthwhile it is to use page numbers as a navigation tool for most weblogs.

I’ve updated my page number plugin. You can now generate page number lists as navigation elements. If you have a 50 page entry weblog, and you are viewing page 10, then the tag will generate something like this: 1 … 8,9,10,11,12 … 50. Each number would be a link to the appropriate page.

The tag generates an unordered list, so you will need to style it to have it display as I’ve shown above. The CSS you will want to use would be the following:


ul.rsx-page-num-list{
    display:inline;
    list-style:none;
    margin:0px;
    padding:0px;
}
ul.rsx-page-num-list li {
    display: inline;
}

Please let me know if you find any problems.

rsx_page_number.txt

Comment [6] |  

URLs

   24 May 2004, late afternoon

I’m mucking around with my URLs again. First, I’ve made a new section which lists the categories you can view posts by, which you can see listed above. I’ve removed the archive section for the time being. Second, now when you browse by a category, the URL will be /category/category_name/. I thought this would be more clear then /-/category_name, which was what I was using before.

Also, I’m sure many of you don’t really care what my URLs look like now. If you are such a person, and would like to ignore these sorts of posts in the future, you may want to point your browswer here instead: http://www.funkaoshi.com/immaculate/. That section of my site does not include any of these posts about how my site is being put together, but is otherwise identical to the main page.

Comment  

Page Number Plugin

   18 May 2004, early morning

I’ve written a plugin for textpattern that will display the current page of you are on when viewing an articles list page. Someone on the Textpattern forum asked for such a thing. Hopefully this is what she wanted.

rsx_page_number.txt

Update May 18th: The plugin now can be used to find the current page, and the total number of pages. There is also a tag that will generate a navigation widget that looks something like “ << Page 4 of 7 >> “.

Update May 19th: The plugin now lets you specify what text to use for the right and left navigation, and is enclosed in span so you can style the navigation element with css.

Update Sept 2nd 2005: The un-linked page number in the list generated by rsx_page_number_list is now wrapped in a span tag with a class of unlinked.

Update Oct 20th 2007: Jean Rajotte has updated the plugin; more details can be found on his web site.

Comment [20] |  

A Word Count plugin.

   10 May 2004, the wee hours

There was a request in the Textpattern forum for a word count plugin. I got to work on one shortly after reading the post, because it sounded like something that would be easy to do. The result of my work is this plugin. This is my firsrt plugin for Textpattern. My next goal is to make some of the modifications I made to this site into plugins. As it stands, upgrading to the next version of Textpattern is going to be a pain in the ass.

Update: My plugin works, but I have switched to using Plek’s Word Count plugin as it gives slightly more accurate numbers.

Comment [6]  

Del.icio.us Links Are Here To Stay

   8 May 2004, terribly early in the morning

I figured out how to display the links I store at del.icio.us here at this site as well. Currently, you can view them on the links page.

What’s going on? How does this all work? Why, I’m glad you asked.

  1. When I find a link I like, I can make note of it with the del.icio.us bookmarklet. The site will then be saved at my del.icio.us home page.
  2. I found a python script that will query del.icio.us for the links you saved on a given day. I modified the script so that it will instead find the last 10 links you saved. The links are retrieved and formated into a small snippet of HTML, which gets saved on my computer. This file is then securely copied to funkaoshi.com using scp. Running python program and copying the file I made into a shell script.
  3. The shell script gets run 4 times a day using cron. cron is a program that will run jobs at times you schedule. I didn’t know how cron worked previously, but thankfully it is quite simple to use. I found a great site that taught me enough to get by.

What I would ultimately like to do is have a bookmarklet that will let me quickly save links in textpattern, and post those links to del.icio.us. Update: I have done this!

I’m quickly running out of things I can think of to do with this site. I will probably start reading Quicksilver shortly.

Comment [4] |  

New URL

   7 May 2004, the wee hours

This site can now be reached at http://evilurl.com/hornyWankerTitty. If you would like your own evilurl, go to evilurl.

Comment |  

Clean URLs in Textpattern

   2 May 2004, late afternoon

How I went about getting cleaner URLs in TXP 1.18a.

Read the rest of this post. (796 words)

Comment [21] |  

← ← ← → → →