I need help in finishing a Wordpress plugin I'm developing. I'm almost finished, but I am experiencing some problems and I can't figure out why I get the errors. I am posting the link to the plugin so you may download and test. I think it's the best way to discover what is wrong
What does it do?
The plugin lets you select a image and stores the image URL in a custom property. You can then retrieve this custom property in your template design.
When you install it, it will add two custom metaboxes to POST and PAGE edit screen in the backend. Each custom property has a button for selecting image. When you click this button, a UI Dialog box opens and displays files and folders.
Once you have selected an image and saved the POST / PAGE, you can retrieve the custom property and use the image url in your template design.
Installation
Just dowload the plugin from here: http://stiengenterprises.com/download/wp-filebrowser
Unzip and copy the folder to you/plugin dir, then activate the plugin.
Known issues
1) 404 Not found
When clicking the 'Get image url' button, jQuery triggers jQuery("#fileBrowser").dialog() which then loads 'fileBrowser.php'.
At line one, I have the following code:
require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');
This is what is causing the 404 Not Found error. This line did not cause any troubles in WP v2.9.1.
2) File upload
I've not been able to use jQuery Form Plugin to uplaod files. I would really like to use this for file Upload. I do not want to use Flash.
I have had a go at it, but no luck :( You can see my Stackoverflow ticket here: http://stackoverflow.com/questions/3707372/does-anyone-have-a-good-example-tutorial-on-how-to-use-jquery-form-upload
I would really really appreciate any help you can give me :)
UPDATE
after testing Todd's suggestion, it works on my local installation of WPMU. But I still receive an error message on my web server:
Warning: require_once(WP_HOME/wp-blog-header.php) [function.require-once]:
failed to open stream: No such file or directory in
/home/mysite/wpmu/wp-content/plugins/wp-filebrowser/fileBrowser.php on line 4
Fatal error: require_once() [function.require]:
Failed opening required 'WP_HOME/wp-blog-header.php'
(include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in
/home/mysite/wpmu/wp-content/plugins/wp-filebrowser/fileBrowser.php on line 4
Line 4 is require_once(WP_HOME.'/wp-blog-header.php');