Textpattern notes Part 1

22 Jun 2004

As and when I get time, I’m going to post some more information about this site’s conversion over to Textpattern. I’m going to evangelise it until I’m blue in the face.

There were quite a few little tweaks I had to make, but here are just a few notes to be getting on with…

Clean URLs for the news feeds

Create your folder structure (such as /feeds/rss/) and place the following code in an index.php file in that last directory:

<pre><?php header('location: /?rss=1&section=journal'); ?> </pre>

Just replace ‘rss’ for ‘atom’ if you need that feed too. I’ve also specified that the feed should come from my journal section, but you if you just run Textpattern as a blog you leave this out. Thanks to Drew McLellan of Allinthehead for this one.

Shortstats

In order to get Texpattern and Shaun Inman’s Shortstats working in harmony, I placed the shortstat include at the bottom of each of the section text files in the root. For example, in the ‘article’ file you would have :

<pre><?php include "./textpattern/config.php"; $s = "article"; include $txpcfg["txpath"]."/publish.php"; textpattern(); include($_SERVER["DOCUMENT_ROOT"]."/shortstat/inc.stats.php") ?> </pre>

Mixing hard coded and txp driven pages

In the about section, I needed to do something clever for the ‘about hicksdesign’ page, wheareas the colophon and the contact pages would essentially be just articles.

Using the If_category plug-in by Matthew Moss, I set up the ‘about’ section page to show the hard coded content if the category=hicksdesign, and just a plain article for the others:

<pre><txp:mdm_if_category category="hicksdesign"> ....hard coded content in here.... </txp:mdm_if_category> <txp:mdm_if_category category="colophon,contact"> <txp:article limit="1" form="about" /> </txp:mdm_if_category> </pre>

This method is also used to alter the layout between the desktops page and the other downloads pages.

Recent Posts

It’s just fashion

26 Jun 2018

The Symbol Sourcebook

08 Jun 2018

Differences between Icon and Logo Design on This is HCD Podcast

10 Apr 2018

Twelve South PencilSnap

01 Apr 2018

The Infinite Canvas

09 Feb 2018

Blade Runner 2049

14 Oct 2017

Instagram Hickstagram

  • 14 Jul 2018

    Stopping for a breather - hot day for hills

  • 13 Jul 2018

  • 09 Jul 2018

    Recent garden addition: Stargazer Lillies

  • 07 Jul 2018

    Well… we missed quite a few key acts, but have made it here before Interpol starts at least!

  • 07 Jul 2018

    On our way to BST in Hyde Park. Or… not 😞

  • 06 Jul 2018

    My favourites from this years On Form Sculpture exhibition. The whale was my absolute favourite, but was already sold (which is fine as I don’t have a spare £11,000)

  • 01 Jul 2018

  • 01 Jul 2018

    Not quite in height order. Sort it out

  • 01 Jul 2018

    Filth.

  • 30 Jun 2018

    Agapanthus about to burst forth

Contact us

Call Jon on +44 (0)7917 391536, email or tweet @hicksdesign.

Alternatively, pop in for tea and cake at the studio…

Hicks
Wenrisc House
Meadow Court
Witney, OX28 6ER
United Kingdom