How do I override the node_gallery_edit_images_form function in the node_gallery.pages.inc?

I want to remove the drop down select of galleries the user can select and also remove the cover radio button.

I also want to remove the sort menu tab

any sugestions on where to start anyone,

thank you

Comments

zebadix’s picture

Version: 6.x-1.0-alpha1 » 6.x-2.0-alpha12
dbeall’s picture

to remove the sort images tab
remove or comment out this code in node_gallery/node_gallery.module

@@line 143

$items['node/%node_gallery_gallery/sort'] = array(
    'title' => 'Sort Images',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('node_gallery_sort_images_form', 1),
    'access callback' => 'node_gallery_user_access',
    'access arguments' => array('edit image', 1),
    'file' => 'node_gallery.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );

I have to look for the other items..

dbeall’s picture

I think the radio button can be hidden with css
or

remove or comment out this from node_gallery/node_gallery.pages.inc

@@line298

$form['is_cover'] = array(
    '#type' => 'radios',
    '#default_value' => $cover_fid,
    '#options' => $options,
  );
dbeall’s picture

to remove the drop down select list of galleries the user can select

remove or comment out this from node_gallery/node_gallery.pages.inc

@@line 330

$form['files'][$key]['gid'] = array('#type' => 'select', '#title' => 'Gallery', '#default_value' => $gallery->nid, '#options' => $gallery_list);
dddave’s picture

Status: Active » Closed (fixed)