The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Limit Attachments Per Time Details »» | |||||||||||||||||||||||||
Allows you to limit the number of attachments one can post in X (defined) hours.
There is also an option to exclude mods and admins from this limit. To install this hack download the attached file (lapt.hack.php), upload to your /admin folder and use vbHacker. A demo (screen shot of the new settings in the Admin CP) can be found here: https://vborg.vbsupport.ru/attachmen...&postid=232927 Show Your Support
|
Comments |
#22
|
||||
|
||||
Ok, it tells you to find this, right?
Code:
// sort attachement if ($permissions[canpostattachment] and trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") { |
#23
|
||||
|
||||
This is why I couldn't find it. I had to narrow the search down to just canpostattachment. Usually any code you say to look for is right on target for me. I must have installed some hack somewhere that changed something.
Sorry I bothered you with it. I feel kindof stupid now. Code:
if ($permissions['canpostattachment'] and trim($attachment) != 'none' and trim($attachment) != '' and trim($attachment_name) != '') { Quote:
|
#24
|
||||
|
||||
Here's the code I found it in in newreply. There are actually 2 places here that have that code. I should replace the first one?
Code:
case 'new': if ($permissions['canpostattachment'] and trim($attachment) != 'none' and trim($attachment) != '' and trim($attachment_name) != '') { $attachmentid = acceptupload(1); $DB_site->query(" DELETE FROM attachment WHERE attachmentid = $oldattachid "); $postinfo = $DB_site->query_first(" SELECT attachmentid, filename FROM attachment WHERE attachmentid = $attachmentid "); } break; default: $attachmentid = $oldattachid; } } elseif ($permissions['canpostattachment'] and trim($attachment) != 'none' and trim($attachment) != '' and trim($attachment_name) != '') { $attachmentid = acceptupload(1); $oldattachid = true; $postinfo = $DB_site->query_first(' SELECT attachmentid, filename FROM attachment WHERE attachmentid = '.intval($attachmentid).' AND visible = 0 '); |
#25
|
||||
|
||||
Ahh, you installed another hack that changes that part (my Save Attachments on Preview). Sorry.
|
#26
|
||||
|
||||
Guess I should have installed this one first huh? Was I right, only the first part under case new gets changed? Thanks for helping me figure it out though. I was starting to think I was losing the ability to install hacks.
Quote:
|
#27
|
||||
|
||||
I think you only need to update the 'new' case, but I'm not sure.
|
#28
|
||||
|
||||
Well, the board didn't blow up or lock me out, so I think we did it. The options are there in the Admin settings so I guess that means it is working? Thanks, Chen, for all of your help on this one.
BTW: PM on the way. Quote:
|
#29
|
|||
|
|||
i have had this hack installed for quite some time, but ecently it has taken the forum very long to post a new thread or submit a reply.
I found out the slowness was due to this hack, particulary this line of code: $attachcount = $DB_site->query_first('SELECT COUNT(*) AS total FROM attachment WHERE userid='.$bbuserinfo['userid'].' AND dateline>('.time().'-3600*'.$limitattachtime.')'); My attachment table is about 370MB with 7,700 records. When I make a simple query to this table in phpmyadmin, its very slow to respond also. The rest of the site is extremely fast, any suggestions? |
#30
|
|||
|
|||
any ideas on the above? anyone?
|
#31
|
|||
|
|||
Is this hack available for 3.6?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|