[geeklog-cvs] geeklog: Added an option to send a copy to self to the "Mail Sto...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Oct 4 05:10:32 EDT 2009


changeset 7356:7c38c0c6ce0c
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7c38c0c6ce0c
user: Dirk Haun <dirk at haun-online.de>
date: Sun Oct 04 10:08:27 2009 +0200
description:
Added an option to send a copy to self to the "Mail Story to a Friend" dialog and made the look of this and the "Send mail to user" dialogs more consistent

diffstat:

 public_html/docs/english/theme.html                              |  10 +++++
 public_html/docs/history                                         |   9 +++-
 public_html/layout/professional/profiles/contactauthorform.thtml |  17 ++++++--
 public_html/layout/professional/profiles/contactuserform.thtml   |  28 ++++++-------
 public_html/profiles.php                                         |  18 +++++++--
 5 files changed, 55 insertions(+), 27 deletions(-)

diffs (180 lines):

diff -r bca4b093d603 -r 7c38c0c6ce0c public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html	Sun Oct 04 09:36:19 2009 +0200
+++ b/public_html/docs/english/theme.html	Sun Oct 04 10:08:27 2009 +0200
@@ -198,6 +198,12 @@
 <h2><a name="changes">Theme changes in Geeklog 1.6.1</a></h2>
 
 <ul>
+<li>Added a "send copy to myself" option to
+    <tt>profiles/contactauthorform.thtml</tt></li>
+<li>Cosmetics: Made the look and layout of the "Send mail to user"
+    (<tt>contactuserform.thtml</tt>) and "Mail Story to a Friend"
+    (<tt>contactauthorform.thtml</tt>) dialogs more consistent (alignment, size
+    of input fields).</li>
 <li>The Topic Editor now contains a line displaying the number of stories in
     the current topic. New variables in <tt>admin/topic/topiceditor.thtml</tt>:
     <code>{lang_num_stories}</code>, <code>{num_stories}</tt></li>
@@ -238,12 +244,16 @@
 <li>Links: Removed a <code>width="150"</code> from the Category editor template
     (<tt>admin/categoryeditor.thtml</tt>) that pushed the first column too far
     to the right.</li>
+<li>Static Pages: Added new input fields for a meta description and meta
+    keywords to the Static Pages editor.</li>
 <li>Static Pages: In the Static Pages editor, moved the Hits display below
     the Last Updated entry (<tt>admin/editor.thtml</tt>,
     <tt>admin/editor_advanced.thtml</tt>).</li>
 <li>Static Pages: Added textarea fileds for meta description and meta keywords
     in the Static Pages editor (<tt>admin/editor.thtml</tt>,
     <tt>admin/editor_advanced.thtml</tt>).</li>
+<li>Polls: Added new input fields for a meta description and meta keywords to
+    the Polls editor.</li>
 <li>Polls: Added new CSS classes <tt>poll-autotag-message</tt>,
     <tt>poll-autotag</tt>, <tt>poll-autotag-left</tt>, used when embedding polls
     via the new autotags.</li>
diff -r bca4b093d603 -r 7c38c0c6ce0c public_html/docs/history
--- a/public_html/docs/history	Sun Oct 04 09:36:19 2009 +0200
+++ b/public_html/docs/history	Sun Oct 04 10:08:27 2009 +0200
@@ -3,6 +3,9 @@
 Oct ??, 2009 (1.6.1)
 ------------
 
