Gallery Block generates links only with default path (without language prefix):

/gallery/...

even if I switch it to, for example /de/ and it should be /de/gallery/...

Comments

ncy’s picture

StatusFileSize
new4.2 KB

just a guess, i probably shouldn't have named some variables $base_path because that's reserved by Drupal?

anyway, try this patch. it renames all instances of $base_path to $bpath.

ncy’s picture

Status: Active » Needs review
StatusFileSize
new4.2 KB

erh, sorry, i messed up the order of the files in the diff command.

re-posting patch:

verikami’s picture

:-(

...nothing changes - so this is not a problem with $base_path/$bpath
...it is strange that the link is wrong only in block...

gallery page:

http://host/de/gallery
http://host/en/gallery
http://host/gallery

generates (respectively) proper links to subdirs:

http://host/de/gallery/subdir
http://host/en/gallery/subdir
http://host/gallery/subdir

but links 4 all lang versions from block are:

http://host/gallery/subdir
http://host/gallery/subdir
http://host/gallery/subdir
verikami’s picture

...I think the problem is located here:

function: theme_fast_gallery_display_block()
line: ~1013


$link = '<a href="' . base_path() . $random_img_path . '">' .  $img . '</a>';

verikami’s picture

...& this works for me:


$link = '<a href="' . url($random_img_path) . '">' .  $img . '</a>';

but I do not know how to make 'professional patch'...

rapsli’s picture

does this work too:

$link = l($img,$random_img_path,array('html'=>TRUE));

let me know so I can put it into the code.

verikami’s picture

it's ok :-)

...lots of functions... I'm just starting to learn this api

rapsli’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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