Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2005, 01:00 AM
phreak420 phreak420 is offline
 
Join Date: Jan 2005
Location: IL
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Image Hosting Script

Hello guys. I am still learning PHP but this is what I want someone to do for me:

I would like a script done in PHP that would tie along with my HTML script with the file form. A great example would be http://www.imageshack.us . I would like to allow anyone to visit my site and have them upload a jpg, gif, png, psd, and bmp image. And then in return give them the link to their picture, a forum link [IMG] [/IMG], and HTML link.

If someone could do that or at least help me code one over AOL Instant Messenger, that would be good.

If this type of request is not allowed on this board, please tell me for future reference.
Reply With Quote
  #2  
Old 01-12-2005, 01:23 AM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't looked into image uploading yet (I'd be more interested in the thumbnail creation actually) so it would be great if anyone could post what they know about it.
Reply With Quote
  #3  
Old 01-12-2005, 06:14 PM
phreak420 phreak420 is offline
 
Join Date: Jan 2005
Location: IL
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tekton
I haven't looked into image uploading yet (I'd be more interested in the thumbnail creation actually) so it would be great if anyone could post what they know about it.
About thumbnail creation, hmm. I think you can get scripts at www.hotscripts.com and maybe learn from it.

I still want an Image Hosting script. Anyone?
Reply With Quote
  #4  
Old 01-12-2005, 06:32 PM
rake's Avatar
rake rake is offline
 
Join Date: Nov 2002
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like i said, before, you can't come here and expect someone to code an entire hack for you, well, unless one of the coders is willing to.. you should at the Modification Requests forum, or unless you are willing to pay, in which case, you should look at the Service Requests forum. However, you can always ask for advice around here. There are always people willing to help.

Here are my tips:
1. Look into file upload via PHP.
2. Tie your script with vBulletin for easy thumbnail creation, since the functionality is already there. You just need to tweak it to suit your needs. Check the includes/functions_image.php file.
Reply With Quote
  #5  
Old 01-12-2005, 06:35 PM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?t=69088" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=69088</a>

Doesn't contain the thumbnailing, but it has some pretty clean code that is easy to read if you're interested.
Reply With Quote
  #6  
Old 01-12-2005, 06:52 PM
phreak420 phreak420 is offline
 
Join Date: Jan 2005
Location: IL
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rake
Like i said, before, you can't come here and expect someone to code an entire hack for you
The thing is, its not a hack for vB. Its a PHP script. I wrote some coding of this script (with not knowing much PHP), a friend of mine also helped write most of it.
PHP Code:
<?php 
if($Submit){ 

if (
$_FILES['imagefile']['type'] == "image/gif" OR $_FILES['imagefile']['type'] == "image/jpg" OR $_FILES['imagefile']['type'] == "image/psd" OR $_FILES['imagefile']['type'] == "image/png") {      
   
copy ($_FILES['imagefile']['tmp_name'], "www.3pic-designs.com/hosting/".$_FILES['imagefile']['name']) 
   or die (
"Could not copy"); 
}else{ 
   echo 
"Not an image file (".$_FILES['imagefile']['name'].")"


}else{ 

?>
And here is the error I get with a .gif: Warning: copy(www.3pic-designs.com/hosting/phreak.gif): failed to open stream: No such file or directory in /home/www/3pic-designs.com/hosting/upload.php on line 11
Could not copy

And here is the error I get with a .jpg: Not an image file (Divine.jpg)

Does anyone know how I could fix this? I wrote the image/jpg all the way to png myself from just looking at the code and changing the /gif to my desire.

EDIT: I dont want a vB hack. I am talking about a real script for a site. Not forums.
Reply With Quote
  #7  
Old 01-12-2005, 06:56 PM
rake's Avatar
rake rake is offline
 
Join Date: Nov 2002
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

make sure the folder exists and is world-writable (chmod 777). Also, use the move_uploaded_file function instead of copy.
Reply With Quote
  #8  
Old 01-12-2005, 07:18 PM
phreak420 phreak420 is offline
 
Join Date: Jan 2005
Location: IL
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rake
Also, use the move_uploaded_file function instead of copy.
What does that part mean?...Sorry, still learning PHP.
Reply With Quote
  #9  
Old 09-16-2005, 09:10 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my suggestion, use the search button, there has been some made already, if not what your looking for, then you will have to pay someone most likely
Reply With Quote
Reply


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


All times are GMT. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04134 seconds
  • Memory Usage 2,248KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete