Hey all, I'm making a mod for the forum on a site I work for. I finally convinced them to upgrade from YABB Gold 1 SP 1.1 to SMF but the owner is unwilling go ahead with the upgrade until I get a RPG level system working for the new forum. It's something the users of the current version like a lot and so they'd be pretty upset if that wasn't carried over.
I'm quite familiar with PHP and Databases but SMF is the most complicated thing I've worked with as of yet so I wanted to layout what changes I plan and where and see from those more familiar with the code if I'd inevitably break something of if I'm going about this the wrong way. This post is quite long, so I apologize in advance if there's a post length limit.
Ok, first off you can check the way our current forum's level system works at http://www.timewastersguide.com/boards/yabb/YaBB.cgi, basically when you register you choose one of around 10 classes then as you post your level goes up and you get a unique title based off of your choses class. I'm sure you've all seen this before, I've even seen some SMF mods that slightly do this but they don't work how I need, so it's nothing incredibly complicated its just that SMF is a little complicated for me.
So first off I need to add a drop down option box, from what I can tell unless a template has a custom Register.template.php you use the one in the Default template folder, which will be populated from a XML file with the class names. I have to then modify the Register.php in the Sources folder to include adding the class name and class title is, this will also entail adding 2 new fields into the smf_members database table. It would pull class title from a separate XML file that has all those.
I'm going to base leveling off of level usergroups so I'm going to have to make 100 or so new usergroups (yea! Just how I like spending my weekends!) and I'm just going to name them numerically, ie starting with 1 and ending in either 99 or 100.
The user profile needs to then display the Class name, User level number and level name. So I need to modify Profile.template.php either in the theme I'm using (if it has one) or in the Default theme folder, and this is where it gets complicated. Since you guys have the very cool $context array (I managed to integrate the forum's login as our main site's log-in in about 10 minutes, very easy to use once you know what it does) I'd like to use that but I'm adding new Database fields so I cant unless I modify the SSI.PHP, which is way beyond my skill level, so instead I need to add these database calls to either the Profile.template.php or profile.php in the Sources folder and I'm not sure which on would be best. I can call the user level as ID_POST_GROUP and just display that since I've already made it a number.
I also need to display the user level and name with each post, this will be quite easy to do once I figure out how to do it with the profile. Lastly I need to know where the forum updates the post group in the smf_members database table, I assume it's in the Post.php file but I haven't had time to look through it.
Thanks for reading, any comments or suggestions would be much appreciated.