PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
ashkon
Client


Joined: Jan 15, 2006
Posts: 22

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

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: 9136
Location: Arizona

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

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

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum