]> git.mxchange.org Git - friendica.git/commitdiff
admin option to disable post content in email notifications for the site
authorZach Prezkuta <fermion@gmx.com>
Sat, 23 Feb 2013 16:31:34 +0000 (09:31 -0700)
committerZach Prezkuta <fermion@gmx.com>
Sat, 23 Feb 2013 16:31:34 +0000 (09:31 -0700)
14 files changed:
include/enotify.php
mod/admin.php
view/admin_site.tpl
view/email_notify_html.tpl
view/email_notify_text.tpl
view/smarty3/admin_site.tpl
view/smarty3/email_notify_html.tpl
view/smarty3/email_notify_text.tpl
view/theme/decaf-mobile/admin_site.tpl
view/theme/decaf-mobile/smarty3/admin_site.tpl
view/theme/frost-mobile/admin_site.tpl
view/theme/frost-mobile/smarty3/admin_site.tpl
view/theme/frost/admin_site.tpl
view/theme/frost/smarty3/admin_site.tpl

index b87b159eb68ff040b9c324216eab3083c9df6310..928d2b4b484c2b818618e6b600b271ec6a4f3d1e 100644 (file)
@@ -415,6 +415,9 @@ intval($params['uid']), LOGGER_DEBUG);
 
                call_hooks('enotify_mail', $datarray);
 
+               // check whether sending post content in email notifications is allowed
+               $content_allowed = !get_config('system','enotify_no_content');
+
                // load the template for private message notifications
                $tpl = get_markup_template('email_notify_html.tpl');
                $email_html_body = replace_macros($tpl,array(
@@ -432,7 +435,8 @@ intval($params['uid']), LOGGER_DEBUG);
                        '$thanks'       => $datarray['thanks'],
                        '$site_admin'   => $datarray['site_admin'],
                        '$title'                => $datarray['title'],
-                       '$htmlversion'  => $datarray['htmlversion'],    
+                       '$htmlversion'  => $datarray['htmlversion'],
+                       '$content_allowed'      => $content_allowed,
                ));
                
                // load the template for private message notifications
@@ -453,6 +457,7 @@ intval($params['uid']), LOGGER_DEBUG);
                        '$site_admin'   => $datarray['site_admin'],
                        '$title'                => $datarray['title'],
                        '$textversion'  => $datarray['textversion'],    
+                       '$content_allowed'      => $content_allowed,
                ));
 
 //             logger('text: ' . $email_text_body);
