Tags:
create new tag
view all tags

Question

How can I define / change the style of auto - links to Non Existing Topics ? Does it always have to be a yellow background ?

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Win 2000 sp4
Web server: Apache 1.3.28
Perl version: 5.6.1
Client OS: Win 2000 sp4
Web Browser: Mozilla Firebird 0.6.1

-- BorisHolzer - 22 Oct 2003

Answer

We were talking about this on TWikiIRC only yesterday. To date the colour is a preference (NEWTOPICFONTCOLOR) but the format "word?" is not, that is hardcoded in the code.

It's in TWikiDotPm, about line 2392

} elsif( $doLink ) {
        $text .= "<span style='background : $newTopicBgColor;'>"
              .  "<font color=\"$newTopicFontColor\">$theLinkText</font></span>"
              .  "<a href=\"$scriptUrlPath/edit$scriptSuffix/$theWeb/$theTopic?topicparent=$webName.$topicName\">?</a>";
        return $text;

    } 

If you'd like to contribute code to make this configurable we'd be eager to incorporate your changes.

-- MartinCleaver - 22 Oct 2003

The new topic background color is not hardcoded, see code:

    $newTopicBgColor   = TWiki::Prefs::getPreferencesValue("NEWTOPICBGCOLOR")   || "#FFFFCE";
    $newTopicFontColor = TWiki::Prefs::getPreferencesValue("NEWTOPICFONTCOLOR") || "#0000FF";

Change the NEWTOPICBGCOLOR setting in your TWikiPreferences

-- PeterThoeny - 22 Oct 2003

Thanks for posting that code, Martin. I can't believe I (think I) can understand most of it. But, I really don't know what the periods (".") represent — are they line continuation marks? (The second two, maybe?) What about the first (in ".=")?

-- RandyKramer - 23 Oct 2003

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2003-10-23 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.