Hello.
A while ago I wrote some code to search a directory for images and dynamically create a date selector and thumbnail container. It consisted of a PHP file and some Javascript. When the date selector is changed, it uses AJAX (to the PHP file) to fetch the image numbers for the selected day. The Javascript then dynamically modifies the DOM to display the correct thumbnails.
I'm new at Drupal, and I figured I'd start learning how to writing a module. From looking at the core modules, I can't really find anything to point me in the right direction. I'm having a problem laying out my directories.
Here is the layout of my server
www/myserver/drupal - base install
www/myserver/drupal/media/photos/155W - photos directory
www/myserver/drupal/modules/mediaselector/mediaselector.css
www/myserver/drupal/modules/mediaselector/mediaselector.js
www/myserver/drupal/modules/mediaselector/mediaselector.module
www/myserver/drupal/modules/mediaselector/mediaselector.php
www/myserver/drupal/modules/mediaselector/mediaselector.inc -- common functions to module and php
In my page I reference the module passing in the directory.
mediaselector_load( "media/photos/155W" );
When the page is referenced, the current working directory for the php file is www/myserver/drupal.
This works great and my images are found correctly.