Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
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"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
  3. Add this/these line(s) after <head>:

    <style>.popup{color:#333;cursor:help;text-decoration:none}
    .popup:hover{background-color:#fc3;}</style>


    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:

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

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

    e.g.
    '" 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:

    Find
    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.
    e.g.
    '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.

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

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.

Browse

Categories


Articles

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