| 1 |
<?php |
<?php |
| 2 |
// $Id: shazamgallery.module,v 1.24 2006/05/02 15:15:19 ber Exp $ |
// $Id: shazamgallery.module,v 1.25 2006/05/02 15:17:44 ber Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help |
* Implementation of hook_help |
| 304 |
$types = variable_get('shazamgallery_nodes', array('image')); |
$types = variable_get('shazamgallery_nodes', array('image')); |
| 305 |
|
|
| 306 |
if ($type == "page" && user_access('access content')) { |
if ($type == "page" && user_access('access content')) { |
| 307 |
if (_image_get_vid()) { |
if (_image_gallery_get_vid()) { |
| 308 |
$links[] = l(t("image galleries"), "gallery"); |
$links[] = l(t("image galleries"), "gallery"); |
| 309 |
} |
} |
| 310 |
} |
} |
| 477 |
* Set the breadcrumb for any image node |
* Set the breadcrumb for any image node |
| 478 |
*/ |
*/ |
| 479 |
function _shazamgallery_set_image_breadcrumb($node) { |
function _shazamgallery_set_image_breadcrumb($node) { |
| 480 |
$terms = taxonomy_node_get_terms_by_vocabulary($node->nid, _image_get_vid()); |
$terms = taxonomy_node_get_terms_by_vocabulary($node->nid, _image_gallery_get_vid()); |
| 481 |
$term = array_pop($terms); |
$term = array_pop($terms); |
| 482 |
if ($term) { |
if ($term) { |
| 483 |
$vocabulary = taxonomy_get_vocabulary(_image_get_vid()); |
$vocabulary = taxonomy_get_vocabulary(_image_gallery_get_vid()); |
| 484 |
$breadcrumb[] = array('path' => 'gallery', 'title' => $vocabulary->name); |
$breadcrumb[] = array('path' => 'gallery', 'title' => $vocabulary->name); |
| 485 |
// XXXtangent: changed this to use galleries for the breadcrumb instead of taxonomy |
// XXXtangent: changed this to use galleries for the breadcrumb instead of taxonomy |
| 486 |
if ($parents = shazamgallery_get_parents($node->nid)) { |
if ($parents = shazamgallery_get_parents($node->nid)) { |