Ejemplo n.º 1
0
    if ($Settings->get('notification_logo') != '') {
        // Display site logo
        $site_name = $Settings->get('notification_long_name') != '' ? $Settings->get('notification_long_name') : $Settings->get('notification_short_name');
        echo '<img src="' . $Settings->get('notification_logo') . '" alt="' . $site_name . '" />';
    } else {
        // No logo, Display only long site name
        echo '<p' . emailskin_style('.p+p.sitename') . '>' . $Settings->get('notification_long_name') . '</p>';
    }
    ?>
</div>
<?php 
}
?>

<div<?php 
echo emailskin_style('div.email_payload');
?>
>
<?php 
if ($params['include_greeting']) {
    // Display the greeting message
    ?>
<p<?php 
    echo emailskin_style('.p');
    ?>
><?php 
    echo T_('Hello $login$!');
    ?>
</p>
<?php 
}
Ejemplo n.º 2
0
        $duplicated_files_message = $new_File->get_duplicated_files_message(array('message' => '<p' . emailskin_style('.p') . '><b' . emailskin_style('.important') . '>' . T_('WARNING: the same profile picture is used by these other users: %s.') . '</b></p>' . "\n", 'use_style' => true));
    }
    if ($params['avatar_changed']) {
        // If profile pictre has been changed
        echo '<p' . emailskin_style('.p') . '>' . T_('The main profile picture was changed to:') . '</p>' . "\n";
        echo '<p' . emailskin_style('.p') . '>' . $User->get_avatar_File()->get_tag('', '', '', '', 'fit-320x320', 'original', '', '', '', '', '', '#', '', 1, 'none') . '</p>' . "\n";
    } elseif ($params['new_avatar_upload']) {
        // Display the newly uploaded file only if it was not set as main profile picture
        echo '<p' . emailskin_style('.p') . '>' . T_('A new profile picture file was uploaded:') . '</p>' . "\n";
        echo '<p' . emailskin_style('.p') . '>' . $new_File->get_tag('', '', '', '', 'fit-320x320', 'original', '', '', '', '', '', '#', '', 1, 'none') . '</p>' . "\n";
    }
    // Display warning message about duplicated files
    echo $duplicated_files_message;
    // User's pictures:
    echo '<p' . emailskin_style('.p') . '>' . T_('The current profile pictures for this account are:') . '</p>' . "\n";
    $user_pictures = '';
    $user_avatars = $User->get_avatar_Links(false);
    foreach ($user_avatars as $user_Link) {
        $user_pictures .= $user_Link->get_tag(array('before_image' => '', 'before_image_legend' => '', 'after_image_legend' => '', 'after_image' => ' ', 'image_size' => 'crop-top-160x160'));
    }
    echo empty($user_pictures) ? '<p' . emailskin_style('.p') . '><b>' . T_('No pictures.') . '</b></p>' : $user_pictures;
}
// Buttons:
echo '<div' . emailskin_style('div.buttons') . '>' . "\n";
echo get_link_tag($admin_url . '?ctrl=user&user_tab=profile&user_ID=' . $params['user_ID'], T_('Edit User'), 'div.buttons a+a.button_yellow') . "\n";
echo "</div>\n";
// Footer vars:
$params['unsubscribe_text'] = T_('If you don\'t want to receive any more notifications about user changes, click here:') . ' <a href="' . $htsrv_url . 'quick_unsubscribe.php?type=account_changed&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
Ejemplo n.º 3
0
<div class="email_footer"<?php 
echo emailskin_style('div.email_footer');
?>
>

<?php 
echo '<p' . emailskin_style('.p') . '><b>' . T_('Please do not reply to this email!') . '</b><br />' . "\n";
echo sprintf(T_('This message was automatically generated by %s running on <a %s>%s</a>.'), $app_name, 'href="' . $baseurl . '"' . emailskin_style('.a'), $Settings->get('notification_short_name'));
echo "<br />\n";
echo sprintf(T_('Your login on %s is: $login$'), $Settings->get('notification_short_name'));
echo ' &bull; ';
echo '<a href="' . get_lostpassword_url(false, '&amp;', false) . '"' . emailskin_style('.a') . '>' . T_('Lost password?') . '</a>';
echo "</p>\n";
echo '<p' . emailskin_style('.p') . '><b>' . T_('Too many emails?') . '</b><br />' . "\n";
echo sprintf(T_('To configure the emails you receive, click here: <a %s>edit notification preferences</a>.'), 'href="' . get_notifications_url('&amp;', $recipient_user_ID) . '"' . emailskin_style('.a'));
if (!empty($params['unsubscribe_text'])) {
    // Display the unsubscribe message with link
    echo "<br />\n";
    echo $params['unsubscribe_text'];
}
echo "</p>\n";
echo '<p' . emailskin_style('.p+p.center') . '><img' . emailskin_style('.img+img.b2evo') . ' src="' . $rsc_url . 'img/powered-by-b2evolution-120t.gif" alt="Powered by b2evolution" /></p>';
?>

