Hide new topic link based on the forum topics
I got it working.
Here is the code

function theme_advanced_forum_node_type_create_list(&amp;$variables) {
  $forum_id = $variables['forum_id'];

  // Get the list of node types to display links for.
  $type_list = advanced_forum_node_type_create_list($forum_id);


  $forum_ids = array(1,2,3,4); // Ids of forum1
  $forum2_ids = array(5,6,7,8,9,10);  // Ids of forum2



  $output = '';

    if (in_array($forum_id, $forum_ids))  {

      $output .= '&lt;div class="forum-add-node forum-add-forum"&gt;';
      $output .= theme('advanced_forum_l', array(
        'text' =&gt; 'New topic',
        'path' =&gt; $type_list['forum']['href'],
        'options' =&gt; NULL,
        'button_class' =&gt; 'large',
        ));
      $output .= '&lt;/div&gt;';

  }
  elseif (in_array($forum_id, $forum2_ids))  {
    $output .= '&lt;div class="forum-add-node forum-add-forum2"&gt;';
      $output .= theme('advanced_forum_l', array(
        'text' =&gt; 'New topic',
        'path' =&gt; $type_list['forum2']['href'],
        'options' =&gt; NULL,
        'button_class' =&gt; 'large',
        ));
      $output .= '&lt;/div&gt;';
    }
  else {
    // User did not have access to create any node types in this fourm so
    // we just return the denial text / login prompt.
    $output = $type_list;
  }


  return $output;
}