Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

FoxNotify-Comments

Comments and Discussion about FoxNotify

Leave latest message at the top please!


FoxNotify email attachment

Is it possible to have FoxNotify send a file as an attachment.?? Graham April 1 2008
It is not possible a far as I know, and I think it would be quite difficult to implement, if possible at all. HansB


FoxNotify email footer

Hi - how would i go about sticking a footer into my notification email created by Fox? I'd like to have a line added to emails reminding recipients of unsubscription options, and maybe even some website tagline stuff at the end... however, right now it appears adding this info to Email Item Formats (say, #default), would result in the footer being repeated if there are multiple posts being reported, right? Is there an easy way to mod FoxNotify so that a footer is amended if supplied? Thanks! overtones99? March 28, 2008, at 09:29 PM

I think it may work if you change $FoxNotifyBodyFmt to include a footer variable. Try this in config:

# change body format to include footer var:
$FoxNotifyBodyFmt = 
   "\$FoxNotifyBodyHeadingFmt" 
   ."\$FoxNotifyItems\n\n"
   ."\$FoxNotifyBodyFooterFmt\n";
# add new footer var:
$FoxNotifyBodyFooterFmt = "my footer stuff....";

To make this variable configurable via the FoxNotifyTemplates page would need some alterations of the foxnotify.php script. HansB March 29, 2008, at 03:37 AM

Just in case others might like to see, i altered my version of foxnotify.php in the following places in order to have it add footers:

 SDV($FoxNotifyBodyFooterFmt, "You have received this email because you're signed up 
    to receive notifications from \$WikiTitle");  // <- new
 SDV($FoxNotifyBodyFmt, 
   "\$FoxNotifyBodyHeadingFmt\n" 
   ."\$FoxNotifyItems\n\n"
   ."\$FoxNotifyBodyFooterFmt\n");     // <- new

then later, adding a global variable for $FoxNotifyBodyFooterFmt:

 function FoxNotifyUpdate($pagename, $dir='') {
  global $FoxNotifyList, $FoxNotifyLists, $FoxGeneralNotifyList, $FoxNotifyFile, $IsPagePosted,
    $FmtV, $FoxNotifyTimeFmt, $FoxNotifyItemFmt, $FoxNotifyTemplatePageFmt, $FoxNotifyListsGroup,
    $FoxNotifySquelch, $FoxNotifyDelay, $Now, $SearchPatterns, $WikiTitle, $FoxRecipient,
    $FoxNotifySubjectFmt, $FoxNotifyBodyFmt, $FoxNotifyBodyHeadingFmt, /* new => */ $FoxNotifyBodyFooterFmt, 
    $FoxNotifyHeaders, $FoxNotifyParameters;

and then amending in one more spot:

     if(PageExists($tpname)) {
     		$tpage = ReadPage($tpname, READPAGE_CURRENT);
     		$tsubject = trim(TextSection($tpage['text'], '#subject'),"\r\n");
     		$tbodyheading = trim(TextSection($tpage['text'], '#heading'),"\r\n");
     		$tbodyfooter = trim(TextSection($tpage['text'], '#footer'),"\r\n");   // <- new
     }
     if(!$tsubject) $tsubject = $FoxNotifySubjectFmt;
     $subject = FmtPageName($tsubject, $pagename);
     if($tbodyheading) $FoxNotifyBodyHeadingFmt = $tbodyheading;
     if($tbodyfooter) $FoxNotifyBodyFooterFmt = $tbodyfooter;   // <- new

this works great!! overtones99? March 30, 2008, at 06:43 PM


FoxNotify form: odd characters >>> & <<<

Hi again, Just wondering what <<< and >>> are supposed to do in the code on FoxNotify? I have the feeling it's supposed to be for a newline [[<<]], right? thanks! overtones99? March 24, 2008, at 11:21 PM

It is supposed to say that the code line is continuing, i.e. the next line in the example belong to the previous line. It is NOT part of the code! sorry if that caused confusion! Sometimes source code has very long lines, and posting them to display as source code can destroy the skin layout. HansB


emails in HTML?

Could Foxnotify have the means to format the mail so that an e-mail reader (i.e. Thunderbird) could display the mail as html rather than plain text? Graham 2008-03-26

it may be possible by adding or changing various FoxNotify config variables, in order to add the necessary declarations for coding, mime-type, and tags. But I have not tried. HansB

The following can perhaps give you some ideas. But note that you can't use the FoxNotifyTemplates for inserting HTML tags, unless you specifically allow certain html tags for it (possibly).

add in config.php (and don't use/remove/rename FoxNotifyTemplates)

//the next makes the email into HTML formatted email
$FoxNotifyHeaders = 'MIME-Version: 1.0' . "\r\n"
        .'Content-type: text/html; charset=iso-8859-1' . "\r\n";

//try adding some HTML tags
//heading in the email body:
$FoxNotifyBodyHeadingFmt = "<h3>Recent \$WikiTitle posts: </h3>\n";

//each notify item:
$FoxNotifyItemFmt = "<a href='$ScriptUrl/{\$FullName}'>$ScriptUrl/{\$FullName}</a>"
             ." . . . $PostTime by <b>{$LastModifiedBy}</b><br /> \n";

//adding a footer
$FoxNotifyFooterFmt = "<br /><i>mail sent by pmwiki notification service</i>";  

$FoxNotifyBodyFmt = 
   "\$FoxNotifyBodyHeadingFmt" 
   ."\$FoxNotifyItems\n"
   ."\$FoxNotifyFooterFmt\n";

I have two forms in my site. How can I specify two different "subject" in the "FoxNotifyTemplates" page? Pierre 2008-02-12

I have no easy solution for this. Presently you can specify different template formats for the email body only. Maybe i can change that in future to allow specifying formats for header and subject. Right now you can try to load a different FoxNotifyTemplate page for each of your form pages, using conditionals in config.php to set $FoxNotifyTemplatePageFmt, somthing like this:

$name = PageVar($pagename, '$FullName');
if ($name=='SomeGroup.SomePageA')
   $FoxNotifyTemplatePageFmt = ""$FoxNotifyListsGroup.FoxNotifyTemplatesA";
if ($name=='SomeGroup.SomePageB')
   $FoxNotifyTemplatePageFmt = ""$FoxNotifyListsGroup.FoxNotifyTemplatesB";
include_once("$FarmD/cookbook/fox/foxnotify.php");

HansB February 13, 2008, at 05:59 AM


Edit - History - Print - Recent Changes - Search
Page last modified on April 01, 2008, at 09:46 AM