|
Main sidebar
|
PITS /
01171Summary: Recent notify posts for the PITS group should include Summary
Created: 2010-02-12 17:15
Status: Closed - added
Category: Other
Assigned:
Priority: 3
Currently, notification mails like this one are sent for changes in the PITS group:
Recent PmWiki posts:
http://www.pmwiki.org/wiki/Site/AllRecentChanges
* http://pmwiki.org/wiki/PITS/00962
February 04, 2010, at 07:00 AM by Petko
Wouldn't it be nice to get something like this instead:
Recent PmWiki posts:
http://www.pmwiki.org/wiki/Site/AllRecentChanges
* http://pmwiki.org/wiki/PITS/00962
"Make [=>><<=] behave identically with other block formatting ..."
February 04, 2010, at 07:00 AM by Petko
Usually, I am only interested in a handful of PITS entries, and having to look up the summary of every changed one gets cumbersome (is everyone else memorizing the numbers of the PITS entries they want to follow?). To achieve this, local/pits.php could include something along the lines:
$FmtPV['$Summary']='FormatPITSummary($pn)';
function FormatPITSummary($pn) {
$s=PageTextVar($pn, "Summary");
$s=str_replace(array('$', "\n"), array('#',' '), $s);
if (strlen($s)>74) $s=substr($s, 0, 70).'...';
return $s;
}
and Unfortunately, the The two e-mails I got with this enabled looked really nice! Now I see that with my proposal, GLOBAL variables could be exposed. Sorry I wasn't careful enough. Suggestions:
$FmtPV['$DirtySummary']='FormatPITSummary($pn)';
function FormatPITSummary($pn) {
global $FmtV;
$s=PageTextVar($pn, "Summary");
$s=str_replace("\n", ' ', $s);
if (strlen($s)>74) $s=substr($s, 0, 70).'...';
$FmtV['$CleanSummary']=$s;
return '$CleanSummary';
}
-- Rogutės, 2010-02-13 |