Tags:
create new tag
view all tags
This arose when I started a page for meeting minutes. I enter people's names in good TWiki format so that when they register they get linked, but of course until that happens the names appear with ? appended which looks ugly and confusing outside the context of TWiki.

My intention is to distribute the meeting minutes as an HTML email (See EmailThisPageLink), using the print skin to remove most of the clutter first.

What I have done for now is to insert the following code in TWiki::internalLink

    if(getSkin() eq 'print') {
        $doLink = undef;
    }

just before the line

    my $text = $thePreamble;

Hard-coding the skin name is nasty, of course. Is there a way to set per-skin or per-template variables? That would be a help towards making a more generic code change possible.

-- NigelArmstrong - 26 Mar 2002

You can just use the <noautolink> tag - search Codev for autolink to find some examples, as it's not formally documented. Another possibility is to set the WebPreferences for a meeting-minutes web (or a meeting minutes page, see TopicVarsPlugin) so that the formatting for 'create new topic' type links is less intrusive - the following settings are in TWikiPreferences, should really be enhanced with a 'no new-topic link' setting:

   * Background color of non existing topic: ( default cornsilk or #FFFFCE ) 
      * Set NEWTOPICBGCOLOR = #FFFFCE 

   * Font color of non-existant topic: ( default #0000FF ) 
      * Set NEWTOPICFONTCOLOR = #0000FF 

-- RichardDonkin - 26 Mar 2002

(I just realised there's a bug in the code I originally entered, probably due to spending more time coding PHP than Perl. I've corrected it above.)

Thanks for your comments, Richard, but what I'm after is a way to vary the rendering of new topic links only when a particular skin is applied. Code inspection suggests some source changes are required, but not the way I've done it.

-- NigelArmstrong - 26 Mar 2002

OK, how about doing a simple plugin (or even putting in the DefaultPlugin) a line that checks for a skin, then looks for non-existent WikiWords and prefixes them with <nop>?) This should have the effect you want. Or you could do something slicker that changes the way non-existent pages are linked. Post your patches here and add a suitable TWikiPatches string, they would be interesting to see.

It would be best if you do a new skin, to avoid having to re-integrate your changes to the 'print' templates on future upgrades.

-- RichardDonkin - 26 Mar 2002

It should now be possible to do this with a variable change and/or a skin with a different CSS now that we have NewTopicLinkStylePatch.

I've marked this as FeatureDone as all the functionality required for this is now in core, even though the skin hasn't been created.

-- SamHasler - 28 Jul 2004

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2004-07-29 - SamHasler
 
  • 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.