The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Auto usergroup change?
To all other hackers out there, any ideas?
I've implemented a points system for users who post replies in a particular forum (newbie help forum). Added an extra field into user table for "points" and have said in newreply.php that IF user posts a reply and is NOT thread starter THEN user's points = points + 2. This works absolutely fine. What I want to know if anyone can help with is if it's possible to trigger a usergroupid change when user reaches x points. eg. IF user points = x AND usergroupid = new member THEN usergroupid = full member. Has anyone already got something like that? I'm almost positive I've got the correct syntax in the php file but it doesn't work. Points works fine, usergroupid doesn't change. Any help appreciated. |
#2
|
||||
|
||||
Could you post what code you tried to use
Satan |
#3
|
|||
|
|||
Ummm....hehe...my bad.
The points are added with the following code in newreply.php: Quote:
I was trying using similar code to do the change of usergroups: Quote:
It's a little messy, and it doesn't need to also set the last post bits, but putting it here means that on the 10th reply when rating=20 I was hoping usergroupid would change from 2 to 10 automatically to open up an extra forum for example, different user title, etc. I'm doing something completely wrong aren't I? It's blatantly obvious isn't it? Hehe. |
#4
|
|||
|
|||
Is bumping allowed? Ahem...
Anybody, any ideas? Someone? Pwetty pwease? |
#5
|
||||
|
||||
hmm, the code looks ok, are you sure ratings reach 20 before this query runs?
|
#6
|
|||
|
|||
I was trying this on a test board and kept posting to test this. rating increases by two each time correctly, however the usergroupdid change doesn't trigger.
|
#7
|
||||
|
||||
are you sure the query is reached?
also surely posting with usergroup 2? take out the seond query and instead of the first one try this: PHP Code:
|
#8
|
|||
|
|||
Oh my, that code worked. I've since taken it a few steps further into a great automated hack. I'm not sure I understand why the code I tried first didn't evaluate, but the second with two iif statements did the job. Now a new registered member can make x posts and then get *upgraded* automatically to a different usergroup. Top stuff.
errrrr..I posted another help request in the unfinished forum before I realised this one was here. Hmmm...maybe if I sneak in and distract the "Help me Finish" mod while you go and nab my thread from there.... Thanks a lot Xenon, worked a treat. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|