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
  #242  
Old 08-03-2003, 06:34 PM
cindyd cindyd is offline
 
Join Date: Sep 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also have a Moderator group that cannot see the picture she uploaded and when she clicks on the link, she gets a message saying she doesn't have permission to view this page.

Please, can someone work with me on this?

Oh, this was so simple, it's embarassing to even talk about.....I got it fixed. I knew it had to do with permissions somehow, but I thought it was more complicated than having the Profile set to YES to Show Images. Egads
Reply With Quote
  #243  
Old 08-04-2003, 05:21 AM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

rarg....i'm getting asn sql error when trying to delete a post with an attachment...


here is the lines....10 above and below in functions...

PHP Code:

// ###################### Start delete post #######################
function deletepost($postid,$countposts=1,$threadid=0) {
  global 
$DB_site;

  
// decrement user post count
  
if ($postinfo=getpostinfo($postid)) {
    if (
$countposts) {
      
$storeadmin $DB_site->query_first("SELECT newreply FROM storeadmin");
$storem=$storeadmin[newreply];
$DB_site->query("UPDATE user SET posts=posts-1,storep=storep-'$storem' WHERE userid='$postinfo[userid]'");

    }
    if (
$postinfo['attachmentid']) {
            
// make sure you don't remove attachments still in use $att = explode(",",$postinfo[attachmentid]);
                
foreach($att as $value) {
                   if(isset(
$qry)) {
                    
$qry .= " OR attachmentid='$value'";
                   } else {
                    
$qry "attachmentid='$value'";
                   }
                }
            
$otherattachs=$DB_site->query("SELECT attachmentid FROM post WHERE $qry AND threadid<>'$postinfo[threadid]'");
            if (
$DB_site->num_rows($otherattachs)==0) {
                
$DB_site->query("DELETE FROM attachment WHERE $qry");
        
$DB_site->query("UPDATE thread SET attach = attach - 1 WHERE threadid = '$threadid'");
            }
    }

    
$DB_site->query("DELETE FROM post WHERE postid='$postid'");
  }


any idea?
Reply With Quote
  #244  
Old 08-16-2003, 03:07 PM
cindyd cindyd is offline
 
Join Date: Sep 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will there be a fix for editing a post? The posts disappear when they are edited.
Reply With Quote
  #245  
Old 08-19-2003, 08:07 PM
Megadeuce Megadeuce is offline
 
Join Date: Jul 2003
Location: League City, Texas USA
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also, is there a way to give a name to file right next to the attachment? for example

Attachment Hack vbattach.zip ?
Reply With Quote
  #246  
Old 08-26-2003, 09:13 PM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hack works fine, but when I try to "update counters", I get this error.

Quote:
Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: UPDATE thread SET lastpost=1061935004,replycount=0,postusername='all star', postuserid='39', lastposter='allstar',attach= WHERE threadid=1563
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE threadid=1563' at line 1

mysql error number: 1064
I know it probably was my error, but the instructions were a little bit confusing considering the original hack and modification for "add attachment on edit post" were combined. Is there a way to fix this?
Reply With Quote
  #247  
Old 09-15-2003, 11:24 PM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack made my smilies in my quick reply dissapear! I am very mad!!!!!
Reply With Quote
  #248  
Old 09-21-2003, 07:42 PM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright I installed the vb3 Attachments hack a while back - the one that lets you post multiple attachments and such. Now I just installed this hack as well, and low and behold the two conflict with each other.

The thing is, old attachments work fine after I did that scan thing to them all, but when I try to post new attachments I get a bunch of errors:

Quote:
Warning: filesize(): Stat failed for /home/virtual/site4/fst/var/www/html/attachments/.file (errno=2 - No such file or directory) in /home/virtual/site4/fst/var/www/html/attachment.php on line 59

Warning: fopen(): Unable to access /home/virtual/site4/fst/var/www/html/attachments/.file in /home/virtual/site4/fst/var/www/html/attachment.php on line 60

Warning: fopen(/home/virtual/site4/fst/var/www/html/attachments/.file): failed to open stream: No such file or directory in /home/virtual/site4/fst/var/www/html/attachment.php on line 60

Warning: fread(): supplied argument is not a valid stream resource in /home/virtual/site4/fst/var/www/html/attachment.php on line 61

Warning: fclose(): supplied argument is not a valid stream resource in /home/virtual/site4/fst/var/www/html/attachment.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site4/fst/var/www/html/attachment.php:59) in /home/virtual/site4/fst/var/www/html/attachment.php on line 68
Any thought as to getting the two hacks to integrate together? Or anyway to fix the problems im having?
Reply With Quote
  #249  
Old 09-22-2003, 02:33 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe un-install the old one first?
Reply With Quote
  #250  
Old 09-22-2003, 04:58 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lifesourcerec
The hack works fine, but when I try to "update counters", I get this error.



I know it probably was my error, but the instructions were a little bit confusing considering the original hack and modification for "add attachment on edit post" were combined. Is there a way to fix this?
i think u can sovled the problem here,take look the link

http://www.vbulletin.com/forum/showt...546#post463546
Reply With Quote
  #251  
Old 09-22-2003, 06:54 PM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MaDCaT75
Maybe un-install the old one first?
People have already made multiple attachments, if I took it off it would take away the multiple attachments, and probably screw some things up
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 02:38 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.04778 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_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
  • (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