Extra profile field using data from database

Started by JimmySmith, January 31, 2016, 01:28:44 PM

Previous topic - Next topic

JimmySmith

I am wanting to add a field to players profiles showing data from the database.

I know SMF has the functionality for custom fields however I cant have this one altered in anyway as it will be showing player in-game time.

What file would I need to look into to edit?

JimmySmith

Any help? If not I'lls top this side of the project

Gluz

Then you don't need a custom profile field, just retreive your data from the database in the source code of profile and then add your data to be displayed in the profile.template.php, just show in the summary, or where you want.

Gluz

I suppose that your data is in a separate table with the ID of the member and the data (player in-game time). But to be sure, I need to know where and what exactly is that data, and that is table name, name of the table rows, how it's stored the time in the database (seconds, minutes, etc).

This need manual edits in some files, if you want to do it yourself then I'll post the code, but if you are not into manual edit files, then you can attach the files here in your next post.

The files needed are:
/Sources/Profile-View.php
/Themes/your_theme/Profile.template.php
/Themes/default/languages/Modifications.english.php


Is all that need to be modified to show an extra data from the database in the Summary of the User Profile.

Advertisement: