You are here

function node_gallery_get_config in Node Gallery 6.2

Get node gallery config

the config was stored in variable table with this format: node_gallery_(gallery_type)-(image_type);

Parameters

unknown_type $gallery_type:

Return value

unknown

14 calls to node_gallery_get_config()
node_gallery_config_list in ./node_gallery.admin.inc
@file Node gallery admin page file
node_gallery_config_load in ./node_gallery.module
node_gallery_get_cover in ./node_gallery.inc
node_gallery_get_image_parent_gallery_config in ./node_gallery.inc
node_gallery_get_types in ./node_gallery.inc
get node gallery types list

... See full list

File

./node_gallery.inc, line 17
Node gallery models

Code

function node_gallery_get_config($gallery_type = NULL) {
  static $ng_configs = array();
  if (empty($ng_configs)) {
    global $conf;
    $node_types = array_keys(node_get_types());
    foreach ($conf as $key => $value) {
      if (strpos($key, 'node_gallery_') === 0 && !empty($value)) {
        $t = substr($key, 13);
        if (in_array($t, $node_types)) {
          $ng_configs[$t] = $value;
        }
      }
    }
  }
  if (!empty($gallery_type)) {
    return $ng_configs[$gallery_type];
  }
  return $ng_configs;
}