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