SMF Support > SMF 2.0.x Support
Info from the database Help/Info
a454nova:
--- Quote from: Arantor on May 11, 2012, 06:58:06 PM ---This is where it gets very complicated, because it's done in four separate places.
loadMemberData in Load.php loads the data from the database
loadMemberContext in the same file then converts it to a different format internally
prepareDisplayContext in Display.php then grabs that data and gets it ready for display
template_main in Display.template.php then actually displays it
That's how it does it, I can go through and pull the relevant edits but I don't have a copy of 2.0 to hand to look at... :/
--- End quote ---
I swear I've been through Load.php, but I guess I was looking for the wrong thing... Damn late nights!!
Arantor!!!! You sir are an Awesome Bad Azz!!! Thanks!!!!
For anyone that would like to do the same thing-
Load.php Line 493 ish 'posts' => empty($user_settings['posts']) ? 0 : $user_settings['posts'],
Add below it -> 'downpro_credits' => empty($user_settings['downpro_credits']) ? 0 : $user_settings['downpro_credits'],
Now ['downpro_credits'] has a value and you can use it anywhere. This will work for any value you wanna pull from the Database.
Thanks again Arantor!
Arantor:
$user_settings is the *current user*'s value, not the user whose profile it is. I presume that isn't what you want.
(In which case you have to modify the places I mentioned)
a454nova:
--- Quote from: Arantor on May 11, 2012, 08:55:25 PM ---$user_settings is the *current user*'s value, not the user whose profile it is. I presume that isn't what you want.
(In which case you have to modify the places I mentioned)
--- End quote ---
I only have it showing for the user them self. Not for everyone else to see. As the admin, I can see it in the Download Admin panel anyways. This was for them to see their own and I'm using it in the Simple Portal Mod too.
Will that work?
Arantor:
See, I thought you were going to put it, as you said, under the poster information in a thread and thus see everyone's. (Which is why I gave you the pointers to Display.php and Display.template.php, if you wanted to put it in the profile, that's a different set of code again)
What you have is mostly workable - except if an admin looks at a user's profile, they will see their own count rather than what the user has available, which can make answering questions difficult.
Navigation
[0] Message Index
[*] Previous page
Go to full version