head	1.14;
access;
symbols;
locks; strict;
comment	@# @;


1.14
date	2008.01.22.03.21.27;	author TWikiContributor;	state Exp;
branches;
next	1.13;

1.13
date	2007.01.16.04.11.58;	author TWikiContributor;	state Exp;
branches;
next	1.12;

1.12
date	2006.06.25.16.26.27;	author TWikiContributor;	state Exp;
branches;
next	1.11;

1.11
date	2006.04.01.05.55.15;	author TWikiContributor;	state Exp;
branches;
next	1.10;

1.10
date	2006.02.01.12.01.19;	author TWikiContributor;	state Exp;
branches;
next	1.9;

1.9
date	2004.08.28.07.22.32;	author PeterThoeny;	state Exp;
branches;
next	1.8;

1.8
date	2004.04.25.00.10.27;	author PeterThoeny;	state Exp;
branches;
next	1.7;

1.7
date	2003.01.30.07.43.00;	author PeterThoeny;	state Exp;
branches;
next	1.6;

1.6
date	2002.05.04.16.10.36;	author MikeMannix;	state Exp;
branches;
next	1.5;

1.5
date	2001.12.04.07.22.21;	author MikeMannix;	state Exp;
branches;
next	1.4;

1.4
date	2001.12.02.10.22.00;	author MikeMannix;	state Exp;
branches;
next	1.3;

1.3
date	2001.12.01.10.03.44;	author MikeMannix;	state Exp;
branches;
next	1.2;

1.2
date	2001.11.30.09.53.00;	author MikeMannix;	state Exp;
branches;
next	1.1;

1.1
date	2001.11.23.11.34.45;	author MikeMannix;	state Exp;
branches;
next	;


desc
@none
@


1.14
log
@buildrelease
@
text
@%META:TOPICINFO{author="TWikiContributor" date="1177803014" format="1.1" version="14"}%
%STARTINCLUDE%
---+ TWiki Site Tools

_Utilities for searching, navigation, and monitoring site activity_

TWiki Site Tools include utilities for navigating, searching and keeping up with site activity. Preferences can be configured by web or site-wide. You are currently in the *%SYSTEMWEB%* web. In particular, TWiki provides two highly configurable, automated site monitoring tools, *<nop>WebNotify*, to e-mail alerts when topics are edited, and *<nop>WebStatistics*, to generate detailed activity reports.

%TOC%

#WebNotify
---++ <nop>WebNotify - recent changes alert

Each TWiki web has an automatic e-mail alert service that sends a list of recent changes on a preset schedule, like once a day. Users can subscribe and unsubscribe using %NOTIFYTOPIC% in each web. The Perl script =mailnotify= is called by a background process at regular intervals. The script sends an automated e-mail to subscribed users if topics were changed in a web since the script was last run.

   * You can create a WebNotify link using TWikiVariables with ==%<nop>NOTIFYTOPIC%==

%INCLUDE{"WebChangesAlert"}%

You can also use =%<nop>USERSWEB%= instead of =Main=, but this is not necessary even if you have renamed the main web by configuring ={MainWebName}= in [[%SCRIPTURLPATH{"configure"}%][configure]].

#WebSearch
---++ <nop>WebSearch - search TWiki site

WebSearch is an extremely fast and flexible search facility, part of the core TWiki feature set. WebSearchAdvanced offers more options, including:
   * topic title or full-text search
   * regular expressions
   * search within web or site-wide
   * index-style A-Z alphabetical listing sorted topic title
   * many more

See also: SearchHelp for help; TWikiVariables and FormattedSearch for including hard-coded searches in text.

#WebChanges
---++ <nop>WebChanges - what's new

To check for the most recently edited topics while on-site, use the WebChanges link, usually located in the toolbar. It lists the most recently modified topics, newest first, along with the first couple of lines of the page content.

This is simply a preset =SEARCH=. The number of topics listed by the =limit= parameter.:
<blockquote>
<pre>
%<nop>SEARCH{ ".*" web="%INCLUDINGWEB%" type="regex" nosearch="on" order="modified"%BR% reverse="on" 
limit="50" }%
</pre>
</blockquote>

#WebRssAndAtom
---++ <nop>WebRss and <nop>WebAtom - news feeds on recent changes

You can point your news reader at WebRss and WebAtom to find out what is new in a TWiki web. WebRssBase and WebAtomBase have the details. Like WebChanges, this is based on a =%<nop>SEARCH{}%=.

#WebIndex
---++ <nop>WebIndex - list of topics

WebIndex lists all web topics in alphabetical order, with the first couple of lines of text. This is simply a preset =SEARCH=:
<blockquote>
<pre>
%<nop>SEARCH{ "\.*" scope="topic" type="regex" nosearch="on" }%
</pre>
</blockquote>

#WebStatistics
---++ <nop>WebStatistics - site statistics

