The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Can anyone help me to fix a query on a piece of script written for vb2? What the code is supposed to do is limit the number of concurrent searches being done on the forum. The original thread is here:
https://vborg.vbsupport.ru/showthrea...limit+searches However, it is closed to new posts, I assume because it is so old. However, I think the mod would work in my circumstances but I think one of the queries in it is incorrect. I realize the original coder is no longer supporting the mod, nor was the code widely installed so there is not a lot of feedback or troubleshooting for it in the thread. Basically, what the code does is create a new USER column called 'searching'. All users start with '0' in that field. When they go to do a search the field is changed to a '1'. When they finish searching (ie. are taken to the search results page) that field is reset back to '0'. In other words, while a user is in the middle of a search their searching field is set to '1'. When a new user goes to do a search, the system first adds up the total '1's in that field to decide whether a new search can be untaken at this time. So, if I have a limit of 4 concurrent searches allowed, the 5th searcher is turned away and told to try later. Make sense? Here's the problem...I think everything is working in the script except at the very beginning...the query where it tries to find the total of all the '1's in the searching column. Here is how it is written: PHP Code:
Can anyone help me fix the query? Later in the code, when it is deciding whether to allow a new user to do a search this is the code it uses (where $ups is the maximum number of concurrent searches allowed, set in the admin panel): PHP Code:
Can anyone help? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|