Version: 1.00, by Scott MacVicar
Developer Last Online: Mar 2016
Version: 2.2.x
Rating:
Released: 02-17-2002
Last Update: Never
Installs: 121
No support by the author.
Well after alot of time leaving it in the beta hacks forums without any problems, I'm now moving it to the Full Releases, I'm satisfied that there isn't any bugs that need to be addressed. Thanks to Jawelin he pointed out most of the mistakes through alot of his testing.
I've attached it as an installer file here, as it needs to make changes to the database. Two new rows to settings and a new column in the attachment table.
Scott
Updated some more
Note the > is missing off the bottom of the file after the ?, add it before trying to install
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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.
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.
// ###################### Start getmodpermissions #######################
function getmodpermissions($forumid,$userid=-1) {
// gets permissions, depending on given userid and forumid
global $DB_site,$bbuserinfo;
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
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.