phpbb3如何让自定义配置文件字段显示在用户发布的帖子上?

I have this code: But it dosn't work.

from viewtopic_body.html

<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "ingame_name" -->
        <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
    <!-- ENDIF -->
<!-- END custom_fields -->

My custom field name is called "ingame_username" and is set to display everywhere possible in the options, ive deleted the cache after making changes and still doesn't show.

How do I display is with the code structure above and how can I call it in other parts of the template?

Theres very limited documentation about this.

I agree it is not very straight forward, since there are a few options you need to check under ACP, and you also have to edit your template. Here are the steps:

  1. Go to "ACP > Users and Groups (tab) > Custom Profile Fields (link) > Click on the settings icon" rename your custom field from "ingame_username" to "ingameusername", since the under score will cause issues.
  2. On that same page make sure that the "Display on viewtopic screen" option is checked for the field in question.
  3. Go to "ACP > General (tab) > Server Configuration (section) > Load Settings (link)", and make sure that the "Display custom Profile fields on topic pages" radio option is checked.
  4. Find the line in "viewtopic_body.html" that contains:

    {postrow.POSTER_FROM}

Underneath it, add the following line (line 184 in phpbb 3.0.10):

<!-- IF postrow.custom_fields.PROFILE_INGAMEUSERNAME_NAME --><dd><strong>{postrow.custom_fields.PROFILE_INGAMEUSERNAME_NAME}:</strong> {postrow.custom_fields.PROFILE_INGAMEUSERNAME_VALUE}</dd><!-- ENDIF -->

That's it! You will now see the custom field and it's value on the Viewtopic Page.

enter image description here

Pete