Info/Instructions: 1. Follow the modification instructions attached. 2. Go to your admin area and choose edit config settings. 3. Turn on file attachments by specifying a writeable folder, and the URL. 4. Set the maximum allowed size of attachments. 5. Set what file types to allow. 6. Click the update config.inc.php button. 7. Using the edit forum tool, allow file attachments to any or all forums.
NOTE: Allowing file attachments is set to OFF by default on any existing forums.
Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Would it be possible for the different forums to use separate file catalogs?
What I mean is this:
I would like some forums to have theis own catalogs for attachements. These should only be accesseble by users who have access to the certain forum, and not open to everyone, like the default catalog.
Would be cool to have when I later on will by the PayPal-mod.
Wondering if it would be a simple add in or edit to this mod to only allow certain groups to post the attachments, on any given forum?
To basicly only allow groups 5 to 8 the permission to post attachments for instance? (Didnt see a mod like this when searching, hope i didnt miss it)
Looks like the first edit mentions group 4... would it just be adding the other groups to that (and taking the 4 out?) what would be the code exactly? (Im real green at programming)
This section in adduser.php seems to be where it decides permissions to post attachments? Yes? No?
// ------------------------------------------------------------------------- // If we are allowing file attachments and we are dealing with a Mozilla 4+ // browser then we let them attach files. Also we need to make sure they // are not posting as Anon. if( ($Attach == "On") && ($Reged == "y")) { $attachfile = "<br /><br />{$ubbt_lang['YES_FILE2']}"; $fileinput ="<input type="file" name="userfile" accept="*" class="formboxes" size="60" />"; }
This line: if( ($Attach == "On") && ($Reged == "y"))
Im not sure how to do it, but adding more arguements to it will do it right?
Like if it said "if attach is on, and reged is yes, AND group is 5 OR 6 OR 7 OR 8" then it is allowed???
Can someone who knows php more than me make/modify that line of code so I can try it?
Will it work the way I think it will, only allowing users in those groups to post attachments?
It looks like the same if/then line I am asking for help on might need to be added/edited to other parts of this mod too, whereever it says the if reg'd and attach=on?
This would be great for you guys out there like myself who run donation/supporter software for supporting members.
Since i was allowing attachments to any forums, I only needed to change who was allowed to.. I only wanted certain groups to have the ability to upload...
SO I only changed the strings which checked the user, in the post modifying scripts, and it now locks out any user who isnt in my supporting groups, from adding attachments.
I just modified this mod... Only had to modify the scripts that add or modify posts. (addpost, modifypost etc)
Just changed the lines in the scripts that figure out what users are allowed to post attachments. I added in the groups I wanted, and took out the ones I didnt.
This mod the way its posted is a lot more in depth than what I just did... This mod is made to restrict them per forum... and also there is selections available through the admin panel. What I did stripped out all that stuff.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.