![]() |
Custom name check in register.php / log IP of each visit?
Hello,
I have two questions about custom functions in vBulletin.
Thanks a lot for any hint :) |
Look for a hook near that section; you can then add a plugin using that hook location.
You should also use vBulletin's DB class if you're executing queries. eg: $db->query_write(); or $db->query_read(); see: https://vborg.vbsupport.ru/showthread.php?t=119350 |
Thanks for your comment, the use of the $db class was no problem, I was already thinking of doing that. More useful was this article:
https://vborg.vbsupport.ru/showthread.php?t=82625 which I found thanks to you mentioning the word hook, I have read it before in the code but couldn't think of what was used for. What about the IP loggin on each login? Is there a function in vBulletin or an existing plugin or would I have to write my own hook for that? Hm somehow I can't get the hook to work. I inserted it at 'register_addmember_process' but now the step "Complete Registration" just takes forever and does not show the next page. My hook code is: PHP Code:
|
I've never seen an IF statement like this:
PHP Code:
PHP Code:
|
Both work the same, you can omit the {} if there is only one statement following the IF condition, you just need it to mark a whole block of statements to be executed when the condition is met. I tried it with {} in case vBulletin interprets the code different to PHP, it took also ages for the page to load but finally my error was displayed. Then I removed the {} again, reloaded the page and it responded quickly with the error message. Very strange :eek:. But anyway thanks for your concern :).
|
Well, either way - if you want to code according to vBulletin's standards you should always use braces in conditionals, unless you're using the ternary operator.
|
Hmmm, Kirk, if you insist on following vBulletin coding standards ;).
PHP Code:
|
All times are GMT. The time now is 03:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|