Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/deb7131n5/domains/ on line 14

Deprecated: Function split() is deprecated in /home/deb7131n5/domains/ : eval()'d code on line 471
Maxvoltar - Textpattern tips for a happier life

Maxvoltar is the personal weblog of Tim Van Damme, a freelance interface designer at Made by Elephant.

50° 54' 47" N, 4° 25' 50" E

Textpattern tips for a happier life

The new design gave me a good reason to add some extra features to this site. Besides a full-blown archive, I also added some features only visible for me.


I’ve talked about this plugin before. Rss_article_edit is something I think should be built into Textpattern by default. It adds a link to each article that lets you edit it with one click. Once you’re done editing, you just click “View” on the edit page, and you’re back at the article page. I add the links to the title. My code looks like this:


<small> gives me a hook to give it a different style. But this is a personal preference. Maybe it’s just me being picky ;) The end result looks something like this:

Left: What you see – Right: What I see


This isn’t a plugin (yet?), but more a piece of code Sam Brown wrote after we were chatting about rss_article_edit. His side of the story:

Tim asked me earlier if it was possible to display a list of links in Textpattern but only to him, admin only links if you will. Not 30 seconds later and we had this whipped up for placement anywhere within your Textpattern template.

Basically, it checks whether you’re logged in as an admin. If so, it’ll display whatever you want. This way, you can display links you frequently use to update your site. I suggest you read Sam’s article on it for more details. One small tip: Use single quotes in the HTML you want it to output.

Left: His – Right: Mine

That’s it, 2 tricks that’ll make maintaining your site just a little bit more fun! Would love to hear if there are other things you use!


  • Marcus

    3691 days ago

    Why don’t you just use the rvm_privileged-Plugin?

  • mathiasbaert

    3691 days ago

    Nice quick hack, just make sure you realize it’s hidden, not protected. Now it’s only links, so no harm done, but I easily made them visible by adding your cookie myself with the powercombo firefox+firebug+firecookie.

    Also, I like the new design.

  • Mark Otto

    3690 days ago

    Sweet—interesting take on this, especially since I have no real experience with Textpattern. I stick to WordPress and Markdown—and the occasional Rails stuff with WordPress has edit links built in with their template tags, a mighty powerful system if I may say so myself.

    Having a slightly different view on the same data is also a trend I see catching on more and more. Being able to make on-the-fly edits and changes is pretty sweet and intuitive.

    Consider visitors see descriptions, but if you’re logged in, you can hover and click to edit titles and descriptions. Brilliant!

  • Tim Van Damme

    3690 days ago

    @Mark Otto: It’s something I’ve been trying to add to client work more and more. But of course, it always depends on the context of the project.

  • Noel Hurtley

    3687 days ago

    I love the new design! It really puts the focus on your writing.

    I second the comment about rvm_privileged, It’s an awesome plugin. I actually just eliminated rss_article_edit from my sites by using the following code to achieve the same thing: <txp:rvm_if_privileged><a href="/textpattern/index.php?event=article&step=edit&ID=<txp:article_id />">Edit</a></txp:rvm_if_privileged>

    Please note that if for some reason you haven’t installed Textpattern at your domain’s root directory then simply add <txp:site_url /> before /textpattern/ and the template parser will generate an absolute URL.

  • Destry Wion

    3684 days ago

    Third on the rvm_privileged.

    Also, another small plugin that I find a lot of value with is zem_article_info. It simply keeps a separate (and combined) word count in the Write panel for the excerpt and body copy. This has proven very valuable where contributing authors must keep submissions within a restricted word count to be published. There’s also a version called lam_article_info that uses JS to display the counts live as you type. I prefer the original, which updates the counts on each save. Both can be found here.

  • John Stephens

    3684 days ago

    Thanks Noel!

    Like Tim, I’ve been using rss_article_edit as an essential plugin for TXP, and one drawback of this method is that you need to instruct clients to set their own cookies for the plugin to work (unless I’m doing it wrong?). But using rvm_privileged in the way you suggested just works. Awesome.

    And Tim, thanks for giving us a place to get smarter.

  • Josh Stephens

    3680 days ago

    I’m glad you found it useful John. I’m sure the concept could be extended to categories and other types of content.


Commenting is closed for this article.


Powered by Fusion