| Author |
Message |
Kommius (not logged)
Guest

|
Posted:
Sat Jan 28, 2006 6:21 am |
|
Hi all,
I've been encountering some weird problems with Map Manager in the admin section..
1°) When editing a Category, if you fill anything in the "Enter URL" field, you get the following error message :
| Quote: |
| ERROR : Please ensure you have granted proper permissions, review the install.txt file for instructions! - 002 |
Please note that this does not happen when adding a category, and the upload works fine.
2°) Same problem with editing Maps |
| |
|
|
 |
Kommius

Joined: Jan 28, 2006
Posts: 5
|
Posted:
Sat Jan 28, 2006 7:40 am |
|
Thumb generation fails as well.. so it's impossible to add a map in jpg/png format.
I get the following message : Thumbnails have been generated for
and nothing under it!
Proper permissions have been set up for the folders as said in the readme (chmod 777). I double checked, since i'm the owner of the server |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Sat Jan 28, 2006 6:10 pm |
|
What version of nuke are you running?
Does your server have the GD library installed?
What version of map manager? |
| |
|
|
 |
Kommius

Joined: Jan 28, 2006
Posts: 5
|
Posted:
Sat Jan 28, 2006 6:48 pm |
|
Thank you for your fast reply, and taking the time to deal with my problem
I am running the latest version of Map Manager, 1.1 (for PN 7.5 and up)
on PHP-Nuke 7.8
PHP 5.1.1 installed on server, GD not installed
If you wish to take a closer look, the site's link is the following:
http://ik59158.ikexpress.com/~test2/admin.php
Login : maps
Pass : maps
Ive set the account so u only have access to Maps module
Thanks for your help,
Cheers  |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Sat Jan 28, 2006 11:53 pm |
|
Sorry, nothing i can do at this point. GD library is listed as a requirement in the install.txt
If you are the owner of the server, you might look in to installing it. |
| |
|
|
 |
Kommius

Joined: Jan 28, 2006
Posts: 5
|
Posted:
Mon Jan 30, 2006 6:00 pm |
|
Problem solved for the Thumbnail generation (spent 3 hours installing GD with PHP 5.1.2, until i came upon this tutorial explaining a workaround for it).
So that works - Only pb left is when editing a Map then, it's impossible to update the map without getting a 002- Check permissions error message...
Btw, you could probably add a short script for GIF generation as well, now that it's supported with GD.. If you don't have the time, i will look into it  |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Tue Jan 31, 2006 3:56 am |
|
Yes, i see the edit map does need some work.
for the gif support add this to the modules/Maps/admin/incs/thumb.php
before ?>
| Code: |
function thumb_gif($mapimage, $thumbwidth, $thumbheight, $spath, $dpath){
$destimg = ImageCreateTrueColor($thumbwidth, $thumbheight);
$srcimg = ImageCreateFromGIF($spath."/".$mapimage);
ImageCopyResized($destimg, $srcimg, 0, 0, 0, 0, $thumbwidth, $thumbheight, ImageSX($srcimg), ImageSY($srcimg));
ImageGIF($destimg, $dpath."/".$mapimage);
}
|
then find..
| Code: |
}else{
echo _TYPENOTSUP."<br> -» $mapimage<br>";
}
|
and change to
| Code: |
}else if($type == "gif" || $type == "GIF"){
thumb_gif($mapimage, $thumbwidth, $thumbheight, $mapimagedir, $mapimagedir."/thumb");
}else{
echo _TYPENOTSUP."<br> -» $mapimage<br>";
}
|
thats all, enjoy |
| |
|
|
 |
Kommius

Joined: Jan 28, 2006
Posts: 5
|
Posted:
Tue Jan 31, 2006 9:48 am |
|
Thanx for the thumb generation script
I got a fix for the error when you edit a category and you already have an image stored :
In mapupdatecat.php (admin/incs);
REPLACE
| Code: |
if ($upfile != ""){
$catimagee = upfile($catimagedir, "upfile");
} else {
$catimagee = $catimagelinke;
} |
WITH:
| Code: |
if ($catimagelinke != ""){
$catimagee = $catimagelinke;
} else {
$catimagee = upfile($catimagedir, "upfile");
} |
The reason for the error is that instead of returning an empty value when you for the $upfile when you don't upload anything, it returns a value of the type Array(); so in fact it's never really empty.. something to look into i suppose
[EDIT] Another fix for the missing $admin_file in globals of Thumb.php :
In admin/incs/Thumbs.php,
REPLACE
| Code: |
global $db, $prefix, $module_name, $mapimagedir; |
WITH
| Code: |
global $db, $prefix, $module_name, $mapimagedir, $admin_file; |
|
| |
|
|
 |
|
|