diff options
-rwxr-xr-x | css/readability.css | 5 | ||||
-rw-r--r-- | email.php | 49 | ||||
-rw-r--r-- | images/footer-thanks.png | bin | 0 -> 6453 bytes | |||
-rwxr-xr-x | js/readability.js | 4 | ||||
-rw-r--r-- | log.txt | 3 |
5 files changed, 42 insertions, 19 deletions
diff --git a/css/readability.css b/css/readability.css index 3c1502b..c970a29 100755 --- a/css/readability.css +++ b/css/readability.css @@ -72,6 +72,7 @@ span.version { left: 10px;
}
#readTools a {
+ overflow: hidden;
margin-bottom: 8px;
display: block;
opacity: .4;
@@ -181,8 +182,8 @@ span.version { left: 50%;
margin: 0 0 0 -240px;
padding: 0;
- width: 480px;
- height: 460px;
+ width: 500px;
+ height: 490px;
border: solid 3px #666;
background-color: #fff;
z-index: 100 !important;
@@ -1,5 +1,5 @@ <?php - set_include_path( get_include_path() . PATH_SEPARATOR . 'lib'); + set_include_path( get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/lib'); session_start(); require_once 'Zend/Filter.php'; @@ -29,6 +29,8 @@ //FILTER DATA $from = $filters->filter($_POST['from']); + $fromName = $filters->filter($_POST['name']); + $fromName = !empty($fromName) ? $fromName : $from; $to = $filters->filter($_POST['to']); $to = array_map('trim', split(',', $to)); $note = $filters->filter($_POST['note']); @@ -72,6 +74,7 @@ { // store the from address so it's saved for future use setcookie("from", $from, time()+3600*24*7*4, "/"); + setcookie("name", $fromName, time()+3600*24*7*4, "/"); require_once 'Zend/Mail.php'; require_once 'Zend/Mail/Transport/Smtp.php'; @@ -79,7 +82,7 @@ $mailer = new Zend_Mail_Transport_Smtp('smtp.googlemail.com', Array( 'auth' => 'login', 'username' => 'readability@arc90.com', - 'password' => '*******', + 'password' => '********', 'ssl' => 'ssl', 'port' => 465, )); @@ -91,7 +94,10 @@ $body = '<body>'; $body .= '<div style="font-size: 15px;">'; $body .= '<p>This page was sent to you by: '.$from.'</p>'; - $body .= '<p>Message from sender: </p><p><blockquote>'.stripslashes($note).'</blockquote></p>'; + if(!empty($note)) + { + $body .= '<p>Message from sender: </p><p><blockquote>'.stripslashes($note).'</blockquote></p>'; + } $body .= '<p>Just click this link: <a href="'.$pageUrl.'">'.$pageTitle.'</a></p>'; $body .= '<hr />'; $body .= '<p style="font-size: 90%;">Sent from <a href="http://lab.arc90.com/experiments/readability/">Readability</a> | An <a href="http://www.arc90.com">Arc90</a> lab experiment<p>'; @@ -100,7 +106,8 @@ $mail = new Zend_Mail(); $mail->setBodyHtml($body); - $mail->setFrom($from); + $mail->setFrom($from, $fromName); + $mail->addHeader('Reply-To', $from); foreach($to as $toAddress) { @@ -234,7 +241,7 @@ public static function hasValidParams() { - $requiredParams = array('from', 'to', 'note', 'key', 'pageTitle', 'pageUrl'); + $requiredParams = array('from', 'name', 'to', 'note', 'key', 'pageTitle', 'pageUrl'); $sentParams = array_keys($_POST); foreach($requiredParams as $required) { @@ -277,8 +284,8 @@ font-size: 14px; margin: 0; padding: 0; - width: 480px; - height: 450px; + width: 500px; + height: 490px; font-family: times, serif; background-color: #fff; } @@ -296,13 +303,13 @@ padding-right: 10px; display: block; float: left; - width: 100px; + width: 130px; text-align: right; } input, textarea{ padding: 5px; - width: 330px; + width: 320px; font-family: times, serif; font-size: 14px; border: solid 1px #999; @@ -325,7 +332,7 @@ } .helper, .details{ - margin-left: 110px; /* add label width + label padding-right */ + margin-left: 120px; /* add label width + label padding-right */ } .section{ margin-top: 15px; @@ -360,12 +367,17 @@ bottom: 10px; } #complete{ + margin-top: 120px; + text-align: center; padding: 20px; } #complete p{ margin: 0 0 10px; font-size: 16px; } + #complete img{ + margin-top: 100px; + } </style> </head> <body> @@ -375,7 +387,11 @@ <?php if($page == 'form'){ ?> <form action="./email.php" method="post" accept-charset="utf-8" id="send-email-form"> <div class="section"> - <label for="from">From :</label> + <label for="name">Your Name :</label> + <input type="text" name="name" id="name" value="<?php echo Readability::getParam('name') ?>" /> + </div> + <div class="section"> + <label for="from">Your Email :</label> <input type="text" name="from" id="from" value="<?php echo Readability::getParam('from') ?>" <?php echo Readability::getErrorClass('from', $errors); ?> /> <?php if(Readability::isError('from', $errors)){ ?> <p class="helper error"> @@ -384,7 +400,7 @@ <?php } ?> </div> <div class="section"> - <label for="to">To :</label> + <label for="to">Recipients :</label> <input type="text" name="to" id="to" value="<?php echo Readability::getParam('to') ?>" <?php echo Readability::getErrorClass('to', $errors); ?> /> <?php if(Readability::isError('to', $errors)){ ?> <p class="helper error"> @@ -392,7 +408,7 @@ </p> <?php } ?> <p class="helper"> - Seperate multiple recipients with commas. + Seperate multiple <em>email addresses</em> with commas. </p> </div> <div class="section"> @@ -417,11 +433,14 @@ <?php }else if($page == "complete"){ ?> <div id="complete"> <p> - Thanks for using Readability! + A link to this page has been sent to <?php echo Readability::emailAsLinks($to) ?> </p> <p> - A link to this page has been sent to <?php echo Readability::emailAsLinks($to) ?> + Thanks for using Readability. </p> + <div> + <img src="http://davehauenstein.com/readabilityTest/images/footer-thanks.png" alt="Readability" /> + </div> </div> <?php } ?> </div> diff --git a/images/footer-thanks.png b/images/footer-thanks.png Binary files differnew file mode 100644 index 0000000..07de8ce --- /dev/null +++ b/images/footer-thanks.png diff --git a/js/readability.js b/js/readability.js index 7259ccb..b5f2347 100755 --- a/js/readability.js +++ b/js/readability.js @@ -1,5 +1,5 @@ var readabilityVersion = "0.4";
-var emailSrc = 'http://lab.arc90.com/experiments/readability/email.php';
+var emailSrc = 'http://davehauenstein.com/readabilityTest/email.php';
var iframeLoads = 0;
(function(){
@@ -234,7 +234,7 @@ function emailBox() { var emailContainer = document.createElement('div');
emailContainer.setAttribute('id', 'email-container');
- emailContainer.innerHTML = '<iframe src="'+emailSrc + '?pageUrl='+escape(window.location)+'&pageTitle='+escape(document.title)+'" scrolling="no" onload="removeFrame()" style="width:480px; height: 460px; border: 0;"></iframe>';
+ emailContainer.innerHTML = '<iframe src="'+emailSrc + '?pageUrl='+escape(window.location)+'&pageTitle='+escape(document.title)+'" scrolling="no" onload="removeFrame()" style="width:500px; height: 490px; border: 0;"></iframe>';
document.body.appendChild(emailContainer);
}
@@ -0,0 +1,3 @@ +2009-04-20 20:38:57 :: ERROR:There was an exception sending the email. [to:bens@arc90.com, from:davehauenstein@gmail.com, notes:lets build this., pageUrl: http://www.pokelondon.com/story/project-launch/mmmm-doughnuts-arduino-style-/, pageTitle: Mmmm. Doughnuts. Arduino Style. | POKE] +2009-04-20 20:38:57 :: ERROR:535-5.7.1 Username and Password not accepted. Learn more at
+ |