|
< < |
<--
PLEASE DO NOT EDIT THIS TOPIC
It is automatically generated from the subversion repository, and any changes
you make will simply be overwritten the next time a release is generated.
Instead, you could check your fix in, raise a bug in the Bugs web, or mail the author(s).
--> |
|
DBCachePlugin |
|
< < |
|
|
Description |
|
to a normal non-specific function call. The TopicMethod itself is called with an implicit
parameter OBJECT that refers to SomeTopic , that is the object this method has been called for. |
|
< < |
ATTACHMENTS lists the attachments of a given topic giving you a high degree of control about
what and how to display attachments. |
|
DBRECURSE iterates over topics in a web following a certain topic-to-topic relation, like
the parent-child relation among topics. You can define arbitrary relations using filters.
Syntax |
|
< < |
ATTACHMENTS
List all attachments of a given topic. Without any parameters it displays a
table of attachments similar to the one generated by the templates at the bottom
of a topic. There are a couple of parameters that take regular expressions to
limit the number of attachments to be listed.
Syntax:
%ATTACHMENTS%, %ATTACHMENTS{"<topic>" ...} |
"<topic>" |
topic whos attachments we want to query |
attr="..." |
match the attachments' attribute |
autoattached="yes,no,undef" |
limit attachments to those that are (not) autoattached |
comment="..." |
match the attachments' comment |
maxdate="..." |
specify latest attachment |
maxsize="..." |
specify biggest attachment |
mindate="..." |
specify earliest attachment |
minsize="..." |
specify smallest attachment |
names="..." |
match the name of attachments to be include in the list |
user="..." |
match the attachments' user who uploaded it |
footer="..." |
format string appended to the result |
format="..." |
how to format each attachment |
header="..." |
format string prefixing the resulting output |
separator="..." |
format string put between each formatted attachment |
hidenull="on,off" |
hide/display the empty result; only the header and the footer are included if set to "off" and there's no attachment at the given topic |
sort="name,date,size,user,comment,comment:name" |
sort results by specified field |
reverse="on/off" |
enable reverse sorting |
limit="..." |
limit the number of attachments to the given number; by default show all |
The following variables can be used in the format parameter:
- $attr: the attributes
- $autoattached: the autoattach flag
- $comment: the comment field
- $date(<format>): the attachment date using <format> to format the date
- $date: the attachment date
- $delete: the action to delete the current attachment
- $deleteUrl: the url used in the delete action
- $icon: img tag representing the filetype
- $iconUrl: the url pointing to the icon used in the img tag
- $index: the position index of the attachment in the result
- $move: the action to move the current attachment
- $moveUrl: the url used in the move action
- $name: the name of the attachment
- $path: the path property of the attachment
- $props: the action to change the properties of the current attachment
- $propsUrl: the url used in the props action
- $size: the size in bytes
- $sizeK: the size in kilo bytes
- $sizeM: the size in mega bytes
- $topic: the name of the topic of whose attachments are listed
- $type: the file type of the current attachment
- $url: the attachments url
- $urlpath: the attachments urlpath
- $user: the user that uploaded the attachment
- $web: the web name of the current topic
- $webdav: the action to edit the current attachment using the Foswiki:Extensions/WebDavPlugin
- $webdavUrl: the url used in the webdav action
- $wikiuser: the user's home topic that recently changed the current attachment
The header and footer format strings may only contain
- $count: the number of attachments found
The format, header and footer may contain the standard escape sequences:
- $dollar: $ sign
- $n: newline
- $percnt: % sign
Example:
%ATTACHMENTS{format="| $name: | $type |"}%
generates:
%ATTACHMENTS{format="| $name: | $type |"}% |
|
DBCALL
Fetch topic content or a section of it from the database store. |
|
defaults to "$n"; the special separator "none" disables separation |
include="..." |
pattern each found topic name must match to be considered a hit |
exclude="..." |
pattern each found topic name must not match to be considered a hit |
|
|
< < |
sort="..." |
specifies the sorting of hits; defaults to "name" |
|
> > |
sort="..." |
specifies the sorting of hits; this can be a comma separted list of attributes to specify more complicated sortings; defaults to "name" |
|
|
reverse="..." |
specify if hits should be sorted in reverse order; defaults to "off" |
limit="..." |
maximum number of topics to include in the hit set |
skip="..." |
number of topics to skip while constructing the hit set; defaults to "0" |
|
|
Following variables are expanded in format strings:
- $percnt: % sign
- $dollar: $ sign
|
|
> > |
|
|
- $n: newline
- $nop: "empty string"
- $count: the number of hits
|
|
(see Macros documentation).
- $expand(<formfield-accessor>): return the formfield pointed to by the <formfield-accessor>
|
|
> > |
- $d2n(<formfield-accessor>): converts a date formfield's value to epoch seconds
|
|
- $rss(...): encode entities so that the text can be included in an rss feed
- $encode(...): encode entities so that the text can be included in HTML input form elements
- $flatten(...): remove any special markup producing a flattened text representation
- $trunc(...,length): truncate a string to the given length
|
|
< < |
- $d2n(...): converts a date string to epoch seconds
|
|
- $uc(...): converts a string to upper case
- $lc(...): converts a string to lower case
|
|
All format strings may contain the following variables: |
|
> > |
|
|
- $n: newline
- $percnt: % sign
|
|
Syntax:
%TOPICTITLE{"<topic>"}% |
<topic> |
topic we want the page title off, defaults to current topic |
|
|
> > |
hideautoinc="on/off" |
ignore/respect autoinc topic names |
|
|
- from a TOPICTITLE preference variable, or
- from a "TopicTitle" formfield attribute, or
- defaults to the topic name
|
|
> > |
DBPREV, DBNEXT
reference the "neigbour" documetns of an item found in a search query
Syntax:
%DBPREV{"<search>" ... "}%*, %DBNEXT{"<search>" ... "}% |
"<search>" |
query string that defines a search, see DBCacheContrib |
web="..." |
the web where to search in (default: current web) |
topic="..." |
the topic from where to search for neighbours (default: current topic) |
format="..." |
format string to render the results (default: "$web.$topic") |
order |
define a sorting on the hit set; see above |
reverse="on,off" |
sort keys descending or ascending |
Results are rendered using the format parameter which understands the normal format tokens
like $dollar , $percnt , $nop and $n as well as $web and $topic which refer to
the previous or next topic in DBPREV or DBNEXT respectively.
These two macros come in handy rendering a navigation among search results found by a DBQUERY. For
example, the following code will render a navigation as found in blog applications linking to the
previous and next blog entry in a list of postings ordered by created date:
%DBPREV{
search="TopicType=~'\bBlogEntry\b' AND State != 'unpublished' AND topic != 'WebTopicEditTemplate'"
order="created"
format="[[$web.$topic]]"
}%
%DBNEXT{
search="TopicType=~'\bBlogEntry\b' AND State != 'unpublished' AND topic != 'WebTopicEditTemplate'"
order="created"
format="[[$web.$topic]]"
}%
(from Foswiki:Extensions/BlogPlugin) |
|
Syntax of search queries
A search query is a boolean expression on fields of a topic. (Tip: use %DBDUMP to explore the available fields). |
|
the dbcache once loaded into memory will stay there among multiple requests.
This option only has an effect using speedy/perperl or fastcgi setups. |
|
< < |
Plugin Installation Instructions |
> > |
SecureTopicTitles
When enabling $$Foswiki::cfg{SecureTopicTitles} , TopicTitles will only be used as a link text in WikiWords
when the user has got view access to the target topic.
Installation Instructions |
|
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install". |
|
If you have any problems, or if the extension isn't available in configure , then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help. |
|
> > |
WARNING: before using DBCachePlugin on your site do take down your web server and run
cd <foswiki-root>/bin; ./rest /DBCachePlugin/updateCache
to generate all caches initially. Then switch on the web server again. The cache will be maintained
automatically from there on.
|
|
Plugin Info
<--
- Set SHORTDESCRIPTION = Lightweight frontend to the DBCacheContrib
-->
|
|
< < |
|
> > |
|
|
|
|
< < |
Release: |
3.50 |
Version: |
8342 (2010-07-28) |
|
> > |
Release: |
30 Aug 2013 |
Version: |
v5.4.3 |
|
|
Change History: |
<-- versions below in reverse order --> |
|
|
> > |
30 Aug 2013: |
fixed crashes when calling API on non-existing web |
23 Jul 2013: |
fixed crashing page when trying to load a cache for a non-existing sub-web |
18 Jul 2013: |
fixed computing a hash key for a sub-web on MS Windows due to differences in Cwd::abs_path |
10 Jul 2013: |
fixed querying non-standard %META data; improved %DBDUMP to show non-standard %META data |
06 May 2013: |
fixed updateCache rest handler to pick up changes on the filesystem reliably |
08 Apr 2013: |
implemented $lc and $uc as documented; fixed default TopicTitle for a WebHome being the web name with parent webs stripped off |
30 Mar 2013: |
fixed formatting results in DBRECURSE |
28 Mar 2013: |
fixed op_ref in search queries; fixed $flatten() |
14 Mar 2013: |
make preferences searchable by caching them into a map instead of an array |
25 Jan 2013: |
fixed loading cache from disk again on a change |
07 Jan 2013: |
a lot of performance improvements |
29 Nov 2012: |
topic title of webhomes now defaults to the web name instead of the topic name |
19 Nov 2012: |
improved save performance on large webs |
01 Oct 2012: |
handle bad date formfields more gracefully |
11 Jan 2012: |
implemented TopicTitles protected by access control rights |
10 Jan 2012: |
implemented DBPREV and DBNEXT; rationalized rendering TopicTitles instead of the normal WikiWord linktext; improved $flatten() to look nicer; fixed sorting search results by multiple keys |
25 Aug 2011: |
fixed dbcache index not build properly when creating a new web; improved flatten() to weed out more; fixed indexing of non-existing webs due to mal-formed urls |
06 Apr 2011: |
fixed error where empty sections were confused with non-existing sections |
09 Nov 2010: |
moved ATTACHMENTS over to Foswiki:Extensions/TopicInteractionPlugin; added API to temporarily disable update handlers; fixed afterSaveHandler to properly update when attachments change |
02 Nov 2010: |
fixed to work with virtual hosts; added $quot formatting token; support non-ascii characters in $formfield(...) -- Foswiki:Main/AntonioTerceiro |
|
|
|
|
26 Jan 2006: |
fixed internal links in DBCALL; support for STARTSECTION, old SECTION being deprecated |
24 Nov 2005: |
Initial version |
|
|
< < |
Dependencies: |
Name | Version | Description |
---|
Time::ParseDate | >=2003.0211 | Required. Available from CPAN. | Storable | >=2.07 | Recommended for sites with few topics. Available from CPAN | Foswiki::Contrib::DBCacheContrib | >=4324 | Required. Database module. | BerkeleyDB | >=0 | Recommended for sites with many topics. Available from CPAN | |
|
> > |
Dependencies: |
Name | Version | Description |
---|
Foswiki::Contrib::DBCacheContrib | >=3.00 | Required. | Time::ParseDate | >=2003.0211 | Required. | Storable | >=2.07 | Required. | |
|
|
|
|
< < |
META FILEATTACHMENT |
attr="h" autoattached="1" comment="" date="1207666446" name="wikiringlogo40x40.png" path="wikiringlogo40x40.png" size="2571" user="ProjectContributor" version="1" |
|