> How to set global setting from the local/config.php file into 
> the actual
> page, so the settings can be customized on the page itself?
> 
> I am using the emailform receipe and it works great, but I'd 
> like to set
> the:
> 
> $EMailFormAddresses['feedback'] = '[EMAIL PROTECTED]';
> $EMailFormDefaultSender = '[EMAIL PROTECTED]';
> 
> on the page itself instead of local/config.php

You could create your own markup which you would use like this:

(:setupmail [EMAIL PROTECTED]
[EMAIL PROTECTED]:)

markup("setupmail", "<_end", "/\\(:setupmail\s+(.*?):\\)/ie", 
    "MySetupMail(\$pagename, \"\$1\")");  

function MySetupMail($pagename, $opt)
{
   global $EMailFormAddresses, $EMailFormDefaultSender;
   $opt = ParseArgs($opt);
   #echo "Setting...<br>\n";
   $EMailFormAddresses['feedback'] = ($opt['feedback'] ? $opt['feedback'] :
'[EMAIL PROTECTED]');
   $EMailFormDefaultSender = ($opt['sender'] ? $opt['sender'] :
'[EMAIL PROTECTED]');
}

I don't have emailform installed so I can't test the functionality, but it
calls the function properly so from their on you can hopefully figure out
where it's going.

Do note that your email addresses will be in cleartext if anyone looks at
the source on this page.

-Peter


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to