Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Kommius (not logged)
Guest






PostPosted: Sat Jan 28, 2006 6:21 am
Reply with quote

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

PostPosted: Sat Jan 28, 2006 7:40 am
Reply with quote

Thumb generation fails as well.. so it's impossible to add a map in jpg/png format. Shocked

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
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Sat Jan 28, 2006 6:10 pm
Reply with quote

What version of nuke are you running?
Does your server have the GD library installed?
What version of map manager?
 
View user's profile Send private message Visit poster's website
Kommius




Joined: Jan 28, 2006
Posts: 5

PostPosted: Sat Jan 28, 2006 6:48 pm
Reply with quote

Thank you for your fast reply, and taking the time to deal with my problem Wink

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 Wink

Thanks for your help,
Cheers Cool
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Sat Jan 28, 2006 11:53 pm
Reply with quote

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.
 
View user's profile Send private message Visit poster's website
Kommius




Joined: Jan 28, 2006
Posts: 5

PostPosted: Mon Jan 30, 2006 6:00 pm
Reply with quote

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... Wink

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 Razz
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Tue Jan 31, 2006 3:56 am
Reply with quote

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> -&raquo; $mapimage<br>";
      }


and change to

Code:

      }else if($type == "gif" || $type == "GIF"){
         thumb_gif($mapimage, $thumbwidth, $thumbheight, $mapimagedir, $mapimagedir."/thumb");
      }else{
         echo _TYPENOTSUP."<br> -&raquo; $mapimage<br>";
      }


thats all, enjoy
 
View user's profile Send private message Visit poster's website
Kommius




Joined: Jan 28, 2006
Posts: 5

PostPosted: Tue Jan 31, 2006 9:48 am
Reply with quote

Thanx for the thumb generation script Wink

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 Wink

[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;
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours
Forums ©