The Textpattern Engine

Part 2: The Textpattern Engine

This article is about the Textpattern CMS itself and what you should know about it. The Wikipedia Article covers its basic history if you’re interested; otherwise, let’s get started.

The file structure is fairly simple. Areas seen by the public are in the root directory while the engine itself is found in the “textpattern” directory.

You will most likely not have to edit anything, because almost anything can be accomplished through the variety of tags or plugins available. However, if you do find the need to hack your site into perfection, it’s good to know where the important files are.

Obviously, anything related to comments is found in the “publish/comment.php” file. This also include the code for the comment form if you would like to fix up the tabindex. This is also the place to go if you want to wrap your comments in a div or otherwise modify the commenting system.

Another important file handles all of the tags used within the CMS and can be found at “publish/taghandlers.php”. You would only have to modify anything in this file if the tags output or function is not exactly what you’re looking for. For example, on my home page, I modified the <txp:comments_invite /> tag such that the invite text and count would be contained in the anchor. The file is very well commented and you can find the particular tag handler you’re looking for by searching for the name (ex. I searched for “comments_invite” in the example above).

Obviously, you might make some modifications to the root “index.php” in order to have an effect on all pages produced. Some people add their statistics code in this file for example.

Update: I neglected to mention an important aspect of Textpattern, it’s language file. The language information controls almost all of the actual words outputted by the CMS ranging from error messages to administrator-side text. Actually, in recent versions, it has lost it’s “file” status and has been integrated in the main database. It is helpful to know how to modify this if you want to personalize your site; for example, if you wanted to change the default “Thank you” response for comments, you would do a search (in PHPMyAdmin or similar) in the “txp_lang” table of your database for the text and replace it with whatever you want.

That’s pretty much it for the Textpattern Engine. If I missed something or would like me to elaborate on a specific part, leave a comment below.

  1. its breaking my mind

    cashmaniac

    Feb 21, 03:24 PM #

  2. Hi everyone,
    just downloaded TXP, made some changes in the defult page and CSS. How can I preview what I have done so far? I don’t have URL for my site yet though.

    Thanx in advance!

    cosmique

    Mar 23, 01:41 PM #

  3. > This also include the code for the comment form if you would like to _ fix up_ the tabindex.

    What’s the tabindex? (the order in which things are highlighted when you press <tab>?>
    The _ fix up_ link doesn’t work

    > wrap your comments in a div or otherwise modify the commenting system.

    What are comments? What I’m writing right now?

    As a [retired] technical writer I can say that it’s not not a good idea to introduce new terminology without defining it.

    (I’m approaching txp very gingerly. The exisiting site I work on is written in straight html/css but I think perhaps cms might be a better way to go. would give others the ability to edit pages…)

    harryg

    Apr 8, 11:00 PM #

Add a Comment

Phrase modifiers:

_emphasis_
*strong*
__italic__
**bold**
??citation??
-deleted text-
@code@

Block modifiers:

bq. Blockquote
p. Paragraph

Links:

"linktext":http://example.com


Show Articles By:

You can show articles by time or category.

  • 260.

    The Ethics of Practicing Procedures on the Nearly Dead

    The report from the field was not promising by any stretch, extensive trauma, and perhaps most importantly unknown “downtime” (referencing the period where the patient received no basic care like...

    Read More

  • 260.

    The Ethics of Teaching Hospitals

    I can’t imagine what the patient was thinking. Seeing my trembling hands approaching the lacerations on his face with a sharp needle. I tried to reassure him that I knew what I was doing, but the...

    Read More

  • 260.

    Conscious Conversation: Behavioral Science

    Dr. Eran Zaidel is a professor of Behavioral Neuroscience and faculty member at the Brain Research Institute at UCLA. His work focuses on hemispheric specialization and interhemispheric interaction...

    Read More

  • 260.

    Progress Report

    Two years down, I’m still going. The next two years are my clinical rotations, the actual hands-on training. It’s a scary prospect, responsibilities and such; but it’s equally exciting, after...

    Read More

  • 260.

    Why Medical School Should Be Free

    There’s a lot of really great doctors out there, but unfortunately, there’s also some bad ones. That’s a problem we don’t need to have, and I think it’s caused by some problems with the...

    Read More

  • 260.

    The Cerebellum: a model for learning in the brain

    I know, it’s been a while. Busy is no excuse though, as it is becoming clear that writing for erraticwisdom was an important part of exercising certain parts of my brain that I have neglected...

    Read More

  • 260.

    Conscious Conversation: Philosophy

    Daniel Black, author of Erectlocution, was kind enough to chat with me one day and we had a great discussion – have a listen.

    Read More

  • 260.

    The Stuff in Between

    I’m actually almost normal when not agonizing over robot production details, and quite a bit has happened since I last wrote an update. First, I’ve finally graduated. I had a bit of a...

    Read More