key Log In or Register to edit

Fundraising Plugin

This plugin defines %FUNDRAISINGMESSAGE%, using a few variables defined on FundraisingPlugin; this can be used as %BROADCASTMESSAGE% on Main.TWikiPreferences.


Example

this-ngo.org needs money:

  $120

$30 to go

before 2005-10-28: give us money

Behaviour

%FUNDRAISINGMESSAGE% is not defined when one of the following conditions is verified:

  • %ENDDATE% is in the past;
  • %GOAL% has already been reached;
  • the configuration variables (defined below) values are not consistent.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the Text Formatting Rules topic:
    • Set SHORTDESCRIPTION = Show a fundraising message with a progress bar

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • End date of the fundraising:
    • Set ENDDATE = 2008-10-28

  • Total amount to raise:
    • Set GOAL = 1000

  • Amount already pledged:
    • Set PLEDGED = 200

  • Message to display before the progress bar
    • #Set PREMSG = TWiki a besoin d'argent :
    • Set PREMSG = TWiki needs money:

  • How to display the already pledged amount
    • Set PLEDGEDMSG = $%FUNDRAISINGPLUGIN_PLEDGED%
    • #Set PLEDGEDMSG = %FUNDRAISINGPLUGIN_PLEDGED% €

  • How to display the amount to raise in the progress bar (TOGO will be replaced by the missing amount)
    • Set TOGOMSG = $TOGO to go
    • #Set TOGOMSG = manque TOGO €

Plugin Installation Instructions

  • Download the ZIP file from the Plugin web (see below)
  • Unzip FundraisingPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/FundraisingPlugin.txt Plugin topic
    lib/TWiki/Plugins/FundraisingPlugin.pm Plugin Perl module
  • Edit FundraisingPlugin to suit your needs.
  • Write-protect Fundraising Plugin against modifications (with bullet * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup).
  • To enable it on all pages, set %BROADCASTMESSAGE% to %FUNDRAISINGMESSAGE% in Main.TWikiPreferences topic.

Plugin Info

Plugin Author: TWiki:Main.BenVoui
Plugin Version: 2 Feb 2006 (0.2.1)
Change History:  
2 Feb 2005: Replaced "euro" by the euro symbol. Use the non-breaking space Unicode char when needed. (0.2.1)
6 Nov 2005: Fixed default config (0.2)
21 Aug 2005: Initial version (0.1)
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.0
License: GPL (GNU General Public License)
TWiki:Plugins/Benchmark: Good Style 96%, Formatted Search 98%, Fundraising Plugin 100%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/FundraisingPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/FundraisingPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/FundraisingPluginAppraisal

Related Topics: T Wiki Preferences, T Wiki Plugins

-- TWiki:Main.BenVoui - $Date: 2006-01-01 22:13:39 -0500 (Sun, 01 Jan 2006) $

 
Ad Sponsor
Back to Redbourn
Copyright © We make no guarantee of the correctness of the content of this site. All material on this collaboration platform is the property of Martin Cleaver and the contributing authors.