Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make message preview configurable #713

Merged
merged 1 commit into from Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions public_html/lists/admin/init.php
Expand Up @@ -369,6 +369,9 @@
if (!defined('USE_MANUAL_TEXT_PART')) {
define('USE_MANUAL_TEXT_PART', 0);
}
if (!defined('USE_MESSAGE_PREVIEW')) {
define('USE_MESSAGE_PREVIEW',false);
}
if (!defined('ALLOW_NON_LIST_SUBSCRIBE')) {
define('ALLOW_NON_LIST_SUBSCRIBE', 0);
}
Expand Down
16 changes: 9 additions & 7 deletions public_html/lists/admin/send_core.php
Expand Up @@ -708,14 +708,16 @@ function submitform() {
<input type="text" name="replyto"
value="' .htmlspecialchars($messagedata['replyto']).'" size="60" /></div>';
}
if (USE_MESSAGE_PREVIEW) {
$maincontent .= '
<div class="field" id="message-text-preview">
<label for="messagepreview">' .s('Message preview').Help('generatetextpreview').'</label>
<input type="text" id="messagepreview" name="messagepreview" size="60" readonly />
<div id="message-text-preview-button">' .
PageLinkAjax('send&tab=Content&id='.$id.'&action=generatetextpreview', $GLOBALS['I18N']->get('Generate')).'</a>
</div>
</div>';
<div class="field" id="message-text-preview">
<label for="messagepreview">' .s('Message preview').Help('generatetextpreview').'</label>
<input type="text" id="messagepreview" name="messagepreview" size="60" readonly />
<div id="message-text-preview-button">' .
PageLinkAjax('send&tab=Content&id='.$id.'&action=generatetextpreview', $GLOBALS['I18N']->get('Generate')).'
</div>
</div>';
}

$maincontent .= sprintf('

Expand Down
3 changes: 3 additions & 0 deletions public_html/lists/config/config_extended.php
Expand Up @@ -672,6 +672,9 @@
// instead of trying to create it by parsing the HTML version into plain text
define('USE_MANUAL_TEXT_PART', 0);

// Message preview tries to show a small preview of how your campaign will look in email applications
define('USE_MESSAGE_PREVIEW',true);

// set this to 1 to allow adding attachments to the mails
// caution, message may become very large. it is generally more
// acceptable to send a URL for download to users
Expand Down