mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/events] Started on hooks for advanced last topic titles mod.
PHPBB3-9550
This commit is contained in:
parent
841ea0e494
commit
3c20ac71c5
1 changed files with 9 additions and 0 deletions
|
@ -119,6 +119,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
'ORDER_BY' => 'f.left_id',
|
'ORDER_BY' => 'f.left_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
run_hooks('display_forums_sql_inject', &$sql_ary);
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
@ -127,6 +129,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
|
run_hooks('display_forums_row_inject', &$row);
|
||||||
|
|
||||||
$forum_id = $row['forum_id'];
|
$forum_id = $row['forum_id'];
|
||||||
|
|
||||||
// Mark forums read?
|
// Mark forums read?
|
||||||
|
@ -223,6 +227,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
}
|
}
|
||||||
$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
|
$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
|
||||||
$forum_rows[$parent_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
$forum_rows[$parent_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
||||||
|
|
||||||
|
$data = array(&$forum_rows, &$parent_id, &$row);
|
||||||
|
run_hooks('display_forums_row_values_inject', &$data);
|
||||||
}
|
}
|
||||||
else if ($row['forum_type'] != FORUM_CAT)
|
else if ($row['forum_type'] != FORUM_CAT)
|
||||||
{
|
{
|
||||||
|
@ -482,6 +489,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||||
'U_LAST_POST' => $last_post_url)
|
'U_LAST_POST' => $last_post_url)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
run_hooks('display_forums_assign_block_vars', &$row);
|
||||||
|
|
||||||
// Assign subforums loop for style authors
|
// Assign subforums loop for style authors
|
||||||
foreach ($subforums_list as $subforum)
|
foreach ($subforums_list as $subforum)
|
||||||
|
|
Loading…
Add table
Reference in a new issue