форум vBSupport.ru > vBSupport.org > Гурушник > kerk
Register Меню vBsupport Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
kerk
k0t
 
kerk's Avatar
Default Рассылка из админки в HTML
17

Для рассылки из админки в HTML формате, требуется редактирование двух файлов, поэтому те, кто в принципе против сего "непотребного действа", могут дальше не читать =)
редактирование файлов потому как нет хуков нужных местах, не к чему прицепить свой код
===
итак...
открываем файл admincp/email.php и находим
PHP Code:
$phrasegroups = array('user''cpuser''messaging''cprofilefield''profilefield'); 
заменяем на
PHP Code:
$phrasegroups = array('user''cpuser''messaging''cprofilefield''profilefield''posting'); 
ниже найти
PHP Code:
if (empty($_REQUEST['do']))
{
    
$_REQUEST['do'] = 'start';

добавить ниже
PHP Code:
if($_POST['preview'])
{
      
$vbulletin->input->clean_array_gpc('p', array(
            
'message' => TYPE_STR,
            
'ashtml' => TYPE_BOOL
      
));
      
$vbulletin->GPC['message'] = trim($vbulletin->GPC['message']);
      if(
$vbulletin->GPC['message'] == '')
      {
            
print_stop_message('nothing_to_do');
      }
      if(
$vbulletin->GPC['ashtml'])
      {
            print 
"<div style=\"padding: 10px; margin: 10px; background-color: #ffffff;\">" $vbulletin->GPC['message'] . "</div>";
      }else{
            print 
"<div style=\"padding: 10px; margin: 10px; background-color: #ffffff;\">" nl2br(htmlspecialchars_uni($vbulletin->GPC['message'])) . "</div>";
      }
      
print_cp_footer();

ниже найти
PHP Code:
    $vbulletin->input->clean_array_gpc('p', array(
        
'user'              => TYPE_ARRAY,
        
'profile'           => TYPE_ARRAY,
        
'serializeduser'    => TYPE_STR,
        
'serializedprofile' => TYPE_STR,
        
'septext'           => TYPE_NOTRIM,
        
'perpage'           => TYPE_UINT,
        
'startat'           => TYPE_UINT,
        
'test'              => TYPE_BOOL,
        
'from'              => TYPE_STR,
        
'subject'           => TYPE_STR,
        
'message'           => TYPE_STR,
    )); 
заменить на
PHP Code:
    $vbulletin->input->clean_array_gpc('p', array(
        
'user'              => TYPE_ARRAY,
        
'profile'           => TYPE_ARRAY,
        
'serializeduser'    => TYPE_STR,
        
'serializedprofile' => TYPE_STR,
        
'septext'           => TYPE_NOTRIM,
        
'perpage'           => TYPE_UINT,
        
'startat'           => TYPE_UINT,
        
'test'              => TYPE_BOOL,
        
'from'              => TYPE_STR,
        
'subject'           => TYPE_STR,
        
'message'           => TYPE_STR,
        
'ashtml'            => TYPE_BOOL,
        
'username'          => TYPE_STR,
    )); 
ниже найти
PHP Code:
vbmail($user['email'], $vbulletin->GPC['subject'], $sendmessagetrue$vbulletin->GPC['from']); 
заменить на
PHP Code:
vbmail($user['email'], $vbulletin->GPC['subject'], $sendmessagetrue$vbulletin->GPC['from'], ''$vbulletin->GPC['username']); 
ниже найти
PHP Code:
    print_form_header('email''dosendmail'falsetrue'cpform_dosendmail');
    
construct_hidden_code('test'$vbulletin->GPC['test']);
    
construct_hidden_code('serializeduser'sign_client_string(serialize($vbulletin->GPC['user'])));
    
construct_hidden_code('serializedprofile'sign_client_string(serialize($vbulletin->GPC['profile'])));
    
construct_hidden_code('from'$vbulletin->GPC['from']);
    
construct_hidden_code('subject'$vbulletin->GPC['subject']);
    
construct_hidden_code('message'$vbulletin->GPC['message']);
    
construct_hidden_code('startat'$vbulletin->GPC['startat']);
    
construct_hidden_code('perpage'$vbulletin->GPC['perpage']); 
заменить на
PHP Code:
    print_form_header('email''dosendmail'falsetrue'cpform_dosendmail');
    
construct_hidden_code('test'$vbulletin->GPC['test']);
    
construct_hidden_code('ashtml'$vbulletin->GPC['ashtml']);
    
construct_hidden_code('serializeduser'sign_client_string(serialize($vbulletin->GPC['user'])));
    
construct_hidden_code('serializedprofile'sign_client_string(serialize($vbulletin->GPC['profile'])));
    
construct_hidden_code('from'$vbulletin->GPC['from']);
    
construct_hidden_code('username'$vbulletin->GPC['username']);
    
construct_hidden_code('subject'$vbulletin->GPC['subject']);
    
construct_hidden_code('message'$vbulletin->GPC['message']);
    
construct_hidden_code('startat'$vbulletin->GPC['startat']);
    
construct_hidden_code('perpage'$vbulletin->GPC['perpage']); 
ниже найти
PHP Code:
        print_form_header('email''dosendmail');
        
print_table_header($vbphrase['email_manager']);
        
print_yes_no_row($vbphrase['test_email_only'], 'test'0);
        
print_input_row($vbphrase['email_to_send_at_once'], 'perpage'500);
        
print_input_row($vbphrase['from'], 'from'$vbulletin->options['webmasteremail']);
        
print_input_row($vbphrase['subject'], 'subject');
        
print_textarea_row($vbphrase['message_email'], 'message'''1050);
        
$text $vbphrase['send']; 
заменить на
PHP Code:
        print_form_header('email''dosendmail');
        
print_table_header($vbphrase['email_manager']);
        
print_yes_no_row($vbphrase['test_email_only'], 'test'0);
        
print_yes_no_row('Send as HTML?''ashtml'0);
        
print_input_row($vbphrase['email_to_send_at_once'], 'perpage'500);
        
print_input_row($vbphrase['from'], 'from'$vbulletin->options['webmasteremail']);
        
print_input_row($vbphrase['username'], 'username');
        
print_input_row($vbphrase['subject'], 'subject');
        
print_textarea_row($vbphrase['message_email'], 'message'''1050);
        
$text $vbphrase['send']; 
ниже найти
PHP Code:
print_submit_row($text); 
заменить на
PHP Code:
    if($_REQUEST['do'] == 'start')
    {
          
print_table_footer(4,
                
"<input type=\"submit\" class=\"button\" value=\"" $vbphrase['send'] . "\" />
                <input type=\"submit\" name=\"preview\" class=\"button\" value=\"" 
$vbphrase['preview'] . "\" />
                <input type=\"reset\" name=\"reset\" class=\"button\" value=\"" 
$vbphrase['reset'] . "\" />"
          
);
    }else{
          
print_submit_row($text);
    } 
сохранить файл и загрузить на сервер

открыть файл includes/class_mail.php
найти
PHP Code:
        $headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter
заменить на
PHP Code:
        if($_POST['ashtml'])
        {
              
$headers .= 'Content-Type: text/html' iif($encoding"; charset=\"$encoding\"") . $delimiter;
        }else{
              
$headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter;
        } 
сохранить файл и загрузить на сервер


помимо возможности отправки рассылки в HTML, появится предпросмотр и дополнительное текстовое поле "от кого" (например Новостной бот), скрины ниже

поле "от кого (имя)"


предпросмотр отправляемого письма HTML


предпросмотр отправляемого письма text/plain


скрин из почтовика яндекса


скрин из почтовика Thunderbird


скрин из почтовика оперы


в других почтовиках не проверял за отсутствием =)

бонус: мелкий хак "отписка от рассылок"
да, я знаю, что отписаться от админской рассылки можно в кабинете, но довольно часто очень сложно объяснить узеру где это находится, да и ленивый узер нынче пошел =)
суть хака: две ссылки, которые можно дать в письме, перейдя по которым узер автоматически либо отписывается от рассылки, либо подписывается на нее
ссылки подобного вида
отписаться от рассылки - http://vbsupport.ru/forum/profile.php?do=unsubscribe
подписаться на рассылку - http://vbsupport.ru/forum/profile.php?do=subscribe

