Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-11-2010, 04:28 AM
Skillz is offline Skillz
Registered User

Join Date: Feb 2010
Posts: 3

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 wonder how hard would it be to display this data on a different page.

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.
Reply With Quote
  #2  
Old 02-11-2010, 08:18 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Thanks for sharing! I'm sure other people will use this too.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #3  
Old 02-12-2010, 02:53 AM
Skillz is offline Skillz
Registered User

Join Date: Feb 2010
Posts: 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.
Reply With Quote
  #4  
Old 02-12-2010, 08:31 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

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
Reply With Quote
  #5  
Old 02-12-2010, 12:59 PM
Skillz is offline Skillz
Registered User

Join Date: Feb 2010
Posts: 3

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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 11:38 AM.




Powered by vBulletin®