Announcement

Collapse
No announcement yet.

Profile field's

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Profile field's

    How to make visible the profile field's under avatar, in the left side of posting?

  • #2
    THIS article shows you how to do that in vB5.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.6.3 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      Where in new conversation template I should put the code for the field's in profile?

      And for the version 5.1. I haven't found on the server the file text.php, there was only content.php.

      Comment


      • #4
        You don't need to worry about the code fix part of the post.....it's obsolete.

        These are the bits you need to worry about:

        First make sure your hook system is active (it is turned off by default). Go to Admincp > Settings > Products/Hook System > Enable/Disable Hook System > Yes.

        Now, go to Admincp > Products & Hooks > Manage Hooks and click the link that says "[Add New Hook]". In that new hook, set the following:
        Hook is Active: Yes
        Hook Location: conversation_userstats
        Title: Show Profile Fields in Postbit
        Template Name: conversation_fields
        Hook Arguments: conversation=conversation
        SAVE

        Now go to Admincp > Styles & Templates > Style Manager > Add New Template and on that page, set the following:
        Title: conversation_fields
        Template:
        Code:
        {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}


        For each field you want shown, you will need to add this code under that line:
        Code:
        <vb:if condition="$userInfo['fieldX']"><li><label>{vb:phrase fieldX_title}:</label> <span>{vb:raw userInfo.customFields.default.fieldX_title.val}</span></li></vb:if>


        Replace the X in "FieldX" (three times) with the fieldid and, if your field is in a Category other than Uncategoried, then replace "default" with "categoryY_title" where Y is the category id.

        So, for instance, say I have the following I want to add:
        Name Category
        field5 (uncategoried)
        field7 New Cat(id 1)


        Then my template would look like this:
        Code:
        {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
        
        <vb:if condition="$userInfo['field5']"><li><label>{vb:phrase field5_title}:</label> <span>{vb:raw userInfo.customFields.default.field5_title.val}</span></li></vb:if>
        
        <vb:if condition="$userInfo['field7']"><li><label>{vb:phrase field7_title}:</label> <span>{vb:raw userInfo.customFields.category1_title.field7_title.val}</span}</li></vb:if>


        That's it!
        MARK.B | vBULLETIN SUPPORT

        TalkNewsUK - My vBulletin 5.6.3 Demo
        AdminAmmo - My Cloud Demo

        Comment


        • #5
          All above I understood, I don't understand where to write this code...

          Comment


          • #6
            The details are all in the instructions. There's two parts to it: adding a hook, and adding a new template.

            The new template is called conversation_fields, and you put the code in that it states in the instructions.

            You need to replace x in the code with the id of your profile field, which you can find by looking in the profile field manager.
            The original link I posted has some screenshots about finding the id number.

            There is an example bit of code in the instructions too.
            MARK.B | vBULLETIN SUPPORT

            TalkNewsUK - My vBulletin 5.6.3 Demo
            AdminAmmo - My Cloud Demo

            Comment


            • #7
              I've got new template 'conversation_fields' completely like default template, concerning of the content. Which subtitle in new template I should choose to write there the code.

              Here is a part of my code:

              {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}


              <vb:if condition="$userInfo['field4']"><li><label>{vbhrase field4_Beruf}:</label> <span>{vb:raw userInfo.customFields.default.field4_Beruf.val}</span></li></vb:if>

              <vb:if condition="$userInfo['field7']"><li><label>{vbhrase field7_Weltanschauung}:</label> <span>{vb:raw userInfo.customFields.default.field7_Weltanschauung.val}</span></li></vb:if>

              <vb:if condition="$userInfo['field8']"><li><label>{vbhrase field8_Politische Ansichten}:</label> <span>{vb:raw userInfo.customFields.default.field8_Politische Ansichten.val}</span></li></vb:if>

              Comment


              • #8
                Here is the template conversation_fields.

                Comment


                • #9
                  I've resolved the problem with help of a mod from Glenn.

                  Comment


                  • #10
                    Originally posted by Gardarika View Post
                    I've resolved the problem with help of a mod from Glenn.
                    I assume it was my mod If so, I'm glad it helped you. For those who wants the same, you can go to vb org at

                    http://www.vbulletin.org/forum/showthread.php?t=323162

                    and also in my site

                    http://vbmods.rocks/forum/vbulletin-...lds-in-postbit

                    The mod does not require editing existing templates. You just have to upload the XML file and configure what custom fields to show and you're done.


                    GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

                    Comment


                    • #11
                      Yes, Glenn, it was your mod from your site. Thank you for the mod!

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X