Announcement

Collapse
No announcement yet.

Custom user info fields displayed under their name when they post?

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

  • Custom user info fields displayed under their name when they post?

    Everyone on my forums plays Diablo 2. I want to make a custom field that people could update in their profiles so it says what battle.net realm they use under their name when they post. Ideally it would be a pull down menu will preset values the user could select (USWest, USEast, Europe, or Asia). Does vB 2 have such a feature? I thought I remembered one of Me2Be's posts talking about a similar feature...

  • #2
    Edit postbit template and use $userinfo[fieldx] replacing x with the ID of the profile field.

    Comment


    • #3
      When adding the new profile field I received this error (this is the page source):

      <HTML><HEAD>
      <META content="text/html; charset=windows-1252" http-equiv=Content-Type>
      <META content="MSHTML 5.00.3018.900" name=GENERATOR></HEAD>
      <STYLE>
      A:visited {TEXT-DECORATION: none}
      A:hover {BACKGROUND-COLOR: #40364d; COLOR: #f5d300}
      A:link {TEXT-DECORATION: none}
      A:active {TEXT-DECORATION: none}
      BODY {CURSOR: default; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
      UL {CURSOR: default; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
      LI {CURSOR: default; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
      P {CURSOR: default; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
      TD {FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
      TR {FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
      SELECT {COLOR: #51485F; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
      INPUT {COLOR: #51485F; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
      TEXTAREA {COLOR: #51485F; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
      OPTION {COLOR: #51485F; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
      FORM {FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
      </STYLE>
      </HEAD>
      <BODY bgcolor="#CCCCCC" text="#3F3849" link="#3F3849" vlink="#3F3849" alink="#3F3849" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10">

      <!-- Database error in vBulletin Control Panel: Invalid SQL: INSERT INTO profilefield (profilefieldid,title,description,required,hidden,maxlength,size) VALUES (NULL,'Bnet Realm','Indicate what battle.net realm you primarily use. Realms: USWest, USEast, Europe, Asia.',0,0,'6','6','10')
      mysql error: Column count doesn't match value count at row 1
      mysql error number: 1136
      Date: Saturday 03rd of March 2001 06:24:47 AM
      Script: /forum/admin/profilefield.php
      Referer: http://216.122.219.45/forum/admin/pr...?s=&action=add
      -->
      </td></tr></table>
      <p>There seems to have been a slight problem with the database.
      Please try again by pressing the refresh button in your browser.</p>An E-Mail has been dispatched to our <a href="mailto:[email protected]">Technical Staff</a>, who you can also contact if the problem persists.</p><p>We apologise for any inconvenience.</p>

      Comment


      • #4
        This has already been addressed an a fix posted.

        Comment


        • #5
          Originally posted by Ed Sullivan
          ...fix posted.
          Fix as in some setting I got wrong? Or downloadable update? Or a fix mentioned in another thread?

          Comment


          • #6
            Fix in another thread.

            Comment


            • #7
              I can't find it in my search. *cough*link*cough* ...either Ed or anyone else that knows where the thread is. Thanks!

              Comment


              • #8
                Found it: http://www.vbulletin.com/forum/showt...ser+AND+fields

                It's working now.

                Comment


                • #9
                  I looked at the thread in the link above, and it didn't seem to contain much helpful info, either, other than to say that it was fixed in yet another thread. Actually it does contain the fix, but after the fix was posted, a Staff member mentioned the fix had already been posted, but did NOT confirm that the fix there was the official fix.

                  I have found the official fix (which is the same in the thread above). It is here.
                  -Justin "JJR512" Rebbert
                  JJR512.com: Chat about anything!

                  Comment


                  • #10
                    I'm having a problem with the original point of this thread.

                    First of all, I fixed the SQL problem as discussed above.

                    I've added a custom field named SETI Status. When I go back to edit profile fields, the link to edit this one has the number 5, so that is what I assume the number is that I'm supposed to replace into this: $userinfo[fieldx]. Well I've added $userinfo[5] into the postbit template, so this is what I have:
                    Code:
                    <table width="100%" cellpadding="4" cellspacing="0" border="0">
                    <tr><td width="100%">
                    <a name="post$post[postid]"></a>
                    $post[firstnewinsert]
                    <normalfont><B>$post[username]</B></normalfont><br>
                    <smallfont>$post[usertitle]</smallfont><br><br>
                    $post[avatar]<br><br>
                    <smallfont>[b]$userinfo[5]<br>[/b]Registered: $post[joindate]<br>Location: $post[field2]<br>Posts: $post[posts]</smallfont>
                    </td></tr></table>
                    (Not the entire template, of course, but that is the relevant part and the only part that has been changed.

                    Now I've added data in the field for my own profile, and looked at a thread that I've posted in. Nothing shows up above the Registered: date, or anywhere else. What am I doing wrong, or how do I fix this? I note that all the other variables in this section seem to start with $post. Is that important?
                    -Justin "JJR512" Rebbert
                    JJR512.com: Chat about anything!

                    Comment


                    • #11
                      It needs to be $userinfo[field5]

                      Comment

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