index 98e52d28bd9d79b27766e9833652843845e02537..c263a646d41e94c77e1973a2727775e5dc73c57a 100644 (file)
@@ -255,6 +255,8 @@ function admin_page_site_post(&$a){
        $global_directory       =       ((x($_POST,'directory_submit_url'))     ? notags(trim($_POST['directory_submit_url']))  : '');
        $thread_allow           =       ((x($_POST,'thread_allow'))             ? True                                          : False);
        $newuser_private                =       ((x($_POST,'newuser_private'))          ? True                                          : False);
+       $enotify_no_content             =       ((x($_POST,'enotify_no_content'))       ? True                                          : False);
+
        $no_multi_reg           =       ((x($_POST,'no_multi_reg'))             ? True                                          : False);
        $no_openid              =       !((x($_POST,'no_openid'))               ? True                                          : False);
        $no_regfullname         =       !((x($_POST,'no_regfullname'))          ? True                                          : False);
@@ -371,6 +373,7 @@ function admin_page_site_post(&$a){
        }
        set_config('system','thread_allow', $thread_allow);
        set_config('system','newuser_private', $newuser_private);
+       set_config('system','enotify_no_content', $enotify_no_content);
 
        set_config('system','block_extended_register', $no_multi_reg);
        set_config('system','no_openid', $no_openid);
@@ -505,6 +508,7 @@ function admin_page_site(&$a) {
                '$global_directory'     => array('directory_submit_url', t("Global directory update URL"), get_config('system','directory_submit_url'), t("URL to update the global directory. If this is not set, the global directory is completely unavailable to the application.")),
                '$thread_allow'         => array('thread_allow', t("Allow threaded items"), get_config('system','thread_allow'), t("Allow infinite level threading for items on this site.")),
                '$newuser_private'      => array('newuser_private', t("Private posts by default for new users"), get_config('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")),
+               '$enotify_no_content'   => array('enotify_no_content', t("Don't include post body in email notifications"), get_config('system','enotify_no_content'), t("Don't include the body of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")),
 
                '$no_multi_reg'         => array('no_multi_reg', t("Block multiple registrations"),  get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
                '$no_openid'            => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")),
index a6fe2d789cbbc0126be00154c81fb02c4324c001..20a0839fee2ab67ac7f0d84ee5ca33c645e84ea9 100644 (file)
@@ -84,6 +84,7 @@
        {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
+       {{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
        
        <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
        
index 43f72f15c404a0b7bffec82c449f5c474bcf633e..4a8e5a9114d3f2e89c45fe936cb8264bb54b158e 100644 (file)
        <tr><td style="padding-top:22px;" colspan="2">$preamble</td></tr>
 
 
+       {{ if $content_allowed }}
        <tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$source_link"><img style="border:0px;width:48px;height:48px;" src="$source_photo"></a></td>
                <td style="padding-top:22px;"><a href="$source_link">$source_name</a></td></tr>
        <tr><td style="font-weight:bold;padding-bottom:5px;">$title</td></tr>
        <tr><td style="padding-right:22px;">$htmlversion</td></tr>
+       {{ endif }}
        <tr><td style="padding-top:11px;" colspan="2">$hsitelink</td></tr>
        <tr><td style="padding-bottom:11px;" colspan="2">$hitemlink</td></tr>
        <tr><td></td><td>$thanks</td></tr>
@@ -25,3 +27,4 @@
 </table>
 </body>
 </html>
+
index 018bb60786607cd90cea7360c94203d16d354741..af7931e4b069c4d5d54b95cfeee9d038ded3d4bb 100644 (file)
@@ -1,13 +1,16 @@
 
 $preamble
-       
+
+{{ if $content_allowed }}
 $title
 
 $textversion
-                               
+
+{{ endif }}
 $tsitelink
 $titemlink
 
 $thanks
 $site_admin
 
+
index bad0f52756e4c39945cbdd93099e5e3492ec8da9..c1442202d16911c5ca5ccd22b626332e188f9ca6 100644 (file)
        {{include file="field_input.tpl" field=$sitename}}
        {{include file="field_textarea.tpl" field=$banner}}
        {{include file="field_select.tpl" field=$language}}
-        {{include file="field_select.tpl" field=$theme}}
+       {{include file="field_select.tpl" field=$theme}}
        {{include file="field_select.tpl" field=$theme_mobile}}
        {{include file="field_select.tpl" field=$ssl_policy}}
        {{include file="field_checkbox.tpl" field=$new_share}}
        {{include file="field_checkbox.tpl" field=$hide_help}}
-        {{include file="field_select.tpl" field=$singleuser}}
+       {{include file="field_select.tpl" field=$singleuser}}
 
        
        <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
@@ -89,6 +89,7 @@
        {{include file="field_input.tpl" field=$global_directory}}
        {{include file="field_checkbox.tpl" field=$thread_allow}}
        {{include file="field_checkbox.tpl" field=$newuser_private}}
+       {{include file="field_checkbox.tpl" field=$enotify_no_content}}
        
        <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
        
index e7d4afaa529d55700ca0bdc309dd662c275ec871..7143adbaf202c4a5b7510d030394e6cef2e55515 100644 (file)
        <tr><td style="padding-top:22px;" colspan="2">{{$preamble}}</td></tr>
 
 
+       {{if $content_allowed}}
        <tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="{{$source_link}}"><img style="border:0px;width:48px;height:48px;" src="{{$source_photo}}"></a></td>
                <td style="padding-top:22px;"><a href="{{$source_link}}">{{$source_name}}</a></td></tr>
        <tr><td style="font-weight:bold;padding-bottom:5px;">{{$title}}</td></tr>
        <tr><td style="padding-right:22px;">{{$htmlversion}}</td></tr>
+       {{/if}}
        <tr><td style="padding-top:11px;" colspan="2">{{$hsitelink}}</td></tr>
        <tr><td style="padding-bottom:11px;" colspan="2">{{$hitemlink}}</td></tr>
        <tr><td></td><td>{{$thanks}}</td></tr>
@@ -30,3 +32,4 @@
 </table>
 </body>
 </html>
+
index e164f3023c93bb3f1bfc7eb1a20e31760ae16bbb..054a9e1b0edbd120c7e2ef8da1a9091e52645d09 100644 (file)
@@ -5,14 +5,17 @@
  *}}
 
 {{$preamble}}
-       
+
+{{if $content_allowed}}
 {{$title}}
 
 {{$textversion}}
-                               
+
+{{/if}}
 {{$tsitelink}}
 {{$titemlink}}
 
 {{$thanks}}
 {{$site_admin}}
 
+
index 087de4f7dbca41328d27d5e91872b0730e657309..a419cd9a57a3ad78bb1036995528edfd8026423f 100644 (file)
@@ -41,6 +41,7 @@
        {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
+       {{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
        
        <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
        
index 27773da2c42aea559d525bf95114e1cbae76242d..40580c48609bc54efc518630cebf7fff9888f4e8 100644 (file)
@@ -46,6 +46,7 @@
        {{include file="field_input.tpl" field=$global_directory}}
        {{include file="field_checkbox.tpl" field=$thread_allow}}
        {{include file="field_checkbox.tpl" field=$newuser_private}}
+       {{include file="field_checkbox.tpl" field=$enotify_no_content}}
        
        <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
        
index 087de4f7dbca41328d27d5e91872b0730e657309..a419cd9a57a3ad78bb1036995528edfd8026423f 100644 (file)
@@ -41,6 +41,7 @@
        {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
+       {{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
        
        <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
        
index 27773da2c42aea559d525bf95114e1cbae76242d..40580c48609bc54efc518630cebf7fff9888f4e8 100644 (file)
@@ -46,6 +46,7 @@
        {{include file="field_input.tpl" field=$global_directory}}
        {{include file="field_checkbox.tpl" field=$thread_allow}}
        {{include file="field_checkbox.tpl" field=$newuser_private}}
+       {{include file="field_checkbox.tpl" field=$enotify_no_content}}
        
        <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
        
index 1ae6aba80d8b6158213f03054dcbef1dbac8d231..c57c14569cb9d1aaaa0d7e019151960d5e0bfd06 100644 (file)
@@ -43,6 +43,7 @@
        {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
        {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
+       {{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
        
        <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
        
index 69172468cc60805873888f4b27af3c4b0a2eabad..2f51173591e15f8bcd5cd10b2aa61c98fd3db09e 100644 (file)
@@ -48,6 +48,7 @@
        {{include file="field_input.tpl" field=$global_directory}}
        {{include file="field_checkbox.tpl" field=$thread_allow}}
        {{include file="field_checkbox.tpl" field=$newuser_private}}
+       {{include file="field_checkbox.tpl" field=$enotify_no_content}}
        
        <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>