This modification will allow you to have users input their Steam ID as a profile field. The upgrade to that, and the modification, is that you will have a cron job automatically update the user's steam account status which will then be displayed on the user's postbit and profile information.
I would have made this as a plugin, but this is really my first time coming back into the forum suite in about 2 years, and even back then, I hardly knew how to make a plugin. If someone could help with that, or help me learn, that would be great.
You need to make a couple of new profile fields in MyBB for this to work. So, go to the Admin Panel -> Configuration -> Custom Profile Fields -> Add New Profile Field
You will want to make two profile fields that match the images below. One is for the user to enter a Steam ID, the other the program will write to. The Steam ID is the editable and non-visible field while the Steam Account field is non-editable but visible. Regex is used to only allow numbers to be entered which creates less problems in securing the script. You can name these fields however you want with whatever descriptions and lengths you want. Just be mindful if you choose minimum / maximum lengths.
Create a PHP script that will find information based on the user's Steam ID.
You want to save the following code as a PHP file, with whatever name you want. The easiest way to secure the file is to have it put outside your public directory and run it with cron jobs. I created a folder named "cron" under /home/USER where I placed my PHP file.
Now that you've uploaded the PHP file to your server, you need to run it via a cron job to indicate what the user's status is. The time period you choose is entirely up to you. Navigate to your cPanel or other software used to run your website. You'll want to find "Cron Jobs" and enter it to add a new one. For most, you simply choose a time period. The command line you will need is
Thiswillrunthescriptateverytimeperiodyoutellthejobtorunat. Forme, it's every 15 minutes. You'realsolimitedtoonly100,000requestsadayunlessyougetapprovedformore.
The last thing you will need to do is add just a little bit of CSS to make the field look good, and different based on what the user's status is. You will need to navigate to the Themes & Templates -> Default -> Global.css -> Advanced Mode
You will then want to add this code anywhere you want (I placed mine at the bottom). Of course, the colors don't have to be the ones I used, but they look decent on the default forum theme. I'll be changing them once my custom theme is done.
That's it! You don't have to use the same colors, or place the CSS in the same spot, or even put the PHP folder in the same spot as long as you secure your cron jobs and link to everything properly. But, this should have been a pretty easy tutorial.