Re: Пожелания дополнений Event List
Добавлено: 11.06.2016 11:43
добавила ещё параметров в первое событие
скачать русский перевод, моды, скины и стили для phpBB, phpBB3
https://www.phpbbguru.net/community/
Это в ядро добавлять не обязательно, можно сделать прямо в слушателе данного события.
Событий нет, но их можно добавить. Без изменения(минимального) кода их добавить нельзя, поэтому привожу с изменениями
includes/functions_admin.php
, функция get_forum_list
Код: Выделить всё
global $db, $auth;
Код: Выделить всё
global $db, $auth, $phpbb_dispatcher;
Код: Выделить всё
return $rowset;
Код: Выделить всё
/**
* Modify the rowset of forum list data
*
* @event core.forum_list_modify_rowset
* @var array rowset Array with the forum list data
*/
$vars = array('rowset');
extract($phpbb_dispatcher->trigger_event('core.forum_list_modify_rowset', compact($vars)));
search.php
Код: Выделить всё
$pad_store = array('0' => '');
Код: Выделить всё
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[$row['forum_id']] = $row;
}
/**
* Modify the rowset of search data
*
* @event core.search_forum_modify_rowset
* @var array rowset Array with the search results data
*/
$vars = array('rowset');
extract($phpbb_dispatcher->trigger_event('core.search_forum_modify_rowset', compact($vars)));
foreach ($rowset as $row)
Код: Выделить всё
while ($row = $db->sql_fetchrow($result))
https://tracker.phpbb.com/browse/PHPBB3-14712
А такое индексирование обязательно?
https://tracker.phpbb.com/browse/PHPBB3-14713
includes\functions_content.php
, функцияfunction make_jumpbox
Код: Выделить всё
global $config, $auth, $template, $user, $db, $phpbb_path_helper;
Код: Выделить всё
global $config, $auth, $template, $user, $db, $phpbb_path_helper, $phpbb_dispatcher;
Код: Выделить всё
$right = $padding = 0;
Код: Выделить всё
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[(int)$row['forum_id']] = $row;
}
/**
* Modify the rowset of forum list data
*
* @event core.forum_list_jumpbox_modify_rowset
* @var array rowset Array with the forum list data
*/
$vars = array('rowset');
extract($phpbb_dispatcher->trigger_event('core.forum_list_jumpbox_modify_rowset', compact($vars)));
Код: Выделить всё
while ($row = $db->sql_fetchrow($result))
Код: Выделить всё
foreach ($rowset as $row)
\includes\functions_admin.php
функцияmake_forum_select
Код: Выделить всё
global $db, $user, $auth;
Код: Выделить всё
global $db, $user, $auth, $phpbb_dispatcher;
Код: Выделить всё
$right = 0;
Код: Выделить всё
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[(int)$row['forum_id']] = $row;
}
/**
* Modify the rowset of forum list data
*
* @event core.forum_list_make_forum_select_modify_rowset
* @var array rowset Array with the forum list data
*/
$vars = array('rowset');
extract($phpbb_dispatcher->trigger_event('core.forum_list_make_forum_select_modify_rowset', compact($vars)));
Код: Выделить всё
while ($row = $db->sql_fetchrow($result))
Код: Выделить всё
foreach ($rowset as $row)
includes\acp\acp_forums.php
Код: Выделить всё
if ($row = $db->sql_fetchrow($result))
{
do
Код: Выделить всё
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[(int)$row['forum_id']] = $row;
}
/**
* Modify the rowset of forum list data
*
* @event core.acp_forums_modify_rowset
* @var array rowset Array with the forum list data
*/
$vars = array('rowset');
extract($phpbb_dispatcher->trigger_event('core.acp_forums_modify_rowset', compact($vars)));
//if ($row = $db->sql_fetchrow($result))
if ( sizeof($rowset))
{
//do
foreach($rowset as $row)
Код: Выделить всё
while ($row = $db->sql_fetchrow($result));