This is an old revision of the document!
Table of Contents
AMAP software Wiki administration
This documentation is for the AMAP administrators and developers.
Authors FAQ
How do I add my pages in the lateral menu ?
Go to this page to create your software pages and make them appear correctly in the lateral menu.
How do I -hide- some pages in the lateral menu ?
Sometimes you add a wiki page from a page in the lateral menu and you do not want this new page to create a new entry in the menu.
โ At page creation time, just make sure its name starts with โ.:private:โ
E.g. [[.:private:OPF format]]
The lateral menu was configured to ignore the pages which name contains this char sequence.
How can I track the downloads for my software ?
Use this kind of text to get a download form:
<form> action mail coligny@cirad.fr subscriber@email thanks "The download link has been sent to your e-mail address, thanks for downloading our software." fieldset "Please register" textbox "Your Name" email "E-mail address" textbox "Organism (optional)" ! textbox "Motivation (optional)" ! static "This registration is only for internal statistics, the download link will be automatically sent to your e-mail address" hidden "Download link " "=http://amap-dev.cirad.fr/projects/yoursoftware/files" submit "Submit Query" </form>
Explanation:
- The form will ask for the e-mail user's mail address (and other information)
- This mail will be recognized by the download system if the email field label contains 'mail' (here: 'E-mail address')
- The mail will be sent to you for statistics (here: coligny@cirad.fr)
- and it will be sent to the user's mail (will replace subscriber@email) who will have the download link (here 'http://amap-dev.cirad.fr/projects/yoursoftware/files')
How to adapt this form to download my software ?
Technical pages for the Wiki administrators
Configuring the download system
Used the dokuwiki bureaucracy plugin with little changes in the php files:
1. amapsoft/lib/plugins/bureaucracy/actions/mail.php: added a paragraph, removed a line
/** * Build a nice email from the submitted data and send it */ function run($data, $thanks, $argv) { global $ID; // get recipient address(es) $to = join(',',$argv); $sub = sprintf($this->getLang('mailsubject'),$ID); $txt = sprintf($this->getLang('mailintro')."\n\n\n", dformat()); foreach($data as $opt){ $value = $opt->getParam('value'); $label = $opt->getParam('label'); A /* Add subscriber email to $to */ A if(strripos($to, "subscriber@email") !== false && strripos($label, "mail") !== false) { A $trans = array("subscriber@email" => $value); A $to = strtr($to, $trans); A } switch($opt->getFieldType()){ case 'fieldset': D // $txt .= "\n====== ".hsc($label)." ======\n\n"; break; default: if($value === null || $label === null) break; $txt .= $label."\n"; $txt .= "\t\t$value\n"; } } global $conf; if(!mail_send($to, $sub, $txt, $conf['mailfrom'])) { throw new Exception($this->getLang('e_mail')); } return $thanks; }
2. amapsoft/lib/plugins/bureaucracy/lang/en/lang.php: changed two labels
$lang['mailsubject'] = 'AMAPsoftware download (%s)'; $lang['mailintro'] = "Hello,\nyou may download the package you requested on AMAPsoftware with the link below.\nRegards,\nThe AMAP developers";
Template for this wiki
See the AMAPsoftware template pages