Honoring the "exclusion" settings in admin for the directory module

dmclark - June 10, 2005 - 01:34
Project:Weblink
Version:4.6.x-1.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

There must be something I'm missing, because I feel dense and there is no prolject page for the directory module.

How can I get only the categories that contain weblinks?

#1

arsart - June 12, 2005 - 21:04

http://cvs.drupal.org/viewcvs/drupal/contributions/modules/directory/
working with 4.6

But i couldn`t force directory.module to show only one vocabulary instead of showing all of them, even there are settings for showing nodes only from one node-type.
Strange module enough.

#2

Bèr Kessels - June 19, 2005 - 15:57

please file a bug against direcotory module, once that becomes possible. For now anyone can help, by getting the directoy module up and running :)

#3

cyberchucktx - September 4, 2005 - 20:35
Title:Using with directory» Honoring the "exclusion" settings in admin for the directory module
Status:won't fix» patch (code needs review)

Well, I finally bit the bullet and tried to make the display exclusion stuff work for the Directory module.

I don't know which CVS to push this out to, or what the process is, so I'll just include the code here and let people play with it.

In the current CVS version of the directory module, look for :

  if ($tid == 0) { //Special formatting for the Root level.

in the function "directory_display_home_category".

Just befoe the "if ($tid.." statement place:

// Suppress if any node type is in the global
// "directory no_nodes" list (set in "settings")
//
  $directory_no_nodes =  (array) variable_get("directory_no_nodes");
  foreach ($vocabulary->nodes as $anodetype) {
    if (in_array($anodetype,$directory_no_nodes)) {
      return $output;
    }
  }

//
// Not in proscribed list, continue
//

Any comments?
Charlie

#4

Bèr Kessels - October 27, 2005 - 10:22
Status:patch (code needs review)» active

please provide a real patch (drupal.org/patch)

#5

Bèr Kessels - January 30, 2006 - 18:39
Status:active» won't fix
 
 

Drupal is a registered trademark of Dries Buytaert.