Dusty Posted March 4, 2020 Report Share Posted March 4, 2020 Привет форумчане, знаю тупой вопрос но как вывести верификацию как в Студентоси в диалог и посты, пример смотреть ниже | | НАДЕЮСЬ ПОНЯЛИ) Quote Link to comment Share on other sites More sharing options...
KirKMS Posted March 6, 2020 Report Share Posted March 6, 2020 Инструкция для этого модуля Зайти в файл \system\modules\functions.php Добавить в любое место // ICON DIALOG function getIconDialog($id){ global $db; if($icon = $db->super_query("SELECT * FROM ".PREFIX."_icons WHERE id = '{$id}'")) return '<img style="width: 13px;" src="'.$icon['img'].'" width="16">'; else return ''; } function getIconDialog2($id){ global $db; if($icon = $db->super_query("SELECT * FROM ".PREFIX."_icons WHERE id = '{$id}'")) return '<img style="width: 13px;" src="'.$icon['img'].'" width="10">'; else return ''; } Зайти в файл \system\modules\im.php Найти там строку //################### Вывод всех диалогов ###################// $metatags['title'] = 'Диалоги'; $mobile_speedbar = '<a href="/messages">Диалоги</a>'; Ниже найти $tpl->set('{name}', $row['user_search_pref']); И вставить сразу после $tpl->set('{icon}', getIconDialog($row['user_icon'])); Выше найти tb2.user_search_pref, user_photo, и вставить после user_icon В этом же файле найти $sql_ = $db->super_query("SELECT tb1.id, text, date, pm_read, folder, history_user_id, from_user_id, attach, tell_uid, tell_date, public, tell_comm, tb2.user_name, user_photo, user_icon FROM `".PREFIX."_messages` tb1, `".PREFIX."_users` tb2 WHERE tb1.for_user_id = '".$user_id."' AND tb1.from_user_id = '".$for_user_id."' AND tb1.history_user_id = tb2.user_id {$sql_sort} ORDER by `date` ASC LIMIT ".$limit.", ".$limit_msg, 1); $tpl->load_template('im/msg.tpl'); if(!$first_id){ Добавить в sql запрос сразу после user_photo , user_icon Найти ниже $tpl->set('{name}', $row['user_name']); вставить сразу после $tpl->set('{icon}', getIconDialog($row['user_icon'])); Зайти в файл \templates\ваш шаблон\im\msg.tpl Найти там {name}</a> и вставить после {icon} Зайти в файл \templates\ваш шаблон\im\dialog.tpl Найти там {name}</div> и вставить после {icon} 1 Quote Link to comment Share on other sites More sharing options...
Dusty Posted March 6, 2020 Author Report Share Posted March 6, 2020 Только что, KirKMS сказал: Инструкция для этого модуля Зайти в файл \system\modules\functions.php Добавить в любое место // ICON DIALOG function getIconDialog($id){ global $db; if($icon = $db->super_query("SELECT * FROM ".PREFIX."_icons WHERE id = '{$id}'")) return '<img style="width: 13px;" src="'.$icon['img'].'" width="16">'; else return ''; } function getIconDialog2($id){ global $db; if($icon = $db->super_query("SELECT * FROM ".PREFIX."_icons WHERE id = '{$id}'")) return '<img style="width: 13px;" src="'.$icon['img'].'" width="10">'; else return ''; } Зайти в файл \system\modules\im.php Найти там строку //################### Вывод всех диалогов ###################// $metatags['title'] = 'Диалоги'; $mobile_speedbar = '<a href="/messages">Диалоги</a>'; Ниже найти $tpl->set('{name}', $row['user_search_pref']); И вставить сразу после $tpl->set('{icon}', getIconDialog($row['user_icon'])); Найти выше sql запрос и вставить после user_photo вот это user_icon Тут же найти tb2.user_search_pref, user_photo, и вставить после user_icon В этом же файле найти $sql_ = $db->super_query("SELECT tb1.id, text, date, pm_read, folder, history_user_id, from_user_id, attach, tell_uid, tell_date, public, tell_comm, tb2.user_name, user_photo, user_icon FROM `".PREFIX."_messages` tb1, `".PREFIX."_users` tb2 WHERE tb1.for_user_id = '".$user_id."' AND tb1.from_user_id = '".$for_user_id."' AND tb1.history_user_id = tb2.user_id {$sql_sort} ORDER by `date` ASC LIMIT ".$limit.", ".$limit_msg, 1); $tpl->load_template('im/msg.tpl'); if(!$first_id){ Добавить в sql запрос сразу после user_photo , user_icon Найти ниже $tpl->set('{name}', $row['user_name']); вставить сразу после $tpl->set('{icon}', getIconDialog($row['user_icon'])); Зайти в файл \templates\ваш шаблон\im\msg.tpl Найти там {name}</a> и вставить после {icon} Зайти в файл \templates\ваш шаблон\im\dialog.tpl Найти там {name}</div> и вставить после {icon} лучший модер, в глав-админы его +REP спасибо Quote Link to comment Share on other sites More sharing options...
Zekgame Posted April 18, 2020 Report Share Posted April 18, 2020 Когда добавляешь {icon} то возле имени пишется "{icon}",а галочка не ставится! В 06.03.2020 в 18:15, KirKMS сказал: Найти там {name}</a> и вставить после {icon} Quote Link to comment Share on other sites More sharing options...
Zekgame Posted April 18, 2020 Report Share Posted April 18, 2020 33 минуты назад, Zekgame сказал: Когда добавляешь {icon} то возле имени пишется "{icon}",а галочка не ставится! Уже не надо,я разобрался Quote Link to comment Share on other sites More sharing options...
Zeralld Music Posted May 23, 2020 Report Share Posted May 23, 2020 Лол,а в постах как? Quote Link to comment Share on other sites More sharing options...
Семен Posted May 23, 2020 Report Share Posted May 23, 2020 1 минуту назад, Zeralld Music сказал: Лол,а в постах как? в wall.php и wall.public.php вставляешь $tpl->set('{icon}', getIconDialog($row['user_icon'])); в шаблоне где надо вставляещь {icon} Quote Link to comment Share on other sites More sharing options...
Zeralld Music Posted May 23, 2020 Report Share Posted May 23, 2020 @semen Окей,после чего? Так то спасибо Quote Link to comment Share on other sites More sharing options...
Zeralld Music Posted May 23, 2020 Report Share Posted May 23, 2020 1 час назад, semen сказал: в wall.php и wall.public.php вставляешь $tpl->set('{icon}', getIconDialog($row['user_icon'])); в шаблоне где надо вставляещь {icon} Чет вместо иконки возле имени ишет просто {icon} Quote Link to comment Share on other sites More sharing options...
KirKMS Posted November 13, 2020 Report Share Posted November 13, 2020 В 24.05.2020 в 06:45, Zeralld Music сказал: Значит не правильно сделан вывод Quote Link to comment Share on other sites More sharing options...
Admin22 Posted November 5, 2021 Report Share Posted November 5, 2021 Не работает Quote Link to comment Share on other sites More sharing options...
NaFanyA Posted November 5, 2021 Report Share Posted November 5, 2021 50 минут назад, Admin22 сказал: Не работает Должно работать, перепроверь. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.