Hello,

My Gallery2 is accessible on "/gallery", which is conflicting with Drupal's own image_galleries module. I would like to change URI of my Gallery2 to some other address, for example to "/xgallery". Can you please tell me how to do it?

Comments

yngens’s picture

Title: It is now on /gallery and I would like to change to /xgallery How to do it? » How to change /gallery to /xgallery?

changing title to fit to issue tracker's field.

profix898’s picture

Its not possible without altering the module's code. You must 1. change the menu path in function gallery_menu() and 2. change the 'Embed URI' variable under 'Directory settings'.

1) look for $items[] = array('path' => 'gallery', ... (in gallery.module) and change it to something else
2) go to admin/settings/gallery and change 'Embed URI' to match the path above

Dont forget to flush the cache and rebuild the menu. I dont think there are other places you must change, but you will see what happens after you did the modifications above ;)

P.S. Please avoid to double-post to the issues queue and the G2 forums in the future.

yngens’s picture

profix898, sorry for double posting on gallery.menalto too. your instructions worked out like a charm, except just one problem that i have been dealing for several hours trying different things - new settings prevent displaying gallery menu block in drupal. i use matrix theme and before i had all the necessary commands for users in the gallery menu block on the left of every gallery page. i made sure that all the settings for the block (an it is in the list of drupal blocks) and settings within gallery2 are correct, but unfortunately it does not show. do you have any idea why?

and just in case if other users will want to use both gallery2 and image_galleries of drupal at the same time, i believe the way that i suggested to resolve my issue should be made possible to set in administration options.

huge thanks to you for helping to solve this big for me issue. and i would appreciate if you could give me some clue how to get gallery menu back to work.

mandclu’s picture

It appears one more change is required, this time in gallery_block.php, on line 89:

        if ((arg(0) == 'gallery') && (isset($gallery_sidebar) && !empty($gallery_sidebar))) {

...should now be:

        if ((arg(0) == 'xgallery') && (isset($gallery_sidebar) && !empty($gallery_sidebar))) {

I tend to agree, it would be nice if you could set this ia a preference.

yngens’s picture

#4 solved the problem. thanx surge_martin!

profix898’s picture

Version: 5.x-1.x-dev » master
Assigned: Unassigned » profix898
Category: support » feature

I think this will be a feature in D6 version of gallery module. We will probably have an option to disable/move the gallery menu item, because its likely required by http://drupal.org/node/138400.

profix898’s picture

Component: Code » Code / API
Status: Active » Fixed

This is now implemented in 6.x-1.x/HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.