]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
add article forwarding by email (closes #271)
[tt-rss.git] / functions.php
index a11d9e59c3b1e102046174869e96fc21292cb480..18e7b23f1d3c1912c83fe8c750a5837cf5a5d534 100644 (file)
 
                        print "<div class=\"postReply\">";
 
-                       print "<div class=\"postHeader\" onmouseover=\"enable_resize(true)\" 
+                       print "<div class=\"postHeader\" onmouseover=\"enable_resize(false)\" 
                                onmouseout=\"enable_resize(false)\">";
 
                        $entry_author = $line["author"];
                        if (!$zoom_mode) {
                                print "<span id=\"ATSTR-$id\">$tags_str</span>
                                        <a title=\"".__('Edit tags for this article')."\" 
-                                       href=\"javascript:editArticleTags($id, $feed_id)\">(+)</a>";
+                                       href=\"#\" onclick=\"editArticleTags($id, $feed_id)\">(+)</a>";
 
                                print "<img src=\"".theme_image($link, 'images/art-zoom.png')."\" 
                                                class='tagsPic' style=\"cursor : pointer\" style=\"cursor : pointer\"
                                                onclick=\"publishWithNote($id, '$note_escaped')\"
                                                alt='PubNote' title='".__('Publish article with a note')."'>";
 
+                               if (DIGEST_ENABLE) {
+                                       print "<img src=\"".theme_image($link, 'images/art-email.png')."\" 
+                                               class='tagsPic' style=\"cursor : pointer\" style=\"cursor : pointer\"
+                                               onclick=\"emailArticle($id)\"
+                                               alt='Zoom' title='".__('Forward by email')."'>";
+                               }
+
                        } else {
                                $tags_str = strip_tags($tags_str);
                                print "<span id=\"ATSTR-$id\">$tags_str</span>";
                print "<disable-cache value=\"1\"/>";
 
        }
+
+       function save_email_address($link, $email) {
+               // FIXME: implement persistent storage of emails
+
+               if (!$_SESSION['stored_emails']) 
+                       $_SESSION['stored_emails'] = array();
+
+               if (!in_array($email, $_SESSION['stored_emails']))
+                       array_push($_SESSION['stored_emails'], $email);
+       }
 ?>