Correction:
To avoid the "My topics" feature from appearing when you're not logged in and coming as Guest, you should put
if (!$forum_user['is_guest'])
before the previous paragraph that you must have inserted into the header.php
The final code (header.php) may look as follows:
if ($forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1')
{
$visit_links = array();
if (!$forum_user['is_guest'])
$visit_links['newposts'] = '<span id="visit-new"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_new']).'" title="'.$lang_common['New posts title'].'">'.$lang_common['New posts'].'</a></span>';
if (!$forum_user['is_guest'])
$visit_links['search_topics'] = '<span id="search_topics"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_user_topics'], $forum_user['id']).'"title="'.$lang_common['My topics title'].'">'.$lang_common['My topics'].'</a></span>';
$visit_links['recent'] = '<span id="visit-recent"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_recent']).'" title="'.$lang_common['Active topics title'].'">'.$lang_common['Active topics'].'</a></span>';
INSTEAD OF
if ($forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1')
{
$visit_links = array();
if (!$forum_user['is_guest'])
$visit_links['newposts'] = '<span id="visit-new"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_new']).'" title="'.$lang_common['New posts title'].'">'.$lang_common['New posts'].'</a></span>';
$visit_links['recent'] = '<span id="visit-recent"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_recent']).'" title="'.$lang_common['Active topics title'].'">'.$lang_common['Active topics'].'</a></span>';
$visit_links['unanswered'] = '<span id="visit-unanswered"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_unanswered']).'" title="'.$lang_common['Unanswered topics title'].'">'.$lang_common['Unanswered topics'].'</a></span>';
}