Simple level system
#6
I just looked into it more, it seems that it's not possible without a fair amount of core edits. It'd probably be best just to write your own task for it or modify the user group promotion one (which is possible without core edits). If you do want to make the core edits, this is what I was testing with for actually giving the option on the user titles page, but it won't actually do anything other than save/display the data.

Unfortunately it seems like a fair amount of core edits will need to be made, such as member.php and functions_user.php. MyBB doesn't use a standard way of getting the title so you'd probably have to modify everywhere that a user title is shown.

If you end up using group promotions instead, you can very easily modify the attached file to save settings for group promotions instead of titles. Then all you have to do is copy the promotions.php task to a file with another name (e.g. levelpromotions.php), make the necessary modifications to it to detect the level, and then modify the task file for group promotions when you activate the plugin using something like this:

$db->update_query('tasks', array('file' => 'levelpromotions'), "tid='5'");

As long as the copied task file does its job it should work perfectly. You'll also have to use the above code again on deactivation, simply changing levelpromotions to promotions.


Attached Files
.php   test.php (Size: 1.7 KB / Downloads: 68)
Reply


Messages In This Thread
Simple level system - by LCTG - 2013-07-06, 03:47 PM
RE: Simple level system - by Whiteneo - 2013-07-07, 03:45 AM
RE: Simple level system - by Jammerx2 - 2013-07-07, 04:40 AM
RE: Simple level system - by LCTG - 2013-07-07, 09:16 AM
RE: Simple level system - by maniacmusic - 2013-07-07, 05:57 AM
RE: Simple level system - by Jammerx2 - 2013-07-07, 07:35 PM
RE: Simple level system - by LCTG - 2013-07-08, 03:29 PM
RE: Simple level system - by Jammerx2 - 2013-07-08, 09:14 PM
RE: Simple level system - by LCTG - 2013-07-09, 03:05 AM
RE: Simple level system - by Jammerx2 - 2013-07-09, 04:11 AM
RE: Simple level system - by Kieria - 2021-04-18, 10:53 PM
RE: Simple level system - by Whiteneo - 2021-04-20, 07:02 PM
RE: Simple level system - by Kieria - 2021-04-20, 09:12 PM
RE: Simple level system - by Whiteneo - 2021-04-20, 10:50 PM
RE: Simple level system - by Eldenroot - 2021-04-21, 01:37 PM
RE: Simple level system - by Whiteneo - 2021-04-21, 02:52 PM
RE: Simple level system - by Kieria - 2021-04-22, 10:01 AM
RE: Simple level system - by Whiteneo - 2021-04-22, 12:46 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)