1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/data/TWiki/TWikiTipsOfTheDayInclude.txt,v Sat Jan 26 15:50:53 2008 +0100
1.3 @@ -0,0 +1,95 @@
1.4 +head 1.3;
1.5 +access;
1.6 +symbols;
1.7 +locks; strict;
1.8 +comment @# @;
1.9 +
1.10 +
1.11 +1.3
1.12 +date 2008.01.22.03.21.32; author TWikiContributor; state Exp;
1.13 +branches;
1.14 +next 1.2;
1.15 +
1.16 +1.2
1.17 +date 2007.01.16.04.11.56; author TWikiContributor; state Exp;
1.18 +branches;
1.19 +next 1.1;
1.20 +
1.21 +1.1
1.22 +date 2006.02.01.12.01.24; author TWikiContributor; state Exp;
1.23 +branches;
1.24 +next ;
1.25 +
1.26 +
1.27 +desc
1.28 +@new-topic
1.29 +@
1.30 +
1.31 +
1.32 +1.3
1.33 +log
1.34 +@buildrelease
1.35 +@
1.36 +text
1.37 +@%META:TOPICINFO{author="TWikiContributor" date="1167969723" format="1.0" version="3"}%
1.38 +%META:TOPICPARENT{name="TWikiTipsOfTheDayAdmin"}%
1.39 +---+ TWiki Tips Of the Day Include
1.40 +
1.41 +This Page randomly picks a Tip of the day to display. The %HOMETOPIC% includes the part between the horizontal rules.
1.42 +
1.43 +-----
1.44 +%STARTINCLUDE%
1.45 +<div class="tipsOfTheDay"><div class="tipsOfTheDayContents">
1.46 +<strong class="tipsOfTheDayHeader">%ICON{tip}% TWiki Tip of the Day</strong>
1.47 +<div class="tipsOfTheDayText">%CALC{$SET(webtopic, $LISTRAND(%SEARCH{ "^TWiki[Custom]*Tip[0-9A-Z]" web="%SYSTEMWEB%, %USERSWEB%" 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)))}%
1.48 +%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(%)}%
1.49 +</div>
1.50 +</div>
1.51 +</div>
1.52 +%STOPINCLUDE%
1.53 +-----
1.54 +
1.55 +__See also:__ TWikiTipsOfTheDay, TWikiTipsOfTheDayAdmin
1.56 +@
1.57 +
1.58 +
1.59 +1.2
1.60 +log
1.61 +@buildrelease
1.62 +@
1.63 +text
1.64 +@d1 1
1.65 +a1 1
1.66 +%META:TOPICINFO{author="TWikiContributor" date="1167969723" format="1.0" version="2"}%
1.67 +d11 1
1.68 +a11 1
1.69 +<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)))}%
1.70 +@
1.71 +
1.72 +
1.73 +1.1
1.74 +log
1.75 +@buildrelease
1.76 +@
1.77 +text
1.78 +@d1 1
1.79 +a1 1
1.80 +%META:TOPICINFO{author="TWikiContributor" date="1121985706" format="1.0" version="1"}%
1.81 +a8 10
1.82 +<!--
1.83 +| Topic list: | %CALC{$SET(list, %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" }%)$GET(list)}% |
1.84 +| Number of Tips: | %CALC{$SET(number,$LISTSIZE($GET(list)))$GET(number)}% |
1.85 +| Random Number: | %CALC{$SET(number, $INT($RAND( $GET(number) ) + 1))$GET(number)}% |
1.86 +| Web.Topic: | %CALC{$SET(webtopic, $LISTITEM( $GET(number), $GET(list)))$GET(webtopic)}% |
1.87 +| Dot pos: | %CALC{$SET(pos, $FIND(., $GET(webtopic)))$GET(pos)}% |
1.88 +| Web: | %CALC{$SET(web, $REPLACE($GET(webtopic), $GET(pos), 100))$GET(web)}% |
1.89 +| Topic: | %CALC{$SET(topic, $REPLACE($GET(webtopic), 1, $GET(pos)))$GET(topic)}% |
1.90 +| Full URL: | %CALC{$SET(webTotd,%SCRIPTURL%/view%SCRIPTSUFFIX%/$GET(web)/$GET(topic))}% |
1.91 +-->
1.92 +d11 2
1.93 +a12 2
1.94 +<div class="tipsOfTheDayText">
1.95 +%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%SCRIPTSUFFIX%/$web/$topic][$pattern(.*?\-\-\-\+([^\n\r]+).*)]]</span><br /> $summary(100, noheader) [[%SCRIPTURL%/view%SCRIPTSUFFIX%/$web/$topic][%MAKETEXT{"Read on"}% <img src=\\"%PUBURLPATH%/%TWIKIWEB%/TWikiDocGraphics/more-small.gif\\" alt=\\"Read more\\" title=\\"Read on\\" width=\\"13\\" height=\\"13\\" border=\\"0\\" />]]\"}$NOP(%)}%
1.96 +a19 1
1.97 +
1.98 +@