Attached Files
File Type: zip kr_Unsubscribe.zip (3.4 KB, 32 views)
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
sejd
Эксперт
 
sejd's Avatar
Default
0

Я вот этим хаком иногда пользуюсь:

тема на орге
Правда, очень редко требуется рассылать html-письма.
 
 
Smalesh
В Черном списке
Default
0

Quote:
Originally Posted by kerk View Post
да, я знаю, что отписаться от админской рассылки можно в кабинете, но довольно часто очень сложно объяснить узеру где это находится, да и ленивый узер нынче пошел =)
Многие почтовики требуют наличие такой ссылки для отписки при массовой рассылке.
 
 
liner
Эксперт
 
liner's Avatar
Default
0

@sejd, можно выложить сюда?
kerk, для 4.2 пойдет? там вроде файлы не менялись.
 
 
GiRassell
Эксперт
 
GiRassell's Avatar
Default
1

@liner,
 
 
liner
Эксперт
 
liner's Avatar
Default
0

@GiRassell, офигенно работает.
А чего тут не релизили до сих пор?

liner добавил 24.08.2014 в 17:38
Как вспомню дважды попытки построить HTML на 3.8, маты пользователей...

Last edited by liner : 08-24-2014 at 06:38 PM. Reason: Добавлено сообщение
 
 
хрюк
Гость
Default

Quote:
Originally Posted by liner View Post
А чего тут не релизили до сих пор?
Есть он здесь.
 
 
liner
Эксперт
 
liner's Avatar
Default
0

Quote:
Originally Posted by TAIFUN View Post
Есть он здесь.
пруф?
 
 
Luvilla
Гость
Default

@liner, @GiRassell, ну ёлки...

1 тема = 1 хак

сколько повторять?
тем более, в чужой теме с авторским хаком...
 
 
Gardemarin
Простоузер
Default
0

kerk, отличное решение, спасибо большое!
Вопрос, а как избавиться от автоматически добавляемого в имени отправителя "@ название форума"?

Gardemarin добавил 24.09.2015 в 04:54
Кажись нашел:

Правим файл includes/class_mail.php:

Находим:

Code:
$mailfromname = "$username @ " . $vbulletin->options['bbtitle'];
Заменяем на:

Code:
$mailfromname = "$username";
Работает, вроде, корректно. Приставку "@ имя форума" не дополняет в имени отправителя рассылок. Но, допускаю, что сделал что-то некорректно, и это мое действо может повлиять еще на что-либо...

Last edited by Gardemarin : 09-24-2015 at 05:54 AM. Reason: Добавлено сообщение
 

Tags
email, html


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 10:47 PM.


Powered by vBulletin® Version 3.5.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.