Content last modified Monday 6 March 2017
hop to #bottom
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Tooltip popups and notes on admin screen

The basic answer is this:
to edit the admin screen, edit \textpattern\include\txp_article.php

If you’d like further instructions, keep reading…
(If the information seems really elementary, please pardon me… it took a bit of fiddling for me to figure this stuff out and I’m documenting this in detail with the expectation that I’ll have to refer to it myself in the future.)

Enable tooltips with CSS
  1. Open up \textpattern\lib\txplib_head.php
  2. Find the page header code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <html xmlns="" xml:lang="en" lang="en">
  3. Add this/these line(s) after <head>:


    The .popup:hover style is entirely optional, you may certainly adjust the color and other styling to your preference.

Now you can add tooltips to your admin article-entry screen.

Adding text to the page
This can be general text—doesn’t have to be tooltipped.

The edits you make to the page are up to you; the page you’ll need to edit is \textpattern\include\txp_article.php

Example edits:

  • To add text next to the Title field:

    //-- title input --------------

    and add your text/html after the
    '" class="edit" size="40" tabindex="1" />

    '" class="edit" size="40" tabindex="1" /> Title* <span title=" Please see the \'Note on titles\' below " class="popup">[?]</span>'
  • To add text between the Body and Excerpt fields:

    echo '<textarea style="width:400px;height:360px" rows="1" cols="1" name="Body" tabindex="2">',htmlspecialchars($Body),'</textarea>';

    and enter your text/html code after </textarea>

    e.g. ...htmlspecialchars($Body),'</textarea><br /><p>* <strong>Note on titles</strong>: you must have a title for this article.</p>';

To change existing text on the admin page, you edit \textpattern\lang\en_gb.txt or your other language files.

Tooltips on Custom Fields
  1. Open \textpattern\lib\admin_config.php
  2. Find the custom fields bit
    // use custom fields for articles - must be in 'quotes'
  3. Add your custom text for the custom fields.
    'custom_2_set' => '<span title=" enter your/website URL here " class="popup"><strong>Website</strong> [?]</span>',

Article Request Count:
Posted here:
03 Mar 2005
Article modified:
17 Mar 2005

Comments/questions? Leave a message in the form.

Commenting is closed for this article.

Commented (3)

Regarding custom fields:
they appear under the name which you give them in admin_config.php
yes, as andreas said.. you can find more about that at the Customizing Custom Fields article

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern