wiki-archive/twiki/data/TWiki/TWikiTipsOfTheDayInclude.txt

20 lines
1.4 KiB
Plaintext

%META:TOPICINFO{author="TWikiContributor" date="1167969723" format="1.0" version="2"}%
%META:TOPICPARENT{name="TWikiTipsOfTheDayAdmin"}%
---+ TWiki Tips Of the Day Include
This Page randomly picks a Tip of the day to display. The %HOMETOPIC% includes the part between the horizontal rules.
-----
%STARTINCLUDE%
<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"}%&nbsp;<img src=\\"%ICONURL{more-small}%\\" alt=\\"Read more\\" title=\\"Read on\\" width=\\"13\\" height=\\"13\\" border=\\"0\\" />]]\"}$NOP(%)}%
</div>
</div>
</div>
%STOPINCLUDE%
-----
__See also:__ TWikiTipsOfTheDay, TWikiTipsOfTheDayAdmin