The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Quote:
However, I don't want to issue and deduction when the user is only issued a warning (infraction without points). |
#12
|
||||
|
||||
If you use the code I posted in post #8, then the deduction will be based on the accumulated active points prior to the infraction being issued. So, for example, suppose a user has 3 active points, and you then issue a warning...$userinfo['ipoints'] will be equal to 3.
But, if you use the hook location and variable I suggested in post #10, then $vbulletin->GPC['points'] will be equal to 0. |
#13
|
|||
|
|||
Hi Mark
PHP Code:
Any ideas? |
#14
|
||||
|
||||
why are you using continue without a loop?
I would remove this, it is rather pointless in that code: PHP Code:
|
#15
|
|||
|
|||
Quote:
|
#16
|
||||
|
||||
That is not how your code is working. You need to put the bottom inside the if statement. I can post the code when I get home if someone doesn't beat to it
--------------- Added [DATE]1450838239[/DATE] at [TIME]1450838239[/TIME] --------------- try this: PHP Code:
|
#17
|
|||
|
|||
I tried that - it doesn't work.
I don't get the server 500 error anymore, but it no longer deducts points if the infraction points being handed out is > 0 |
#18
|
||||
|
||||
sorry, i think I read what you wanted backwards, try this:
PHP Code:
|
Благодарность от: | ||
MarkFL |
#19
|
|||
|
|||
Thanks for the reply.
I already have that exact code on my forums - yet it still does not work. It also doesn't make sense to me. When I read your code, it basically only runs the deduction code when it ISNT an infraction, and IS a warning. I want the deduction code to only run when there IS points applied to the infraction. I hope I am making sense. |
#20
|
||||
|
||||
ok, that is what I gave you the first time
PHP Code:
PHP Code:
So what determines an infraction vs a warning, in the code? --------------- Added [DATE]1450845203[/DATE] at [TIME]1450845203[/TIME] --------------- the continue you had in your code is what was causing the 500 error for you, as a continue is used to exit a loop, and you did not have a loop. So I moved the code you wanted to run when points is 0, to inside your if statement. Should it run when points is 0, or when it is not 0? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|