+- Added an option to send a copy to self to the "Mail Story to a Friend" dialog
+  and made the look of this and the "Send mail to user" dialogs more consistent
+  [Dirk]
 - Display the number of stories in the current topic in the Topic Editor
   (feature request #0000806) [Dirk]
 - Call CUSTOM_userCheck from admin/user.php (bug #0000925) [Dirk]
@@ -51,8 +54,8 @@
 - Only list [code], [raw] tags when story.* permissions are required [Dirk]
 - [page_break] was not listed when all HTML was allowed for Root users [Dirk]
 - Added support for meta tags and meta keywords, provided by Tom Homer
-- When an error occurs in bigdump.php (during migration) keep the language when
-  sending the user back to migrate.php (bug #0000943) [Dirk]
+- When an error occurs in bigdump.php (during migration) keep the selected
+  language when sending the user back to migrate.php (bug #0000943) [Dirk]
 - Use COM_getUserDateTimeFormat, i.e. the user's preferred format, for
   displaying the date and time in search results [Dirk]
 - When disabling a feed, delete the feed file [Dirk]
@@ -94,7 +97,7 @@
 
 Static Pages Plugin 1.6.1
 -------------------
-- Fresh installs of the plugin in Geeklog 1.6.1 accidentally used a wrong name
+- Fresh installs of the plugin in Geeklog 1.6.0 accidentally used a wrong name
   for the plugin's admin group. Silently fix that during the upgrade [Dirk]
 - Made the list of pages sortable by author (feature request #0000978) [Dirk]
 - List available autotags in the static pages editor [Dirk]
diff -r bca4b093d603 -r 7c38c0c6ce0c public_html/layout/professional/profiles/contactauthorform.thtml
--- a/public_html/layout/professional/profiles/contactauthorform.thtml	Sun Oct 04 09:36:19 2009 +0200
+++ b/public_html/layout/professional/profiles/contactauthorform.thtml	Sun Oct 04 10:08:27 2009 +0200
@@ -23,14 +23,21 @@
         </tr>
         <tr>
             <td class="alignright" style="vertical-align:top;"><b>{lang_shortmessage}:</b></td>
-            <td><textarea name="shortmsg" rows="8" style="width:100%">{shortmsg}</textarea></td>
+            <td><textarea name="shortmsg" rows="10" style="width:100%">{shortmsg}</textarea></td>
+        </tr>
+        <tr>
+            <td class="alignright"><b>{lang_cc}</b></td>
+            <td><input type="checkbox" name="cc" checked="checked"{xhtml}> {lang_cc_description}</td>
         </tr>
         {captcha}
         <tr>
-            <td colspan="2" class="warning aligncenter"><br{xhtml}>{lang_warning}<br{xhtml}><br{xhtml}>
-                <input type="hidden" name="sid" value="{story_id}"{xhtml}>
-                <input type="hidden" name="what" value="sendstory"{xhtml}>
-                <input type="submit" value="{lang_sendmessage}"{xhtml}>
+            <td colspan="2" class="warning aligncenter" style="padding-top:10px;">
+                {lang_warning}
+                <div style="padding:5px;">
+                    <input type="hidden" name="sid" value="{story_id}"{xhtml}>
+                    <input type="hidden" name="what" value="sendstory"{xhtml}>
+                    <input type="submit" value="{lang_sendmessage}"{xhtml}>
+                </div>
             </td>
         </tr>
     </table>
diff -r bca4b093d603 -r 7c38c0c6ce0c public_html/layout/professional/profiles/contactuserform.thtml
--- a/public_html/layout/professional/profiles/contactuserform.thtml	Sun Oct 04 09:36:19 2009 +0200
+++ b/public_html/layout/professional/profiles/contactuserform.thtml	Sun Oct 04 10:08:27 2009 +0200
@@ -1,31 +1,29 @@
+<p>{lang_description}</p>
 <form action="{site_url}/profiles.php" method="post" name="contact">
-    <table cellspacing="0" cellpadding="0" width="100%" class="plugin">
+    <table cellspacing="0" cellpadding="3" width="100%">
         <tr>
-            <td colspan="2" class="pluginInfo">{lang_description}</td>
+            <td class="alignright"><b>{lang_username}</b></td>
+            <td><input type="text" name="author" size="40" maxlength="96" value="{username}"{xhtml}></td>
         </tr>
         <tr>
-            <td>{lang_username}</td>
-            <td><input type="text" name="author" size="32" value="{username}" maxlength="32"{xhtml}></td>
+            <td class="alignright"><b>{lang_useremail}</b></td>
+            <td><input type="text" name="authoremail" size="40" maxlength="96" value="{useremail}"{xhtml}></td>
         </tr>
         <tr>
-            <td>{lang_useremail}</td>
-            <td><input type="text" name="authoremail" size="32" value="{useremail}" maxlength="96"{xhtml}></td>
+            <td class="alignright"><b>{lang_subject}</b></td>
+            <td><input type="text" name="subject" size="40" maxlength="96" value="{subject}"{xhtml}></td>
         </tr>
         <tr>
-            <td>{lang_cc}</td>
-            <td><input type="checkbox" name="cc" checked="checked"{xhtml}> {lang_cc_description}</td>
+            <td class="alignright" style="vertical-align:top;"><b>{lang_message}</b></td>
+            <td><textarea name="message" rows="10" style="width:100%">{message}</textarea></td>
         </tr>
         <tr>
-            <td>{lang_subject}</td>
-            <td><input type="text" name="subject" size="32" maxlength="96" value="{subject}"{xhtml}></td>
-        </tr>
-        <tr>
-            <td style="vertical-align:top;">{lang_message}</td>
-            <td><textarea name="message" wrap="physical" rows="10" cols="50">{message}</textarea></td>
+            <td class="alignright"><b>{lang_cc}</b></td>
+            <td><input type="checkbox" name="cc" checked="checked"{xhtml}> {lang_cc_description}</td>
         </tr>
         {captcha}
         <tr>
-            <td colspan="2" class="warning alignleft" style="padding-left:200px;padding-top:10px;">
+            <td colspan="2" class="warning aligncenter" style="padding-top:10px;">
                 {lang_nohtml}
                 <div style="padding:5px;">
                     <input type="hidden" name="what" value="contact"{xhtml}>
diff -r bca4b093d603 -r 7c38c0c6ce0c public_html/profiles.php
--- a/public_html/profiles.php	Sun Oct 04 09:36:19 2009 +0200
+++ b/public_html/profiles.php	Sun Oct 04 10:08:27 2009 +0200
@@ -371,11 +371,19 @@
                                   . $sid);
     }
 
-    $mailto = COM_formatEmailAddress ($to, $toemail);
-    $mailfrom = COM_formatEmailAddress ($from, $fromemail);
-    $subject = COM_undoSpecialChars(strip_tags('Re: '.$story->DisplayElements('title')));
+    $mailto = COM_formatEmailAddress($to, $toemail);
+    $mailfrom = COM_formatEmailAddress($from, $fromemail);
+    $subject = 'Re: ' . COM_undoSpecialChars(strip_tags($story->DisplayElements('title')));
 
-    $sent = COM_mail ($mailto, $subject, $mailtext, $mailfrom);
+    $sent = COM_mail($mailto, $subject, $mailtext, $mailfrom);
+
+    if ($sent && isset($_POST['cc']) && ($_POST['cc'] == 'on')) {
+        $ccmessage = sprintf($LANG08[38], $to);
+        $ccmessage .= "\n------------------------------------------------------------\n\n" . $mailtext;
+
+        $sent = COM_mail($mailfrom, $subject, $ccmessage, $mailfrom);
+    }
+
     COM_updateSpeedlimit ('mail');
 
     // Increment numemails counter for story
@@ -468,6 +476,8 @@
     $mail_template->set_var('toname', $to);
     $mail_template->set_var('lang_toemailaddress', $LANG08[19]);
     $mail_template->set_var('toemail', $toemail);
+    $mail_template->set_var('lang_cc', $LANG08[36]);
+    $mail_template->set_var('lang_cc_description', $LANG08[37]);
     $mail_template->set_var('lang_shortmessage', $LANG08[27]);
     $mail_template->set_var('shortmsg', htmlspecialchars($shortmsg));
     $mail_template->set_var('lang_warning', $LANG08[22]);



More information about the geeklog-cvs mailing list