AlexIA

Advanced Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору Нашел я модуль учета активности и поощерений для нюки но возникла загвоздка с форумом phpBB2 Системе не считает ни темы ни сообщения оставленные на форуме, помогите подогнать 2 последних отрезка скрипта, чтобы 1 мог считать созданные темы а 2 сообщения. Похоже 2 последние отрывка предназначены для старого форума. А в таблицах форума phpBB идут не ники а номера юзеров. Кому интересен модуль создания и учета поощерений пишите вышлю. Этот отрывок подсчета статей опубликованных на главной (РАБОТАЕТ) =============================== function cnt_storiesihome($year,$month) { global $prefix, $ps_excludeusers, $user_prefix; if ($month < 10){ $month = "0".$month;} $results = mysql_query("select count(*), informant, uid from $prefix"._stories.", $user_prefix"._users." where uname=informant and (ihome='0' OR catid='0') and uname not in ('',$ps_excludeusers) and time LIKE '".$year."-".$month."-%' group by informant"); if(!$results) {echo "cnt_storiesihome: ".mysql_errno().": ".mysql_error()."<br>";exit;} ps_update_points($results,$year,$month,'cnt_storiesihome'); ====================================== Это отрывок для подсчета созданных тем на форуме (не считает) ================================== function cnt_custom1($year,$month) { global $prefix, $ps_excludeusers, $user_prefix; if ($month < 10){ $month = "0".$month;} $results = mysql_query("select count(*), uname, uid from $prefix"._forumtopics.", $user_prefix"._users." where topic_poster=uid and uname not in ('',$ps_excludeusers) and topic_time LIKE '".$year."-".$month."-%' group by uname"); if(!$results) {echo "cnt_custom1: ".mysql_errno(). ": ".mysql_error()."<br>";exit;} ps_update_points($results,$year,$month,'cnt_custom1'); ================================= Это отрывок для подсчета сообщений на форуме (не считает) ================================= function cnt_custom2($year,$month) { global $prefix, $ps_excludeusers, $user_prefix; if ($month < 10){ $month = "0".$month;} $results = mysql_query("select count(*), uname, uid from $prefix"._posts.", $user_prefix"._users." where poster_id=uid and uname not in ('',$ps_excludeusers) and post_time LIKE '".$year."-".$month."-%' group by uname"); if(!$results) {echo "cnt_custom2: ".mysql_errno(). ": ".mysql_error()."<br>";exit;} ps_update_points($results,$year,$month,'cnt_custom2'); ==================================
---------- http://WMe.in.ua - WebMoney Exchange in Ukraine http://InKey.ua - Интернет бизнес под ключ! WebMoney :: Персональные аттестаты :: Хостинг :: Домены :: Серверы |
|