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)

squawell 04-30-2003 07:29 PM

Quote:

Today at 04:24 AM rake said this in Post #100
Not in my hack. ;)



NOTE TO EVERYONE WHO USED THE ATTACHMENT.PHP FROM THE OLD ZIP:
Replace it with your original one.

i know that not about ur hack.... ;)

anyway i comment that and it works now

thankz rake.......this is a nice hack..... :classic:

find new problem when edit post and remove the multiple attachment files i got this

Invalid SQL: SELECT attachmentid FROM post WHERE attachmentid=233,234
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 '234' at line 1

mysql error number: 1064

Date: Thursday 01st of May 2003 04:30:10 AM
Script: http:///forum/forum/editpost.php
Referer: http:///forum/editpost.php?s=&action=editpost&postid=1372

iggy123 04-30-2003 07:43 PM

Quote:



NOTE TO EVERYONE WHO USED THE ATTACHMENT.PHP FROM THE OLD ZIP:
Replace it with your original one.


I don't have it anymore :( I have been trying for hours to get this too work, and can't uninstall it as i have no idea on how to delete the tables and get the attachments back to the way they were...

rake 04-30-2003 07:45 PM

:) 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]);
}

Link14716 04-30-2003 07:47 PM

Quote:

Today at 04:43 PM iggy123 said this in Post #102
I don't have it anymore :( I have been trying for hours to get this too work, and can't uninstall it as i have no idea on how to delete the tables and get the attachments back to the way they were...

Download a new ZIP from the member's area or make the changes to the attachment.php that I posted. If you make the changes I posted, that attachment.php will work ;)

Link14716 04-30-2003 07:48 PM

Quote:

Today at 04:45 PM rake said this in Post #103
:) I'm glad to see it finally works.
So are we, rake, so are we. :)

Breaker 04-30-2003 07:51 PM

i will be installing this when i get some free time

iggy123 04-30-2003 08:01 PM

Quote:

Today at 09: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]);
}

which file is that from????

iggy123 04-30-2003 08:15 PM

Quote:

Today at 09:47 PM Link14716 said this in Post #104
Download a new ZIP from the member's area or make the changes to the attachment.php that I posted. If you make the changes I posted, that attachment.php will work ;)

I have applied the changes you made and it still doesn't work??? is there any chance you could post your attachment.php..... I am really getting depressed now! this should've gone into the beta release not here!

rake 04-30-2003 08:33 PM

The hack didn't work before because of small errors which slipped in because of tiredness. :sleep: The hack in it's current state will work fine.

iggy123 04-30-2003 08:38 PM

Is there any chance that you could send me - or post - a working attachment.php. I have tried altering the one on the post but i can now edit but i am still getting error when trying to view an attachment -

Quote:

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT filename,filedata,dateline,visible
FROM attachment
WHERE attachmentid='50'AND private=0
mysql error: Unknown column 'private' in 'where clause'

mysql error number: 1054

Date: Wednesday 30th of April 2003 04:37:20 PM
Script: http://xxx/forums/forums/attachment.php?attachmentid=50
Referer: http://xxxxx/forums/showthread.php?threadid=459


All times are GMT. The time now is 09:06 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.01778 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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