Hi,

I've installed Advanced Forum and want to use forum with this. I succeed in setup all this but I've now a problem. The section where I'd like to display forum is managed with Quicktabs. There is no possibility on that point to display forum directly in a quicktab and I'd like to know if this is possible (and of course how) to call forum in a node with for example module_invoke. Is there someone that can help me with that or someone who have a better solution?

Thanks

Comments

michelle’s picture

I had my forums in Quicktabs for a while. It was pretty neat from a geek standpoint but not a good UI for my users so I ended up switching to local tabs. Anyway, this is what I did:

/**
 * Implementation of hook_block().
 */
function cromods_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
     $blocks[0]['info'] = 'Forum listing in block';

     return $blocks;

    case 'view':
      $block = array();
      switch ($delta) {
        case 0:
          $block['subject'] = '';
          $forums = advanced_forum_get_forums(0);        
          $block['content'] = theme('forum_list', $forums, 0, 0);
          break;
       }
      
      return $block;
  }
}

Now you've got forums in a block which can be added to QT.

Michelle

FrancoisL’s picture

Hi Michelle,

Thanks for your answer :).

I've putted the code in settings.php but I'd like to understand where and/or how you call this hook?

Do you create a block or a node with a specific code inside?

For what I've done I putted this code in a bloick:

<?php
$forums = advanced_forum_get_forums(0);       
echo theme('forum_list', $forums, 0, 0);
?>

The forum display in a quicktab but when we go in the trheads we are not anymore in the quicktab.

François

michelle’s picture

You don't put code into settings.php. This should go in a custom module. Doing the block through the UI is an option, too, but I prefer not to use PHP in blocks.

This puts the forum list in a block, not the individual threads.

Michelle

FrancoisL’s picture

Thanks for your reply,

I've created the module (with the .module files without ?> at the end and of course the .info file) but I don't see the block appear in the block list. Is there something I forgot?

Thanks

François

liliplanet’s picture

very nice :)