Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
Attachment Upload by URL Details »»
Attachment Upload by URL
Version: 1.00, by akanevsky akanevsky is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-30-2005 Last Update: 06-19-2005 Installs: 11
 
No support by the author.

/*================================================= =====================*\
|| Attachment Upload by URL
|| Author : Psionic Vision
|| Works on : vBulletin 3.0.7 Only
\*================================================ ======================*/

There have been some requests for attachment upload by URL option... So here it is - my atttempt to create something like this. I am not sure that the way I did it is completely valid, but it does work. That is why I put it in beta releases. The code is fairly short, so it will not take more than one minute to install or remove it.

What this does is, it allows a user to upload an attachment from an URL rather than directly from user's computer. Sometime it is very useful.

Please test it out and comment and/or criticize. Thanks.

Edit: A fix was posted, please see this post:
https://vborg.vbsupport.ru/showpost....7&postcount=14
This fix is included into the new manual.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 05-03-2005, 05:44 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
Can't get the fopen() code to work either.
You get the same error?
Reply With Quote
  #23  
Old 05-03-2005, 05:46 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't tell as error has been turned off. I get a blank page, or nothing. I managed to upload only one url... from my site
Reply With Quote
  #24  
Old 05-03-2005, 07:53 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah...

1. The reason I used CURL library is safety. Originally, prior to installation of my hack, the code posted above would not work, as the is_uploaded_file function would not allow it. Right now, however, his code, would pose a security threat to your board, because it would tell the API that the file was uploaded by CURL and is safe, while that is not really true.

Therefore, the alternate code of yours is completely impertinent to the hack and I would like you to remove it. Thanks.

2. The code works for my site, however I set it to time out after 25 seconds of no response. Now, what exactly is the problem?

P.S. Please read here if you don't know why fopen is not safe:
https://vborg.vbsupport.ru/showthread.php?t=80541
Reply With Quote
  #25  
Old 05-03-2005, 08:34 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I kind of agree with Dark Visor. Someone posted a hack, if there is a problem, let him fix it. No need to hijack his thread. That only creates confusion. If you have a different idea, create your own thread.
Reply With Quote
  #26  
Old 05-10-2005, 10:14 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm...this seems interesting...so does it actually upload the file on the server?? that would save loads off red crosses...and is the original version working for all??
Reply With Quote
  #27  
Old 05-11-2005, 09:14 AM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
so does it actually upload the file on the server??
Yes, it does. It creates a standard attachment, just as if you uploaded the file from your computer.
Reply With Quote
  #28  
Old 05-12-2005, 12:07 AM
eplus_revenge eplus_revenge is offline
 
Join Date: May 2005
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dude,,i dont get any error..but after i click upload..it just says uploading..then nothign happens...
Reply With Quote
  #29  
Old 05-12-2005, 07:18 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a timeout after 25 seconds. And it works only if you have Curl installed...
Reply With Quote
  #30  
Old 05-14-2005, 10:29 AM
lange's Avatar
lange lange is offline
 
Join Date: Apr 2003
Location: Montreal (Canada)
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
Reply With Quote
  #31  
Old 05-14-2005, 03:38 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess this could be moved to Final Releases?
Reply With Quote
Reply

Thread Tools

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 11:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05561 seconds
  • Memory Usage 2,294KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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