Quote:
Originally Posted by kh99
Anyway, I think the thing about postdata_start is that you maybe won't be sure that the post is actually saved because it's possible it could fail later. Also, it's possible that that class is used whenever any changes are made to a post, not just when a new one is created. I think maybe newpost_complete would be better. .
|
Ah, ok that sounds very logic! Since for now I only want to do something if a "new post" gets created! Also thanks for the hint about how to check if a new thread gets created!
I just switched to the hook "newpost_complete" and it works, and I dont need to set the $vbulletin var to global since it already happened in the main script, thanks for the hint! Now I just need to find out which vars are available at this point, so I can save it to my db table

Trying it out, and I am going to explain what I want to code below:
Im trying to build a activities plugin, which tracks the following actions and saves them into db.
- thread creation
- posting a new reply
- changing avatar
- posting a message on somebodys wall
- joined a group
- created a picture album
- uploaded pictures to an album
- created a new blog entry
After achieving this, I want to create the acp interface for it, where I can define which usergroups are able to use it + set default settings.
Then I want to create the usercp for it, where users can define if they want to use it at all + which things they want to get tracked.
And when this is done, I want to create a new tab on the member profile page, which grabs the data my plugin collects and makes it look pretty

(of course there will need to be some filtering I guess... but Ill handle that when the time is right)
I guess when im done with this, I became a good vb coder haha

Of course you can have the plugin if I manage to get it working, since your helping me here
EDIT: New post + News thread is working... now im trying to complete the rest! going to ask questions when I run into problems
Quote:
Originally Posted by nerbert
I'm sure $vbulletin->userinfo['userid'] is available on any file in the forum folder. Perhaps you have a typo.
|
It wasnt available inside postdata_save, but it is in newpost_complete

thanks!