Longer summary: s/100/500/g
TWiki Skins Skins overlay regular templates with alternate header/footer layouts. You can use Skins to change the look of a TWiki topic, for example, the layout of the header and footer. Rendered text between header and footer does not change. You can also use Skins to define an alternate view, like a view optimized for printing. To see the installed TWikiSkins, see TWikiSkinBrowser. See More Tips... TWiki:Main.PaulineCheung 30 Jan 2005
Read on
TWiki Skins Skins overlay regular templates with alternate header/footer layouts. You can use Skins to change the look of a TWiki topic, for example, the layout of the header and footer. Rendered text between header and footer does not change. You can also use Skins to define an alternate view, like a view optimized for printing. To see the installed TWikiSkins, see TWikiSkinBrowser. See More Tips... TWiki:Main.PaulineCheung 30 Jan 2005
Read on
Parse the guts:
<div class="tipsOfTheDay"><div class="tipsOfTheDayContents">
<strong class="tipsOfTheDayHeader">%ICON{tip}% TWiki Tip of the Day</strong>
<div class="tipsOfTheDayText">%CALC{$SET(webtopic, $LISTRAND(%SEARCH{ "^TWiki[Custom]*Tip[0-9A-Z]" web="%TWIKIWEB%, %MAINWEB%" topic="TWiki*Tip*" scope="topic" type="regex" casesensitive="on" nosearch="on" nototal="on" separator=", " format="$web.$topic" noheader="on" }%))$SET(pos, $FIND(., $GET(webtopic)))$SET(web, $REPLACE($GET(webtopic), $GET(pos), 100))$SET(topic, $REPLACE($GET(webtopic), 1, $GET(pos)))}%
%CALC{$NOP(%)SEARCH{ \"^$GET(topic)$\" web=\"$GET(web)\" scope="topic" regex="on" nosearch=\"on\" noheader=\"on\" nototal=\"on\" limit=\"1\" format=\"<span class=\\"tipsOfTheDayTitle\\">[[%SCRIPTURL{view}%/$web/$topic][$pattern(.*?\-\-\-\+([^\n\r]+).*)]]</span><br /> $summary(100, noheader) [[%SCRIPTURL{view}%/$web/$topic][%MAKETEXT{"Read on"}% <img src=\\"%ICONURL{more-small}%\\" alt=\\"Read more\\" title=\\"Read on\\" width=\\"13\\" height=\\"13\\" border=\\"0\\" />]]\"}$NOP(%)}%
</div>
</div>
</div>
- Indented for comprehension.
- Does not function with all the spaces shown here for parsing.
<div class="tipsOfTheDay">
<div class="tipsOfTheDayContents">
<strong class="tipsOfTheDayHeader">%ICON{tip}% TWiki Tip of the Day</strong>
<div class="tipsOfTheDayText">
%CALC{
$SET(webtopic,
$LISTRAND(
%SEARCH{ "^TWiki[Custom]*Tip[0-9A-Z]"
web="%TWIKIWEB%, %MAINWEB%"
topic="TWiki*Tip*"
scope="topic"
type="regex"
casesensitive="on"
nosearch="on"
nototal="on"
separator=", "
format="$web.$topic"
noheader="on"
}%
)
)
$SET(pos,$FIND(.,$GET(webtopic)))
$SET(web, $REPLACE($GET(webtopic), $GET(pos), 500))
$SET(topic, $REPLACE($GET(webtopic), 1, $GET(pos)))
}%
%CALC{
$NOP(%)SEARCH{ \"^$GET(topic)$\"
web=\"$GET(web)\"
scope="topic"
regex="on"
nosearch=\"on\"
noheader=\"on\"
nototal=\"on\"
limit=\"1\"
format=\"<span class=\\"tipsOfTheDayTitle\\">
[[%SCRIPTURL{view}%/$web/$topic][$pattern(.*?\-\-\-\+([^\n\r]+).*)]]
</span>
<br />
$summary(500, noheader)
[[%SCRIPTURL{view}%/$web/$topic][%MAKETEXT{"Read on"}% <img src=\\"%ICONURL{more-small}%\\" alt=\\"Read more\\" title=\\"Read on\\" width=\\"13\\" height=\\"13\\" border=\\"0\\" />]]
\"}
$NOP(%)}
%
</div>
</div>
</div>
--
DickFurnas - 10 Apr 2007