spooks, on 03 November 2009, 21:03, said:
If u download my latest upload (v1.15) you will see i`ve changed the code insertion points to a more logical point (your existing code don`t matter) and fixed the errors in the previous that were causing your problem. [img]http://forums.oscommerce.com/public/style_emoticons/default/smile.gif[/img]
Hi
I've tried your add-on which is just what I need i order to get a structure to my images folder. However, I have had many attempts, but it does not work yet. I have copy/pasted all the corrections in the admin/categories.php and the includes/languages/english/categories.php as well as my local language categories.php. Thus no typing errors. When executing, the images folder cannot be found. About line 600 it does not enter the "if ($handle = opendir($root_image_dir)) { ..." but executes the else part. The permissions on the images-folder and sub folders are 777. Among other things I have tried the following code in a separate php-file, and it works, listing the names of folders and files in var/www/catalog/images/.
<?php
$dir = "/var/www/catalog/images/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}
?>
Thank you for any help. I'm experienced in programming, but new to php and I haven't fully grasped the structure of the osCommerse yet.