???Fixes for several gallery problems: creation, "back to..." link, incorrect linkes to images
| Project: | IMCE_Gallery |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
1. Gallery creation: add braces to table names in requests
replace in requests in imce_gallery.install
"imce_gallery" with "{imce_gallery}"
"imce_gallery_items" with "{imce_gallery_items}"
2. Remove all entrances of "/kadarusman"
change the line 181 in imce_gallery.module from:
> $div .= 'uid.'/imce" method="post">';
to
> $div .= 'uid.'/imce" method="post">';
3. The link "Back to Gallery" dont work propertly
change the line 399 in imce_gallery.module from:
> $back_url = substr($back_url, 0, ($pos-$c_url+1));
to
> $back_url = substr($back_url, 1, ($pos-$c_url+1));
4. Images do not display correctly in gallery
change the line 148 in imce_gallery.module from:
> $g_folder = variable_get('file_directory_path', 'files').'/'. $settings[$grid]['prefix'].$guid;
to
> $set = imce_settings_user();
> $g_folder = $set["dir"];

#1
I do not understand the patch. from Line 180 to 189 nothig ist active!
See my code in the imce_gallery module:
/*
$div .= 'uid.'/imce" method="post">';
$div .= 'Choose the gallery you would like to associate to:
';
while($gals = db_fetch_object($res_sql)) {
$div .= 'gid.'" /> '.$gals->g_name . '
';
}
$div .= '
';
$div .= '';
$div .= '';
*/
So what i have to do?
Warm regards from Cologne
Dirk
#2
Probably should be 399 as is but 400 from
$back_url = preg_replace("/(\?q\=)/", "", $back_url);
to
$back_url = preg_replace("/.*(\?q\=)/", "", $back_url);
#3
thank you!
When i was fix the files the gallery is working!
two more:
the step 2 - i don"t find in module that lines
in firefox browser don't show the "prew. next, close" icon. you can fix them if you make the original modules directory the imce_galery and copy the gif files.
#4
more problems found!
When i want to modify the gallery name or description the
refhresh and delete button
not funkcionally!
somebody has the right code? thank you... my current imce gallery is attached.
#5
In imce_gallery.module file, instead of doing this:
or this:
which wasn't working for me, I replaced:
$c_url = strlen($back_url);$pos = strrpos($back_url, "/");
$back_url = substr($back_url, 0, ($pos-$c_url+1));
$back_url = preg_replace("/(\?q\=)/", "", $back_url);
with my code:
$back_url = 'http://'.$_SERVER['SERVER_NAME'].request_uri();$back_url = substr($back_url,0,strrpos($back_url,"/"));
and it's working perfectly. Maybe it will help somebody.
misku