</div>

</div><?php 
/* End of "div.email_wrap"*/
?>
</body>
</html>
Ejemplo n.º 4
0
<?php

/**
 * This is used when sendinf the newsletter - HTML VERSION
 *
 * For more info about email skins, see: http://b2evolution.net/man/themes-templates-skins/email-skins/
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
emailskin_include('_email_header.inc.html.php', $params);
// ------------------------------- END OF EMAIL HEADER --------------------------------
global $htsrv_url;
// Default params:
$params = array_merge(array('message_html' => ''), $params);
echo $params['message_html'];
// Footer vars:
$params['unsubscribe_text'] = T_('If you don\'t want to receive this newsletter anymore, click here:') . ' <a href="' . $htsrv_url . 'quick_unsubscribe.php?type=newsletter&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
<?php

/**
 * This is the HTML template of email message for post by email report
 *
 * For more info about email skins, see: http://b2evolution.net/man/themes-templates-skins/email-skins/
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
emailskin_include('_email_header.inc.html.php', $params);
// ------------------------------- END OF EMAIL HEADER --------------------------------
// Default params:
$params = array_merge(array('Items' => NULL), $params);
$Items = $params['Items'];
echo '<p' . emailskin_style('.p') . '>' . T_('You just created the following posts:') . '</p>';
foreach ($Items as $Item) {
    echo format_to_output($Item->title);
    echo '<p' . emailskin_style('.p') . '>' . get_link_tag($Item->get_permanent_url('', '', '&'), '', '.a') . '</p>';
}
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
Ejemplo n.º 6
0
 /**
  * Get User identity link, which is a composite of user avatar and login, both point to the specific user profile tab.
  *
  * @return string User avatar and login if the identity link is not available, the identity link otherwise.
  */
 function get_identity_link($params = array())
 {
     // Make sure we are not missing any param:
     $params = array_merge(array('link_text' => 'avatar_name', 'thumb_size' => 'crop-top-15x15', 'thumb_class' => 'avatar_before_login', 'thumb_zoomable' => false, 'login_mask' => '', 'display_bubbletip' => true, 'nowrap' => true, 'user_tab' => 'profile', 'use_style' => false, 'blog_ID' => NULL), $params);
     $identity_url = get_user_identity_url($this->ID, $params['user_tab'], $params['blog_ID']);
     $attr_bubbletip = '';
     if ($params['display_bubbletip']) {
         // Set attribute to initialize a bubbletip
         $attr_bubbletip = ' rel="bubbletip_user_' . $this->ID . '"';
     }
     $avatar_tag = '';
     if (strpos($params['link_text'], 'avatar') !== false) {
         // Avatar must be displayed in this link
         $avatar_tag = $this->get_avatar_imgtag($params['thumb_size'], $params['thumb_class'], '', $params['thumb_zoomable']);
         if ($params['thumb_zoomable']) {
             // User avatar is zoomable
             // Add tag param to init bubbletip
             $avatar_tag = str_replace('<img ', '<img rel="bubbletip_user_' . $this->ID . '"', $avatar_tag);
             return $avatar_tag;
             // We should exit here, to avoid the double adding of tag <a>
         }
     }
     $link_login = '';
     $class = empty($params['link_class']) ? '' : $params['link_class'];
     if ($params['link_text'] != 'only_avatar') {
         // Display a login, nickname, firstname, lastname, fullname or preferredname
         switch ($params['link_text']) {
             case 'login':
             case 'avatar_login':
                 $link_login = $this->login;
                 break;
             case 'nickname':
                 $link_login = $this->nickname;
                 break;
             case 'firstname':
                 $link_login = $this->firstname;
                 break;
             case 'lastname':
                 $link_login = $this->lastname;
                 break;
             case 'fullname':
                 $link_login = $this->firstname . ' ' . $this->lastname;
                 break;
             case 'preferredname':
                 $link_login = $this->get_preferred_name();
                 break;
                 // default: 'avatar_name' | 'avatar' | 'name'
         }
         $link_login = trim($link_login);
         if (empty($link_login)) {
             // Use a login or preferred name by default
             $link_login = $this->get_username();
         }
         // Add class "login" to detect logins by js plugins
         $class .= $link_login == $this->login ? ' login' : '';
         if ($params['login_mask'] != '') {
             // Apply login mask
             $link_login = str_replace('$login$', $link_login, $params['login_mask']);
         }
     }
     $gender_class = $this->get_gender_class();
     $attr_style = '';
     if ($params['use_style']) {
         // Use "style"
         $attr_style = emailskin_style('.user+.' . str_replace(' ', '.', $gender_class));
     }
     $attr_style = ' class="' . trim($class . ' ' . $gender_class . ($params['nowrap'] ? ' nowrap' : '')) . '"' . $attr_style;
     if (empty($identity_url)) {
         return '<span' . $attr_style . $attr_bubbletip . '>' . $avatar_tag . $link_login . '</span>';
     }
     $link_title = T_('Show the user profile');
     return '<a href="' . $identity_url . '" title="' . $link_title . '"' . $attr_style . $attr_bubbletip . '>' . $avatar_tag . $link_login . '</a>';
 }
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
emailskin_include('_email_header.inc.html.php', $params);
// ------------------------------- END OF EMAIL HEADER --------------------------------
global $htsrv_url, $admin_url, $baseurl;
// Default params:
$params = array_merge(array('tasks' => array()), $params);
echo '<p' . emailskin_style('.p') . '>' . T_('The following scheduled tasks have ended with error:') . "</p>\n";
if (is_array($params['tasks']) && count($params['tasks'])) {
    echo '<p' . emailskin_style('.p') . '><ul>';
    foreach ($params['tasks'] as $task_ID => $task) {
        echo '<li>' . $task['name'] . ' (#' . $task_ID . '): ' . T_($task['message']) . '</li>';
    }
    echo "</ul></p>\n";
}
// Buttons:
echo '<div' . emailskin_style('div.buttons') . '>' . "\n";
echo get_link_tag($admin_url . '?ctrl=crontab&ctst_timeout=1&ctst_error=1', T_('Review tasks with errors'), 'div.buttons a+a.button_yellow') . "\n";
echo "</div>\n";
// Footer vars:
$params['unsubscribe_text'] = T_('You are a scheduled task admin, and you are receiving notifications when a scheduled tasks ends with error or timeout.') . "<br />\n" . T_('If you don\'t want to receive any more notifications about scheduled task errors, click here:') . ' <a href="' . $htsrv_url . 'quick_unsubscribe.php?type=cronjob_error&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
Ejemplo n.º 8
0
/**
 * Get link tag
 *
 * @param string Url
 * @param string Link Text
 * @param string Link class
 * @param integer Max length of url when url is used as link text
 * @return string HTML link tag
 */
