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

Reply
 
Thread Tools
vb3 Attachments - Including Multiple Attachments Option Details »»
vb3 Attachments - Including Multiple Attachments Option
Version: 1.00, by rake rake is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 04-27-2003 Last Update: Never Installs: 87
 
No support by the author.

Woo! Finally! I've been working on this for 10 straight hours now.

It's a replica of the vbulletin 3 attachment feature, which supports multiple uploads. We can't have vbulletin 3 yet, but at least we can copy it.


Files to edit: 5
Queries to run: 5
New Templates: 3

Just be sure to backup before trying anything.
You can see it live at my forums. Log in as test/test, if you want to see it in action.

And don't forget to click the Install button if you like the hack.



=-=-=-=-=-=-==-=-
UPDATE - Please re-download the file. Upgrading instructions are included in instructions.php. And sorry for the wait. I had to bribe my parents with 15 math exercises to let me use the computer. :knockedout:
=-=-=-=-=-=-=-==-

=-=-=-=-=-=-=-=-=-
SECOND UPDATE - Sorry for the previous non-functioning version, everyone. I did those modifications really late at night and some errors slipped in. This update fixes permission errors, allows you to specify a maximum number of attachments, fixes 65535 bytes error and includes repairing instructions for editpost.php
I have tested it on a clean 230 test board and it worked fine.
=-=-=-=-=-=-=-=-=-

=-=-=-=-=-=-=-=-=-=
THIRD REVISION - This update fixes the 3 largest errors reported so far:
1. The view image atachments option now works
2. Attaching more than one file with a new thread now works
3. Deleting a post with attachments now works
=-=-=-=-=-=-=-=-=-=

To everyone who used attachment.php from the old zip: Please replace it with your original one. attachment.php was added in the zip by mistake.

Show Your Support

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

Comments
  #62  
Old 04-30-2003, 12:06 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something in functions.. I just added my old functions and the old attachments show again.. but multiple ones do not.. Just the first picture in a multiple attachment thread.
Reply With Quote
  #63  
Old 04-30-2003, 12:12 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BTW... Thnx for the fix for the editpost.php still doesn't work right though.. It will delete all content out of a post if I click on edit post. I think it has to do with the recycle bin mod.. (not worried about that ATM.) Still wondering why functions.php wont show any images.. :disappointed:
Reply With Quote
  #64  
Old 04-30-2003, 12:18 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 09:12 PM 350Chevy said this in Post #62
BTW... Thnx for the fix for the editpost.php.. Works fine on posts with single attachments or no attachments..
Whoops...

Change
PHP Code:
       if(isset($qry)) {
        
$qry .= " OR attachmentid='$value'";
       } else {
        
$qry "attachmentid='$value'";
       } 
To
PHP Code:
    $att explode(",",$postinfo[attachmentid]);
    foreach(
$att as $value) {
       if(isset(
$qry)) {
        
$qry .= " OR attachmentid='$value'";
       } else {
        
$qry "attachmentid='$value'";
       }
    } 
Even still, when I submit the edited post, it gives me a blank page and I look at the post and it is now completely blank...

EDIT: Whoops, I made anopther mistake in the above code. Re-apply that change if you have already applied it.
Reply With Quote
  #65  
Old 04-30-2003, 12:24 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That seemed to fix editpost.. thnx.. I'm quite tired.. going to bed.. I'm confused on why the old functions shows the first image attached while the edited one shows nothing.. Oh well..

Thnx for all the help..
Reply With Quote
  #66  
Old 04-30-2003, 12:26 AM
translucent translucent is offline
 
Join Date: Apr 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting blank pages whenever I hit showpost.php, editpost.php, etc. During the install process, was I supposed to use sections labeled 'Find - This works with the "add attachment on edit post" hack' if I don't have that hack installed?
Reply With Quote
  #67  
Old 04-30-2003, 12:28 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:26 AM translucent said this in Post #65
was I supposed to use sections labeled 'Find - This works with the "add attachment on edit post" hack' if I don't have that hack installed?

No.. You weren't..

I was a little confused with that part of the hack as well (due to the type of wording he used.) Just skip anything that references "add attachment". I think there are only 2 instances of it and they're both in editpost.php.

That shouldn't effect they way you view posts. It's just the editpost part of it.
Reply With Quote
  #68  
Old 04-30-2003, 12:33 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:18 AM Link14716 said this in Post #63
Whoops...

Change
PHP Code:
       if(isset($qry)) {
        
$qry .= " OR attachmentid='$value'";
       } else {
        
$qry "attachmentid='$value'";
       } 
To
PHP Code:
    $att explode(",",$postinfo[attachmentid]);
    foreach(
$att as $value) {
       if(isset(
$qry)) {
        
$qry .= " OR attachmentid='$value'";
       } else {
        
$qry "attachmentid='$value'";
       }
    } 
Even still, when I submit the edited post, it gives me a blank page and I look at the post and it is now completely blank...

EDIT: Whoops, I made anopther mistake in the above code. Re-apply that change if you have already applied it.
That works fine for editing posts with one attachment or no attachments.. but I get this when trying to edit a post with multiple attachments:

Code:
Database error in vBulletin 2.3.0:

Invalid SQL: SELECT filename FROM attachment WHERE attachmentid=2940,2941,2942
mysql error: You have an error in your SQL syntax near '2941,2942' at line 1

mysql error number: 1064

Date: Tuesday 29th of April 2003 09:37:55 PM
Script: http://www.ls6.com/forums/forums/edi...xxxxxxxxxxxxxx
Referer: http://www.ls6.com/forums/showthread...xxxxxxxxxxxxxx
Reply With Quote
  #69  
Old 04-30-2003, 12:43 AM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could be that you didnt change ,'attachmentid' to 'attid' in one of the edits....dunno know...>.>

also, i was veryyyy confused on the editpost.php file edits....i still havent gotten it to work....i think i'll try again soon :bunny:
Reply With Quote
  #70  
Old 04-30-2003, 01:10 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work with the old attachments we already have now?
Reply With Quote
  #71  
Old 04-30-2003, 01:12 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, but I wouldn't recommend installing this right now. This has so many errors in it. This should be in Beta Hacks...
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 07:19 AM.


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.04772 seconds
  • Memory Usage 2,330KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_php
  • (3)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
  • (1)pagenav_pagelinkrel
  • (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