#1
|
||
|
Made some edits to the phUploader
I hope that you do not mind.
Just some minor edits. I wanted the image to display when you uploaded it, not just the name. I also wanted forum code (bbcode) to show up after the upload as well, so users can easily copy/paste it. Here is the code edit, around line 246. Code:
If(move_uploaded_file($_FILES['file']['tmp_name'][$i],$folder.$file_name[$i].".".$file_ext[$i])) { $success.="<b>SUCCESS:</b> <img src=$full_url$file_name[$i]".".$file_ext[$i]><br />"; $success.="<b>URL:</b> <a href=\"".$full_url.$file_name[$i].".".$file_ext[$i]."\" target=\"_blank\">".$full_url.$file_name[$i].".".$file_ext[$i]."</a><br />"; $success.="<b>BBCODE:</b> [IMG]$full_url$file_name[$i]".".$file_ext[$i][/IMG]<br /><br />"; I demo of the work I've done can be found here: http://hosting.ut-files.com **Please note. All images that are not related to any of the Unreal games will be removed.** Last edited by Skillz; 02-11-2010 at 05:10 AM. |
#2
|
||
|
Thanks for sharing! I'm sure other people will use this too.
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#3
|
||
|
Something else I am interested in getting to work, that's multiple uploads using only one "form" where you can select multiple images all at once. Instead of having to click the "browse" button each time to find and select the image you want loaded.
This is the first priority, should clean up the page a lot. Secondly, I'd like to have the server auto convert image files to JPG/PNG if type is something other than what's allowed. Such as BMP files automatically being converted to JPG/PNG/etc... Not top on the list. |
#4
|
||
|
The multi select is only available with html v5. When that becomes the standard you can use one file input to select and upload multiple files. <input name="files[]" type="file" multiple="true" />. This will work right now in browsers that are html5 compatible, like Google Chrome.
You can also use flash to upload multiple files if you want to integrate it into the form. The image conversion is possible with either the built in GD library or Imagick. GD can't convert nearly as many formats as Imagick though.
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#5
|
||
|
I've been doing some research on this and it seems that Flash w/ AJAX is the best method. I do believe this is a bit above my programming skill level.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PhUploader problem | YUGI | phphq.Net Forums | 2 | 06-22-2008 06:12 PM |
phUploader | sof-com | phphq.Net Forums | 1 | 05-25-2008 02:50 AM |
phUploader help | lodupersempre | phphq.Net Forums | 0 | 05-12-2008 08:30 AM |
phUPLOADER Question | Matraxx | phphq.Net Forums | 4 | 10-21-2007 09:05 PM |
Image Edits | Chrispy | Hardware and Software | 1 | 12-12-2005 04:51 PM |