Deprecated: Function set_magic_quotes_runtime() is deprecated in /users/home/kjell/web/public/textpattern/lib/txplib_db.php on line 14

Deprecated: Function split() is deprecated in /users/home/kjell/web/public/textpattern/lib/txplib_misc.php(571) : eval()'d code on line 352
Print Link URLs in Instiki → log → station11
  1. 15 December 2004

    Print Link URLs in Instiki

    It bothered me that I couldn’t see what url my wiki page was referencing when I printed the page out, and fixing it really wasn’t too hard, so here ya go.

    All you need is some css magic, I have it set up now so that it only prints out links outside of the wiki, links prefixed with http://.

    Just change line 4 ( @style_additions = ".newWikiWord { background-color: white; font-style: italic; }") of instiki/app/views/wiki/print.rhtml into this:

     @style_additions = ".newWikiWord { background-color: white; font-style: italic; }" + 
    "\n\ta[href^=\"http://\"]:after { content: \" [url: \"attr(href)\" ] \";}" +
    "\n\ta:after { color: #777; }"

    And then the actual link will print out after the link text. Unless you use IE, in which case you don’t really deserve the coolness.

    tags:

  2. Vacation | Recommended