viiprogrammer Posted November 8, 2015 Report Share Posted November 8, 2015 Описание: При публикации записи с телефона возле даты будет выводится значок телефона. Установка Шаг 1: Открыть: \templates\Default\wall\record.tpl и one_record.tpl там найти <a href="/wall{author-id}_{rec-id}" onClick="Page.Go(this.href); return false" class="online">{date} И после вставить {mobile} Шаг 2 В \system\classes\wall.php найти if($row_wall['likes_num']){ $tpl->set('{likes}', $row_wall['likes_num']); $tpl->set('{likes-text}', '<span id="like_text_num'.$row_wall['id'].'">'.$row_wall['likes_num'].'</span> '.gram_record($row_wall['likes_num'], 'like')); } else { $tpl->set('{likes}', ''); $tpl->set('{likes-text}', '<span id="like_text_num'.$row_wall['id'].'">0</span> человеку'); } и после вставить if($row_wall['mobile_p']){ $tpl->set('{mobile}', '<img src="/templates/Default/images/mobile_online.png" />'); } else { $tpl->set('{mobile}', ''); } Шаг 3 В C\system\modules\wall.php нати case "send": NoAjaxQuery(); $wall_text = ajax_utf8(textFilter($_POST['wall_text'])); $attach_files = ajax_utf8(textFilter($_POST['attach_files'], false, true)); $for_user_id = intval($_POST['for_user_id']); $fast_comm_id = intval($_POST['rid']); $answer_comm_id = intval($_POST['answer_comm_id']); $str_date = time(); и после вставить if(check_smartphone()){$mobile = '1';}else{$mobile = '0';} потом найти //Вставляем саму запись в БД $db->query("INSERT INTO `".PREFIX."_wall` SET author_user_id = '{$user_id}', for_user_id = '{$for_user_id}', text = '{$wall_text}', block_rec = '{$friendsa}'......."); $dbid = $db->insert_id(); и в запрос добавить , mobile_p = '{$mobile}' В запросы вывода \ обновления записей добавить mobile_p Шаг 4 Создать поле mobile_p в таблице vii_wall int 1 Ставим + 4 Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 9, 2015 Author Report Share Posted November 9, 2015 Видео по установке 2 Quote Link to comment Share on other sites More sharing options...
AdVest Posted November 9, 2015 Report Share Posted November 9, 2015 (edited) а где обещанное в группы?=) Edited November 9, 2015 by AdVest Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 9, 2015 Author Report Share Posted November 9, 2015 а где обещанное в группы?=) Забыл написать что гляну позже в часов 8 чекни тему 1 Quote Link to comment Share on other sites More sharing options...
AdVest Posted November 9, 2015 Report Share Posted November 9, 2015 Забыл написать что гляну позже в часов 8 чекни тему хорошо, в кс переиграл?) Прос термин чекни там чаще всего используется) Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 9, 2015 Author Report Share Posted November 9, 2015 хорошо, в кс переиграл?) Прос термин чекни там чаще всего используется) ну есть чуть-чуть xD уже пишу инструкцию Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 9, 2015 Author Report Share Posted November 9, 2015 Вывод значка в сообществах Отрываем \system\classes\wall.public.php и находим if($row_wall['likes_num']){ $tpl->set('{likes}', $row_wall['likes_num']); $tpl->set('{likes-text}', '<span id="like_text_num'.$row_wall['id'].'">'.$row_wall['likes_num'].'</span> '.gram_record($row_wall['likes_num'], 'like')); } else { $tpl->set('{likes}', ''); $tpl->set('{likes-text}', '<span id="like_text_num'.$row_wall['id'].'">0</span> человеку'); } и после ставим if($row_wall['mobile_p']){ $tpl->set('{mobile}', '<img src="/templates/Default/images/mobile.PNG" />'); } else { $tpl->set('{mobile}', ''); } Открыем \system\modules\groups.php Ищем //################### Добавление записи на стену ###################// case "wall_send": NoAjaxQuery(); $id = intval($_POST['id']); $wall_text = ajax_utf8(textFilter($_POST['wall_text'])); $attach_files = ajax_utf8(textFilter($_POST['attach_files'], false, true)); и после ставим if(check_smartphone()){$mobile = '1';}else{$mobile = '0';} потом находим //Вставляем саму запись в БД $db->query("INSERT INTO `".PREFIX."_communities_wall` SET public_id = '{$id}', text = '{$wall_text}', attach = '{$attach_files}', add_date = '{$server_time}'"); И добавляем туда mobile_p = '{$mobile}', тут же находим ниже $wall->query("SELECT tb1.id, text, public_id, add_date, fasts_num, attach, likes_num, likes_users, tell_uid, public, tell_date, tell_comm, tb2.title, photo, comment..... И добавляем туда mobile_p, тут же ищем //################### Одна запись со стены ###################// case "wallgroups": $id = intval($_GET['id']); $pid = intval($_GET['pid']); $row = $db->super_query("SELECT id, adres, del, ban FROM `".PREFIX."_communities` WHERE id = '{$pid}'"); if($row AND !$row['del'] AND !$row['ban']){ $tpl->load_template('groups/wall_head.tpl'); $tpl->set('{id}', $id); $tpl->set('{pid}', $pid); if($row['adres']) $tpl->set('{adres}', $row['adres']); else $tpl->set('{adres}', 'public'.$pid); $tpl->compile('info'); include ENGINE_DIR.'/classes/wall.public.php'; $wall = new wall(); и после в запросе $wall->query("SELECT tb1.id, text, public_id, add_date, fasts_num, attach, likes_num, likes_users, tell_uid, public, tell_date, tell_comm, tb2.title, photo, comments, adres FROM `".PREFIX."_communities_wall` tb1, `".PREFIX."_communities` tb2 WHERE tb1.id = '{$id}' AND tb1.public_id = tb2.id AND fast_comm_id = 0"); добавляем mobile_p, Открываем \templates\Default\groups\record.tpl и находим <div class="fl_l"><a href="/wallgroups{public-id}_{rec-id}" onClick="Page.Go(this.href); return false" class="online">{date} и после вставляем {mobile} Открываем \system\modules\public.php Находим там include ENGINE_DIR.'/classes/wall.public.php'; $wall = new wall(); $wall->query("SELECT tb1.id, text, public_id, add_date, fasts_num, attach, likes_num, likes_users, tell_uid, public, tell_date, tell_comm, fixed, tb2.title, photo, comments, adres FROM `".PREFIX."_communities_wall` tb1, `".PREFIX."_communities` tb2 WHERE tb1.public_id = '{$row['id']}' AND tb1.public_id = tb2.id AND fast_comm_id = 0 ORDER by `fixed` DESC, `add_date` DESC LIMIT {$page_cnt}, {$limit_select}"); $wall->template('groups/record.tpl'); И добавляем туда mobile_p, Ставим ++ 3 Quote Link to comment Share on other sites More sharing options...
AdVest Posted November 9, 2015 Report Share Posted November 9, 2015 Вывод значка в сообществах Отрываем \system\classes\wall.public.php и находим Тьфу да я лоханулся, у меня даже все так было) сори) с пк проверял через моб версию) Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 9, 2015 Author Report Share Posted November 9, 2015 Тьфу да я лоханулся, у меня даже все так было) сори) с пк проверял через моб версию) :D :D я user-agent подменяю на мобильника Quote Link to comment Share on other sites More sharing options...
AdVest Posted November 9, 2015 Report Share Posted November 9, 2015 :D :D я user-agent подменяю на мобильника уже понял) Quote Link to comment Share on other sites More sharing options...
lionid Posted November 10, 2015 Report Share Posted November 10, 2015 Видео по установке а можеш сделать хак репоста на стену в моб версии ? Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 10, 2015 Author Report Share Posted November 10, 2015 а можеш сделать хак репоста на стену в моб версии ? Ок позже гляну Quote Link to comment Share on other sites More sharing options...
lionid Posted November 11, 2015 Report Share Posted November 11, 2015 Ок позже гляну ты гледел как зделать репост ? Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 11, 2015 Author Report Share Posted November 11, 2015 ты гледел как зделать репост ? сори заказ... гляну, я помню Quote Link to comment Share on other sites More sharing options...
AdVest Posted November 11, 2015 Report Share Posted November 11, 2015 ты гледел как зделать репост ? хорош пилить человека, у него своих дел масса сам бы, чтоли уже попытался, а то привыкли многие жрать, то что подано.... Quote Link to comment Share on other sites More sharing options...
uhuHOJ Posted November 11, 2015 Report Share Posted November 11, 2015 Дружище можешь пж сделать хак редактирование записи как вк Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted November 13, 2015 Author Report Share Posted November 13, 2015 Дружище можешь пж сделать хак редактирование записи как вк Так он есть в пабле.... вот тк там прикрепления нельзя редактировать , а так тк за деньги Quote Link to comment Share on other sites More sharing options...
gnev Posted December 19, 2015 Report Share Posted December 19, 2015 у меня не появляется значок моб версии Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted December 20, 2015 Author Report Share Posted December 20, 2015 у меня не появляется значок моб версии Если тебе надо еще в моб версии то пропиши в шаблоне mobile Quote Link to comment Share on other sites More sharing options...
007 Posted July 21, 2016 Report Share Posted July 21, 2016 Если тебе надо еще в моб версии то пропиши в шаблоне mobile На видео показано путь к фото. у меня его нету. прописал classes-->wall.php if($row_wall['mobile_p']){ $tpl->set('{mobile_p}', '<img src="/templates/Default/images/mobile.PNG"/>'); } else { $tpl->set('{mobile}', ''); } Не работает 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.