Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

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
  #32  
Old 05-14-2005, 07:22 PM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked just fine for me...and i love it...time to place this puppy on the live boards!!!
Reply With Quote
  #33  
Old 06-13-2005, 08:17 AM
quachvu quachvu is offline
 
Join Date: Jun 2004
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i change time out from 25s to 1 minute of more?
Reply With Quote
  #34  
Old 06-13-2005, 08:22 AM
quachvu quachvu is offline
 
Join Date: Jun 2004
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dude,,i dont get any error..but after i click upload..it just says uploading..then nothign happens... and i have alread installed curl
Reply With Quote
  #35  
Old 06-13-2005, 08:26 AM
quachvu quachvu is offline
 
Join Date: Jun 2004
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dark Visor
Sorry, I forgot to include that into the instructions. Will update them in a minute.

The fix is as follows:

In template 'newattachment', find:

Code:
if ((elm.type == 'file'))
and replace with:

Code:
if ((elm.type == 'file') || (elm.type == 'text'))
i just found
Code:
if (elm.type == 'file')
in my template ...
Reply With Quote
  #36  
Old 06-13-2005, 03:23 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dark Visor
I guess this could be moved to Final Releases?
I installed this in 2 minutes, and it works as described! Thanks!

It would be nice to have "upload by URL" on the same line as the entry box, though, since it is kind of confusing, but otherwise works great!
Reply With Quote
  #37  
Old 06-13-2005, 05:52 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

quachvu,
I do not provide support for modified templates.

yoyoyo,
thanks Maybe I'll make it on one line. I'll see.
Reply With Quote
  #38  
Old 06-14-2005, 10:19 AM
quachvu quachvu is offline
 
Join Date: Jun 2004
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its a original template and was not modified, and even i set up a fresh Vbulletin 307 forum and look in newattachment i just only can find this code in it

Quote:
var haveupload = false;
for (var i=0; i < formobj.elements.length; i++)
{
var elm = formobj.elements[i];
if (elm.type == 'file')
{
if (elm.value != "")
{
haveupload = true;
Reply With Quote
  #39  
Old 06-20-2005, 05:51 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, my bad.
You would need to replace
PHP Code:
if (elm.type == 'file'
with
PHP Code:
if ((elm.type == 'file') || (elm.type == 'text')) 
Reply With Quote
  #40  
Old 07-09-2005, 10:54 AM
logofreax logofreax is offline
 
Join Date: Jan 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank youn for this Hack but i?ve got one Problem:

If I want to attach any File by URL I get this Error Message:

Quote:
Warning: filesize(): Stat failed for /kunden/73715_63755/domains/handy-faq.de/files/anhaenge/09783ad8c17c227c60f91d23b073d58c (errno=2 - No such file or directory) in /includes/functions_file.php on line 286
Can you please help me?

cu
logofreax
Reply With Quote
  #41  
Old 07-09-2005, 12:08 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think it has anything to do with my hack...
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 08:05 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.04542 seconds
  • Memory Usage 2,308KB
  • 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
  • (3)bbcode_code
  • (2)bbcode_php
  • (4)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