THETEXTPATTERNENGINE

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, 06: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, 04:41 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.

    Natural Kinds in Chemistry

    One of my favorite courses so far was last semester’s “Natural Kinds”. Everything from the unique subject matter to the seminar-like structure made the class a blast, up until the...

    Read More

  • 260.

    The Phenomen- ology of Freedom

    Are we truly free? Are the paths of our lives charted beforehand, or is every moment an opportunity to break new ground? The answer isn’t easily found, the determinate physical world seems to hit a...

    Read More

  • 260.

    An Open Letter to God.

    So here’s the deal, we’ve been here a while doing great things and…eh things, but there’s always been that trickling or gushing concern about why. We’re amazing, when you stop to think...

    Read More

  • 260.

    Nietzsche: The Fast Track

    The darkly dressed student made yet another existentially pessimistic remark and the professor unleashed one of the harsher insults I’ve heard: “Every student goes: Nietzsche, Schopenhauer,...

    Read More

  • 260.

    Computers and God

    I came across an interesting presentation on digg (and surprisingly, it wasn’t a kitten with horrifying spelling/grammar) recently that compared – albeit often fallaciously – our...

    Read More

  • 260.

    Surviving Life

    The questions we ask are not ones we can ponder in our free time and easily set aside when there’s life to do. What am I? Am I free? What is the purpose of my existence? Why should I strive to...

    Read More

  • 260.

    The New Erratic Wisdom

    Another semester, another redesign (give it a solid refresh to clear your cache). This one’s been brewing for quite some time now, with the notched grid motif coming around a few months ago,...

    Read More

  • 260.

    Imperfect Art

    Plato’s metaphysics and his Doctrine of Forms describes a general division of our universe into forms and particulars. Forms are instantiated by contingent particulars. That is, particulars are...

    Read More