(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi47.tinypic.com%2Fejfr54.png&hash=838f3151b880e08f2c10f3543adccb55070a476a)
As you can see there, I would like to add custom lines below the "Posts" line. Where can I edit this?
Thanks.
Does this custom lines would be filled by users themselves? if so, there is the custom profile fields (http://wiki.simplemachines.org/smf/Features_and_Options#Profile_Fields).
No, I will "hard code" the fields so it will be shown for everyone.
So, does this field will be the same for every user?
If so, you will have to edit your theme's Display.template.php file, this is the post line on the default theme:
// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
just add yours below:
// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
/* My custom hard-coded field */
echo '
<li class="hardcoded_field">something here</li>';
replace "something here" with whatever you want to appear
Thank you so much, just what I needed. Just one last question:
"$txt['member_postcount'], ': ', $message['member']['posts']"
How does the script know what "$txt['member_postcount']" is? Is it defined somewhere?
Yes it is a text string and is defined on the language files located at /Themes/default/languages/
That particular string is located at the index.yourlanguage..php where yourlanguage is the actual language you are using, most likely "english", so index.english.php
Thanks once again. Topic solved.