The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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:
|
#4
|
||||
|
||||
I've never seen an IF statement like this:
PHP Code:
PHP Code:
|
#5
|
|||
|
|||
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 . But anyway thanks for your concern .
|
#6
|
||||
|
||||
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.
|
#7
|
||||
|
||||
Hmmm, Kirk, if you insist on following vBulletin coding standards .
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|