function get_link_tag($url, $text = '', $class = '', $max_url_length = 50)
{
    if (empty($text)) {
        // Link text is empty, Use url
        $text = $url;
        if (strlen($text) > $max_url_length) {
            // Crop url text
            $text = substr($text, 0, $max_url_length) . '&hellip;';
        }
    }
    $link_attrs = array('href' => $url);
    if (!empty($class)) {
        if (strpos($class, '.') === false) {
            // Simple class name
            $link_attrs['class'] = $class;
        } else {
            // This class name is used for email template
            $link_attrs['style'] = emailskin_style($class, false);
        }
    }
    return '<a' . get_field_attribs_as_string($link_attrs) . '>' . $text . '</a>';
}
            $message_content .= T_('Last used on') . ': <b>' . format_to_output(mysql2localedatetime($user_lastseen_ts)) . "</b>\n";
        }
    } else {
        $message_content .= '<p' . emailskin_style('.p') . '>' . T_('Login:'******' ' . $iterator_User->get_colored_login(array('mask' => '$login$')) . "</p>\n";
    }
    $url_change_password = $secure_htsrv_url . 'login.php?action=changepwd' . '&' . $dummy_fields['login'] . '=' . rawurlencode($iterator_User->login) . '&reqID=' . $params['request_id'] . '&sessID=' . $Session->ID . $params['blog_param'];
    // Restrict the password change url to be saved in the email logs
    $url_change_password = '******' . $url_change_password . '$secret_content_end$';
    // Buttons:
    $message_content .= '<div' . emailskin_style('div.buttons') . '>' . "\n";
    $message_content .= get_link_tag($url_change_password, T_('Change your password NOW'), 'div.buttons a+a.button_yellow') . "\n";
    $message_content .= "</div>\n";
    if ($params['user_count'] > 1) {
        // Several accounts with the given email address, display last used date for each
        $message_content .= '</div>';
    }
}
if ($params['user_count'] > 1) {
    // exists more account with the given email address
    $message_content = '<p' . emailskin_style('.p') . '>' . T_('It seems you have multiple accounts associated to this email address. Choose the one you want to use below:') . '</p>' . $message_content;
    $message_note = T_('For security reasons the links are only valid for your current session (by means of your session cookie).');
} else {
    $message_note = T_('For security reasons the link is only valid for your current session (by means of your session cookie).');
}
echo '<p' . emailskin_style('.p') . '>' . T_('Somebody (presumably you) has requested a password change for your account.') . "</p>\n";
echo $message_content;
echo '<p' . emailskin_style('.p+.note') . '>' . T_('Please note:') . ' ' . $message_note . "</p>\n";
echo '<p' . emailskin_style('.p') . '><i' . emailskin_style('.note') . '>' . T_('If you did not request this password change, simply ignore this email.') . '</i></p>';
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
/**
 * This is sent to ((Moderators)) to remind them that some posts are still awaiting moderation 24 hours after they have been posted.
 *
 * For more info about email skins, see: http://b2evolution.net/man/themes-templates-skins/email-skins/
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
emailskin_include('_email_header.inc.html.php', $params);
// ------------------------------- END OF EMAIL HEADER --------------------------------
global $admin_url, $baseurl, $htsrv_url, $post_moderation_reminder_threshold;
$BlogCache =& get_BlogCache();
// Default params:
$params = array_merge(array('blogs' => array(), 'posts' => array()), $params);
echo '<p' . emailskin_style('.p') . '>' . sprintf(T_('There have been posts awaiting moderation for more than %s in the following blogs:'), seconds_to_period($post_moderation_reminder_threshold)) . '</p>';
echo '<ul>';
foreach ($params['blogs'] as $blog_ID) {
    $moderation_Blog = $BlogCache->get_by_ID($blog_ID);
    echo '<li>' . $moderation_Blog->get('shortname') . ' (' . sprintf(T_('%s posts waiting'), $params['posts'][$blog_ID]) . ') - ' . get_link_tag($admin_url . '?ctrl=dashboard&blog=' . $blog_ID, T_('Click here to moderate') . ' &raquo;', '.a') . '</li>';
}
echo '</ul>';
// Footer vars:
$params['unsubscribe_text'] = T_('You are a moderator in this blog, and you are receiving notifications when the posts may need moderation.') . '<br />' . "\n" . T_('If you don\'t want to receive any more notifications about post moderation, click here') . ': ' . '<a href="' . $htsrv_url . 'quick_unsubscribe.php?type=pst_moderation_reminder&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
Ejemplo n.º 11
0
/**
 * Get attribute "style" by class name for element in email templates
 *
 * @param string Class name
 * @param boolean TRUE to return string as ' style="css_properties"' otherwise only 'css_properties'
 * @return string
 */
