Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
ashkon
Client



Joined: Jan 15, 2006
Posts: 22

PostPosted: Mon Jan 23, 2006 5:21 am Reply with quote

Hi,

I want to expand the capabilities of the upload module that comes with phpnuke so that people can use the existing text fields, as well as use an input form to upload other types of files (such as images or flash files).

The first thing I tried was creating a basic upload program using an HTML form converted to php using nuke tools:

Code:
<form enctype="multipart/form-data" action="uploader.php" method="POST">

<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>


where the action "uploader.php" looks like:

Code:
<?


$target_path = "uploads/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}

?>


I figure that using this method is as simple as putting the input form somewhere at the end of the submit_news table. However, uploader.php is very restricted in what it does. It does not distinguish between acceptable file extensions, sizes, and is probably not safe in many other ways to use.

I was wondering. I have an additional module installed (EasyUp) that does exactly what I am trying to program. Is there a way to have one menu item load both Submit_News and EasyUp on top of eachother in separate tables? Or is there any other way to integrate these two modules? If not, I will have to research php and build a better/safer upload function myself.

Thanks,
Ashkon
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Jan 31, 2006 7:26 am Reply with quote

ashkon wrote:
Is there a way to have one menu item load both Submit_News and EasyUp on top of eachother in separate tables? Or is there any other way to integrate these two modules? If not, I will have to research php and build a better/safer upload function myself.

Thanks,
Ashkon


Sounds to me like custom development is needed.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 can attach files in this forum
You can download files in this forum


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