"); SDV($GTDfooter, ""); SDV($GTDform, <<
$[Command]: #GTDcmdline#
$[Display]:
#GTDsubmitbutton#
EOF ); SDV($GTDQuickRef, " (:table class=frame cellspacing=6 style='font-size:small;':) (:cell valign=top:) '''Commands :'''\\\\ %kbd%'''+''' stuff @tag%% add a line\\\\ %kbd%'''*''' stuff%% autoappend \"stuff\" in next added lines\\\\ %kbd%'''=''' stuff @tag%% modify selected line\\\\ %kbd%'''?''' search -excl%% search for (filter) lines\\\\ '''tags :''' @context \$project @tag\\\\ '''line prefixes :''' %kbd%'''!''' high priority%% %kbd%'''.''' done%% \\\\ %kbd%'''?''' maybe%% %kbd%''';''' waitingfor%% %kbd%''':''' reference%% (:cell valign=top:) '''Task list :'''\\\\ right-click, shift+click : modify status\\\\ middle-click, ctrl+click : copy to command line\\\\ '''@Tag list :''' double-click : filter task list\\\\ right-click, shift+click : undo filter tasks\\\\ middle-click, ctrl+click : copy to command line\\\\ '''checks :''' filter tasks by status (:tableend:) "); SDV($GTDdefaultdata, "Add a task with \"+ stuff\" then press Enter. After some additions/changes, press \"Save changes\". Read the gtd-tlm cookbook manual \$pmwiki @online . Created contexts @work @home @anywhere @phone @computer ? Check Cookbook:GTD-TLM for updates \$pmwiki @online"); SDVA($HandleActions, array('editGTDdata'=>'HandleGTD')); SDVA($HandleAuth, array('editGTDdata' => 'edit')); function FmtGTD($pagename, $args) { global $FmtPV, $HTMLFooterFmt, $HTMLHeaderFmt, $GTDdefaultdata, $GTDform, $GTDheader, $GTDfooter, $GTDQuickRef, $Now, $GTD; static $TLMnum = 0; if($TLMnum>0) return; $TLMnum++; $opt = ParseArgs($args); $datapage = $GTD['datapage'] = MakePageName($pagename, IsEnabled($opt['datapage'], "$pagename-gtddata")); $dpage = RetrieveAuthPage($datapage,'read',1, READPAGE_CURRENT);//ask for pw if needed if(!$dpage) Abort("? No read permissions at $datapage."); if(!@$dpage['text'])$text = $GTDdefaultdata; else $text = preg_replace("/^\\s*\\[@\\s*(.*)\\s*@\\]\\s*$/s", '$1', $dpage['text']); $GTD['rawdata'] = htmlspecialchars($text); $GTD['now'] = $Now; foreach(array('top', 'waitingfor', 'next', 'done', 'maybe', 'ref') as $v) $GTD["show_$v"] = intval(IsEnabled($opt[$v], 1) ) ? 'checked="checked"' : ''; $GTD["submitbutton"] = intval(@$opt['readonly']) ? '' : FmtPageName('', $pagename); $GTD['lines'] = IsEnabled($opt['lines'], 10); $clines = intval(IsEnabled($opt['clines'], 2)) ; if($clines<1) $clines = 2; $cmdattr = "name='command' class='gtd cmdline' ondblclick=\"this.value=''\" onblur='CMDfocus=0;' onkeydown='javascript:return keyCapt(event, 1);'"; $GTD['cmdline'] = $clines == 1? "" :""; if(@$opt['startup']) $FmtPV['$GTDstartup'] = "\"{$opt['startup']}\""; $HTMLHeaderFmt['gtd'] = $GTDheader; $HTMLFooterFmt['gtd'] = FmtPageName($GTDfooter, $pagename); $out = PPRE('/#GTD(\w+)#/', '$GLOBALS["GTD"][$m[1]]', FmtPageName($GTDform, $pagename)); if(IsEnabled($opt['quickref'], 1)) return PRR(Keep($out)."\n$GTDQuickRef"); else return Keep($out); } function HandleGTD($pagename, $auth='edit') { $datapage = MakePageName($pagename, $_REQUEST['datapage']); $dpage = RetrieveAuthPage($datapage,$auth,1);#will ask for pw if needed $newpage = $dpage; $newpage['text'] = "[@\n". stripmagic($_REQUEST['rawdata'])."\n@]"; UpdatePage($datapage, $dpage, $newpage); Redirect($pagename); }