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(
'$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
'$site_admin' => $datarray['site_admin'],
'$title' => $datarray['title'],
'$textversion' => $datarray['textversion'],
+ '$content_allowed' => $content_allowed,
));
// logger('text: ' . $email_text_body);
$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);
}
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);
'$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.")),
{{ 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>
<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>
</table>
</body>
</html>
+
$preamble
-
+
+{{ if $content_allowed }}
$title
$textversion
-
+
+{{ endif }}
$tsitelink
$titemlink
$thanks
$site_admin
+
{{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>
{{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>
<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>
</table>
</body>
</html>
+
*}}
{{$preamble}}
-
+
+{{if $content_allowed}}
{{$title}}
{{$textversion}}
-
+
+{{/if}}
{{$tsitelink}}
{{$titemlink}}
{{$thanks}}
{{$site_admin}}
+
{{ 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>
{{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>
{{ 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>
{{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>
{{ 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>
{{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>