Adding a "post element?"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Solomon Parker
    New Member
    • Dec 2018
    • 6
    • 5.3.x

    Adding a "post element?"

    I would like to add the user's location data they entered in their profile under their "Posts: ##" that shows up under the avatar, etc. on each post.

    Does anyone know how to do that?

    Thanks
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74132

    #2
    This is not possible on Cloud at this time.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • Wayne Luke
      Wayne Luke commented
      Editing a comment
      In a default installation, location is field2. So...

      Go to Styles -> Style Manager. Add a a new template for your style from the drop down menu. Name it user_profile_fields. Add this code:
      Code:
      {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
      <vb:if condition="$userInfo['field2']">
        <li>
          <label>{vb:phrase field2_title}:</label> <span>{vb:raw userInfo.field2}</span>
        </li>
      </vb:if>
      Then go to Hooks & Templates -> Manage Templates and add a new Template Hook.
      1. Give it a name.
      2. Set the Hook Location to conversation_userstats.
      3. For the template name use user_profile_fields
      4. In the Hook Arguments field add conversation=conversation.
      5. Make sure your hook is active and save it.

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      I have this mod that can be configured to show any of the custom profile fields in postbit.

      By default, vBulletin 5 only displays the Join Date and Post count in the postbit area (avatar and username section) in the thread view of a topic. There may be other tutorials out there to add custom fields in postbit but some require you to edit the existing postbit template. Editing existing templates is not good for

    • OrganForum
      OrganForum commented
      Editing a comment
      Thanks Wayne & Glenn!

Related Topics

Collapse

Working...