View Full Version : vb3 Attachments - Including Multiple Attachments Option
Woo! Finally! I've been working on this for 10 straight hours now. :p
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 (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=52294) 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.
SpeedStreet
04-28-2003, 07:23 PM
Screenies?
i thought screenshots would be useless, since most members here visit vbulletin.com. There's also the test account on my forums, if you wish to see it. Experiencing a hack first-hand is always better than screenshots.
SpeedStreet
04-28-2003, 07:38 PM
I like screenies.
So I made some for yah....no charge ;)
This is in your newthread template (sorry for the mislabelling in the titles):
SpeedStreet
04-28-2003, 07:38 PM
The Manage Screen
SpeedStreet
04-28-2003, 07:39 PM
Files Added
SpeedStreet
04-28-2003, 07:40 PM
And your files are added.
Great hack Rake, I'll be installing this...once I am done installing the other ten hacks on my back burner :D
Disturbed
04-28-2003, 07:42 PM
very nice!
how many attachments can i add? any admin options?
btw, love your site (:
Thank you for the screenshots SpeedStreet :). And thank you for the kind comment Distrurbed. The number of attachments is only limited by the maximum attach size. I can add an option for that if you want, although i think it's pretty useless.
Velocd
04-28-2003, 07:53 PM
Great job, a feature I'm sure my members will find most useful. ;)
* Velocd clicks install
all-the-vb
04-28-2003, 07:53 PM
that's cool, thanks
:)
* All-the-vb (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=32825) clicks install
Black Vivi
04-28-2003, 08:08 PM
/me clicks install
corsacrazy
04-28-2003, 08:09 PM
intalled :P been wantin this one 4 ages well err since i saw it on vb 3 lol nice one mate
Is there an option so only certain usergroups can use multiple attachments? Maybe an option in the usergroup options pages?
I just realised i forgot three things:
1. Modification to attachment.php
2. Removal of files from the temporary table
3. Making old attachments compatible. (Old attachments won't be displayed in the postbit. Just ones uploaded after the hack was installed).
I'll have an update by tomorrow. I'm too tired to do it now. :(
Edit: that isn't currently supported, N9ne
corsacrazy
04-28-2003, 08:14 PM
^ :( hope u get that sorted mate
Nice work, This adds only two querys to showthread.php right?.
Also the top of your install.txt reads incorrectly ;)
================================================== ==
F I N A L F A N T A S Y D I S C O V E R Y
BATTLE SYSTEM
afterlab
04-28-2003, 08:20 PM
rake, great job on this. I knew someone would manage to release this eventually, glad to see it in your name.
I'll be looking into implementing this later. *bookmarked*
Looks awesome :)
I'll be installing this.
Davey
04-28-2003, 08:39 PM
Very nice hack.
One which will be cherished by vB2 members who won't be upgrading to vB3.
I can see this being one of the hottest hacks.
Possibly even hack of the month?
Keep up the good work.
Dave.
PS: *Installs*.
Boofo
04-28-2003, 09:20 PM
Today at 04:12 PM rake said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=388591#post388591)
I just realised i forgot three things:
1. Modification to attachment.php
2. Removal of files from the temporary table
3. Making old attachments compatible. (Old attachments won't be displayed in the postbit. Just ones uploaded after the hack was installed).
I'll have an update by tomorrow. I'm too tired to do it now. :(
Excellent hack there, rake. Well done! ;)
I will definitely be installing this when these things are implemented. I have too many attachments now to have to re-do them all. ;)
squawell
04-28-2003, 10:38 PM
i love this...
* squawell installed....:D:D:D:
a problem when i click add file it show me i must logging
anyone have this problem??
Larry@IOG
04-28-2003, 10:41 PM
I'll install soon
Larry
MetroSports82
04-29-2003, 12:38 AM
rake, thanks for this great addition mate. excellent work! ;)
Metro.
Very nice! I'm probably going to upgrade to vB3 (as much as I hate to admit it), but well done!
Hobbes
04-29-2003, 04:41 AM
Parse error: parse error in /home/virtual/site31/fst/var/www/html/editpost.php on line 326..
help?
Hobbes
04-29-2003, 04:59 AM
Today at 02:12 PM rake said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=388591#post388591)
I just realised i forgot three things:
1. Modification to attachment.php
2. Removal of files from the temporary table
3. Making old attachments compatible. (Old attachments won't be displayed in the postbit. Just ones uploaded after the hack was installed).
I'll have an update by tomorrow. I'm too tired to do it now. :(
Edit: that isn't currently supported, N9ne
iwont loose my previous attachs by installing this, right, unless i already messed up cuz theyre not showing...and..
a problem when i click add file it show me i must be logged inim gettign that too...>.> :ermm: :ermm: :ermm: :ermm: :ermm:
Could you please post all the lines surrouding the one with the error please?
As for the login error, the file does check for permissions:
if($bbuserinfo[userid]==0) {
show_nopermission();
}
if($threadid!=0) {
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
}
$foruminfo=getforuminfo($forumid);
$permissions=getpermissions($forumid);
if (($bbuserinfo['userid']!=$threadinfo['postuserid'] or $bbuserinfo['userid']==0) and (!$permissions['canviewothers'] or !$permissions['canreplyothers'])) {
show_nopermission();
}
if (!$permissions['canview'] or (!$permissions['canreplyown'] and $bbuserinfo['userid']==$threadinfo['postuserid'])) {
show_nopermission();
}
if ($permissions[canpostattachment] and trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") {
show_nopermission();
}
You might want to replace all that, with this: ;)
====================
if($bbuserinfo[userid]==0) {
show_nopermission();
}
if($threadid!=0) {
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
}
$foruminfo=getforuminfo($forumid);
$permissions=getpermissions($forumid);
if($threadid!=0) {
if (($bbuserinfo['userid']!=$threadinfo['postuserid'] or $bbuserinfo['userid']==0) and (!$permissions['canviewothers'] or !$permissions['canreplyothers'])) {
show_nopermission();
}
if (!$permissions['canview'] or (!$permissions['canreplyown'] and $bbuserinfo['userid']==$threadinfo['postuserid'])) {
show_nopermission();
}
}
if ($permissions[canpostattachment]) {
show_nopermission();
}
===============
Hobbes
04-29-2003, 06:04 AM
ok...stay on! lemme get the code...!!
$xtime=time()-$t;
$DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signa ture',iconid='$iconid',time=time+'$xtime'$editedby sql$attachmentsql WHERE postid='$postid'");
unindexpost($postid);
indexpost($postid);
eval("standardredirect(\"".gettemplate("redirect_editthanks")."\",\"showthread.php?s=$session[sessionhash]&postid=$postid#post$postid\");");
}
if ($action=="deletepost") {
if ($deletepost=="yes") {
//get first post in thread
$getfirst=$DB_site->query_first("SELECT postid,dateline FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
it's on line 326. those are 320-330.
also, is that log-in prob in newattachment.php? *is illiterate*
and, this is 2.2.6 btw :(
Kars10
04-29-2003, 06:33 AM
I think this is one of the most hottest hacks since a long time... :)
Thanks rake for releasing this.
Kars
* Kars10 klicks install!
squawell
04-29-2003, 07:06 AM
Today at 03:45 PM rake said this in Post #28 (https://vborg.vbsupport.ru/showthread.php?postid=388778#post388778)
Could you please post all the lines surrouding the one with the error please?
As for the login error, the file does check for permissions:
if($bbuserinfo[userid]==0) {
show_nopermission();
}
if($threadid!=0) {
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
}
$foruminfo=getforuminfo($forumid);
$permissions=getpermissions($forumid);
if (($bbuserinfo['userid']!=$threadinfo['postuserid'] or $bbuserinfo['userid']==0) and (!$permissions['canviewothers'] or !$permissions['canreplyothers'])) {
show_nopermission();
}
if (!$permissions['canview'] or (!$permissions['canreplyown'] and $bbuserinfo['userid']==$threadinfo['postuserid'])) {
show_nopermission();
}
if ($permissions[canpostattachment] and trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") {
show_nopermission();
}
You might want to replace all that, with this: ;)
====================
if($bbuserinfo[userid]==0) {
show_nopermission();
}
if($threadid!=0) {
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
}
$foruminfo=getforuminfo($forumid);
$permissions=getpermissions($forumid);
if($threadid!=0) {
if (($bbuserinfo['userid']!=$threadinfo['postuserid'] or $bbuserinfo['userid']==0) and (!$permissions['canviewothers'] or !$permissions['canreplyothers'])) {
show_nopermission();
}
if (!$permissions['canview'] or (!$permissions['canreplyown'] and $bbuserinfo['userid']==$threadinfo['postuserid'])) {
show_nopermission();
}
}
if ($permissions[canpostattachment]) {
show_nopermission();
}
===============
hello~~i already replace above code but still cant work.....
and it only show me the error loging page.....
need help again......thankz
subu1
04-29-2003, 09:39 AM
ups i have a white screen if i click "manage attachment"
can you hepl me? :-)
greetz subu1
edit sorry i forgot to make newattachment template, but now i dont have permission for attachment :cry: but i am Admin *g*
mossyuk
04-29-2003, 09:43 AM
Quick question before I install it, how does it work with the attachments as files hack?
mossyuk
04-29-2003, 11:25 AM
Just noticed Rake is only 15! If 15 year olds are coding quality hacks like this, am I going to have a job in 5 years? hehe, of course I am, I'll know less but have more experiance so people like him will be my subordinate :) (joke!)
sorry to stray off topic there. Im going to give this hack a whirl regardless of whether or not it may work with attachments as files :)
sabret00the
04-29-2003, 12:32 PM
can't wait till all the problems are sorted, this will be awesome once it's installed ;)
matthepepe
04-29-2003, 02:08 PM
what would be really nice is, if while hes fixing it instead of the files being uploaded are limited by the max attachment size, it actually checked each file, so each file could be up to the size of the max limit. Either way its a great hack.
DPoole
04-29-2003, 05:13 PM
is this sorted for adding to an existing board or is there still a wait on the new bits to be done ?
also nice site you got there rake.
alamuae
04-29-2003, 05:14 PM
I had problem in Database
http://www.xxxxxxxx.com/vb/showthread.php?s=&postid=6
>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT attachment.attachmentid,attachment.filename,attach ment.visible AS attachmentvisible,attachment.counter,post.postid FROM attachment LEFT JOIN post on attachment.postid=post.postid WHERE attachment.attachmentid=0 OR attachment.attachmentid='0' OR attachment.attachmentid='0'
mysql error: Unknown column 'attachment.postid' in 'on clause'
mysql error number: 1054
Date: Tuesday 29th of April 2003 12:04:16 PM
Script: http://xxxxxxxxxxxxxxx/vb/showthread.php?s=&postid=6
Referer:
>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<
my vb 2.3.0
350Chevy
04-29-2003, 06:34 PM
Some problems... All old attachments are gone (not that big of a problem and this was kind of expected..) But when trying to attach anything I get the window to browse for and select a file. Once I click on ADD I get the "You do not have permission to access this page. This could be due to one of several reasons: ect..ect..ect.. Logged in user: 350Chevy [logout]" page..
Also a line in editpost.php was not found..
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
350Chevy
04-29-2003, 06:56 PM
Also, is there a way to edit showthread.php to show the old attachments if they exist in a thread? It shouldn't be too hard I just can't figure it out.. heh
Bison
04-29-2003, 07:12 PM
Some of you guys ask the weirdest questions ... now do you really think this young man knows if this hack will work with other hacks? Why don't you try it on a test board and give us all your feedback instead! :o
Good piece of work Rake!
alamuae: Are you sure you ran the queries? All 5 of them?
350Chevy: I mentioned I was working on that. Re-download the file in the first post and read upgrading instructions. There are parts for the editpost.php only for people with the "add attachment on edit post hack". They're marked in the instructions file. This also goes for Anguish.
subu1: templates.txt includes three templates to add, not just newthread.php
Also, the first post has been updated. Thank you.
As for my age, *grin* 15 seems to be my lucky number. I turned 15 on the 15th of April. :)
iggy123
04-29-2003, 08:37 PM
I am having a problem with this hack also, it tells me that i dont have the permissions to add the files????
DPoole
04-29-2003, 08:41 PM
Today at 09:12 PM Bison said this in Post #41 (https://vborg.vbsupport.ru/showthread.php?postid=389004#post389004)
Some of you guys ask the weirdest questions ... now do you really think this young man knows if this hack will work with other hacks? Why don't you try it on a test board and give us all your feedback instead! :o
Good piece of work Rake!
well maybe u having prob reading but i can clearly see people have installed it - whether to test board or not and are having probs and as for feedback i see loads if i go back and read the posts (HINT HINT)
So obvious people are gonna be wary about installing it unless they sure it works fine and as rake posted himself he still has some minor adjudments to do with it himself hence my post above.
Today at 10:37 PM iggy123 said this in Post #43 (https://vborg.vbsupport.ru/showthread.php?postid=389062#post389062)
I am having a problem with this hack also, it tells me that i dont have the permissions to add the files????
Even with this update?
Hobbes
04-29-2003, 09:16 PM
one question, when the install says 'comment out'
does that mean delete the code?
</ n00bish >
and what do I do with 'attachment.php' :( >.>
and im still getting the log in thing <.<!
iggy123
04-29-2003, 09:29 PM
Today at 11:06 PM rake said this in Post #45 (https://vborg.vbsupport.ru/showthread.php?postid=389081#post389081)
Even with this update?
yep, even with the update.
I am also getting the following sql error when i try to view old attachments:
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT filename,filedata,dateline,visible
FROM attachment
WHERE attachmentid='31'AND private=0
mysql error: Unknown column 'private' in 'where clause'
mysql error number: 1054
Date: Tuesday 29th of April 2003 05:26:53 PM
Script: http://xxxxxxxx.net/forums/forums/attachment.php?attachmentid=31
Referer: http://xxxxxx.net/forums/showthread.php?threadid=360
Link14716
04-29-2003, 10:34 PM
Today at 06:06 PM rake said this in Post #45 (https://vborg.vbsupport.ru/showthread.php?postid=389081#post389081)
Even with this update?
Yes, I am also having that problem, and I installed it after the update.
squawell
04-29-2003, 10:50 PM
Today at 08:34 AM Link14716 said this in Post #48 (https://vborg.vbsupport.ru/showthread.php?postid=389136#post389136)
Yes, I am also having that problem, and I installed it after the update.
also have same problem....
Link14716
04-29-2003, 11:24 PM
The "no permission" problem was so simple to solve, it's not even funny...
Open newattachment.php
Find:
if ($permissions[canpostattachment]) {
Replace With:
if (!$permissions[canpostattachment]) {
350Chevy
04-29-2003, 11:34 PM
Thnx Link.. That fixed the permissions problem.. But no attachments are showing.. Old or new.. :D
Link14716
04-29-2003, 11:37 PM
Another error:
If you do NOT have the "Private Attachments" hack, open attachment.php
Find:
if (!$attachmentinfo=$DB_site->query_first("SELECT filename,filedata,dateline,visible
FROM attachment
WHERE attachmentid='$attachmentid'".iif($privateok==0, 'AND private=0', ''))){
Replace With:
if (!$attachmentinfo=$DB_site->query_first("SELECT filename,filedata,dateline,visible
FROM attachment
WHERE attachmentid='$attachmentid'")){
Now, with that error gone, all the attachments that I just posted are being cutoff at 65535 bytes. Any ideas why?
EDIT: The images are being cutoff. Here is a link to my test thread...
http://www.vggmn.com/forums/showthread.php?s=&threadid=328
Hobbes
04-29-2003, 11:40 PM
YES!!! YES YES YES YES YES YES!!!! IT WORKS!!!!!!....
only thing not working would be the edit post thing....i did the edits....or at least tried (since i got 2.2.6 and the codes are crazily different)...yeah....and i dont have the add attachments when editing hack either....anyway...
/me CLICKS INSTALL....W000T!!!
Hobbes
04-29-2003, 11:42 PM
link, you probably have to edit the code and change the "MAX_FILE_SIZE" gto something......or change the max file size in the admin options...or sommat....who knows, i have no idea what im talking about..lol...thanks for that newattachment.php fix....it works ;);):p:p:ninja:
Link14716
04-29-2003, 11:43 PM
The max file size is 1 MB, and 65535 bytes is roughly 65 1/2 KB.
350Chevy
04-29-2003, 11:45 PM
Yupper.. And the editpost.php is still messed up but it's getting there.. Thanks again Link..
From editpost.php
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT filename,attachmentid FROM attachment WHERE
Hobbes
04-29-2003, 11:50 PM
Today at 05:43 PM Link14716 said this in Post #55 (https://vborg.vbsupport.ru/showthread.php?postid=389174#post389174)
The max file size is 1 MB, and 65535 bytes is roughly 65 1/2 KB.
the max file size you have set?...
blarm, jus change it in the admin options....ori could be totally wrong and you can disregard this post :bunny:
350Chevy
04-30-2003, 12:04 AM
Any idea on why no attachments show now? Multiple or not? :confused:
Link14716
04-30-2003, 12:05 AM
As I said, the current max file size if 1 MB, and those files are well below that. Furthermore, no error was given.
To fix the editpost.php database error:
Open editpost.php:
Find:
$attachmentinfo=$DB_site->query("SELECT filename,attachmentid FROM attachment WHERE $qry");
Add Above:
$att = explode(",",$postinfo[attachmentid]);
foreach($att as $value) {
if(isset($qry)) {
$qry .= " OR attachmentid='$value'";
} else {
$qry = "attachmentid='$value'";
}
}
Link14716
04-30-2003, 12:06 AM
Today at 09:04 PM 350Chevy said this in Post #58 (https://vborg.vbsupport.ru/showthread.php?postid=389186#post389186)
Any idea on why no attachments show now? Multiple or not? :confused:
Run portattachments.php.
Or, if that's not the problem, upload the attachment.php in the ZIP (applying all applicable fixes posted by me in this thread).
350Chevy
04-30-2003, 12:06 AM
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.
350Chevy
04-30-2003, 12:12 AM
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:
Link14716
04-30-2003, 12:18 AM
Today at 09:12 PM 350Chevy said this in Post #62 (https://vborg.vbsupport.ru/showthread.php?postid=389194#post389194)
BTW... Thnx for the fix for the editpost.php.. Works fine on posts with single attachments or no attachments..
Whoops...
Change if(isset($qry)) {
$qry .= " OR attachmentid='$value'";
} else {
$qry = "attachmentid='$value'";
} To $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.
350Chevy
04-30-2003, 12:24 AM
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.. :D
translucent
04-30-2003, 12:26 AM
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?
350Chevy
04-30-2003, 12:28 AM
Today at 02:26 AM translucent said this in Post #65 (https://vborg.vbsupport.ru/showthread.php?postid=389203#post389203)
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.
350Chevy
04-30-2003, 12:33 AM
Today at 02:18 AM Link14716 said this in Post #63 (https://vborg.vbsupport.ru/showthread.php?postid=389197#post389197)
Whoops...
Change if(isset($qry)) {
$qry .= " OR attachmentid='$value'";
} else {
$qry = "attachmentid='$value'";
} To $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:
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/editpost.php?xxxxxxxxxxxxxxxxxxx
Referer: http://www.ls6.com/forums/showthread.php?xxxxxxxxxxxxxxxxx
Hobbes
04-30-2003, 12:43 AM
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:
Boofo
04-30-2003, 01:10 AM
Does this work with the old attachments we already have now?
Link14716
04-30-2003, 01:12 AM
Yes, but I wouldn't recommend installing this right now. This has so many errors in it. This should be in Beta Hacks...
Austin Dea
04-30-2003, 01:13 AM
/me waits patiently for hack to work
squawell
04-30-2003, 02:06 AM
i got this error
Parse error: parse error, unexpected ',' in /XXXX/editpost.php on line 177
and the line 177 is below:
$att = ",",$postinfo[attachmentid]);
how to fix that??thankz~
Can someone post the new file in a reply, im hitting my cache and dont fell like clearing it ;). Im going to install this on a test board and see if I cant sort thru all the errors myself.
Hobbes
04-30-2003, 04:34 AM
hey link, I'm getting that same error now....for the attachments that are below the max file.
except for me, the files are just cut off....:bunny:
Boofo
04-30-2003, 04:47 AM
Yesterday at 10:06 PM squawell said this in Post #72 (https://vborg.vbsupport.ru/showthread.php?postid=389239#post389239)
i got this error
Parse error: parse error, unexpected ',' in /XXXX/editpost.php on line 177
and the line 177 is below:
$att = ",",$postinfo[attachmentid]);
how to fix that??thankz~
Try changing this:
$att = ",",$postinfo[attachmentid]);
to this:
$att = ",$postinfo[attachmentid]");
Just a guess here. ;)
iggy123
04-30-2003, 05:29 AM
I get the following error when trying to edit a post with multiple attachments.
Parse error: parse error, unexpected ',' in xxxxxxxxxxxxx /forums/editpost.php on line 156
infact i get it on every post i want to edit..
Excuse me. :dead: I'm such a blisterring idiot. I forgot to replace newattachment.php
Well, all the file modifications work on my current board. I'm going to install this on a fresh, unhacked board and see what errors come up.
Edit: Please download the update in the first post. This should fix all errors, including login, editpost.php and size errors. Thank you. :)
squawell
04-30-2003, 09:45 AM
rake i have problem with instruction file the editpost.php part
if i already have this hack ""add attachment on edit post""
should i also edit this two parts??
==========
Find
==========
$attachmentinfo=$DB_site->query_first("SELECT filename FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
==================
Replace With
==================
$attachmentinfo=$DB_site->query("SELECT filename,attachmentid FROM attachment WHERE $qry");
while($attach = $DB_site->fetch_array($attachmentinfo)) {
$name = htmlspecialchars($attach['filename']);
$postinfo[filename] .= "<a href=\"attachment.php?s=$session[sessionhash]&attachmentid=$attach[attachmentid]\" target=\"_blank\">$name</a> ";
}
=========
Find
=========
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
==================
Replace With
==================
$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");
that confused me.....if i should than i got this error
Parse error: parse error, unexpected '}' in /forum/editpost.php on line 437
and what is the attachment.php do??in the zip file.....
Yes.
Just delete attachment.php. It shouldn't have been included in the zip in the first place. It was really late so i misplaced a few files.
It also seems you haven't downloaded the new file in the first post yet.
Austin Dea
04-30-2003, 03:00 PM
Works now?
alamuae
04-30-2003, 03:05 PM
would you please help me in editing the files which i tried to follow the specific instructions given and unfortinately i failed.
notice that i used the hack of the attachment files in editing the reply
my.vb.2.3.0
Austin Dea
04-30-2003, 03:07 PM
Whoa, shouldn't post that O_O..
alamuae
04-30-2003, 03:15 PM
Today at 05:07 PM Austin Dea said this in Post #82 (https://vborg.vbsupport.ru/showthread.php?postid=389428#post389428)
Whoa, shouldn't post that O_O..
looooooooooool
just download the file so that find out!!!
:banana:
Boofo
04-30-2003, 03:24 PM
04-28-03 at 04:12 PM rake said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=388591#post388591)
I just realised i forgot three things:
1. Modification to attachment.php
2. Removal of files from the temporary table
3. Making old attachments compatible. (Old attachments won't be displayed in the postbit. Just ones uploaded after the hack was installed).
I'll have an update by tomorrow. I'm too tired to do it now. :(
rake, have these things been implemented now?
Yes, Boofo. Except for the modification to attachment.php, which was useless. :)
iggy123
04-30-2003, 03:33 PM
well i can't see any difference in the files???? I am still getting the error
Parse error: parse error, unexpected ',' in xxxxxxxxxxxxx /forums/editpost.php on line 156
can you explain exactly what you changed?
Austin Dea
04-30-2003, 03:35 PM
Today at 10:15 AM alamuae said this in Post #83 (https://vborg.vbsupport.ru/showthread.php?postid=389433#post389433)
looooooooooool
just download the file so that find out!!!
:banana:
I mean that you should email rake or something.. don't post your files on the forums.
Boofo
04-30-2003, 03:35 PM
Today at 11:28 AM rake said this in Post #85 (https://vborg.vbsupport.ru/showthread.php?postid=389441#post389441)
Yes, Boofo. Except for the modification to attachment.php, which was useless. :)
Great! I'll install it now that I can keep the old attachments that are already there intact. Does this also work with the PM attachments hack by Firefly? ;)
Herman
04-30-2003, 04:02 PM
Hey Alex, very nice work ;)
I'm sorry for saying it was going to be easy.
When you send me this hack last night, you said I should back up.
Being reckless, I didn't. Everything was going good, but when I got to functions.php, and finished editing it, I got...
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/virtual/site6/fst/var/www/html/chronoinfinity.com/forums/admin/functions.php on line 91
Fatal error: Call to undefined function: getuserinfo() in /home/virtual/site6/fst/var/www/html/chronoinfinity.com/forums/admin/sessions.php on line 112
Li'l help there, rakey? :banana:
sonic3d
04-30-2003, 04:33 PM
everytime i click on manage attachments, a new windows pops up and tell me, that i can use it even though i am an admin.
l8er
sonic
squawell
04-30-2003, 04:35 PM
rake i redownload the zip file and redo the editpost.php adn i got this error
Parse error: parse error, unexpected '}' in /home/forum/editpost.php on line 421
and in ur txt file u say
================
Find - This works with the "add attachment on edit post" hack
================
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
==================
Replace With
==================
$maxattachsize_temp = getmaxattachsize ();
mt_srand ((double) microtime() * 1000000);
$posthash = md5(mt_rand());
$poststarttime = time();
$forumid = $threadinfo[forumid];
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
above this
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
already have this
$maxattachsize_temp = getmaxattachsize ();
so i think it should be
$maxattachsize_temp = getmaxattachsize ();
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
==================
Replace With
==================
$maxattachsize_temp = getmaxattachsize ();
mt_srand ((double) microtime() * 1000000);
$posthash = md5(mt_rand());
$poststarttime = time();
$forumid = $threadinfo[forumid];
eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");
and i have install custom prefix hack i dont know if that will effect this hack...
iggy: You must have have done the hacking incorrectly.
squawell:
=============
Still in editpost.php, find:
$attids = implode(",", $attid);
$attids = iif($attids=="",0,$attids);
$attachmentsql=",attachmentid='$attids'";
}
And replace with:
$attids = implode(",", $attid);
$attids = iif($attids=="",0,$attids);
$attachmentsql=",attachmentid='$attids'";
This part deals with that error.
iggy123
04-30-2003, 06:55 PM
Ok i have gone through the code and found an extra } in the code, when i deleted that everything worked fine (ish)
Now the dreeded "you don't have permission to access this page" is back LOL
ok found the fix for the permissions problem....
https://vborg.vbsupport.ru/showthread.php?postid=389160#post389160
if you apply the changes in that post it works fine Until you try to edit the posts and then i get the following error message:
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT filename,attachmentid FROM attachment WHERE
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Wednesday 30th of April 2003 03:10:42 PM
Script: http://xxxxx/forums/forums/editpost.php?action=editpost&postid=3361
Referer: http://xxxxxx/forums/showthread.php?threadid=459
Repair Report: This type of error cannot be automatically repaired.
squawell
04-30-2003, 06:58 PM
Today at 03:42 AM rake said this in Post #92 (https://vborg.vbsupport.ru/showthread.php?postid=389525#post389525)
iggy: You must have have done the hacking incorrectly.
squawell:
=============
Still in editpost.php, find:
$attids = implode(",", $attid);
$attids = iif($attids=="",0,$attids);
$attachmentsql=",attachmentid='$attids'";
}
And replace with:
$attids = implode(",", $attid);
$attids = iif($attids=="",0,$attids);
$attachmentsql=",attachmentid='$attids'";
This part deals with that error.
ok i got that work~~~but when i click the post where have multiple attachment files and i got this error
Invalid SQL: SELECT licensedviewforum,licensedattach FROM forum WHERE forumid=
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 '' at line 1
mysql error number: 1064
Well, i've removed every instance of that in the updated zip. What file does that appear in?
Today at 08:55 PM iggy123 said this in Post #93 (https://vborg.vbsupport.ru/showthread.php?postid=389529#post389529)
Ok i have gone through the code and found an extra } in the code, when i deleted that everything worked fine (ish)
Now the dreeded "you don't have permission to access this page" is back LOL
ok found the fix for the permissions problem....
https://vborg.vbsupport.ru/showthread.php?postid=389160#post389160
if you apply the changes in that post it works fine Until you try to edit the posts and then i get the following error message:
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT filename,attachmentid FROM attachment WHERE
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Wednesday 30th of April 2003 03:10:42 PM
Script: http://xxxxx/forums/forums/editpost.php?action=editpost&postid=3361
Referer: http://xxxxxx/forums/showthread.php?threadid=459
Repair Report: This type of error cannot be automatically repaired.
first post. :speechless:
squawell
04-30-2003, 07:20 PM
Today at 04:17 AM rake said this in Post #95 (https://vborg.vbsupport.ru/showthread.php?postid=389540#post389540)
Well, i've removed every instance of that in the updated zip. What file does that appear in?
rake in my case
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT licensedviewforum,licensedattach FROM forum WHERE forumid=
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 '' at line 1
mysql error number: 1064
Date: Thursday 01st of May 2003 04:16:28 AM
Script: http://xxxx/forum/forum/attachment.php?s=&attachmentid=234
Referer: http://xxxx/forum/showthread.php?s=&postid=1382#post1382
iggy123
04-30-2003, 07:22 PM
If i delete the attatchment.php it works fine - kind of, I can edit the post , add new files but can't view them.
If i keep the attachment.php i get the sql error so I assume its something in there that is causing the errors..
GaleForce
04-30-2003, 07:23 PM
Good job! I may install this later if I have some time :D
Today at 09:20 PM squawell said this in Post #97 (https://vborg.vbsupport.ru/showthread.php?postid=389544#post389544)
rake in my case
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT licensedviewforum,licensedattach FROM forum WHERE forumid=
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 '' at line 1
mysql error number: 1064
Date: Thursday 01st of May 2003 04:16:28 AM
Script: http://xxxx/forum/forum/attachment.php?s=&attachmentid=234
Referer: http://xxxx/forum/showthread.php?s=&postid=1382#post1382
Not in my hack. ;)
NOTE TO EVERYONE WHO USED THE ATTACHMENT.PHP FROM THE OLD ZIP:
Replace it with your original one.
squawell
04-30-2003, 07:29 PM
Today at 04:24 AM rake said this in Post #100 (https://vborg.vbsupport.ru/showthread.php?postid=389552#post389552)
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
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...
:) 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
Today at 04:43 PM iggy123 said this in Post #102 (https://vborg.vbsupport.ru/showthread.php?postid=389569#post389569)
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
Today at 04:45 PM rake said this in Post #103 (https://vborg.vbsupport.ru/showthread.php?postid=389573#post389573)
:) 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
Today at 09:45 PM rake said this in Post #103 (https://vborg.vbsupport.ru/showthread.php?postid=389573#post389573)
:) 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
Today at 09:47 PM Link14716 said this in Post #104 (https://vborg.vbsupport.ru/showthread.php?postid=389576#post389576)
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!
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 -
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
Link14716
04-30-2003, 08:40 PM
Download a new vB zip from the member's area!
iggy123
04-30-2003, 08:51 PM
did that and that is when I am getting the errors mentioned above
Austin Dea
04-30-2003, 08:52 PM
So this works for sure now? Anyone wanna test it out to confirm?
Today at 10:51 PM iggy123 said this in Post #112 (https://vborg.vbsupport.ru/showthread.php?postid=389622#post389622)
did that and that is when I am getting the errors mentioned above
I can only assume that the error lies in the way you did the modifications.
Could you please post the errors again, just for reference?
iggy123
04-30-2003, 09:25 PM
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
However i have fixed most of the problems now apart from 1
All the old attachments just show up as the shape and size of the image but the image is blank
for example http://clanantivirus.net/forums/attachment.php?&attachmentid=50 but the next image - posted at the same time appears?
http://clanantivirus.net/forums/attachment.php?&attachmentid=51
Also i can edit any post with out an attachment but not with them?
the error i get then is
Warning: Invalid argument supplied for foreach() in /home/virtual/site97/fst/var/www/html/xxxx.net/forums/editpost.php on line 156
and line 156 of the code reads
$att = (",$postinfo[attachmentid]");
foreach($att as $value) {
it's obviously just the attachment.php. Get a fresh, unhacked one, and you will be fine.
As for the second error - you didn't hack the file correctly.
iggy123
04-30-2003, 09:39 PM
I have tried a "fresh" attachment.php file and i was still getting the error messages.
As for the editpost.php i have taken my one i save prior to trying this hack and that is when this error comes up...
Today at 11:39 PM iggy123 said this in Post #117 (https://vborg.vbsupport.ru/showthread.php?postid=389664#post389664)
I have tried a "fresh" attachment.php file and i was still getting the error messages.
As for the editpost.php i have taken my one i save prior to trying this hack and that is when this error comes up...
You either need a pair of glasses or you need to clear your cache, because that is not possible.
iggy123
04-30-2003, 09:48 PM
You either need a pair of glasses or you need to clear your cache, because that is not possible
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!!
sonic3d
04-30-2003, 10:45 PM
working flawlessly. great job.
l8er
sonic
Austin Dea
04-30-2003, 11:23 PM
Really? You've tested it out fully?
squawell
04-30-2003, 11:48 PM
Today at 04:45 AM rake said this in Post #103 (https://vborg.vbsupport.ru/showthread.php?postid=389573#post389573)
:) 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
Today at 06:48 PM iggy123 said this in Post #119 (https://vborg.vbsupport.ru/showthread.php?postid=389670#post389670)
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
Today at 09:06 PM Boofo said this in Post #124 (https://vborg.vbsupport.ru/showthread.php?postid=389726#post389726)
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
Today at 08:12 PM Link14716 said this in Post #125 (https://vborg.vbsupport.ru/showthread.php?postid=389728#post389728)
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
Today at 03:45 PM rake said this in Post #103 (https://vborg.vbsupport.ru/showthread.php?postid=389573#post389573)
:) 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
Today at 02:22 AM 350Chevy said this in Post #128 (https://vborg.vbsupport.ru/showthread.php?postid=389737#post389737)
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..
Boofo
05-01-2003, 12:34 AM
I just got this error when I ran the portattachments.php. What do I do? ;)
Database error in vBulletin 2.2.9:
Invalid SQL: UPDATE attachment SET postid=193 WHERE attachmentid=56
mysql error: Unknown column 'postid' in 'field list'
mysql error number: 1054
Date: Wednesday 30th of April 2003 06:32:17 PM
Script: http://www.bearfacts2.com/forum/forum/portattachments.php
Referer:
Boofo
05-01-2003, 12:46 AM
I have run in to a major problem trying to install this hack. I have the "Keep attachments when previewing" hack installed and the code in completely different for that. Anyone else have that hack installed and know what to change or not change?
350Chevy
05-01-2003, 02:14 AM
Sorry I didn't see this until now about the "fix the file size"
ALTER TABLE `attachment_tmp` CHANGE `filedata` `filedata` MEDIUMTEXT NOT NULL
Thanks...
But is there any way to get this option in the admin panel to work when set to YES?
View Images -Do you wish to display attached images in the threads? Select no to just generate a link to download the image
I'd MUCH rather have the pictures viewed when viewing a thread.. :(
Austin Dea
05-01-2003, 02:25 AM
getting a db error when trying to delete post with attachments...
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT attachmentid FROM post WHERE attachmentid=177,178 AND threadid<>'759'
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 '178 AND threadid<>'759'' at line 1
mysql error number: 1064
Date: Wednesday 30th of April 2003 07:00:37 PM
Script: http://forums.razael-central.com/editpost.php
Referer: http://forums.razael-central.com/editpost.php?s=&action=editpost&postid=11594
I'm running MySQL 4.0.12.
Austin Dea
05-01-2003, 02:27 AM
Whoops, missed the fix in post #103
edit: Nope, still getting the error.
350Chevy
05-01-2003, 02:40 AM
Today at 04:27 AM Austin Dea said this in Post #135 (https://vborg.vbsupport.ru/showthread.php?postid=389789#post389789)
Whoops, missed the fix in post #103
edit: Nope, still getting the error.
hehe.. yup I get that same exact error.. I didn't notice it or test it until you posted that..
Also here's a few more funny things happening with mine..
1) When posting a TOPIC I can only attach one file. If I try to attach a second file it will replace that one file with whichever new file I try to ADD. Try to add another and the same thing.. rinse.. repeat...
2) When posting a REPLY I can attach as many files as I wish. Once I hit submit I get an error:
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT title FROM thread WHERE threadid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Wednesday 30th of April 2003 11:43:57 PM
Script: http://www.ls6.com/forums/forums/newreply.php
Referer: http://www.ls6.com/forums/newreply.php?action=newreply&threadid=15822
BUT... The post goes through just fine with all the attachment(s). If I hit back in my browser and goto view the thread my post with it's attachment(s) are there.
Still would like to get the view images working too. :P
Austin Dea
05-01-2003, 02:54 AM
The code that my db error is referring to (post #134) is the 'Start delete post' section of functions.php, if that helps.
350Chevy
05-01-2003, 03:29 AM
The "last post by" isn't being updated when attaching a file or files to a reply. I'm wondering if that's where the db error is kicking in.. The db error pops up but the post with all the attachments still show...
BTW Mods, This thread should be moved to Beta hacks.. I've successfully installed over 50 hacks with VERY little problem. The very few hacks that I had a problem with were fixed within the same day. This one looks like it has a little ways to go before it's "Final."
Current problems with this hack:
1) Images are not being shown in the threads currently due to a bug with the Multiple file attach hack that will not allow the option to "View Image Attachments" to be set to "YES." There are however links to each attachment and the multiple file attachments are working somewhat.
2) You can't attach more than one image when starting/creating a new thread/topic. If you try it will just replace the last image you try to attach. No database errors when submitting though which is nice.
3) When attaching images (any ammount.. 1 or 100) to a reply you will get a db error. The post will still post and the attachments will all be there but you still get a db error which is not fun. :lick: :banana:
squawell
05-01-2003, 06:12 AM
rake i find another problem when i edit post and i dont attach any
file but front my thread title it show up the pic(paperclip.gif)
how fix that ??thankz.
Boofo
05-01-2003, 06:35 AM
rake, do you think you can lend me a hand to install this as I have the "Save Attachments on Preview" and the "Show Image" (By Slynderdale) hacks installed which makes the code I need to find and change totally different than what I am supposed to have? I figure since it is your hack you might know who to incorporate it better with those hacks. ;)
Today at 02:34 AM Boofo said this in Post #131 (https://vborg.vbsupport.ru/showthread.php?postid=389743#post389743)
I just got this error when I ran the portattachments.php. What do I do? ;)
Database error in vBulletin 2.2.9:
Invalid SQL: UPDATE attachment SET postid=193 WHERE attachmentid=56
mysql error: Unknown column 'postid' in 'field list'
mysql error number: 1054
Date: Wednesday 30th of April 2003 06:32:17 PM
Script: http://www.bearfacts2.com/forum/forum/portattachments.php
Referer:
You've missed a query.
Yes, i'll gladly help, Boofo.
Current TO DO List:
Fix the first two errors reported by 350Chevy.
Fix the Delete Error.
Boofo
05-01-2003, 11:30 AM
I was starting to do a fresh install. I ran the queries in the part of the code for the new install. Do I need to run portattachments.php on a new install. If so, can you please tell which query I missed?
Thank you for the help. What files do I need to PM to you to do the code changes?
Boofo
05-01-2003, 01:16 PM
I need to reverse the queries for this hack until I can get the code changes to get it installed. I can't post or make any new threads. Here is the error I am getting:
Database error in vBulletin 2.2.9:
Invalid SQL:
SELECT a.attachmentid
FROM attachment AS a
LEFT JOIN post ON (post.attachmentid = a.attachmentid)
LEFT JOIN privatemessage ON (privatemessage.attachmentid = a.attachmentid)
WHERE postid IS NULL AND privatemessageid IS NULL
mysql error: Column: 'postid' in where clause is ambiguous
mysql error number: 1052
Date: Thursday 01st of May 2003 07:11:40 AM
Script: http://www.bearfacts2.com/forum/forum/newthread.php?s=&action=newthread&forumid=11
Referer: http://www.bearfacts2.com/forum/forumdisplay.php?s=&forumid=11
Can anyone please tell me how to revert the queries back to what they were before I ran them for this hack for now? These are the queries I think that need to be converted back to the originals until rake can help me with the coding.
ALTER TABLE `post` CHANGE `attachmentid` `attachmentid` VARCHAR( 50 ) DEFAULT '0' NOT NULL;
ALTER TABLE `post` ADD INDEX ( `attachmentid` );
ALTER TABLE `attachment` ADD `postid` INT NOT NULL;
ALTER TABLE `attachment` ADD INDEX ( `postid` );
350Chevy
05-01-2003, 01:23 PM
Today at 11:58 AM rake said this in Post #141 (https://vborg.vbsupport.ru/showthread.php?postid=389887#post389887)
You've missed a query.
Yes, i'll gladly help, Boofo.
Current TO DO List:
Fix the first two errors reported by 350Chevy.
Fix the Delete Error.
Thanks Rake... This is still probably the best hack out there. :classic: :banana:
Boofo
05-01-2003, 02:51 PM
Can anyone please lend a hand with my problem (posted in Post # 143 above)? My forums are down until I can get this fixed.
If you don't count the errors, that is. :nervous:
You have to try to see this from my point of view too. The hack makes changes in 4 of the most important vbulletin files. You never know when a new error might come up. I tested it on a few boards and everything seemed allright, so i thought putting it in the Full Releases forum was a good idea.
====================
Version 1.3
This new version fixes all of the reported bugs:
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
Please re-download the file in the first post. Thank you :)
https://vborg.vbsupport.ru/showthread.php?postid=388561#post388561
Boofo: That isn't from my hack, but replacing:
WHERE postid IS NULL AND privatemessageid IS NULL
with
WHERE post.postid IS NULL AND privatemessageid IS NULL
should work
Austin Dea
05-01-2003, 03:11 PM
I'm still getting the db error when trying to delete a post. I did all of the 1.3 updates..
Today at 05:11 PM Austin Dea said this in Post #147 (https://vborg.vbsupport.ru/showthread.php?postid=389983#post389983)
I'm still getting the db error when trying to delete a post. I did all of the 1.3 updates..
the two functions.php changes handle that.
iggy123
05-01-2003, 03:29 PM
RAKE
Your latest update has fixed all of my problems - thnx for spending the time to fix it - i bet next time you wont offer support ;)
Austin Dea
05-01-2003, 03:34 PM
Sweet, cleared my cache and it works.
Dean C
05-01-2003, 03:47 PM
Wow how did i miss this hack!
Fantastic hack Alex :)
- miSt
Courage
05-01-2003, 04:08 PM
I installed the hack Attachments as Files.
Is this hack compatible now with my forum ?
350Chevy
05-01-2003, 06:32 PM
I've made all the changes.. everything looks good so far and seems to be in working order. I have to head back to work. I'll test more extensively when I get home in about 4 hours.
Thanks again for this wonderful hack Rake. :)
Today at 05:29 PM iggy123 said this in Post #149 (https://vborg.vbsupport.ru/showthread.php?postid=389993#post389993)
RAKE
Your latest update has fixed all of my problems - thnx for spending the time to fix it - i bet next time you wont offer support ;)
Next time i'll have to work harder to avoid any errors ;).
Wow how did i miss this hack!
Fantastic hack Alex
- miSt
Thank you Mist. :)
I installed the hack Attachments as Files.
Is this hack compatible now with my forum ?
Currently - no. But i'm looking into that. Also, i visit softnews from time to time. Great job on that. If you are who i think you are, Courage, i think i may know you. :)
Courage
05-01-2003, 06:39 PM
rake.. I saw an rnc.ro ip on my logs :p
Is that's you ?
350Chevy
05-01-2003, 06:44 PM
Hmm.. Still getting the db errors when posting a reply with attachments..
Delete posts with multiple attachments and posting a new thread with multiple attachments work now though. Viewing multiple attachments also work now. :D
Only prob I see on my end is posting an attachment or attachments in a reply. :(
Today at 08:39 PM Courage said this in Post #155 (https://vborg.vbsupport.ru/showthread.php?postid=390099#post390099)
rake.. I saw an rnc.ro ip on my logs :p
Is that's you ?
unless someone else is using rnc, yes, that's me. :p
350Chevy: That has to be something on your end, since neither me or anyone else has been experiencing that.
iggy123
05-01-2003, 08:47 PM
I have just found another problem - only I can post attachments?? all my other members are unable to? any ideas?
Austin Dea
05-01-2003, 08:54 PM
Mine works fine, must've been something you did.
Austin Dea
05-01-2003, 09:02 PM
Is there a way to integrate this into Chen's Attachment Viewer? The code that would need to be changed is the 3rd step of the attachment.php changes.
350Chevy
05-01-2003, 10:36 PM
Yesterday at 08:49 PM rake said this in Post #157 (https://vborg.vbsupport.ru/showthread.php?postid=390107#post390107)
350Chevy: That has to be something on your end, since neither me or anyone else has been experiencing that.
No problem.. I'll reedit newreply.php and check which mods are using that file and what changes have been made.. I slapped the 1.3 version in there during lunch time in about 5 mins so it's possible I missed something.. ;)
Now I have time to play around and that a look at things. I just hope it's not my hacked up functions.php.. :lol:
matthepepe
05-01-2003, 10:37 PM
for some reason when trying to install this, all my files are not hacked at all, and im trying to just follow the 1.3 instructions since i didnt install any previous versions, i get to the part of the instructions where it comes back to editing editpost.php and functions.php and when i search for the text to replace it doesnt exist.
350Chevy
05-01-2003, 10:44 PM
I must've slapped it together too fast. I reedited newreply.php from scratch and it works flawlessly now. Thnx a ton Rake. ;)
Link14716
05-01-2003, 10:45 PM
04-28-03 at 04:18 PM rake said this in Post #1 (https://vborg.vbsupport.ru/showthread.php?postid=388561#post388561)
=-=-=-=-=-=-=-=-=-=
THIRD REVISION - This update fixes the 3 largest errors reported so far:
1. The view image atachments option now works
=-=-=-=-=-=-=-=-=-=
The view image attachments worked with the second and first version, for future reference. I must of done something to make it work, but I don't remember doing anything that might change that...
Oh well! ;)
sonic3d
05-02-2003, 12:03 AM
when i edit a post and delete the attachments. i get this
Invalid SQL: DELETE FROM attachment WHERE attachmentid=67,68
mysql error: You have an error in your SQL syntax near '68' at line 1
l8er
sonic
matthepepe
05-02-2003, 12:14 AM
i just winged it since the instructions seemed funk, and it seems to be working but the new attachments dont show up ,, the old ones do though... i see they are in the database though it sjust not pulling them out on the post.
squawell
05-02-2003, 02:30 AM
Today at 09:03 AM sonic3d said this in Post #165 (https://vborg.vbsupport.ru/showthread.php?postid=390215#post390215)
when i edit a post and delete the attachments. i get this
Invalid SQL: DELETE FROM attachment WHERE attachmentid=67,68
mysql error: You have an error in your SQL syntax near '68' at line 1
l8er
sonic
try this
https://vborg.vbsupport.ru/showthread.php?postid=389573#post389573
Today at 12:37 AM matthepepe said this in Post #162 (https://vborg.vbsupport.ru/showthread.php?postid=390196#post390196)
for some reason when trying to install this, all my files are not hacked at all, and im trying to just follow the 1.3 instructions since i didnt install any previous versions, i get to the part of the instructions where it comes back to editing editpost.php and functions.php and when i search for the text to replace it doesnt exist.
If you installed the very first version, you need to do the updates in order: first 1.1, then 1.2 and finally 1.3. If this is the first time you are installing, skip the updating part.
matthepepe
05-02-2003, 02:10 PM
i did skip the first steps. i only did the 1.3 stuff. It seemed like there were a lot of stuff you said to find that wasnt there. I just took parts of line and used that to find something very similar, then i replaced it w/ your code. The code itself seems to be working, i just cant get them to show up in the posts.
Only instructions from
First of all, back up. This hack does some heavy
modifications to files and the vbulletin database. Back up!
and on should be followed.
Boofo
05-02-2003, 03:20 PM
rake, did you get the pm?
Freddie Bingham
05-02-2003, 04:38 PM
Just change the SQL calls that reference
WHERE attachmentid=67,68
to
WHERE attachmentid IN (67,68)
and it will work for everyone.
Boofo
05-02-2003, 04:49 PM
You mean like this?
$DB_site->query("DELETE FROM attachment WHERE attachmentid IN ($postinfo[attachmentid])");
Today at 06:38 PM freddie said this in Post #172 (https://vborg.vbsupport.ru/showthread.php?postid=390491#post390491)
Just change the SQL calls that reference
WHERE attachmentid=67,68
to
WHERE attachmentid IN (67,68)
and it will work for everyone.
I never thought of that! I can lose the code for splitting the attachmentid field! :D Thanks Freddie!
Link14716
05-02-2003, 08:50 PM
rake, I recommend making two files: one for a clean install and another for upgrade. That'll save a lot of confusion.
Austin Dea
05-03-2003, 04:46 AM
Attachment viewer integration? =)
Hobbes
05-03-2003, 11:47 PM
still, one question, what exactly does 'comment out' mean? </n00bish>
edit3: and in the 1.2 upgrade you say to find $postinfo[filename] .= "<a href=\"attachment.php?s=$session[sessionhash]&attachmentid=$attach[attachmentid]\" target=\"_blank\">$name</a> ";
}
$postinfo[filename] = htmlspecialchars($attachmentinfo['filename']);
and i have that any where...x.X
$postinfo[filename] = htmlspecialchars($attachmentinfo['filename']); is all i have >.>. so should I just replace $postinfo[filename] = htmlspecialchars($attachmentinfo['filename']); with $postinfo[filename] .= "<a href=\"attachment.php?s=$session[sessionhash]&attachmentid=$attach[attachmentid]\" target=\"_blank\">$name</a> ";
}
$postinfo[filename] = htmlspecialchars($attachmentinfo['filename']); ??
i have skipped that step for now :p :bunny:
That should have been replaced in the original instructions. It's the part that handles the "Keep Current Attachment ( attachment name here )" in editpost.
squawell
05-04-2003, 08:46 AM
05-01-03 at 03:12 PM squawell said this in Post #139 (https://vborg.vbsupport.ru/showthread.php?postid=389846#post389846)
rake i find another problem when i edit post and i dont attach any
file but front my thread title it show up the pic(paperclip.gif)
how fix that ??thankz.
rake this is my problem do u know how to fix that??
sonic3d
05-04-2003, 02:27 PM
05-02-03 at 12:49 PM Boofo said this in Post #173 (https://vborg.vbsupport.ru/showthread.php?postid=390492#post390492)
You mean like this?
$DB_site->query("DELETE FROM attachment WHERE attachmentid IN ($postinfo[attachmentid])");
worked perfectly
now, is there a way to delete only one out of the rest?
also when i edit a post and try to add attachments, it will only let me add one. is that suppose to do that?
l8er
sonic
Deleting only one of the attachments isn't currently possible.
As for the second question: it works fine for me. :classic:
ImportPassion
05-04-2003, 08:10 PM
wow, I am glad I didn't install this yet. I hope you are working on this for the next release? I think this is very important feature.
I haven't been through the code yet to figure out how you did this, but I am sure it is possible to delete one attachment.
D
blackice912
05-05-2003, 07:41 AM
Holy heck, I've been looking for a hack like this
/me installs
duboisi
05-06-2003, 04:11 PM
Works Great!!!!!
Thanks Rake!!
sabret00the
05-07-2003, 04:25 PM
has anyone figured out a way to make it keep atttachments yet?
msimplay
05-08-2003, 04:02 AM
i tried the latest version out
however i have troubles with it working on my forums
cuz i have the preview on edit hack
and attach on edit hack
it worked well on my test forum but i couldnt add more then one attachment on the edit post screen
Vbulletin 2.3 release candidate 3
350Chevy
05-13-2003, 04:40 PM
05-07-03 at 06:25 PM sabret00the said this in Post #185 (https://vborg.vbsupport.ru/showthread.php?postid=392766#post392766)
has anyone figured out a way to make it keep atttachments yet?
??? It keeps your old attachments just fine.
This hack works perfectly if installed correctly. :)
kabresh
05-16-2003, 12:34 AM
sounds like a great hack
although I'm gonna wait a bit untill development goes on
want to be able to delete the attachments 1 by 1
not all together:)
nice job though!
gmarik
05-17-2003, 08:04 AM
Perfect. All ok on 2.3.0?
Boofo
05-19-2003, 04:55 AM
05-08-03 at 12:02 AM msimplay said this in Post #186 (https://vborg.vbsupport.ru/showthread.php?postid=392993#post392993)
i tried the latest version out
however i have troubles with it working on my forums
cuz i have the preview on edit hack
and attach on edit hack
it worked well on my test forum but i couldnt add more then one attachment on the edit post screen
Vbulletin 2.3 release candidate 3
Same problem here. Apparently this won't work with those hacks installed. rake looked at my files and decided it couldn't be done with the code changes from these hacks. I'll wait until vB3 gets released and then someone will make the hack work with these hacks, I'm sure.
350Chevy
05-19-2003, 07:44 PM
05-17-03 at 10:04 AM gmarik said this in Post #189 (https://vborg.vbsupport.ru/showthread.php?postid=396066#post396066)
Perfect. All ok on 2.3.0?
Yes, works perfect on 2.3.0 with 60+ hacks installed.
Boofo
05-19-2003, 08:05 PM
Today at 03:44 PM 350Chevy said this in Post #191 (https://vborg.vbsupport.ru/showthread.php?postid=397333#post397333)
Yes, works perfect on 2.3.0 with 60+ hacks installed.
But...do you have the keep attachments on preview hack or the keep attachments on reply hack installed? ;)
matthepepe
05-20-2003, 12:05 AM
I think the next step is to take this and implement it into the quick reply.
msimplay
05-20-2003, 01:24 PM
Yesterday at 06:55 AM Boofo said this in Post #190 (https://vborg.vbsupport.ru/showthread.php?postid=397038#post397038)
Same problem here. Apparently this won't work with those hacks installed. rake looked at my files and decided it couldn't be done with the code changes from these hacks. I'll wait until vB3 gets released and then someone will make the hack work with these hacks, I'm sure.
true it works well without the hacks installed but those hacks shouldn't really be hacks they should be standard
even yabb preview on edit as standard and preview pms as standard
its weird why it wasn't implemented into Vbulletin as a standard thing
mzlogical
05-20-2003, 05:12 PM
how can i get rid of the changes from the queries that this hack has made, my forums are down now. i know someone else asked, but i couldn't understand how to actually do it. can someone help?
Austin Dea
05-20-2003, 09:46 PM
Had to uninstall because it didn't work with attachment viewer ot private attachments. Still a very nice hack ;)
Hobbes
05-25-2003, 11:01 PM
Ok....I installed this hack, and had it all working.....but then...my host switched servers, and i had to rely merely on my sql backups and php backs which werent the most recent....and..this hack got screwed up in the process...i followed the instructions etc, but now all i get is the http 404 page....im wondering if anyone could help pllleease....:(
fixed:)
Kars10
05-26-2003, 07:39 AM
Works like a charm on 2.3.0 , thanks! :)
Hostc
05-26-2003, 05:58 PM
Awsome :)
*Installs*
obiwan8472
06-02-2003, 09:54 PM
argh! that readme is one of the most difficult to read! theres bits of program all over the place! but still after 2 hrs, figured it out and it works. yay.
obiwan8472
06-02-2003, 10:44 PM
Ok i was wrong! it does not work! the code is not compatible with the add attachments via edit hack on vb3!!!! I have just spent the best part of an hour and nothing!
i give up. this is pointless, ill just wait for vb3.
Skyline_GT
06-06-2003, 09:07 AM
I got this error when I am trying to make a new thread with multi attachment
Database error in vBulletin 2.2.9:
Invalid SQL: SELECT title FROM thread WHERE threadid=
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 '' at line 1
mysql error number: 1064
Skyline_GT
06-06-2003, 09:09 PM
anyone can help?
Skyline_GT
06-07-2003, 06:52 AM
???plz..
Skyline_GT
06-08-2003, 07:44 AM
Hello?
Skyline_GT
06-09-2003, 09:28 PM
bump
UND3Rburn
06-09-2003, 10:05 PM
Great Hack Rake!
BTW Im curious as to what newsboard you are using on your site?
Skyline_GT
06-10-2003, 10:10 PM
Help please
https://vborg.vbsupport.ru/showthread.php?postid=405083#post405083
sonic3d
06-10-2003, 11:08 PM
can some1 tell me how i can take out the queries?
l8er
sonic
blackice912
06-10-2003, 11:14 PM
What's with people removing this? Something screwy?
sonic3d
06-10-2003, 11:24 PM
no, its just no1 really uses this at my board. no need to install if no1 uses it.
l8er
sonic
Skyline_GT
06-11-2003, 02:22 AM
Today at 12:10 AM Skyline_GT said this in Post #209 (https://vborg.vbsupport.ru/showthread.php?postid=407281#post407281)
Help please
https://vborg.vbsupport.ru/showthread.php?postid=405083#post405083
Anyone know and can help me...
Boofo
06-11-2003, 02:31 AM
Today at 07:14 PM blackice912 said this in Post #211 (https://vborg.vbsupport.ru/showthread.php?postid=407303#post407303)
What's with people removing this? Something screwy?
Apparently, if you have a vanilla board (no extra attachment hacks of any kind), then this will work supposedly. But if you have the edit attachments hack or preview attachments hack, this will not work with those. rake told me that he couldn't get the code to work with the hacks I have installed for attachments. Not worth the hassle of installing it, I'm afraid. It probably should have stayed in beta.
Hostc
06-11-2003, 02:39 AM
Question, how do I run the Queries if I don't have access to the database I use?
Skyline_GT
06-11-2003, 03:58 AM
Today at 04:22 AM Skyline_GT said this in Post #213 (https://vborg.vbsupport.ru/showthread.php?postid=407365#post407365)
Anyone know and can help me...
......
squawell
06-11-2003, 03:59 AM
Today at 11:39 AM Hostc said this in Post #215 (https://vborg.vbsupport.ru/showthread.php?postid=407371#post407371)
Question, how do I run the Queries if I don't have access to the database I use?
try this
https://vborg.vbsupport.ru/showthread.php?s=&threadid=33731&highlight=run+sql
or read this
https://vborg.vbsupport.ru/showthread.php?s=&threadid=37726
maybe that will give some help....
sowen
06-12-2003, 05:19 PM
Not sure if this is somthing I did wrong but the attachments now seem to be bypassing the Attachment Queue, anyone else had this problem?
Other than that great Haxk - installs
Skyline_GT
06-14-2003, 02:29 AM
how about me?
Skyline_GT
06-17-2003, 08:29 PM
.....
Skyline_GT
06-17-2003, 08:29 PM
.....
Skyline_GT
06-19-2003, 08:29 PM
bump...
now that school is officially over, i can provide support for this hack. Skyline_GT, i belive you either did something wrong or another hack is interfering with this one.
Skyline_GT
06-23-2003, 11:23 PM
I follow everything in the instruction.txt
SuperG
06-24-2003, 02:13 AM
Ok, simple question. What version of vb do I need to run this? I am currently using 2.2.8 around 4 of the code changes don't match up anywhere close to "close". So, I'm wondering if I need to upgrade to 2.3 for this to work correctly or what?
Thanks for this though, I've been looking for this forever, and I'm gonna be freakin' when I get this working.
Thanks for all your hard work Rake :-)
SuperG
06-26-2003, 03:05 AM
<cough> What happened to school being out? :-)
If you're like me, you look at computers enough at work, you're sick of looking at them at night. O well, I'd like this, but it messed up my site totally, so I gotta find out something before I try again.
Thanks in advance!
Sorry, i've been coding hacks for vb3 lately. Hacks that actually work. :knockedout:
Well, it was my fault for not beta testing this hack before releasing it. I'll try installing it on a clean 2.3.0 board and see if i've missed something. But i doubt people are still interested in this, since the majority is upgrading to vBulletin3.
ImportPassion
06-27-2003, 01:29 PM
I'm prolly not upgrading and I doubt the majority that have hacks they need are not upgrading either unless everyone that has ever made a hack releases them for vb3 as well.
I think you should carry this on. I think others would agree too.
D
Skyline_GT
06-28-2003, 07:01 AM
i am interested...
plz add what u miss...
Skyline_GT
07-03-2003, 09:37 PM
...
Agent XY
07-12-2003, 09:22 AM
Hello,
where can I find the final version?
#andi
squawell
07-12-2003, 11:40 AM
Today at 06:22 PM Agent XY said this in Post #231 (https://vborg.vbsupport.ru/showthread.php?postid=417175#post417175)
Hello,
where can I find the final version?
#andi
u can find it in first post~~~ :)
Agent XY
07-12-2003, 11:48 AM
hello,
ok, thanks squawell.
#andi
rake, i hope you continue work on this to weed out any more bugs ( should there be ).
It would be a very useful hack for me and many fellow members who do not plan to go the vb3 way anytime soon.
:)
Skyline_GT
07-19-2003, 09:21 AM
ya
it seems he is not going to fix the error.
Kane Da Don
07-26-2003, 04:05 AM
i would like to know does this work with the Attachments as files hack and the Add Attachment on Edit Post hack ?? plz i would like to know because i would really like to install this hack for myself
cindyd
08-02-2003, 04:43 PM
I am just now starting to install this hack, and the last query
ALTER TABLE `attachment` ADD INDEX ( `postid` );
is giving me this error:
Database error in vBulletin Control Panel 2.3.0: Invalid SQL: ALTER TABLE `attachment` ADD INDEX ( `postid` ); mysql error: You have an error in your SQL syntax near '; ' at line 1 mysql error number: 1064
Turns out the query through the Admin CP was being picky.
I just finished installing and it's working great! Very nice hack.
*clicks install
cindyd
08-03-2003, 12:25 AM
I'm running into a problem. As an Admin I can see the attachment images as images, but if I log in as a "registered member" then the attachment shows as a download.
How can I change this? The whole point of doing this was so the images would appear in the posts. I can't make everyone an Admin.
If you click on the link for the attachment, it takes you to an error message:
No attachment specified. If you followed a valid link, please notify the webmaster
Are there some permissions or something I have to change?
If you want to look for yourself, just click on my link.
http://www.glassmavenhaven.com/forum/showthread.php?s=&threadid=1538
Please help, I really need this to be working.
I am running 2.30 with some hacks installed, but none of the attachments hacks, except this one.
I also noticed when using IE (I normally use Opera) that the link to Manage Attachments doesn't do anything.
Today at 02:25 AM cindyd said this in Post #238 (https://vborg.vbsupport.ru/showthread.php?postid=422727#post422727)
I'm running into a problem. As an [b]Admin I can see the attachment images as images[b], but if I log in as a "registered member" then the attachment shows as a download.
How can I change this? The whole point of doing this was so the images would appear in the posts. I can't make everyone an Admin.
I'm not really sure about this one. It's been a couple of months since i developed the hack, and i've been using vb3 exclusively since then. Perhaps another member could answer that.
If you click on the link for the attachment, it takes you to an error message:
No attachment specified. If you followed a valid link, please notify the webmaster
Are there some permissions or something I have to change?
I am running 2.30 with some hacks installed, but none of the attachments hacks, except this one.
There's an error in the template. You're missing an ampersand (&) between the sessionhash and attachmentid.
I also noticed when using IE (I normally use Opera) that the link to Manage Attachments doesn't do anything.
It probably has to do with the security settings in ie. The code used for the pop-up is taken from vb3.
cindyd
08-03-2003, 02:16 PM
I'm not really sure about this one. It's been a couple of months since i developed the hack, and i've been using vb3 exclusively since then. Perhaps another member could answer that.
Rake: do you think you might be able to inquire about this? You did offer support on this hack.
I have taken care of the other 2 problems.
cindyd
08-03-2003, 06:34 PM
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
Hobbes
08-04-2003, 05:21 AM
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...
// ###################### 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?
cindyd
08-16-2003, 03:07 PM
Will there be a fix for editing a post? The posts disappear when they are edited.
Megadeuce
08-19-2003, 08:07 PM
Also, is there a way to give a name to file right next to the attachment? for example
Attachment Hack vbattach.zip ?
lifesourcerec
08-26-2003, 09:13 PM
The hack works fine, but when I try to "update counters", I get this error.
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?
MaDCaT75
09-15-2003, 11:24 PM
This hack made my smilies in my quick reply dissapear! I am very mad!!!!!
Mistah Roth
09-21-2003, 07:42 PM
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:
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?
MaDCaT75
09-22-2003, 02:33 AM
Maybe un-install the old one first?
squawell
09-22-2003, 04:58 AM
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/showthread.php?postid=463546#post463546
Mistah Roth
09-22-2003, 06:54 PM
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.