Jump to:
| Project: | Imagemenu |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
I've installed Drupal into a subfolder of the webroot. When i try adding a new image menu item, imce does not show up.
The browse button for adding an image points to http://www.mywebdomain.com/?q=imce... instead of http://www.mywebdomain.com/mydrupalfolder/?q=imce...
As my Drupal CVS application is still pending i just post the code how I've fixed the issue.
I've changed the code from line 346 as follows:
if (module_exists('imce')) {
// Get the base path of the drupal installation (including subfolders)
$basepath = base_path();
// Build the correct path to access IMCE
$imceimagepath = $basepath . '/?q=imce&app=imagemenu|url%40edit-menu-imagepath';
$imcemouseover = $basepath . '/?q=imce&app=imagemenu|url%40edit-menu-mouseover';
$form['menu']['imagepath']['#description'] = t('The path to the image. ').'
Cheers
Comments
#1
Sorry, code above is not complete:
The rest is here:
$form['menu']['imagepath']['#description'] = t('The path to the image. ').'<input type="button" value="Browse" onClick="window.open(\'' . $imceimagepath . '\', \'\', \'width=760,height=560,resizable=1\')"';$form['menu']['mouseover']['#description'] = t('The path to the image. ').'<input type="button" value="Browse" onClick="window.open(\'' . $imcemouseover . '\', \'\', \'width=760,height=560,resizable=1\')"';
It seems that IMCE shows up with this code, but still images are not added correctly.
I'll try to find out more, but would be great if one of the developers could take a look at it too.