Announcement

Collapse
No announcement yet.

how do i do this in the postbit after adding new profile?

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

  • how do i do this in the postbit after adding new profile?

    i wish to add this new profile field to be shown in the postbit...

    but my this code doesn't seems to work


    Code:
    <if condition="$post[field5]==''">
    <div>New field: $post[field5]</div>
    <else/>
    <div>New field: NA</div>
    </if>

  • #2
    You could try this.
    Code:
    <div>
    New field: <if condition="$post['field5']">
    $post[field5]
    <else />
    N/A
    </if>
    </div>
    Hopefully this works.

    Comment


    • #3
      I created a new field in the User Profile, now I would like it to appear below the Avatar with each and every post. How can I do this?

      Thanks.

      Comment


      • #4
        I figured out how with some help from someone.

        Comment


        • #5
          Originally posted by Floris
          You could try this.
          Code:
          <div>
          New field: <if condition="$post['field5']">
          $post[field5]
          <else />
          N/A
          </if>
          </div>
          Hopefully this works.
          thanks will try it...

          Comment


          • #6
            Originally posted by Edric
            I created a new field in the User Profile, now I would like it to appear below the Avatar with each and every post. How can I do this?

            Thanks.
            For reference:

            You should goto the custom profile field manager and get the id. Then edit the postbit and find the code from the avatar, below it, add $post[fieldx] where x is the id.

            Comment


            • #7
              I do not speak php very well, so I'm not surprised when I tried the suggestions above, the new field I added to User Profiles is not showing up under the avatar. I added the new field (Newfield) in the User Profile, and it shows up in each user's individual profile. However, it does not display in each post.

              Below is all the code in the postbit template. Can someone explain what to add and/or modify so that a new field (let's call it Newfield in the explanation) will show below the avatar in each post.


              =====================================================

              <!-- user info -->
              <table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
              <tr>
              <if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
              <td nowrap="nowrap">

              <div id="postmenu_$post[postid]">
              <if condition="$show['profile']">
              <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
              $post[onlinestatus]
              <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
              <else />
              $post[musername]
              </if>
              </div>

              <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
              <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

              </td>

              <td width="100%">&nbsp;</td>
              <td valign="top" nowrap="nowrap">

              <div class="smallfont">
              <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
              <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
              <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
              <div>
              $vbphrase[posts]: $post[posts]
              <if condition="$show['reputation']">$post[reputationdisplay]</if>
              </div>
              <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
              </div>

              </td>
              </tr>
              </table>
              <!-- / user info -->
              Last edited by doubleclick; Sat 26 Jun '04, 5:38am.

              Comment


              • #8
                Originally posted by Floris
                You could try this.
                Code:
                <div>
                New field: <if condition="$post['field5']">
                $post[field5]
                <else />
                N/A
                </if>
                </div>
                Hopefully this works.
                I think I made an oopsy, it should be:

                Code:
                <div>
                New field: <if condition="$post['field5'] == ''">
                $post[field5]
                <else />
                N/A
                </if>
                </div>

                Comment


                • #9
                  Still not working.

                  Remember, I don't speak php, so I don't know if when you type field5 you mean it, or if you mean the name associated with field5? And do you use it once or both times?

                  Also, should there be something between the ' ', and if so, what?

                  Thanks


                  <div>
                  New field: <if condition="$post['field5'] == ''">
                  $post[field5]
                  <else />
                  N/A
                  </if>
                  </div>

                  Comment


                  • #10
                    I use field5, because you showed me field5.

                    Goto the Custom Profile field manager and see what fieldX (fieldid) is associated with the thing you want to display

                    Comment


                    • #11
                      our posts crossed in the wires. see my reply after yours
                      Last edited by doubleclick; Sat 26 Jun '04, 8:12am.

                      Comment


                      • #12
                        If you for example made a custom profile field for someone to pick Male or Female for profile field Gender
                        You'd have

                        Fieldname: Gender
                        Options: Male and Female
                        Fieldid: 12

                        The code could be:

                        <if condition="$post['field12'] == 'Male'">
                        Gender: Male
                        <else />
                        Gender: Female
                        </if>

                        Comment


                        • #13
                          Here's what I'm shooting for: a custom profile field for someone type in whatever they want.


                          Fieldname: Denomination
                          Fieldid: 6

                          Here's what I've used, and it doesn't show up.

                          <!--begin add denomination-->
                          <div>
                          New field: <if condition="$post['field6'] == ''">
                          $post[Denomination]
                          <else />
                          N/A
                          </if>
                          </div>
                          <!--end add denomination-->

                          Comment


                          • #14
                            This doesn't work either

                            <!--begin add denomination-->
                            <div>
                            New field: <if condition="$post['Denomination'] == ''">
                            $post[Denomination]
                            <else />
                            N/A
                            </if>
                            </div>
                            <!--end add denomination-->


                            I'm not trying to pester you Flovis, I'm just trying to get this field to show up.
                            Last edited by doubleclick; Sat 26 Jun '04, 8:59am.

                            Comment


                            • #15
                              Please issue a support ticket through the member area with a detailed explanation of which userfield you want to show or not show in the postbit template, and what it should look like. Include your forum details with an admin account that has permission to modify the styles and let me know on which style you want it. One of our staff will login and try to get it to work.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X