PDA

View Full Version : Allowed Attachment Extensions per Forum


Marco van Herwaarden
06-13-2005, 10:00 PM
Allowed Attachment Extensions per Forum - Version 1.00

What does this hack do?
It will allow you to set the allowed attachment extensions (file types) on a per forum base.

Installation:
Install/uninstall script included. Time to install 2 minutes. 2 file edits, 1 new column in forum table.

How it works?
You will find a new option to set allowed extensions in Forum Manager->Edit Options. You can set per forum a comma seperated list of allowed extensions. Leave this option blank to allow all default extensions.

Screenshots:
Are you kidding me? Ok, added one of the Forum settings page.

Disclaimer:
Make a backup of your forum before installing any hack. I can not held liable for any damage.

Donations.
Donations are not asked for, but if they are made they will be greatly appreciated. Paypal: marcoh64@gmail.com

SlimWicked (https://vborg.vbsupport.ru/member.php?u=82069) Donated for this hack. Very much appreciated.

Please click install if you have this hack running on your board.

Marco van Herwaarden
06-14-2005, 10:51 AM
Reserved for update notices.

SlimWicked
06-14-2005, 12:00 PM
after uploading all files to the install directory and after running
www.mysite.com/install/hack_install.php

i get this error message...

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /global.php on line 329

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 2290

Fatal error: Call to undefined function print_cp_header() in /home2/facialf/public_html/install/his_files/hack_install_b3.php on line 67

Marco van Herwaarden
06-14-2005, 12:16 PM
Oops my mistake. All from the upload directory should go into the 'install' directory.

I will update the zip-file in a minute, or you can just upload into install.

Marco van Herwaarden
06-14-2005, 12:18 PM
Zip file updated.

SlimWicked
06-14-2005, 12:31 PM
after uploading all files to the install directory and after running
www.mysite.com/install/hack_install.php

i get this error message...

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /global.php on line 329

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 2290

Fatal error: Call to undefined function print_cp_header() in /home2/facialf/public_html/install/his_files/hack_install_b3.php on line 67

Marco van Herwaarden
06-14-2005, 12:33 PM
Hmm what php version are you using?

SlimWicked
06-14-2005, 12:38 PM
i'm using php 5.0.4

also in the hack_install_b3.php

// Protect this file as if it was ran in /admincp.
chdir("../$admincpdir");

does "chdir("../$admincpdir");" needs to be chdir("../$admin_cpdir");
if i renamed my admin directory to admin_cp or that doesn't really matter..

Marco van Herwaarden
06-14-2005, 12:41 PM
No That variable gets replaed by the real name of your admincp directory.

I uploaded a new zip, with a modified hack_install_b3.php to also support PHP5. Not tested on PHP5, but it can do no harm.

You can reupload all files, or just the hack_install_b3.php

Edit: Hang on a second, must check soemthing.

Marco van Herwaarden
06-14-2005, 12:46 PM
If this is your first install using the HIS installer (the installer that is included) and you have renamed your admincp, follow these instructions:
- Go to the directory ./install/his_files
- Rename 'hack_config_default.php' to 'hack_config.php'
- Open the file and edit it to use the correct admincp directory.

If you use any future hacks that have a HIS isntaller included, this (renamed) config will not ber overwritten, so this is one time setting.

SlimWicked
06-14-2005, 01:02 PM
thanks buddy...i think that may have did it. i'm in the forum manager now but were can I edit the settings?

Marco van Herwaarden
06-14-2005, 01:06 PM
AdminCP->Forums & Moderators->Forum Manager: Edit Forum

You will see a new option at the bottom of the page with Forum Settings.

Marco van Herwaarden
06-14-2005, 01:10 PM
Ok, added a screenshot

SlimWicked
06-14-2005, 01:23 PM
i know you may think i'm a head ace now...

but when I go there, its not there in my forum manager under edit. and when I tried to unintall it to reinstall it..i get this message..

These are the hacks you have selected to uninstall:

Warning: main(./settings.php) [function.main]: failed to open stream: No such file or directory in /index.php on line 101

Fatal error: main() [function.require]: Failed opening required './settings.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/facialf/public_html/install/hacks/Allowed Extensions per Forum/1/index.php on line 101

Marco van Herwaarden
06-14-2005, 01:48 PM
I am sorry this is happening to you now. I can asure you that it is not the hack itself that is causing you problems right now.

After the hack was finished it seems i have been packaging it a bit too fast into the installer (plus the PHP5 bug in the installer). :(

I will do some decent testruns with the installer and get back to you.

Marco van Herwaarden
06-14-2005, 01:50 PM
Ok, uploaded (again) a version with a fixed uninstaller.

If you don't see those options in your Edit Forum screen, are you sure you made the 2 file edits? They are a bit hidden, you myst like instructed click on the link (on the page after the queries have run during install) to see them.

SlimWicked
06-14-2005, 02:31 PM
Thanks myfriend! I think I have it working now! Sorry for all the questions! But I did send you a donation for all your hard work.

Thanks a million!

Marco van Herwaarden
06-14-2005, 02:43 PM
Thanks myfriend! I think I have it working now! Sorry for all the questions! But I did send you a donation for all your hard work.

Thanks a million!Questions don't matter, things are only getting better from asking questions.

Thank you for your donation.

Marco van Herwaarden
06-14-2005, 04:22 PM
@SlimWicked

It would be appreciated if you also clicked install. ;)

SlimWicked
06-14-2005, 06:57 PM
my bad..just did it.

Thanks a again!

yahoooh
08-06-2005, 02:16 PM
if the type of file not allowed in the main attachement settings , is this hack will allow it ?

Marco van Herwaarden
08-07-2005, 07:14 AM
No (i think).

ryancooper
04-04-2006, 01:42 PM
will this work on 3.5.4

unfv
09-22-2008, 06:30 PM
will this work on 3.7?

dtv100
12-28-2008, 08:37 AM
any chance of get this update to 3.7.4 ?