1
astaldaran
individual custom user rank/title and theme changer only for certain groups
  • 2004/12/2 20:10

  • astaldaran

  • Just popping in

  • Posts: 73

  • Since: 2004/5/9 1


Ok I want persons in a particular group (in this case "premium") to beable to make their own titles. I figure I can just make a module which allows them to choose a name and it uses the code from userranks to make a new rank that is applied to them. Is this the best way to go about doing this?

I also want to provide them with the ability to change their themes but not users not in the group. I thought there might be a model for this but haven't found one.

If you have any sugestions it is appreciated.

2
astaldaran
Re: individual custom user rank/title and theme changer only for certain groups
  • 2004/12/3 2:24

  • astaldaran

  • Just popping in

  • Posts: 73

  • Since: 2004/5/9 1


ok here is what I am going to do tell me if this sounds like it will work.

THe user has one field (their title/"rank")

he fills it out and it does the following things.

1) It checks the modules table to see what rank they have now
2) it deletes that rank from the rank table (using the RankForumDel() from userrank.php)
3) adds a rank using RankForumAdd($rank_title,0,0,'',1)
4) updates rank in profile.

for number 3 I am puzzled about what the differences between rankforumsave and rankforumupdate are...


I am completly lost on number 4... I was going to use the updateuser() function but that looks rather complicated and I don't understand how it works so I think I will just write custom code to simply update the rank field.

Anyway I don't think this will be to hard, I just need to compile it into a module and figure out the code and test. Just wanted to post incase anyone had any useful ideas.

ps:
I see this piece of code "$db =& Database::getInstance();" can i use that in a module, what do I have to call? or should I just use the xoopsdb() function?

Login

Who's Online

320 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits