PDA

View Full Version : Restricting Attachments to forumid 9...


Chris M
09-01-2002, 06:30 PM
Can someone please tell me how I would restrict attachments to only forumid 9?

Satan

g-force2k2
09-02-2002, 02:35 AM
hellsatan in both newreply.php and newthread.php

find:

if ($permissions[canpostattachment] and (!$safeupload or function_exists("is_uploaded_file"))) {
eval("\$attachmentoption = \"".gettemplate("newpost_attachment")."\";");
} else {
$attachmentoption="";
}

replace both with:


// ++++++ Restricting Attachments to forumid 9 +++++++
if($foruminfo[forumid] == 9) {
if ($permissions[canpostattachment] and (!$safeupload or function_exists("is_uploaded_file"))) {
eval("\$attachmentoption = \"".gettemplate("newpost_attachment")."\";");
} else {
$attachmentoption="";
}
} else {
$attachmentoption="";
}
// ++++++ Restricting Attachments to forumid 9 +++++++

regards... hope that helps man ;)

g-force2k2

Chris M
09-06-2002, 04:02 PM
Thanks, but I figured this out while bored after school on Wednesday:)

I have turned it into a Hack I shall release after testing;)

Satan