Manage photo default settings in Node gallery module I am using Node Gallery module to work with albums and photos uploaded by user. When a user views his album there is a tab called Manage Photos which displays table with headings Delete, Preview, Edit and Cover.

I want to  change the text of 'Cover' as 'Album Cover' and display 'Delete' column at the end.

How to do this??
There is a Theming Function inside the theme.inc (\node_gallery\theme\theme.inc) file:

theme_node_gallery_api_manage_items_form($variables)


In there is everything you need. Copy this whole function to your template.php, rename the function to YOURTHEMENAME_node_gallery_api_manage_items_form($variables) and change the desired text. I think this should to the trick. 

Paste the below code inside your active theme template.php file and make sure to change to you theme name.


    /**
     * Theme function for Manage Items form.
     */
    function elegant_theme_node_gallery_api_manage_items_form($variables) {
        $form = $variables['form'];

        if (empty($form['items'])) {
            return t('This gallery is empty.');
        }
        // Pull in the multi-select functionality from core.
        drupal_add_js('misc/tableselect.js');
        // Get fieldname to retrieve the filepath for the thumbnail without
        // loading the node.
        $relationship_type = node_gallery_api_get_relationship_type($form['#gallery']->type);
        $enable_rotation = FALSE;
        if ($relationship_type->settings['manage_items']['enable_rotation'] && (image_get_toolkit() != 'gd' || function_exists("imagerotate"))) {
            $enable_rotation = TRUE;
            drupal_add_library('system', 'ui.dialog');
            drupal_add_library('system', 'ui.draggable');
            drupal_add_library('system', 'ui.resizable');
            drupal_add_js(drupal_get_path('module', 'node_gallery') . '/js/ng_manage_images.js');
        }
        $header = array(
            t('Album Cover'), //changed from Cover to Album Cover
            t('Preview'),
            t('Edit'),
            array(
                'data' => t('Delete'),
                'class' => 'select-all',
            ),
        );
        if ($enable_rotation) {
            $header = array(
                t('Album Cover'), //changed from Cover to Album Cover
                t('Preview'),
                t('Edit'),
                t('Rotation'),
                array(
                    'data' => t('Delete'),
                    'class' => 'select-all',
                ),
            );
        }
        $rows = array();
        foreach (element_children($form['items']) as $nid) {
            $element = &$form['items'][$nid];

            $row = array();
            //Cover checkbox
            if ($form['is_cover']) {
                $row[] = drupal_render($form['is_cover'][$nid]);
            }
            //preview
            $file = $element['item_file']['#value'];
            if (!empty($file)) {
                $file_object = (object) $file;
                $file_view = file_view($file_object, 'node_gallery_api_admin_thumbnail');
                $row[] = drupal_render($file_view);
            }
            else {
                $row[] = '';
            }
            //edit link
            $edit = drupal_render($element['edit_form']);
            if (!empty($element['ngid'])) {
                $edit .= drupal_render($element['ngid']);
            }
            $row[] = $edit;
            //Rotation
            if ($enable_rotation && !empty($file) && $file['type'] == 'image') {
                $row[] = drupal_render($element['rotate']);
            }
            elseif ($enable_rotation) {
                drupal_render($element['rotate']);
                $row[] = '';
            }

            $row[] = drupal_render($element['remove']);
            $rows[] = array('data' => $row);
        }
        $output = theme('table', array(
            'header' => $header,
            'rows' => $rows,
            'attributes' => array('id' => 'upload-attachments'),
            )
        );
        $output .= theme('pager');
        $output .= drupal_render_children($form);
        return $output;
    }