data/TWiki/TWikiTipsOfTheDayInclude.txt,v
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
     1 head	1.3;
     2 access;
     3 symbols;
     4 locks; strict;
     5 comment	@# @;
     6 
     7 
     8 1.3
     9 date	2008.01.22.03.21.32;	author TWikiContributor;	state Exp;
    10 branches;
    11 next	1.2;
    12 
    13 1.2
    14 date	2007.01.16.04.11.56;	author TWikiContributor;	state Exp;
    15 branches;
    16 next	1.1;
    17 
    18 1.1
    19 date	2006.02.01.12.01.24;	author TWikiContributor;	state Exp;
    20 branches;
    21 next	;
    22 
    23 
    24 desc
    25 @new-topic
    26 @
    27 
    28 
    29 1.3
    30 log
    31 @buildrelease
    32 @
    33 text
    34 @%META:TOPICINFO{author="TWikiContributor" date="1167969723" format="1.0" version="3"}%
    35 %META:TOPICPARENT{name="TWikiTipsOfTheDayAdmin"}%
    36 ---+ TWiki Tips Of the Day Include
    37 
    38 This Page randomly picks a Tip of the day to display. The %HOMETOPIC% includes the part between the horizontal rules.
    39 
    40 -----
    41 %STARTINCLUDE%
    42 <div class="tipsOfTheDay"><div class="tipsOfTheDayContents">
    43 <strong class="tipsOfTheDayHeader">%ICON{tip}% TWiki Tip of the Day</strong>
    44 <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)))}%
    45 %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(%)}%
    46 </div>
    47 </div>
    48 </div>
    49 %STOPINCLUDE%
    50 -----
    51 
    52 __See also:__ TWikiTipsOfTheDay, TWikiTipsOfTheDayAdmin
    53 @
    54 
    55 
    56 1.2
    57 log
    58 @buildrelease
    59 @
    60 text
    61 @d1 1
    62 a1 1
    63 %META:TOPICINFO{author="TWikiContributor" date="1167969723" format="1.0" version="2"}%
    64 d11 1
    65 a11 1
    66 <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)))}%
    67 @
    68 
    69 
    70 1.1
    71 log
    72 @buildrelease
    73 @
    74 text
    75 @d1 1
    76 a1 1
    77 %META:TOPICINFO{author="TWikiContributor" date="1121985706" format="1.0" version="1"}%
    78 a8 10
    79 <!--
    80 | 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)}% |
    81 | Number of Tips: | %CALC{$SET(number,$LISTSIZE($GET(list)))$GET(number)}% |
    82 | Random Number:  | %CALC{$SET(number, $INT($RAND( $GET(number) ) + 1))$GET(number)}% | 
    83 | Web.Topic:		| %CALC{$SET(webtopic, $LISTITEM( $GET(number), $GET(list)))$GET(webtopic)}% |
    84 | Dot pos:		  | %CALC{$SET(pos, $FIND(., $GET(webtopic)))$GET(pos)}% |
    85 | Web:				| %CALC{$SET(web, $REPLACE($GET(webtopic), $GET(pos), 100))$GET(web)}% |
    86 | Topic:			 | %CALC{$SET(topic, $REPLACE($GET(webtopic), 1, $GET(pos)))$GET(topic)}% |
    87 | Full URL:		 | %CALC{$SET(webTotd,%SCRIPTURL%/view%SCRIPTSUFFIX%/$GET(web)/$GET(topic))}% |
    88 -->
    89 d11 2
    90 a12 2
    91 <div class="tipsOfTheDayText">
    92 %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"}%&nbsp;<img src=\\"%PUBURLPATH%/%TWIKIWEB%/TWikiDocGraphics/more-small.gif\\" alt=\\"Read more\\" title=\\"Read on\\" width=\\"13\\" height=\\"13\\" border=\\"0\\" />]]\"}$NOP(%)}% 
    93 a19 1
    94 
    95 @