With the links at the end of the posting as if the forum posting were part of a book.

Disabled book module and still the links are there.

Any suggestion on how I can best disable this feature will be greatly appreciated.

Comments

vm’s picture

please link your site or to a screen capture so we can visualize what you are talking about.

Tito A.’s picture

with the link to the screen shot.

Thanks for your help.

Jeff Burnz’s picture

Pretty sure I know what you mean, this is how the Blueprint theme deals with it (wipes out the links entirely):

/**
 * Override, remove previous/next links for forum topics
 *
 * Makes forums look better and is great for performance
 * More: http://www.sysarchitects.com/node/70
 * @TODO: not sure this is working yet in D6
 */
function blueprint_forum_topic_navigation(&$variables) {
  return '';
}

Replace "blueprint" with your theme name, i.e. function MYTHEME_forum_topic_navigation...

NOTE the TODO in the above comment... utterly untested by myself, just an example...

vm’s picture

yep certainly seems to be what the user showed in the image sent to me. Good thing you popped in, I didn't know what theme the OP was using and would have had him/her checking tpl.php files as I thought the user may possibly be using advanced forum.

Tito A.’s picture

Where do I place this code?

VeryMisunderstod...what do you mean OP?

Where do I start tweaking the tpl.php files?

Thank ya.

michelle’s picture

It's not that simple in D6. Here's the code from advforum that removes it:

function advanced_forum_theme_registry_alter(&$theme_registry) {
  // Kill the next/previous forum topic navigation links.
    foreach ($theme_registry['forum_topic_navigation']['preprocess functions'] as $key => $value) {
      if ($value = 'template_preprocess_forum_topic_navigation') {
        unset($theme_registry['forum_topic_navigation']['preprocess functions'][$key]);
      }
    }
 }

Change "advanced_forum" to your module's name, of course.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

Tito A.’s picture

In which file do I insert this code?

vm’s picture

template.php I believe

OP = Original Poster

tpl.php files are your theme files. Though that isn't what needs to be done as confirmed by the other posters in the thread.

Tito A.’s picture

module template.php file?

meaning

forums.tpl.php

?

vm’s picture

template.php is a file in the theme you are using. If it isn't there in your theme folder create your own template.php file and add the function you've been given. Insure to change the function name to be representative of your theme.

forget about the tpl.php files. They aren't needed in this situation and that comment wasn't directed at you for the most part. For a better explaination about tpl.php files, check out the theme developers handbook in the documentation area. You'll get far more explaination then I can give in this forum post.

Tito A.’s picture

Where in the file do I place this function.
Does it matter?

At the begging? the middle? the end?

Tanx so much.

vm’s picture

I was incorrect in my thinking. Follow Michelle's advice below.

michelle’s picture

That's a hook. I don't think it can be done in template.php. I might be wrong, but I'm about 75% sure it has to be in a module. So it would go in your (OP's) site module.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

vm’s picture

ahhhhh! (lightbulb) - missed the alter part of the function.

Tito A.’s picture

function forums_theme_registry_alter(&$theme_registry) {
  // Kill the next/previous forum topic navigation links.
    foreach ($theme_registry['forum_topic_navigation']['preprocess functions'] as $key => $value) {
      if ($value = 'template_preprocess_forum_topic_navigation') {
        unset($theme_registry['forum_topic_navigation']['preprocess functions'][$key]);
      }
    }
}

Not sure where I need to be placing this code.

Do I create a template.php file in the book module folder?

i dunno...

Jeff Burnz’s picture

I gather what MIchelle is saying is that you need to put this into a module (albeit a mini module), that contains just this function.

Here's a quickstart guide: http://drupal.org/node/206753

It only needs to be very simple, call you module something like "custom_functions.module".

michelle’s picture

Yeah. Usually you'll have a site specific module to put little snippits like this in.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.