Roxen.git / server / modules / tags / accessed.pike

version» Context lines:

Roxen.git/server/modules/tags/accessed.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //      #include <module.h>      inherit "module";    - constant cvs_version = "$Id: accessed.pike,v 1.39 2001/01/10 08:57:28 per Exp $"; + constant cvs_version = "$Id: accessed.pike,v 1.40 2001/03/07 13:42:10 kuntri Exp $";   constant thread_safe = 1;   constant module_type = MODULE_TAG | MODULE_LOGGER;   constant module_name = "Accessed counter";   constant module_doc = "This module provides access counters, through the "   "<tt>&lt;accessed&gt;</tt> tag and the <tt>&amp;page.accessed;</tt> entity.";      constant language = roxen->language;      string status() {    return counter->size()+" entries in the accessed database.<br />";
Roxen.git/server/modules/tags/accessed.pike:72: Inside #if defined(manual)
      "accessed":#"<desc tag='tag'><p><short>    Generates an access counter that shows how many times the page has    been accessed.</short> A file, AccessedDB, in the logs directory is    used to store the number of accesses to each page. By default the    access count is only kept for files that actually contain an    accessed-tag, but can also be configured to count all files of a    certain type. <ex><accessed/></ex>   </p></desc>    - <attr name=add value=number> + <attr name='add' value='number'><p>    Increments the number of accesses with this number instead of one, -  each time the page is accessed.</attr> +  each time the page is accessed.</p></attr>    - <attr name=addreal> + <attr name='addreal'><p>    Prints the real number of accesses as an HTML comment. Useful if you    use the cheat attribute and still want to keep track of the -  real number of accesses.</attr> +  real number of accesses.</p></attr>    - <attr name=case value=upper|lower|capitalize> -  Sets the result to upper case, lower case or with the first letter capitalized. + <attr name='case' value='upper|lower|capitalize'><p> +  Sets the result to upper case, lower case or with the first letter +  capitalized.</p>   </attr>    - <attr name=cheat value=number> + <attr name='cheat' value='number'><p>    Adds this number of accesses to the actual number of accesses before    printing the result. If your page has been accessed 72 times and you -  add &lt;accessed cheat=100&gt; the result will be 172.</attr> +  add <tag>accessed cheat='100'</tag> the result will be 172.</p></attr>    - <attr name=database> -  Works like the since attribute, but counts from the day the first entry in the entire accessed database was made. + <attr name='database'><p> +  Works like the since attribute, but counts from the day the first +  entry in the entire accessed database was made.</p>   </attr>    - <attr name=factor value=percent> -  Multiplies the actual number of accesses by the factor. E.g. <tag>accessed factor='50'</tag> -  displays half the actual value. + <attr name='factor' value='percent'><p> +  Multiplies the actual number of accesses by the factor. E.g. +  <tag>accessed factor='50'</tag> displays half the actual value.</p>   </attr>    - <attr name=file value=filename> + <attr name='file' value='filename'><p>    Shows the number of times the page filename has been    accessed instead of how many times the current page has been accessed.    If the filename does not begin with \"/\", it is assumed to be a URL    relative to the directory containing the page with the    accessed tag. Note, that you have to type in the full name    of the file. If there is a file named tmp/index.html, you cannot    shorten the name to tmp/, even if you've set Roxen up to use    index.html as a default page. The filename refers to the -  virtual filesystem. +  virtual filesystem.</p>    -  One limitation is that you cannot reference a file that does not -  have its own &lt;accessed&gt; tag. You can use &lt;accessed -  silent&gt; on a page if you want it to be possible to count accesses -  to it, but don't want an access counter to show on the page itself. +  <p>One limitation is that you cannot reference a file that does not +  have its own <tag>accessed</tag> tag. You can use <tag>accessed +  silent='1'</tag> on a page if you want it to be possible to count accesses +  to it, but don't want an access counter to show on the page itself.</p>   </attr>    - <attr name=lang value=langcodes> + <attr name='lang' value='langcodes'><p>    Will print the result as words in the chosen language if used together -  with type=string. +  with type=string.</p>       <ex><accessed type=\"string\"/></ex>    <ex><accessed type=\"string\" lang=\"sv\"/></ex>   </attr>    - <attr name=per value=second|minute|hour|day|week|month|year> -  Shows the number of accesses per unit of time. + <attr name='per' value='second|minute|hour|day|week|month|year'><p> +  Shows the number of accesses per unit of time.</p>       <ex><accessed per=\"week\"/></ex>   </attr>    - <attr name=prec value=number> + <attr name='prec' value='number'><p>    Rounds the number of accesses to this number of significant digits. If -  prec=2 show 12000 instead of 12148. +  prec=2 show 12000 instead of 12148.</p>   </attr>    - <attr name=reset> + <attr name='reset'><p>    Resets the counter. This should probably only be done under very -  special conditions, maybe within an &lt;if&gt; statement. -  -  This can be used together with the file argument, but it is limited -  to files in the current- and sub-directories. +  special conditions, maybe within an <tag>if</tag> statement. +  This can be used together with the file argument, but it is +  limited to files in the current- and sub-directories.</p>   </attr>    - <attr name=silent> + <attr name='silent'><p>    Print nothing. The access count will be updated but not printed. This    option is useful because the access count is normally only kept for -  pages with actual &lt;access&gt; on them. &lt;accessed -  file=filename&gt; can then be used to get the access count for the -  page with the silent counter. +  pages with actual <tag>access</tag> on them. <tag>accessed +  file='filename'</tag> can then be used to get the access count for the +  page with the silent counter.</p>   </attr>    - <attr name=since> + <attr name='since'><p>    Inserts the date that the access count started. The language will -  depend on the lang tag, default is English. All normal date -  related attributes can be used. See the &lt;date&gt; tag. +  depend on the <att>lang</att> attribute, default is English. All +  normal date related attributes can be used. Also see: <xref +  href='date.tag' />.</p>       <ex><accessed since=\"\"/></ex>   </attr>    - <attr name=type value=number|string|roman|iso|discordian|stardate|mcdonalds|linus|ordered> + <attr name='type' value='number|string|roman|iso|discordian|stardate|mcdonalds|linus|ordered'><p>    Specifies how the count are to be presented. Some of these are only -  useful together with the since attribute. +  useful together with the since attribute.</p>       <ex><accessed type=\"roman\"/></ex>    <ex><accessed since=\"\" type=\"iso\"/></ex>    <ex><accessed since=\"\" type=\"discordian\"/></ex>    <ex><accessed since=\"\" type=\"stardate\"/></ex>    <ex><accessed type=\"mcdonalds\"/></ex>    <ex><accessed type=\"linus\"/></ex>    <ex><accessed type=\"ordered\"/></ex>      </attr>    - <attr name=minlength value=number> + <attr name='minlength' value='number'><p>    Defines a minimum length the the resulting string should have. If it is    shorter it is padded from the left with the padding value. Only values -  between 2 and 10 are valid. +  between 2 and 10 are valid.</p>   </attr>    - <attr name=padding value=character default=0> -  The padding that the minlength function should use. - </attr> - "]); + <attr name='padding' value='character' default='0'><p> +  The padding that the minlength function should use.</p> + </attr>" +  + ]);   #endif      object counter;      void start() {    query_tag_set()->prepare_context=set_entities;    switch(query("backend")) {    case "SQL database":    counter=SQLCounter();    break;