![]() |
I installed this hack on 2.2.9 AND have the hack that allows people to add attachments on editpost an ran into a small problem.
with a combination of this code from this hack and also the add attachment on edit post I was unable to add a 'new' attachment when editing a post. No problem replacing an attachment or deleting an attachment that was placed in the post via newthread or newreply. Therefore I cam up with following few lines that fixed the problem in editpost.php add this bit of code: -------------------------- if ($attachment != '' and $attachmentaction < ' ') { $attachmentaction = "new"; $postinfo[attachmentid] = 999; } ----------------------- before: ----------------------- if ($postinfo[attachmentid]!=0) { // check attachment status // keep, delete, update ----------------------- Don't worry about the $postinfo[attachmentid] being set to 999 because a new ID is calculated later in in the code by calculating the next available key value in the attachment table primary index. |
hey Scott, one small question...
why didin't you just use attachmentid as the file name? - jeff |
by the way - this is a great hack. My attachments table had grown to over 400 mb alone. I never liked the idea of keeping binary data (blobs) in a sql server table.
I have also created my own hack to use mogrify to automatically reduce the size of uploaded images and avatars on my forum and my users love my site. They have no idea about how their attachments are stored but it's pleasing to me to have them as separate files instead of cluttering up my database. :) |
about 8 million people asked this question
no one answered yet but how do you fix this??? "Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/hhapdotcom/www/airplay/admin/attachment_install.php on line 333" its in the IMPORT portion. |
Installed on 2.2.9 and working well. Thanks
|
my problem
Parse error: parse error, unexpected '}' in /home/xxx/public_html/forums/admin/functions.php on line 1819 here are the lines around there PHP Code:
|
the whole forums are not working now... going to the main oage i get this errors
Parse error: parse error, unexpected '}' in /home/xxx/public_html/forums/admin/functions.php on line 1819 Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/forums/admin/functions.php:1819) in /home/xxx/public_html/forums/admin/functions.php on line 1573 Fatal error: Call to undefined function: makelogincode() in /home/xxx/public_html/forums/global.php on line 371 |
You've applied some part of the hack wrong :)
You have an extra } somewhere - miSt |
Quote:
|
One thing i noticed:
During the installation, set your attachments folder RELATIVE TO THE ADMIN FOLDER, then import the files and then set it relative to your root folder. That will probably fix the above error, assuming the folder is chmodded correctly. |
All times are GMT. The time now is 09:05 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|