You can generate a listing manually, or on an automated schedule, of visits to individual pages, on a per web basis. Compiled as a running total on a monthly basis. Includes totals for Topic Views, Topic Saves, Attachment Uploads, Most Popular Topics with number of views, and Top Contributors showing total of saves and attachment uploads. Previous months are saved.

   * You can create a WebStatistics link using TWikiVariables with ==%<nop>STATISTICSTOPIC%==

---+++ Configuring for automatic operation

   * You can automatically generate usage statistics for all webs. To enable this:
      * Make sure variable *{Log}{view}*, *{Log}{save}* and *{Log}{upload} in are set in [[%SCRIPTURLPATH{"configure"}%][configure]]. This will generate log file entries (see below).
      * The WebStatistics topic must be present in all webs where you want to have statistics. You can use the topic in the Main web as a template.
      * Call the =twiki/bin/statistics= script from a cron job, once a day is recommended. This will update the WebStatistics topics in all webs.
      * __Attention:__ The script must run as the same user as the CGI scripts are running, which is user =nobody= on many systems. Example crontab entry: %BR% =0 0 * * * (cd /path/to/twiki/bin; ./statistics &gt;/dev/null 2&gt;&amp;1)=
      * There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/tools/geturl.pl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: %BR% =0 0 * * * (cd /path/to/twiki/tools; ./geturl.pl mydomain.com /urlpath/to/twiki/bin/statistics &gt;/dev/null 2&gt;&amp;1)= 
      * __NOTE:__ =geturl.pl= will do a TWiki CGI request as the <nop>TWikiGuest user, so if you use this workaround, the !WebStatistics topics you are updating will have to be writable by <nop>TWikiGuest.

When running from the command line or a cron job, you can pass parameters to the script like this:
<verbatim>
./statistics -logdate 200605 -webs TWiki,Sandbox
</verbatim>

---+++ Generating statistics manually by URL

   * The =twiki/bin/statistics= script can also be executed as a CGI script, just enter the URL in your browser. Examples:
      * Update current month for all webs you have access to: %BR% =%SCRIPTURLPATH{statistics}%=
      * Update current month for %USERSWEB% web only: %BR% =%SCRIPTURLPATH{statistics}%/%USERSWEB%=
      * Update %SERVERTIME{$month $year}% for %USERSWEB% web: %BR% =%SCRIPTURLPATH{statistics}%/%USERSWEB%?logdate=%SERVERTIME{$year$mo}%=
      * Update %SERVERTIME{$month $year}% for the !ProjectX, !ProjectY and !ProjectZ webs: %BR% =%SCRIPTURLPATH{statistics}%?logdate=%SERVERTIME{$year$mo}%;webs=Project<nop>X,Project<nop>Y,Project<nop>Z=

#LogFiles
---++ Log Files

TWiki generates monthly log files which are used by the statistics script
   * The log file is defined by the *{LogFileName}* setting in [[%SCRIPTURLPATH{"configure"}%][configure]]
   * The file name is =log&lt;year&gt;&lt;month&gt;.txt=
   * Example path name: =twiki/logs/log%SERVERTIME{$year$mo}%.txt=
   * Each access gets logged as: %BR%
     =| &lt;time&gt; | &lt;wikiusername&gt; | &lt;action&gt; | &lt;web&gt;.&lt;topic&gt; | &lt;extra info&gt; | &lt;IP address&gt; |=
   * Example log entry: %BR%
     =| %SERVERTIME{$day $mon $year - $hour:$min}% | %USERSWEB%.TWikiGuest | view | %SYSTEMWEB%.WebRss |  | 66.124.232.02 |=
   * Actions are logged if enabled in [[%SCRIPTURLPATH{"configure"}%][configure]] by the *{Log}{<i>action</i>}* flags
   * Logged actions:
     | *Script* | *Action name* | *Extra info* |
     | attach | =attach= | when viewing attach screen of previous uploaded attachment: =filename= |
     | changes | =changes= |  |
     | edit | =edit= | when editing non-existing topic: =(not exist)= |
     | rdiff | =rdiff= | higher and lower revision numbers: =4 3= |
     | register | =regstart= | !WikiUserName, e-Mail address, LoginName: =user attempts to register= |
     | register | =register= | E-mail address: =user successfully registers= |
     | register | =bulkregister= | !WikiUserName of new, e-mail address, admin ID |
     | rename | =rename= | when moving topic: =moved to !Newweb.NewTopic= |
     | rename | =move= | when moving attachment: =Attachment filename moved to !Newweb.NewTopic= |
     | save | =save= | when replacing existing revision: =repRev 3= %BR% when user checks the minor changes box: =dontNotify= %BR% when user changes attributes to an exising attachment: =filename.ext= |
     | save | =cmd= | special admin parameter used when saving |
     | search | =search= | search string |
     | upload | =upload= | filename |
     | view | =view= | when viewing non-existing topic: =(not exist)= %BR% when viewing previous topic revision: =r3= |