function emailskin_style($class, $set_attr_name = true)
{
    global $emailskins_styles;
    if (!is_array($emailskins_styles)) {
        // Load email styles only first time
        global $emailskins_path;
        require_once $emailskins_path . '_email_style.php';
        foreach ($emailskins_styles as $classes => $styles) {
            if (strpos($classes, ',') !== false) {
                // This style is used for several classes
                unset($emailskins_styles[$classes]);
                $classes = explode(',', $classes);
                foreach ($classes as $class_name) {
                    $class_name = trim($class_name);
                    if (isset($emailskins_styles[$class_name])) {
                        $emailskins_styles[$class_name] .= $styles;
                    } else {
                        $emailskins_styles[$class_name] = $styles;
                    }
                }
            }
        }
    }
    if (strpos($class, '+') !== false) {
        // Several classes should be applied this
        $classes = explode('+', $class);
        $style = '';
        foreach ($classes as $c => $class) {
            $style .= emailskin_style($class, false);
        }
        return empty($style) ? '' : ($set_attr_name ? ' style="' . $style . '"' : $style);
    } elseif (isset($emailskins_styles[$class])) {
        // One class
        $style = trim(str_replace(array("\r", "\n", "\t"), '', $emailskins_styles[$class]));
        $style = str_replace(': ', ':', $style);
        return $set_attr_name ? ' style="' . $style . '"' : $style;
    }
    return '';
}
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
emailskin_include('_email_header.inc.html.php', $params);
// ------------------------------- END OF EMAIL HEADER --------------------------------
global $htsrv_url;
// Default params:
$params = array_merge(array('unread_threads' => '', 'threads_link' => ''), $params);
echo '<p' . emailskin_style('.p') . '>' . T_('You have unread messages in the following conversations:') . "</p>\n";
if (count($params['unread_threads']) > 0) {
    echo '<ul>';
    foreach ($params['unread_threads'] as $unread_thread) {
        echo '<li>' . $unread_thread . '</li>';
    }
    echo "</ul>\n";
}
// Buttons:
echo '<div' . emailskin_style('div.buttons') . '>' . "\n";
echo get_link_tag($params['threads_link'], T_('Read your messages'), 'div.buttons a+a.button_green') . "\n";
echo "</div>\n";
// Footer vars:
$params['unsubscribe_text'] = T_('If you don\'t want to receive notifications for unread messages any more, click here:') . ' <a href="' . $htsrv_url . 'quick_unsubscribe.php?type=unread_msg&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
Ejemplo n.º 13
0
            }
        }
        $notify_message .= "</ul></p>\n";
    }
} else {
    // Short format notification:
    if ($params['notify_type'] == 'moderator') {
        $notify_message .= '<p' . emailskin_style('.p') . '>' . T_('Status') . ': <b>' . $Comment->get('t_status') . "</b></p>\n";
        $notify_message .= '<div class="email_ugc"' . emailskin_style('div.email_ugc') . '>' . "\n";
        $notify_message .= '<p' . emailskin_style('.p') . '><i' . emailskin_style('.note') . '>' . T_('This is a short form moderation message. To make these emails more useful for quick moderation, ask the administrator to send you long form moderation messages instead.') . '</i></p>';
        $notify_message .= "</div>\n";
    }
}
echo $notify_message;
// Buttons:
echo '<div' . emailskin_style('div.buttons') . '>' . "\n";
echo get_link_tag($Comment->get_permanent_url('&', '#comments'), T_('Read full comment'), 'div.buttons a+a.button_green') . "\n";
if ($params['notify_type'] == 'moderator') {
    // moderation email
    if ($Blog->get_setting('comment_quick_moderation') != 'never' && !empty($Comment->secret)) {
        // quick moderation is permitted, and comment secret was set
        echo get_link_tag('$secret_content_start$' . $htsrv_url . 'comment_review.php?cmt_ID=' . $Comment->ID . '&secret=' . $Comment->secret . '$secret_content_end$', T_('Quick moderation'), 'div.buttons a+a.button_yellow') . "\n";
    }
    echo get_link_tag($admin_url . '?ctrl=comments&action=edit&comment_ID=' . $Comment->ID, T_('Edit comment'), 'div.buttons a+a.button_gray') . "\n";
}
echo "</div>\n";
// add unsubscribe and edit links
$params['unsubscribe_text'] = '';
switch ($params['notify_type']) {
    case 'moderator':
        // moderation email
$ip_list = implode(', ', get_linked_ip_list(NULL, $recipient_User));
echo '<p' . emailskin_style('.p') . '>' . sprintf(T_('This message was typed by a user connecting from this IP address: %s.'), $ip_list) . '</p>';
// show sender email address
echo '<p' . emailskin_style('.p') . '>' . sprintf(T_('By replying, your email will go directly to %s.'), '<a href="mailto:' . $params['sender_address'] . '"' . emailskin_style('.a') . '>' . $params['sender_address'] . '</a>') . '</p>';
if (!empty($recipient_User)) {
    // Member:
    global $Settings;
    if ($Settings->get('emails_msgform') == 'userset') {
        // user can allow/deny to receive emails
        $edit_preferences_url = NULL;
        if (!empty($Blog)) {
            // go to blog
            $edit_preferences_url = $Blog->get('userprefsurl', array('glue' => '&'));
        } elseif ($recipient_User->check_perm('admin', 'restricted')) {
            // go to admin
            $edit_preferences_url = $admin_url . '?ctrl=user&user_tab=userprefs&user_ID=' . $recipient_User->ID;
        }
        if (!empty($edit_preferences_url)) {
            // add edit preferences link
            echo '<p' . emailskin_style('.p') . '>' . sprintf(T_('You can edit your profile to not receive emails through a <a %s>form</a>'), 'href="' . $edit_preferences_url . '"' . emailskin_style('.a') . '') . '</p>';
        }
    }
    // Add quick unsubcribe link so users can deny receiving emails through b2evo message form in any circumstances
    $params['unsubscribe_text'] = T_('If you don\'t want to receive any more emails through a message form, click here:') . ' <a href="' . $htsrv_url . 'quick_unsubscribe.php?type=msgform&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
} elseif (!empty($params['Comment'])) {
    // Visitor:
    $params['unsubscribe_text'] = T_('If you don\'t want to receive e-mails on your comments for this e-mail address anymore, click here:') . ' <a href="' . $samedomain_htsrv_url . 'anon_unsubscribe.php?type=comment&c=' . $params['Comment']->ID . '&anon_email=' . rawurlencode($params['Comment']->author_email) . '"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
}
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------
Ejemplo n.º 15
0
    }
} else {
    /* Short notification */
    echo '<p' . emailskin_style('.p') . '>' . sprintf(T_('%s created a new post on %s with title %s.'), $Item->creator_User->get_colored_login(array('mask' => '$avatar$ $login$')), '<b>' . $Blog->get('shortname') . '</b>', '<b>' . $Item->get('title') . '</b>') . "</p>\n";
    if ($params['notify_type'] == 'moderator') {
        echo '<p' . emailskin_style('.p') . '>' . T_('Status') . ': ' . $Item->get('t_status') . "</p>\n";
        echo '<div class="email_ugc"' . emailskin_style('div.email_ugc') . '>' . "\n";
        echo '<p' . emailskin_style('.p') . '><i' . emailskin_style('.note') . '>' . T_('This is a short form moderation message. To make these emails more useful for quick moderation, ask the administrator to send you long form moderation messages instead.') . '</i></p>';
        echo "</div>\n";
    }
}
// Buttons:
echo '<div' . emailskin_style('div.buttons') . '>' . "\n";
echo get_link_tag($Item->get_permanent_url('', '', '&'), T_('View post'), 'div.buttons a+a.button_green') . "\n";
if ($recipient_User->check_perm('item_post!CURSTATUS', 'edit', false, $Item)) {
    // User has permission to edit this post
    echo get_link_tag($admin_url . '?ctrl=items&blog=' . $Item->get_blog_ID() . '&p=' . $Item->ID, T_('Edit post'), 'div.buttons a+a.button_yellow') . "\n";
}
echo "</div>\n";
// Footer vars:
if ($params['notify_type'] == 'moderator') {
    // moderation email
    $params['unsubscribe_text'] = T_('You are a moderator in this blog, and you are receiving notifications when a post may need moderation.') . '<br />';
    $params['unsubscribe_text'] .= T_('If you don\'t want to receive any more notifications about post moderation, click here') . ': ' . '<a href="' . $htsrv_url . 'quick_unsubscribe.php?type=post_moderator&user_ID=$user_ID$&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
} else {
    // subscription email
    $params['unsubscribe_text'] = T_('If you don\'t want to receive any more notifications about new posts on this blog, click here:') . ' <a href="' . $htsrv_url . 'quick_unsubscribe.php?type=coll_post&user_ID=$user_ID$&coll_ID=' . $Blog->ID . '&key=$unsubscribe_key$"' . emailskin_style('.a') . '>' . T_('instant unsubscribe') . '</a>.';
}
// ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
emailskin_include('_email_footer.inc.html.php', $params);
// ------------------------------- END OF EMAIL FOOTER --------------------------------