Skip to topic
|
Skip to bottom
IST-15905
Mobius
Home
Summary
Partners
Work Packages
End User Panel
Scientific Advisory Board
Publications
Deliverables List
Links to Related Projects
Events
News
Visitors: 102
Intranet
Scientific Issues
Scientific Exchanges
Dissemination & Publication
Scientific Deliverables
Tool Development
Inria GForge
Project Management
Calendar
Contractual Documents
Reporting Activity
Project Status
Meetings
Kick-Off Meeting
Annual Meeting
Website information
Admin
MobiusLogo
EmailLists
Help
Tools
Search
Changes
Help Home
Sandbox
Trash
TWiki Home
Start of topic |
Skip to actions
---+ NewsPlugin v1.4 The News plugin implements a simple "Headlines" view, or summary, of a list of news or a weblog. One enters news as items of a bulleted list in a single topic, most recent first. If somewhere in the topic, the keyword <b>%NEWS%</b> appears, then a new topic is created (by default of the name of the topic with =Headlines= appended) with the first line of the 5 more recent news. Ending punctuation is removed from the headlines for a sleeker look. Recommended usage is to INCLUDE this generated topic in some panel in a front page, and put a "More..." link in it to the original <tt>MyCompanyNews</tt> topic. The =%<nop>NEWS%= variable can be set in an HTML comment: <br> =<!-- %<nop>NEWS% -->= It needs a TWiki version of 01 Feb 2003 or better, or the 01 Dec 2001 version with the TWiki:Codev/PluginHookOnSavePatch patch. See http://koala.ilog.fr/wiki/bin/view/Plugins/NewsPluginExampleInclusion ---++ Syntax Rules Add a =%<nop>NEWS%= variable in a news topic named *Xxx* to generate a headline topic named *Xxx<nop>Headlines*. To change the default, use the syntax =%<nop>NEWS{parameter="value" ...}%= syntax with the following available parameters: | *Parameter* | *Value* | | count | The number of headlines to keep. Defaults to 5. | | prefix | This text will be prepended to the generated topic. Defaults to nothing. | | suffix | This text will be appended to the generated topic. Defaults to nothing. | | presep | Prepend each headline with this text. Defaults to =<tab>*<space>= | | postsep | Appends this text to each headline. Defaults to =newline= | | trim | If set to "no", trailings punctuation marks ( =.,:;= ) are note removed from headlines. defaults to "yes" | Example: =%<nop>NEWS{presep="<li>" prefix="<ul>" suffix="</ul>"}%= ---++ Examples Example: If the topic <tt>MyCompanyNews</tt> contains: <pre style='background:#ffffe0; border:solid; width=80%; border-width: thin;'> %<nop>NEWS% <nop>* NewsPlugin released - 18 Feb 2003. The great news plugin has been debugged <nop>* NewsPlugin devel started - 02 Jan 2003. I think this is really needed, I will try to keep it simple </pre> Then on saving the topic <tt>MyCompanyNewsHeadlines</tt> will contain: <pre style='background:#ffffe0; border:solid; width=80%; border-width: thin;''> <nop>* NewsPlugin released - 18 Feb 2003 <nop>* NewsPlugin devel started - 02 Jan 2003 </pre> ---++ NewsPlugin Global Settings Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop><plugin>_<setting>%==, i.e. ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%== * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = %<nop>NEWS% generates a short headlines topic from a list of news * Debug plugin: (See output in =data/debug.txt=) * Set DEBUG = 0 ---++ Plugin Installation Instructions __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running. * Download the ZIP file from the Plugin web (see below) * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/%TOPIC%.txt== | Plugin topic | | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository | | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module | * Test if the installation was successful: * see NewsPluginExample ---++ Plugin Info | Plugin Author: | TWiki:Main/ColasNahaboo | | Plugin Version: | 17 Feb 2003 (V1.000) | | Change History: | <!-- versions below in reverse order --> | | 20 Feb 2003 | 1.4 trim option for removing ending punctuation: . , : ; | | 19 Feb 2003 | 1.3 small bugfix | | 17 Feb 2003 | 1.2 Initial version | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.005 | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | __Related Topics:__ %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins -- TWiki:Main/ColasNahaboo - 17 Feb 2003
End of topic
Skip to action links
|
Back to top
r1.1 :
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
Page history
|
More actions
You are here:
TWiki
>
NewsPlugin
to top
Ideas, requests, problems regarding the Mobius site