#ConfigureEmail
---++ E-mail

---+++ Configuring outgoing mail

Outgoing mail is required for TWikiRegistration and for [[#WebNotify][recent changes alert]].

TWiki will use the ==Net::SMTP== module if it is installed on your system. Set this with the ==SMTPMAILHOST== variable in TWikiPreferences.

The notify e-mail uses the default =changes.tmpl= template, or a skin if activated in the TWikiPreferences.

mailnotify also relies on two hidden files in each =twiki/data/Web= directory: =.changes= and =.mailnotify.= Make sure both are writable by your web server process. =.changes= contains a list of changes; go ahead and make this empty. =.mailnotify= contains a timestamp of the last time notification was done.

You can use an external mail program, such as ==sendmail==, if the =Net::SMTP= module is not installed. Set the program path in =={MailProgram}== in [[%SCRIPTURLPATH{"configure"}%][configure]].

   * %H% Net::SMTP can be easily disabled (if there is an installation error) by setting ==SMTPMAILHOST== in TWikiPreferences to an empty value.

   * %T% You can set a separate ==SMTPSENDERHOST== variable to define the mail sender host (some SMTP installations require this).

---+++ Setting the automatic e-mail schedule

*For Unix platforms:* Edit the =cron= table so that =mailnotify= is called in an interval of your choice. Please consult =man crontab= of how to modify the table that schedules program execution at certain intervals. Example:
<pre>
% crontab -e
0 1 * * * (cd /path/to/twiki/bin; ./mailnotify -q)
</pre>
The above line will run mailnotify nightly at 01:00. The =-q= switch suppresses all normal output.

*For ISP installations:* Many ISPs don't allow hosted accounts direct cron access, as it's often used for things that can heavily load the server. Workaround scripts are available.

*On Windows:* You can use a scheduled task if you have administrative privileges. TWiki:Codev/CronTabWin is a free scheduler for Windows.

---++ Site Permissions

   * TWikiAccessControl describes how to restrict read and write access to topics and webs, by users and groups
   * SitePermissions lists the permissions settings of the webs on this TWiki site

---++ Help with crontab

The crontab command is used to schedule commands to be executed periodically.

   * Wikipedia.org:Crontab - crontab documentation
   * [[http://www.kalab.com/freeware/pycron/pycron.htm][pycron]] - crontab for Windows

__Related Topics:__ AdminDocumentationCategory, AdminToolsCategory

%STOPINCLUDE%
-- __Contributors:__ TWiki:Main.MikeMannix, TWiki:Main.PeterThoeny, TWiki:Main.CrawfordCurrie, TWiki:Main.KennethLavrsen, TWiki:Main.SvenDowideit
@


1.13
log
@buildrelease
@
text
@d1 1
a1 2
%META:TOPICINFO{author="TWikiContributor" date="1163619832" format="1.1" version="13"}%
%TOC%
d3 1
a3 1
---# TWiki Site Tools
d7 3
a9 1
TWiki Site Tools include utilities for navigating, searching and keeping up with site activity. Preferences can be configured by web or site-wide. You are currently in the *%TWIKIWEB%* web. In particular, TWiki provides two highly configurable, automated site monitoring tools, *<nop>WebNotify*, to e-mail alerts when topics are edited, and *<nop>WebStatistics*, to generate detailed activity reports.
d20 1
a20 1
You can also use =%<nop>MAINWEB%= instead of =Main=, but this is not necessary even if you have renamed the main web by configuring ={MainWebName}= in [[%SCRIPTURLPATH{"configure"}%][configure]].
d47 5
d76 2
a77 1
      * There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/tools/geturl.pl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: %BR% =0 0 * * * (cd /path/to/twiki/tools; ./geturl.pl mydomain.com /urlpath/to/twiki/bin/statistics &gt;/dev/null 2&gt;&amp;1)=
d88 2
a89 2
      * Update current month for %MAINWEB% web only: %BR% =%SCRIPTURLPATH{statistics}%/%MAINWEB%=
      * Update %SERVERTIME{$month $year}% for %MAINWEB% web: %BR% =%SCRIPTURLPATH{statistics}%/%MAINWEB%?logdate=%SERVERTIME{$year$mo}%=
d102 1
a102 1
     =| %SERVERTIME{$day $mon $year - $hour:$min}% | %MAINWEB%.TWikiGuest | view | %TWIKIWEB%.WebRss |  | 66.124.232.02 |=
a114 2
     | passwd | =resetpasswd= | LoginName, WikiName, E-mail address, success code from addUserPassword |
     | passwd | =changepasswd= | LoginName, WikiName |
d145 1
a145 1
0 2 * * * (cd /path/to/twiki/bin; ./mailnotify -q)
d147 1
a147 1
The above line will run mailnotify nightly at 02:00. The =-q= switch suppresses all normal output.
d158 7
d167 2
@


1.12
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1121296496" format="1.1" version="12"}%
d39 1
a39 1
<blockquote style="background-color:#f5f5f5">
d41 2
a42 1
%<nop>SEARCH{ ".*" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified"%BR% reverse="on" limit="50" }%
d50 1
a50 1
<blockquote style="background-color:#f5f5f5">
d52 1
a52 1
%<nop>SEARCH{ "\.*" scope="topic" regex="on" nosearch="on" }%
d70 1
a70 1
      * There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/bin/geturl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: %BR% =0 0 * * * (cd /path/to/twiki/bin; ./geturl mydomain.com /urlpath/to/twiki/bin/statistics &gt;/dev/null 2&gt;&amp;1)=
d110 2
a111 1
     | save | =save= | when replacing existing revision: =repRev 3= %BR% when user checks the minor changes box: =dontNotify= |
@


1.11
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1121296496" format="1.1" version="11"}%
d71 5
d79 1
a79 1
      * Update current month for all webs: %BR% =%SCRIPTURLPATH{statistics}%=
d81 2
a82 1
      * Update January 2000 for %MAINWEB% web: %BR% =%SCRIPTURLPATH{statistics}%/%MAINWEB%?logdate=%SERVERTIME{$year$mo}%=
@


1.10
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1121296496" format="1.1" version="10"}%
d15 1
a15 1
	* You can create a WebNotify link using TWikiVariables with ==%<nop>NOTIFYTOPIC%==
d25 5
a29 5
	* topic title or full-text search
	* regular expressions
	* search within web or site-wide
	* index-style A-Z alphabetical listing sorted topic title
	* many more
d60 1
a60 1
	* You can create a WebStatistics link using TWikiVariables with ==%<nop>STATISTICSTOPIC%==
d64 6
a69 6
	* You can automatically generate usage statistics for all webs. To enable this:
		* Make sure variable *{Log}{view}*, *{Log}{save}* and *{Log}{upload} in are set in [[%SCRIPTURLPATH{"configure"}%][configure]]. This will generate log file entries (see below).
		* The WebStatistics topic must be present in all webs where you want to have statistics. You can use the topic in the Main web as a template.
		* Call the =twiki/bin/statistics= script from a cron job, once a day is recommended. This will update the WebStatistics topics in all webs.
		* __Attention:__ The script must run as the same user as the CGI scripts are running, which is user =nobody= on many systems. Example crontab entry: %BR% =0 0 * * * (cd /path/to/twiki/bin; ./statistics &gt;/dev/null 2&gt;&amp;1)=
		* There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/bin/geturl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: %BR% =0 0 * * * (cd /path/to/twiki/bin; ./geturl mydomain.com /urlpath/to/twiki/bin/statistics &gt;/dev/null 2&gt;&amp;1)=
d73 4
a76 4
	* The =twiki/bin/statistics= script can also be executed as a CGI script, just enter the URL in your browser. Examples:
		* Update current month for all webs: %BR% =%SCRIPTURLPATH{statistics}%=
		* Update current month for %MAINWEB% web only: %BR% =%SCRIPTURLPATH{statistics}%/%MAINWEB%=
		* Update January 2000 for %MAINWEB% web: %BR% =%SCRIPTURLPATH{statistics}%/%MAINWEB%?logdate=%SERVERTIME{$year$mo}%=
d82 25
a106 25
	* The log file is defined by the *{LogFileName}* setting in [[%SCRIPTURLPATH{"configure"}%][configure]]
	* The file name is =log&lt;year&gt;&lt;month&gt;.txt=
	* Example path name: =twiki/logs/log%SERVERTIME{$year$mo}%.txt=
	* Each access gets logged as: %BR%
	  =| &lt;time&gt; | &lt;wikiusername&gt; | &lt;action&gt; | &lt;web&gt;.&lt;topic&gt; | &lt;extra info&gt; | &lt;IP address&gt; |=
	* Example log entry: %BR%
	  =| %SERVERTIME{$day $mon $year - $hour:$min}% | %MAINWEB%.TWikiGuest | view | %TWIKIWEB%.WebRss |  | 66.124.232.02 |=
	* Actions are logged if enabled in [[%SCRIPTURLPATH{"configure"}%][configure]] by the *{Log}{<i>action</i>}* flags
	* Logged actions:
	  | *Script* | *Action name* | *Extra info* |
	  | attach | =attach= | when viewing attach screen of previous uploaded attachment: =filename= |
	  | changes | =changes= |  |
	  | edit | =edit= | when editing non-existing topic: =(not exist)= |
	  | rdiff | =rdiff= | higher and lower revision numbers: =4 3= |
	  | register | =regstart= | !WikiUserName, e-Mail address, LoginName: =user attempts to register= |
	  | register | =register= | E-mail address: =user successfully registers= |
	  | register | =bulkregister= | !WikiUserName of new, e-mail address, admin ID |
	  | rename | =rename= | when moving topic: =moved to !Newweb.NewTopic= |
	  | rename | =move= | when moving attachment: =Attachment filename moved to !Newweb.NewTopic= |
	  | passwd | =resetpasswd= | LoginName, WikiName, E-mail address, success code from addUserPassword |
	  | passwd | =changepasswd= | LoginName, WikiName |
	  | save | =save= | when replacing existing revision: =repRev 3= %BR% when user checks the minor changes box: =dontNotify= |
	  | search | =search= | search string |
	  | upload | =upload= | filename |
	  | view | =view= | when viewing non-existing topic: =(not exist)= %BR% when viewing previous topic revision: =r3= |
d123 1
a123 1
	* %H% Net::SMTP can be easily disabled (if there is an installation error) by setting ==SMTPMAILHOST== in TWikiPreferences to an empty value.
d125 1
a125 1
	* %T% You can set a separate ==SMTPSENDERHOST== variable to define the mail sender host (some SMTP installations require this).
d142 2
a143 2
	* TWikiAccessControl describes how to restrict read and write access to topics and webs, by users and groups
	* SitePermissions lists the permissions settings of the webs on this TWiki site
@


1.9
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="1093677752" format="1.0" version="1.9"}%
d8 1
a8 1
TWikiSiteTools include utilities for navigating, searching and keeping up with site activity. Preferences can be configured by web or site-wide. You are currently in the *%TWIKIWEB%* web. In particular, TWiki provides two highly configurable, automated site monitoring tools, *<nop>WebNotify*, to email alerts when topics are edited, and *<nop>WebStats*, to generate detailed activity reports.
d10 2
a11 1
---++ <nop>WebNotify Recent Changes Alert
d13 1
a13 1
Each TWiki web has an automatic email alert service that sends a list of recent changes on a preset schedule, like once a day. Users can subscribe and unsubscribe using %NOTIFYTOPIC% in each web. The Perl script =mailnotify= is called by a background process at regular intervals. The script sends an automated email to subscribed users if topics were changed in a web since the script was last run.
d19 1
a19 1
You can also use =%<nop>MAINWEB%= instead of =Main=, but this is not necessary even if you have renamed the main web by configuring =$mainWebname= in =TWiki.cfg=.  
d21 2
d24 6
a29 1
---+++ Configuring Outgoing Mail
d31 1
a31 1
%WIKITOOLNAME% will use the ==Net::SMTP== module if it is installed on your system. Set this with the ==SMTPMAILHOST== variable in TWikiPreferences.
d33 2
a34 1
The notify e-mail uses the default =changes.tmpl= template, or a skin if activated in the TWikiPreferences.
d36 1
a36 1
mailnotify also relies on two hidden files in each =TWiki/data/[web]= directory: =.changes= and =.mailnotify.= Make sure both are writable by your web server process. =.changes= contains a list of changes; go ahead and make this empty. =.mailnotify= contains a timestamp of the last time notification was done.
d38 6
a43 1
You can use an external mail program, like ==sendmail==, if the =Net::SMTP= module is not installed. Set the program path in ==$mailProgram== in ==TWiki.cfg==.
d45 2
a46 3
	* %H% Net::SMTP can be easily disabled (ex: if there is an installation error) by setting ==SMTPMAILHOST== in TWikiPreferences to an empty value.
 
	* %T% You can set a separate ==SMTPSENDERHOST== variable to define the mail sender host (some SMTP installations require this). 
d48 2
a49 3
---+++ Setting the Automatic Email Schedule

*For Unix platforms:* Edit the =cron= table so that =mailnotify= is called in an interval of your choice. Please consult =man crontab= of how to modify the table that schedules program execution at certain intervals. Example:
d51 1
a51 2
% crontab -e
0 2 * * * (cd /path/to/twiki/bin; ./mailnotify -q)
d53 1
a53 1
The above line will run mailnotify nightly at 02:00. The =-q= switch suppresses all normal output.
d55 2
a56 8
*For ISP installations:* Many ISPs don't allow hosted accounts direct cron access, as it's often used for things that can heavily load the server. Workaround scripts are available.

*On Windows NT/2000:* You can use a scheduled task if you have administrative privileges.
__Note:__ AT on an NT machine is pretty limited.
Microsoft lists several third-party
[[http://www.microsoft.com/ntserver/partners/findoffering/serversolutions/Maintnce.asp#cron][replacements]]. TWiki:Codev/CronTabWin is a free scheduler for Windows.

---++ <nop>WebStatistics Site Usage Log
d62 1
a62 1
---+++ Configuring for Automatic Operation
d65 1
a65 1
		* Make sure variable =$doLogTopicView, $doLogTopicSave and $doLogTopicUpload= in =TWiki.cfg= are set. This will generate log file entries (see below).
d68 2
a69 2
		* __Attention:__ The script must run as the same user as the CGI scripts are running, which is user =nobody= on many systems. Example crontab entry: <br> =0 0 * * * (cd /path/to/TWiki/bin; ./statistics &gt;/dev/null 2&gt;&amp;1)=
		* There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/bin/geturl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: <br> =0 0 * * * (cd /path/to/TWiki/bin; ./geturl mydomain.com /urlpath/to/TWiki/bin/statistics &gt;/dev/null 2&gt;&amp;1)=
d71 1
a71 1
---+++ Generating Statistics Manually by URL
d74 3
a76 3
		* Update current month for all webs: <br> =http://mydomain.com/twiki/bin/statistics=
		* Update current month for Main web only: <br> =http://mydomain.com/twiki/bin/statistics/Main=
		* Update January 2000 for Main web: <br> =http://mydomain.com/twiki/bin/statistics/Main?logdate=200001=
d78 2
a79 1
---+++ Log File Details
d81 2
a82 2
TWiki generates monthly log files which are used by the statistics
	* The log directory is defined by the =$logDir= variable in TWiki.cfg
d84 1
a84 1
	* Example path name: =twiki/data/log%SERVERTIME{$year$mo}%.txt=
d88 2
a89 2
	  =| %SERVERTIME{$day $mon $year - $hour:$min}% | !Main.TWikiGuest | view | !TWiki.WebRss |  | 66.124.232.02 |=
	* Actions are logged if enabled in TWiki.cfg by the =$doLogTopic&lt;action&gt;= flags
d95 4
a98 4
	  | register | =register= | E-mail address |
	  | save | =save= | when replacing existing revision: =repRev 1.3= %BR% when user checks the minor changes box: =dontNotify= |
	  | search | =search= | search string |
	  | rdiff | =rdiff= | =1.4 1.3= |
d101 4
d106 4
a109 1
	  | view | =view= | when viewing non-existing topic: =(not exist)= %BR% when viewing previous topic revision: =r1.3= |
d111 1
d113 1
a113 1
---++ <nop>WebSearch
d115 7
a121 6
WebSearch is an extremely fast and flexible search facility, part of the core TWiki feature set. Options include:
	* topic title or full-text search
	* regular expressions
	* search within web or site-wide
	* index-style A-Z alphabetical listing sorted topic title
	* many more
d123 1
a123 1
See also: TWikiVariables for including hard-coded searches in text.
d125 1
a125 1
---+++ <nop>WebChanges
d127 1
a127 1
To check for the most recently edited topics while on-site, use the WebChanges link, usually located on the upper toolbar. It lists the most recently modified topics, newest first, along with the first couple of lines of the page content. 
d129 1
a129 2
This is simply a preset =SEARCH=. The number of topics listed by the =limit= parameter.:
<blockquote style="background-color:#f5f5f5">
d131 2
a132 1
%<nop>SEARCH{".*" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified" <br />reverse="on" limit="50"}%
d134 5
a138 1
</blockquote>
d140 1
a140 1
---+++ <nop>WebIndex
d142 2
a143 6
WebIndex lists all web topics in alphabetical order, with the first couple of lines of text. This is simply a preset =SEARCH=:
<blockquote style="background-color:#f5f5f5">
<pre>
%<nop>SEARCH{"\.*" scope="topic" regex="on" nosearch="on"}%
</pre>
</blockquote>
d145 1
a145 2
-- TWiki:Main.MikeMannix - 01 Dec 2001 %BR%
-- TWiki:Main.PeterThoeny - 28 Aug 2004
@


1.8
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="1082851827" format="1.0" version="1.8"}%
d16 1
a16 8
TWiki handles <nop>%NOTIFYTOPIC% entries that include the WikiName of a user or a [[%MAINWEB%.TWikiGroups][TWikiGroup]] and an optional e-mail address. Example entries in <nop>%NOTIFYTOPIC%:
<pre>
	 * %MAINWEB%.FredBloggs
	 * %MAINWEB%.FredBloggs - secondary@@home.com
	 * %MAINWEB%.EngineeringGroup
</pre>

The first entry is the default form, the notification gets sent to the e-mail address specified in the user's home page. The second entry lists an alternative e-mail address. The third entry specifies a group, the notification gets sent to each member of the group.
d131 1
a131 1
-- TWiki:Main.PeterThoeny - 24 Apr 2004
@


1.7
log
@none
@
text
@d1 139
a139 113
%META:TOPICINFO{author="PeterThoeny" date="1043912580" format="1.0" version="1.7"}%
%TOC%
%STARTINCLUDE%
---# TWiki Site Tools

_Utilities for searching, navigation, and monitoring site activity_

TWikiSiteTools include utilities for navigating, searching and keeping up with site activity. Preferences can be configured by web or site-wide. You are currently in the *%TWIKIWEB%* web. In particular, TWiki provides two highly configurable, automated site monitoring tools, *<nop>WebNotify*, to email alerts when topics are edited, and *<nop>WebStats*, to generate detailed activity reports.

---++ <nop>WebNotify Recent Changes Alert

Each TWiki web has an automatic email alert service that sends a list of recent changes on a preset schedule, like once a day. Users can subscribe and unsubscribe using %NOTIFYTOPIC% in each web. The Perl script =mailnotify= is called by a background process at regular intervals. The script sends an automated email to subscribed users if topics were changed in a web since the script was last run.

	* You can create a WebNotify link using TWikiVariables with ==%<nop>NOTIFYTOPIC%==

TWiki handles <nop>%NOTIFYTOPIC% entries that include the WikiName of a user or a [[%MAINWEB%.TWikiGroups][TWikiGroup]] and an optional e-mail address. Example entries in <nop>%NOTIFYTOPIC%:
<pre>
	 * %MAINWEB%.FredBloggs
	 * %MAINWEB%.FredBloggs - secondary@@home.com
	 * %MAINWEB%.EngineeringGroup
</pre>

The first entry is the default form, the notification gets sent to the e-mail address specified in the user's home page. The second entry lists an alternative e-mail address. The third entry specifies a group, the notification gets sent to each member of the group.

You can also use =%<nop>MAINWEB%= instead of =Main=, but this is not necessary even if you have renamed the main web by configuring =$mainWebname= in =TWiki.cfg=.  


---+++ Configuring Outgoing Mail

%WIKITOOLNAME% will use the ==Net::SMTP== module if it is installed on your system. Set this with the ==SMTPMAILHOST== variable in TWikiPreferences.

The notify e-mail uses the default =changes.tmpl= template, or a skin if activated in the TWikiPreferences.

mailnotify also relies on two hidden files in each =TWiki/data/[web]= directory: =.changes= and =.mailnotify.= Make sure both are writable by your web server process. =.changes= contains a list of changes; go ahead and make this empty. =.mailnotify= contains a timestamp of the last time notification was done.

You can use an external mail program, like ==sendmail==, if the =Net::SMTP= module is not installed. Set the program path in ==$mailProgram== in ==TWiki.cfg==.

	* %H% Net::SMTP can be easily disabled (ex: if there is an installation error) by setting ==SMTPMAILHOST== in TWikiPreferences to an empty value.
 
	* %T% You can set a separate ==SMTPSENDERHOST== variable to define the mail sender host (some SMTP installations require this). 

---+++ Setting the Automatic Email Schedule

*For Unix platforms:* Edit the =cron= table so that =mailnotify= is called in an interval of your choice. Please consult =man crontab= of how to modify the table that schedules program execution at certain intervals. Example:
<pre>
% crontab -e
15,45 * * * * (cd ~twiki/public_html/bin; ./mailnotify -q)
</pre>
The above line will call mailnotify at 15 minutes and 45 minutes past every hour. The =-q= switch suppresses all normal output.

*For ISP installations:* Many ISPs don't allow hosted accounts direct cron access, as it's often used for things that can heavily load the server. Workaround scripts are available.

*On Windows NT/2000:* You can use a scheduled task if you have administrative privileges.
__Note:__ AT on an NT machine is pretty limited.
Microsoft lists several third-party
[[http://www.microsoft.com/ntserver/partners/findoffering/serversolutions/Maintnce.asp#cron][replacements]]
(as of 2001-11-20, none of them free).

---++ <nop>WebStatistics Site Usage Log

You can generate a listing manually, or on an automated schedule, of visits to individual pages, on a per web basis. Compiled as a running total on a monthly basis. Includes totals for Topic Views, Topic Saves, Attachment Uploads, Most Popular Topics with number of views, and Top Contributors showing total of saves and attachment uploads. Previous months are saved.

	* You can create a WebStatistics link using TWikiVariables with ==%<nop>STATISTICSTOPIC%==

---+++ Configuring for Automatic Operation

	* You can automatically generate usage statistics for all webs. To enable this:
		* Make sure variable =$doLogTopicView, $doLogTopicSave and $doLogTopicUpload= in =TWiki.cfg= are set. This will generate log entries in file =twiki/data/log&lt;date&gt;.txt= .
		* The WebStatistics topic must be present in all webs where you want to have statistics. You can use the topic in the Main web as a template.
		* Call the =twiki/bin/statistics= script from a cron job, once a day is recommended. This will update the WebStatistics topics in all webs.
		* __Attention:__ The script must run as the same user as the CGI scripts are running, which is user =nobody= on most systems. Example crontab entry: <br> =0 0 * * * (cd /path/to/TWiki/bin; ./statistics &gt;/dev/null 2&gt;&amp;1)=
		* There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/bin/geturl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: <br> =0 0 * * * (cd /path/to/TWiki/bin; ./geturl mydomain.com /urlpath/to/TWiki/bin/statistics &gt;/dev/null 2&gt;&amp;1)=

---+++ Generating Statistics Manually by URL

	* The =twiki/bin/statistics= script can also be executed as a CGI script, just enter the URL in your browser. Examples:
		* Update current month for all webs: <br> =http://mydomain.com/twiki/bin/statistics=
		* Update current month for Main web only: <br> =http://mydomain.com/twiki/bin/statistics/Main=
		* Update January 2000 for Main web: <br> =http://mydomain.com/twiki/bin/statistics/Main?logdate=200001=

---++ <nop>WebSearch

WebSearch is an extremely fast and flexible search facility, part of the core TWiki feature set. Options include:
	* topic title or full-text search
	* regular expressions
	* search within web or site-wide
	* index-style A-Z alphabetical listing sorted topic title
	* many more

See also: TWikiVariables for including hard-coded searches in text.

---+++ <nop>WebChanges

To check for the most recently edited topics while on-site, use the WebChanges link, usually located on the upper toolbar. It lists the most recently modified topics, newest first, along with the first couple of lines of the page content. 

This is simply a preset =SEARCH=. The number of topics listed by the =limit= parameter.:
<blockquote style="background-color:#f5f5f5">
<pre>
%<nop>SEARCH{".*" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified" <br />reverse="on" limit="50"}%
</pre>
</blockquote>

---+++ <nop>WebIndex

WebIndex lists all web topics in alphabetical order, with the first couple of lines of text. This is simply a preset =SEARCH=:
<blockquote style="background-color:#f5f5f5">
<pre>
%<nop>SEARCH{"\.*" scope="topic" regex="on" nosearch="on"}%
</pre>
</blockquote>

-- Main.MikeMannix - 01 Dec 2001 %BR%
-- Main.PeterThoeny - 30 Jan 2003
@


1.6
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1020528636" format="1.0" version="1.6"}%
d4 1
a4 1
---# <nop>TWikiSiteTools
d12 14
a25 1
Each TWiki web has an automatic email alert service that sends a list of recent changes on a preset schedule, like once a day. Users can subscribe and unsubscribe using %NOTIFYTOPIC% in each web. The Perl script =mailnotify= is called by a deamon in regular intervals. The script sends an automated email to subscribed users if topics were changed in a web within last interval.
a26 1
	* You can create a WebNotify using TWikiVariables with ==%<nop>NOTIFYTOPIC%==
d32 4
d112 2
a113 1
-- Main.MikeMannix - 01 Dec 2001
@


1.5
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1007450541" format="1.0" version="1.5"}%
a6 2

---++ Overview
@


1.4
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1007288520" format="1.0" version="1.4"}%
d20 1
a20 1
%WIKITOOLNAME% will use the =Net::SMTP= module in case it is installed on your system. You need to specify the =SMTPMAILHOST= variable in TWikiPreferences.
d22 5
a26 1
You can use an external mail program like =sendmail= in case the =Net::SMTP= module is not installed. In this case specify the =$mailProgram= in =twiki/bin/TWiki.cfg=.
@


1.3
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1007201024" format="1.0" version="1.3"}%
d16 2
a40 4
---++ <nop>WebChanges

To check for the most recently edited topics while on-site, use the WebChanges link, usually located on the upper toolbar. It lists the ___ most recently modified, newest first, along with the first couple of lines of the page content.

d45 2
d74 21
a94 1
-- Main.MikeMannix - 30 Nov 2001	
@


1.2
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1007113980" format="1.0" version="1.2"}%
d14 1
a14 5
Each TWiki web has an automatic email alert service that sends a list of recent changes on a preset schedule, like once a day. Users can subscribe and unsubscribe using %NOTIFYTOPIC% in each web.

---+++ How It Works

The Perl script =mailnotify= is called by a deamon in regular intervals. The script sends an automated email to subscribed users if topics were changed in a web within last interval.
@


1.1
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1006515285" format="1.0" version="1.1"}%
d10 1
a10 1
TWikiSiteTools include utilities for navigating, searching and keeping up with site activity. Preferences can be configured by web or site-wide. You are currently in the *%TWIKIWEB%* web.
d12 1
a12 5
---++ Monitoring Topic Changes

TWiki provides two highly configurable, automated site monitoring tools, *<nop>WebNotify*, to email alerts when topics are edited, and *<nop>WebStats*, to generate detailed activity reports.

---+++ <nop>WebNotify Recent Changes Alert
d16 1
a16 1
---++++ Setting Up <nop>WebNotify
d20 1
a20 1
---+++++ Configuring Outgoing Mail
d26 1
a26 1
---+++++ Setting the Automatic Email Schedule
d43 1
a43 1
---+++ WebChanges
d47 1
a47 3
---++++ How does it work?

---++ WebStatistics Site Usage Log
d69 6
a74 8
An extremely fast and flexible search facility.

See also: TWikiVariables

---
---++ Docs Comments for this page

	* What about WebChanges: why isn't that covered here?
d76 1
a76 1
	* Need more details on WebNotify: How does it work? Exactly what data is emailed, in what format? 
d78 1
a78 2
-- PeterThoeny - 16 Mar 2001 
-- Main.MikeMannix - 23 Nov 2001	
@
