$r1 = mysqli_query($db,"SELECT `setting_id`,`social_pub` FROM `channels_origin` WHERE `account_id` = '$self_account_id'
AND `user_id` = '$user_id' ORDER BY `id` LIMIT 0,1");
$data_s = mysqli_fetch_assoc($r1);
$setting_id_1 = $data_s['setting_id'];
$social_pub = $data_s['social_pub'];
$rx = mysqli_query($db,"SELECT `spam_filter`,`replace_words`,`filter_message`,`filter_inline`,`enable_text_message`,`my_text_message`,
`replace_link`,`skip_text`,`filter_links`,`timetable`,`time_post`,`limit_post`,`limit_hours`,
`limit_time`,`limit_status`,`forward_message`,`ignore_post_type`,`sugn_channel`,`word_send_post`,
`word_send_post_func`,`word_send_post_type`,`replace_username_stat`,`replace_username`,`update_message`,
`delete_message`,`reply_post`,`length_message_limit`,`length_message`,`type_check_m`,
`schedule`,`schedule_date`,`send_text_no_media`,`post_no_webpage`,`ignore_album`,`ignore_audio`,
`duplicat_dis`,`del_empty_line`,`rename_files_func`,`word_rename_files`,`arm_link`,`arm_links_data`,`round_msg`,
`sing_image`,`sing_image_png`,`pinned_message`,`hash_tags`,`entities`,`photo_text_post`,
`photo_text_post_image`,`preg_match_list`,`pg_type`,`preg_match_text`,`sticker`,`limit_send`,`limit_send_posts`,
`method_send_post`,`inline_url_data`,`inline_keyboard`,`method_send_max_file`,`spoiler_bot_photo`,
`protect_content_bot`,`spoiler_bot_video`,`grabber_username`,`close_comments`,
`auto_delete_message`,`value_delete_message`,`period_delete_message`,`delete_sign_source`,`valid_sing_post`,
`inline_copy`,`inline_copy_url`,`grabber_content`,`delete_emoji`,`sing_image_position`,`pinned_message_type`,
`habr_post_type`,`habr_photo_end` FROM `channels_settings` WHERE `id` = '$setting_id_1'");
$data_x = mysqli_fetch_assoc($rx);
$spam_filter = $data_x['spam_filter'];
$replace_words = $data_x['replace_words'];
$filter_message = $data_x['filter_message'];
$filter_inline = $data_x['filter_inline'];
$enable_text_message = $data_x['enable_text_message'];
$my_text_message = $data_x['my_text_message'];
$replace_link = $data_x['replace_link'];
$skip_text = $data_x['skip_text'];
$filter_links = $data_x['filter_links'];
$timetable = $data_x['timetable'];
$limit_status = $data_x['limit_status'];
$forward_message = $data_x['forward_message'];
$ignore_post_type = $data_x['ignore_post_type'];
$sugn_channel = $data_x['sugn_channel'];
$word_send_post = $data_x['word_send_post'];
$word_send_post_func = $data_x['word_send_post_func'];
$word_send_post_type = $data_x['word_send_post_type'];
$replace_username_stat = $data_x['replace_username_stat'];
$replace_username = $data_x['replace_username'];
$update_message = $data_x['update_message'];
$delete_message = $data_x['delete_message'];
$reply_post = $data_x['reply_post'];
$length_message_limit = $data_x['length_message_limit'];
$type_check_m = $data_x['type_check_m'];
$schedule = $data_x['schedule'];
$schedule_date = $data_x['schedule_date'];
$send_text_no_media = $data_x['send_text_no_media'];
$post_no_webpage = $data_x['post_no_webpage'];
$ignore_album = $data_x['ignore_album'];
$ignore_audio = $data_x['ignore_audio'];
$duplicat_dis = $data_x['duplicat_dis'];
$del_empty_line = $data_x['del_empty_line'];
$rename_files_func = $data_x['rename_files_func'];
$word_rename_files = $data_x['word_rename_files'];
$arm_links_data = json_decode($data_x['arm_links_data'],true);
$round_msg = $data_x['round_msg'];
$sing_image = $data_x['sing_image'];
$sing_image_png = $data_x['sing_image_png'];
$pinned_message = $data_x['pinned_message'];
$hash_tags = $data_x['hash_tags'];
$entities = $data_x['entities'];
$photo_text_post = $data_x['photo_text_post'];
$photo_text_post_image = $data_x['photo_text_post_image'];
$preg_match_list = base64_decode($data_x['preg_match_list']);
$pg_type = $data_x['pg_type'];
$preg_match_text = $data_x['preg_match_text'];
$sticker = $data_x['sticker'];
$limit_send = $data_x['limit_send'];
$limit_send_posts = $data_x['limit_send_posts'];
$inline_url_data = $data_x['inline_url_data'];
$method_send_post = $data_x['method_send_post'];
$inline_keyboard = $data_x['inline_keyboard'];
$method_send_max_file = $data_x['method_send_max_file'];
$spoiler_bot_photo = $data_x['spoiler_bot_photo'];
$protect_content_bot = $data_x['protect_content_bot'];
$spoiler_bot_video = $data_x['spoiler_bot_video'];
$grabber_username = $data_x['grabber_username'];
$close_comments = $data_x['close_comments'];
$auto_delete_message = $data_x['auto_delete_message'];
$period_delete_message = $data_x['period_delete_message'];
$value_delete_message = $data_x['value_delete_message'];
$delete_sign_source = $data_x['delete_sign_source'];
$valid_sing_post = $data_x['valid_sing_post'];
$inline_copy = $data_x['inline_copy'];
$inline_copy_url = $data_x['inline_copy_url'];
$grabber_content = $data_x['grabber_content'];
$delete_emoji = $data_x['delete_emoji'];
$sing_image_position = $data_x['sing_image_position'];
$pinned_message_type = $data_x['pinned_message_type'];
$habr_post_type = $data_x['habr_post_type'];
$habr_photo_end = $data_x['habr_photo_end'];
$sel = 'selected';
if($timetable == 1){ $timetable_box = 'block;'; } else { $timetable_box = 'none;'; }
if($limit_status == 1){ $limit_box = 'block;'; } else { $limit_box = 'none;'; }
if($word_send_post_func == 1){ $word_send_x = 'block;'; } else { $word_send_x = 'none;'; }
if($length_message_limit == 1){ $length_message_limit_x = 'block;'; } else { $length_message_limit_x = 'none;'; }
if($rename_files_func == 1){ $rename_files_show = 'block;'; } else { $rename_files_show = 'none;'; }
if($sing_image == 1){ $sing_image_show = 'block;';$image_show = 'block;'; } else { $sing_image_show = 'none;'; $image_show = 'none;'; }
if($photo_text_post == 1){ $photo_text_post_show = 'block;'; } else { $photo_text_post_show = 'none;'; }
if($pg_type == 1){ $pg_type_box = 'block;'; } else { $pg_type_box = 'none;'; }
if($method_send_post == 1){ $inline_url_box = 'block;'; } else { $inline_url_box = 'none;'; }
if($inline_keyboard == 1){ $inline_url_data_box = 'block;'; } else { $inline_url_data_box = 'none;'; }
if($inline_copy == 1){ $inline_copy_box = 'block;'; } else { $inline_copy_box = 'none;'; }
if($grabber_content == 1){ $grabber_content_box = 'block;'; } else { $grabber_content_box = 'none;'; }
if($delete_emoji == 1){ $delete_emoji_box = 'block;'; } else { $delete_emoji_box = 'none;'; }
if($schedule == 1){ $schedule_box = 'block;'; } else { $schedule_box = 'none;'; }
?>
Выберите нужный канал для настройки фильтров:
$r = mysqli_query($db,"SELECT `setting_id`,`origin_name`,`publish_name`,`social`,`social_pub` FROM `channels_origin`
WHERE `account_id` = '$self_account_id' AND `channel_publish_id` > 0 AND `user_id` = '$user_id'");
while($list = mysqli_fetch_assoc($r))
{
$setting_id = $list['setting_id'];
$social = $list['social'];
$rx = mysqli_query($db,"SELECT `id` FROM `channels_settings` WHERE `id` = '$setting_id' AND `status` = '0'");
$num = mysqli_num_rows($rx);
if($num == 0){ continue; }
if($social == 1){ $social_desc = 'VK - '; $ico = '🔵'; }
elseif($social == 2) { $social_desc = 'HABR - '; $ico = '⚪️'; }
elseif($social == 0) { $social_desc = 'TG - '; $ico = '🟢'; }
if($list['social_pub'] == 1){ $social_desc_pub = 'VK - '; $ico_p = '🔵'; } else { $social_desc_pub = 'TG:'; $ico_p = '🟢'; }
$name_row = $ico." Источник: $social_desc ".$list['origin_name']." | $ico_p Куда: $social_desc_pub ".$list['publish_name'];
?>
=$name_row;?>
}?>
$info = "Фильтрация на: рекламные посты\посты от ботов\репост с рекламой\n\nУказать текст который есть в обычных постах, и который отсутствует в рекламных сообщениях.";
?>
Валидатор подписи(репосты\рекламные\боты): ❓
Стоп-слова:
Удалять слова:
#1. слово|замена. #2. слово==замена
Удалять из поста указанные ссылки:
if(($filter_message == 4) or ($filter_message == 5)){ $dis_links = 'disabled';$link_bg = 'style="background:#f1f1f1"'; }
else { $dis_links = '';$link_bg = 'style="background:##f9f9f9"'; }
?>
Подпись канала(каждом посте снизу):
Регулярные выражения(паттерны) \ Regex:
Готовые примеры
>Удалять найденный текст
>Заменить найденный текст на
Список слов замены(в порядке списка паттернов):
>С учетом фильтров
>В обход фильтров
Переименовывать медиа-файлы(имя|замена) в посте:
Позиция:
>Внизу с правой стороны
>Верху с левой стороны
>Верху с правой стороны
.PNG изображение(150px\300px) для :
if(!empty($sing_image_png))
{
$bg_png = "background:url(http://".$_SERVER['SERVER_ADDR']."/".download_dir.'/'.$sing_image_png.') no-repeat center;';
$image_png_show = 'block;';
}else { $bg_png = '';$image_png_show = 'none;'; }
?>
.PNG\JPG изображение :
if(!empty($photo_text_post_image))
{
$bg_png = "background:url(http://".$_SERVER['SERVER_ADDR']."/".download_dir.'/'.$photo_text_post_image.') no-repeat center;';
$photo_text_post_show = 'block;';
}else { $bg_png = '';$photo_text_post_show = 'none;'; }
?>
Метод пересылки постов:
>Полная пересылка через telegram аккаунт
>Работа через аккаунт(источника), пересылка через tg bot
Пересылка: Фото\Видео\Аудио\Файлы\Альбомы(без inline)\Текстовые.Макс размер: 50MB.Выполнить: =$bot_username;?> админом в Канал Публикации.}?>
Превышение размера 10МБ\50МБ на загрузку Фото\Медиа:
>Переслать через telegram аккаунт(в обход бота)
>Не пересылать
Функции бота:
Заменять на ссылку:
Фильтрация контента
>Не определен
>Удалять все ссылки в сообщении
>Удалять ссылки только t.me/username* , t.me/joinchat/XXXX* и @Username*
>Игнорировать при наличии ссылок c t.me/name* и t.me/joinchat/XXXX*
>Игнорировать наличие любых ссылок
>Заменять все ссылки в сообщении на свою(указать)
5){ echo 'style="display:none;"';} ?>>
if(($filter_message == 5) && ($enable_text_message == 1)){ $dis = 'disabled'; } else { $dis = ''; }
?>
Заменять на ссылку:
>
Доп фильтрация
>Не определен
>Игнорировать посты без текста(только для медиа)
>Игнорировать все посты с текстом
>Игнорировать посты с текстом(без медиа)
>Игнорировать посты с текстом(только для медиа)
>Игнорировать все посты без текста
>Игнорировать все посты с видео
>Посты с текстом(без медиа)
>Посты с видео\файлы
>Посты с фото
>Удалять текст из медиа постов(фото\видео\файлы)
>Посты видео c текстом
>Посты с фото\видео
if(empty($chat_gpt_key)){ $info_w = "
- Укажите: API KEY ChatGTP! "; } else { $info_w = ''; }
?>
Перевод текста на другой язык=$info_w;?>
>Не указано
$arr = explode("|",$languages);
foreach($arr as $val)
{
?>
>=$val?>
}?>
Сохранить для текущего
Применить для всех