The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
newbie with lots of newbie questions!
hello!
i been studing some basic php stuff and now im open to take the challenge to learn how does vbulletin works, so far i been checking random php files on vbulletin base files and some plugins from modifications, and i have the following questions which i havent been able to solve by myself:
thanks in advance for your time and replies |
#2
|
||||
|
||||
- Hmmm, I'm not a php guru, but there are some functions that require you to use $this->registry->posts or $this->registry->options instead of just $posts or $vbulletin->options. The best thing to figure out which to use is to locate the hook you are wanting to use in the php code and see the syntax used right there.
- information regarding the input cleaner is still valid for vB4 - I don't know anything about the send PM article, sorry - $db should all be the same. If you are writing code for the CMS however, the syntax will be a little different with a "vB::" in front of it. |
#3
|
||||
|
||||
Quote:
thanks a lot for your answers now i hope someone else can help me with the PM bit, in the meanwhile ill check the rest of the stuff you commented, thanks again! |
#4
|
||||
|
||||
Have you tried using that code? It seems as it should still work. If you have any specific questions regarding a error with that code you have posted feel to post with a specific question.
I can not start to help you when you have not even tried to use that code thus have no real question as of yet. |
#5
|
||||
|
||||
Quote:
i just havent tried it because im not sure which part is the correct one but i suppose its time to start poking around, vbulletin its a *HUGE* script and its hard for a php green rookie like me to find the right direction, but ill start checking files and see what i can come up with thanks! |
#6
|
||||
|
||||
You would use plugins. If you want it to send a welcome message you would use a hook like register_addmember_complete. Then when the user finishes registering it would call up the code you just put in the plugin. So if you put that code for the private message in there it would send the message when they finished.
You should set up a test board so that it is on a password protected directory. This way you can do all your testing there and not worry about breaking your live site. |
#7
|
||||
|
||||
Quote:
im running a test board already, i have done some other modifications, what exactly i want to do is to make a modification where the user receives a notification once he makes 50 posts, i have already the full code working in the right hook which is postbit_display_complete but, the only element im missing here is the function or class vbulletin uses to send a PM which i can run everytime a user hits the 50 post mark |
#8
|
||||
|
||||
Quote:
|
#9
|
||||
|
||||
i checked both classes on vb3 and vb4 and they are identical, im gonna play around with it for a while, thanks!
--------------- Added [DATE]1264633171[/DATE] at [TIME]1264633171[/TIME] --------------- okay i tried it out and it works nicely except for one issue, the constant TIMENOW on vb3 is not working anymore on vb4 so i need to find its equivalent --------------- Added [DATE]1264640546[/DATE] at [TIME]1264640546[/TIME] --------------- nevermind the timenow issue, it was a mistake on my side, the issue im having is that the internal vbulletin arrays arent working in the plugin, this is my code: PHP Code:
thanks again for any help |
#10
|
||||
|
||||
This line
Code:
$pmdm->set_recipients('$vbulletin->userinfo['username']', $permissions); Code:
$pmdm->set_recipients($vbulletin->userinfo['username'], $permissions); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|