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

Reply
 
Thread Tools Display Modes
  #11  
Old 07-09-2003, 07:18 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demuro, I dont have time to answer all your questions but ill get a few.

Quote:
ok so this I take it stores the info in a directory...Right?
Yes

Quote:
what is the directory name?
Its defined here:

PHP Code:
$newfile "/home/pathto/public_html/yourfoldername/".$userfile_name
Just change yourfoldername in the code to whatever you want

Quote:
and is it possible to name the file manually, say by adding more form fields
I would recomend naming them with a md5 hash, its just that much secure. Check out scott's attachments as files hack. Im sure you can get the needed code from it.

Quote:
is there a way do view the directory say through the SmartFTP program I use and if so how do I do that
of course, its lives on your server just like your forum directory

Quote:
do I just add a php/MySQL insert staement to insert the name into my database and then use it as a pointer?
Yep
Reply With Quote
  #12  
Old 07-09-2003, 07:48 AM
DeMuro1's Avatar
DeMuro1 DeMuro1 is offline
 
Join Date: Apr 2003
Location: A Golden State
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I swear you guys have got to be the smartest lot in the universe. I so from your info anime loo I know how to do everything else I want.

Thank you all so very much
I am extremely greatful
Reply With Quote
  #13  
Old 07-09-2003, 11:02 AM
Gavin B. Gavin B. is offline
 
Join Date: Jul 2003
Location: Australia
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 09:48 AM DeMuro1 said this in Post #12
I swear you guys have got to be the smartest lot in the universe.
:banana: I try my best lol
Reply With Quote
  #14  
Old 07-09-2003, 11:27 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
07-07-03 at 02:25 PM Mist said this in Post #4
I've always wondered how people upload the files directly into the database though. I mean the attachments in vb aren't stored in a temporary directory are they?

I can create the form with a pointer to the file easily enough but uploading directly to the database is out of my league at the moment. Any tutorials or anything?

- miSt
Mist, this tutorial will probably help you:
http://www.devarticles.com/art/1/68
Reply With Quote
  #15  
Old 07-09-2003, 02:39 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent Lesane - thankyou !

- miSt
Reply With Quote
  #16  
Old 07-09-2003, 03:22 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome, once you readed that tutorial you probably think 'aah never thought it would be that easy'
Reply With Quote
  #17  
Old 07-10-2003, 08:32 AM
DeMuro1's Avatar
DeMuro1 DeMuro1 is offline
 
Join Date: Apr 2003
Location: A Golden State
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

last question I hope

if I modify this line
PHP Code:
&& $userfile_type == "image/jpg" 
to read
PHP Code:
&& $userfile_type == "image/file type I want" 
can I upload any type of file?

and if I add succesive strings of this
PHP Code:
&& $userfile_type == "image/file type I want" 
Then I should be able to upload multiple types of file.

is that right or does this upload only work with jpg images? If it does how can I allow it to upload gif images?

Thanks

and again can I I list you on my site as having written this portion or would you rather remain annonymous?
Reply With Quote
  #18  
Old 07-10-2003, 11:04 AM
Gavin B. Gavin B. is offline
 
Join Date: Jul 2003
Location: Australia
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you can change that to be whatever you like. Just be careful you don't allow any sort of files which could possibly be dangerous.

.gif, .png and jpg are the common extensions I would check for.
Reply With Quote
  #19  
Old 07-10-2003, 11:07 AM
Gavin B. Gavin B. is offline
 
Join Date: Jul 2003
Location: Australia
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:32 AM DeMuro1 said this in Post #17
and again can I I list you on my site as having written this portion or would you rather remain annonymous?
It's only a snippet, I'm sure there's a zillion variations of it floating around, so personally I don't want credit for it. Hope it helped out though.
Reply With Quote
  #20  
Old 07-10-2003, 03:01 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow that upload script was easy to use. Only problem was that when uploading images only part of the image was uploaded so there's a little bug there. But apart from that i understand the concept

- miSt
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 03:58 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.04465 seconds
  • Memory Usage 2,265KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete