vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vb3 Attachments - Including Multiple Attachments Option (https://vborg.vbsupport.ru/showthread.php?t=52294)

Austin Dea 04-30-2003 11:23 PM

Really? You've tested it out fully?

squawell 04-30-2003 11:48 PM

Quote:

Today at 04:45 AM rake said this in Post #103
:) I'm glad to see it finally works.

Edit: Wow, great timing. :lick:


To fix the editing error:

Replace
if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
updatethreadcount($threadinfo[threadid]);
}

With

if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";


$att = explode(",",$postinfo[attachmentid]);
foreach($att as $value) {
if(isset($qry)) {
$qry .= " OR attachmentid='$value'";
} else {
$qry = "attachmentid='$value'";
}
}this part

$DB_site->query("DELETE FROM attachment WHERE $qry");
updatethreadcount($threadinfo[threadid]);
}

thankz again rake...it finally works now......

but i use ur code above i got error when i take the red part than

it works.....if i find any problem i will report let u know.....thankz for the great hack....

Link14716 05-01-2003 12:00 AM

Quote:

Today at 06:48 PM iggy123 said this in Post #119
there is no need to get personal. I have followed your instructions to the T and it is happening. I will gladly send you the files - pre and post hack and you tell me where i am going wrong!!
Trust me, it is impossible to get that error with a clean, unhacked attachment.php. Furthermore, if you really followed my attachment.php edit earlier in this thread, that error would have disappeared.

Boofo 05-01-2003 12:06 AM

Link, is the file from the first post allright to install now? All fixed and working even for old attachments?

Link14716 05-01-2003 12:12 AM

Quote:

Today at 09:06 PM Boofo said this in Post #124
Link, is the file from the first post allright to install now? All fixed and working even for old attachments?
It works perfectly for me. :)

Boofo 05-01-2003 12:16 AM

Quote:

Today at 08:12 PM Link14716 said this in Post #125
It works perfectly for me. :)
Thank you, sir. I'm installing it on your recommendation then. ;)

Austin Dea 05-01-2003 12:18 AM

Me too. =)

350Chevy 05-01-2003 12:22 AM

Files are still getting cut off at 65535 bytes for me(I started over from scratch and reapplied the hack and also reuploaded the new newattachment.php and reuploaded my old attachment.php.)

Also when viewing multiple attachments it shows all the attachments as the first attachment... Example I upload 1.jpg 2.jpg 3.jpg and 4.jpg. When viewing the post it shows 1.jpg four times. When I edit the post it shows all four images listed in the manage list. Any ideas?

Boofo 05-01-2003 12:22 AM

Quote:

Today at 03:45 PM rake said this in Post #103
:) I'm glad to see it finally works.

Edit: Wow, great timing. :lick:


To fix the editing error:

Replace
if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
updatethreadcount($threadinfo[threadid]);
}

With

if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";


$att = explode(",",$postinfo[attachmentid]);
foreach($att as $value) {
if(isset($qry)) {
$qry .= " OR attachmentid='$value'";
} else {
$qry = "attachmentid='$value'";
}
}

$DB_site->query("DELETE FROM attachment WHERE $qry");
updatethreadcount($threadinfo[threadid]);
}


Does this need to be added to the file in the first post?

350Chevy 05-01-2003 12:25 AM

Quote:

Today at 02:22 AM 350Chevy said this in Post #128
Also when viewing multiple attachments it shows all the attachments as the first attachment... Example I upload 1.jpg 2.jpg 3.jpg and 4.jpg. When viewing the post it shows 1.jpg four times. When I edit the post it shows all four images listed in the manage list. Any ideas?
Ok.. I fixed that problem by going into the control panel and setting View Images -Do you wish to display attached images in the threads? Select no to just generate a link to download the image. to NO.

I'd rather have it set to YES but if this is all I can get for now then so be it..

But the max file size is still a problem for me..


All times are GMT. The time now is 04:51 PM.

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.01466 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete