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
--
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