Difference between revisions of "Email-article.php"
(Add textonly checkbox) |
m |
||
Line 23: | Line 23: | ||
<input type=hidden name=xpath:/properties:sendarticle> | <input type=hidden name=xpath:/properties:sendarticle> | ||
<b>Email Address: </b><input type=text name=xpath:/properties/sendarticle:to size=30> | <b>Email Address: </b><input type=text name=xpath:/properties/sendarticle:to size=30> | ||
− | <input type=submit value=\" Send \" | + | <input type=submit value=\" Send \"> |
− | <input type=checkbox value=no name=xpath:/properties/sendarticle:textonly><br><br> | + | <input type=checkbox value=no name=xpath:/properties/sendarticle:textonly> |
+ | <i>tick for text-only</i><br><br> | ||
<p><b>You can also include a message before the article here if you like:</b></p> | <p><b>You can also include a message before the article here if you like:</b></p> | ||
<textarea name=xpath:/properties/sendarticle:msg rows=10 cols=50></textarea> | <textarea name=xpath:/properties/sendarticle:msg rows=10 cols=50></textarea> |
Revision as of 03:18, 26 January 2006
<? if ($event == 'data') {
if (xwGetProperty($properties, 'sendarticle/sent', $sent)) xwMessage("This article has been sent to $sent",'green');
elseif (xwGetProperty($properties, 'sendarticle/to', $GLOBALS['sa-email'])) {
# If mail not sent but we have details, prepare for sending on view event xwSetProperty($properties, 'xpath:/properties:view', 'class.phpmailer.php'); xwSetProperty($properties, 'xpath:/properties:view', $tTitle);
# Tells skin not to wrap site-template around article $GLOBALS['xwRaw'] = true; }
else {
# Not sent and no details either, render input form
xwSetProperty($properties, 'language', 'raw');
$article = "<form action=\"$script\" method=\"POST\">
<input type=hidden name=title value=\"$title\">
<input type=hidden name=xpath:/properties:data value=\"$tTitle\">
<input type=hidden name=xpath:/properties:sendarticle>
Email Address: <input type=text name=xpath:/properties/sendarticle:to size=30>
<input type=submit value=\" Send \">
<input type=checkbox value=no name=xpath:/properties/sendarticle:textonly>
tick for text-only
You can also include a message before the article here if you like:
<textarea name=xpath:/properties/sendarticle:msg rows=10 cols=50></textarea> </form>";
} } else { # Replace msg-token with user article url and msg $utitle = urlencode($title); xwGetProperty($properties, 'sendarticle/msg', $msg); xwGetProperty($properties, 'sendarticle/textonly', $textonly); if ($textonly) { $html = false;
if (ereg('(.+)