The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
that did the trick, any suggestion on parsing the code inside the pm message area?
|
#12
|
||||
|
||||
Quote:
You mean like the user name? |
#13
|
||||
|
||||
Quote:
this is what i mean: PHP Code:
HTML Code:
congratulations Array['username'] you have made your 50th post, we're all so prod of you keep on posting |
#14
|
||||
|
||||
Quote:
Code:
$50postusername = $vbulletin->userinfo['username'] $pmdm->set('message', "congratulations $50postusername you have made your 50th post, we're all so prod of you keep on posting"); it may even be Code:
$50postusername = $vbulletin->userinfo['username'] $pmdm->set('message', "congratulations " . $50postusername . " you have made your 50th post, we're all so prod of you keep on posting"); |
#15
|
||||
|
||||
Quote:
but apparently using the line " $50postusername = $vbulletin->userinfo['username']; " makes the script to stop working, and i have tried with both possibilities you have posted in here, the one with the joined strings and the one with the direct variable this is my full code: PHP Code:
|
#16
|
||||
|
||||
i tried my code in a separate .php file where i called global.php, then i pasted this code (without the IF statement) and it worked pefectly, the PM was sent correctly without any issue, by some odd reason, just by using any extra variable in the plugin, the code doesnt works at all such as $50postusername, id appreciate if someone can help me with this!
|
#17
|
||||
|
||||
Try setting the $message first... ie:
Code:
$message = "congratulations......"; $pmdm->set('message', $message); |
#18
|
||||
|
||||
same outcome, the script doesnt runs but thanks for the idea
|
#19
|
||||
|
||||
Let's see exactly what you did. It could be you wrote it incorrectly. And did you ever specific the hook location? You should tell us that information also.
|
#20
|
||||
|
||||
okay, here goes the full plugin, with some extra stuff i added
hook location: newpost_complete PHP Code:
thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|