Topic: Using extensions to replace core code?
I'm needing to edit a query on index.php but don't understand how I add my additional code into the query? I believe this is possible so if someone can explain how it works I'll figure the rest out for myself
Additional code I need to add is highlighted red.
($hook = get_hook('in_main_output_start')) ? eval($hook) : null;
// Print the categories and forums
$query = array(
'SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster',
'FROM' => 'categories AS c',
'JOINS' => array(
array(
'INNER JOIN' => 'forums AS f',
'ON' => 'c.id=f.cat_id'
),
array(
'LEFT JOIN' => 'forum_perms AS fp',
'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
)
),
'WHERE' => ''.$more_sql.' AND (fp.read_forum IS NULL OR fp.read_forum=1)',
'ORDER BY' => 'c.disp_position, c.id, f.disp_position'
);($hook = get_hook('in_qr_get_cats_and_forums')) ? eval($hook) : null;
When I use this edited code in index.php it works as intended, I'm just unsure about how to replace the original core query with my edited version using manifest.xml?