The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
0k, i have codded this small plugin that is supposed to assign a secondary usergroup when the user reaches 50 posts, all based on a question asked on the register form, "Choose Letter A or B" so, this is supposed to work on that way, if a registered user have choosen A when they register, when they have reached 50 post, they should be able to be on the secondary usergroup "A" or of they have choosen B, the same effect has to occur when they reach 50 posts to be on the secondary usergroup B
Hook: newpost_process PHP Code:
maybe the hook, maybe some wrong codding or maybe both things thanks for your time |
#2
|
||||
|
||||
![]()
I don't think this part is right:
Code:
$vbulletin->options['field5'] Code:
$vbulletin->userinfo['field5'] |
#3
|
|||
|
|||
![]()
Anyhow they will only be in the group as long as they have exactly 50 posts, if they make 51, they will loose it again.
|
#4
|
||||
|
||||
![]()
Also, you have to make sure that there are no other membergroupids.
What you should be doing, is adding them to the membergroup once they hit 50 and updating the group list in the database. Swipe the code from my put user in secondary group at registration plugin and adapt that to suit your needs. Amy |
#5
|
||||
|
||||
![]()
thanks amykhar, im gonna try it and looks good
![]() and Marco, so, i suppose i can use PHP Code:
|
#6
|
||||
|
||||
![]()
Try this
userdata_presave PHP Code:
|
#7
|
||||
|
||||
![]()
0ka, gonna work with all this info
![]() |
#8
|
|||
|
|||
![]()
I didn't see any code in oyur example that is updating the database with the new usergroup, all i see from your example is only working in memory, that is why it would only work with exactly 50 posts.
|
#9
|
||||
|
||||
![]()
... and only while making a new Post - doesn't make too much sense IMHO.
|
#10
|
||||
|
||||
![]()
0k, frist sorry, im still learning to use vbulletin plugins and such, i dont have much experience with PHP neither, so this are my frist attemps to create something with vbulletin, so im doing a lot senseless things x_x
0k, now with amykhar mode i was looking what you said MarcoH, the need to save it on the db so it can be more handy and well, im not very sure of the customized mysql commands used on vb 3.5.0, i just can see what have amykhar on her mod. in other hand im trying to run what you have posted KirbyDE and im having this message: "Your Post is a duplicate of a post that you have posted in the last five minutes. You will be redirected to that Thread" |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|