ExternalSite:Page links, based on rules defined in the InterWikiPreviews topic.
Best used in conjunction with InterwikiPlugin.
ExternalSite:Page links.
| External site alias | Data URL | Data format | Info format | Reload Every |
$page variables.
XML or JSON
ExternalSite:Page , with any %INTERWIKIPREVIEWFIELD{source="data_source" width="initial_width"}% fields replaced by values extracted from the retrieved XML or JSON data.
Reload Every is 0. Otherwise Reload Every is a periodic reload interval in seconds.
| Alias: | Data Source URL: | Data Format: | Info Format: | Reload Every: |
|---|---|---|---|---|
| KernelBug | http://bugzilla.kernel.org/xml.cgi?id= |
XML | "%INTERWIKIPREVIEWFIELD{source="short_desc" width="30"}%" %INTERWIKIPREVIEWFIELD{source="version" width="10"}% %INTERWIKIPREVIEWFIELD{source="product"}% |
0 |
KernelBug:1020 will render as:
KernelBug:1020 "------------------------------" ---------- -
Once http://bugzilla.kernel.org/xml.cgi?id=1020 has been retrieved, this will be replaced by:
KernelBug:1020 "EFS isnt working yet in 2.6.0-test2" 2.6.0-test2 File System
(Assuming that the metadata of that bug hasn't changed.)
The data retrieved from http://bugzilla.kernel.org/xml.cgi?id=1020 will be cached in the plugin's work area.
The next time KernelBug:1020 is rendered, it will contain the cached data.
(The cache validity period is the same as the reload interval, or a configurable default.)
%<plugin>_<setting>%, i.e. %NEWPLUGIN_SHORTDESCRIPTION%
ExternalSite:Page links.
data/debug.txt) InterwikiPreviewPlugin.zip in your twiki installation directory. Content: | File: | Description: |
|---|---|
data/TWiki/InterwikiPreviewPlugin.txt | Plugin topic |
data/TWiki/InterwikiPreviewPlugin.txt,v | Plugin topic repository |
data/TWiki/InterWikiPreviews.txt | Preview rules topic |
data/TWiki/InterWIkiPreviews.txt,v | Preview rules topic repository |
lib/TWiki/Plugins/InterwikiPreviewPlugin.pm | Plugin Perl module |
lib/TWiki/Plugins/InterwikiPreviewPlugin/Rule.pm | Plugin Perl module |
lib/TWiki/Plugins/InterwikiPreviewPlugin/Query.pm | Plugin Perl module |
pub/TWiki/InterwikiPreviewPlugin/MochiKit.js | Redistributed Javascript library (MIT license) |
pub/TWiki/InterwikiPreviewPlugin/MochiKit.js,v | |
pub/TWiki/InterwikiPreviewPlugin/query.js | Plugin Javascript library |
pub/TWiki/InterwikiPreviewPlugin/query.js,v |
{PluginsOrder} configuration setting.
| Plugin Author: | TWiki:Main.IanBygrave |
| Copyright: | © 2007, TWiki:Main.IanBygrave |
| License: | GPL (GNU General Public License |
| Plugin Version: | 3 Jun 2007 (V1.010) |
| Change History: | |
| 3 Jun 2007: | Apply HTTP Cache-control request headers to cached data. New HTTP_CACHE_CONTROL flag. Serialize AJAX requests to reduce server load. Use session values instead of global variables. Bug fixes. |
| 2 May 2007: | Prepopulate fields from cached JSON data too. Make CPAN dependencies optional. |
| 30 Apr 2007: | Allow %INTERWIKIPREVIEWFIELD% tags outside info format specs. Improve interaction with rendering process, and handling of other markup in info format. Protect javascript from rendering. Catch XML parsing errors. Don't delay AJAX when field prepopulation failed. Set CSS class to reflect field prepopulation. |
| 26 Apr 2007: | Prepopulate fields from cached data (XML only). Configurable default cache expiration. |
| 25 Apr 2007: | Add simple caching of rest responses. Minor fixes and code comments. |
| 16 Apr 2007: | Extract javascript to query.js |
| 15 Apr 2007: | Fix for IE7. Fix forced links. |
| 13 Apr 2007: | Add JSON support. Implement '$page' in url. Use twiki version conditional code for getUrl. Use correct plugin handlers. Replace info format syntax %source% with %INTERWIKIPREVIEWFIELD{source="source" width="width"}% |
| 12 Apr 2007: | Fix interaction with InterwikiPlugin. Add css classes to field elements. |
| 10 Apr 2007: | Initial version |
| TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 |
| CPAN Dependencies: | Cache::FileCache |
| XML::Parser optional | |
| JSON optional | |
| Other Dependencies: | none |
| Perl Version: | 5.005 |
| Benchmarks |
GoodStyle 88%, FormattedSearch 96%, InterwikiPreviewPlugin 89% |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/InterwikiPreviewPlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/InterwikiPreviewPluginDev |
| Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/InterwikiPreviewPluginAppraisal |
| I | Attachment | History | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|---|
| |
InterwikiPreviewPlugin.zip | r12 r11 r10 r9 r8 | manage | 64.1 K | 2007-06-02 - 23:07 | UnknownUser | Plugin Package |