Announcement

Collapse
No announcement yet.

conditionals for custom profile fields in user profile

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

  • [Forum] conditionals for custom profile fields in user profile

    I have found an endless supply of information on how to use conditionals for custom profile fields to show in postbit and postbit legacy.

    Code:
    <vb:if condition="$post['fieldx']">
    my link and image information
    </vb:if>
    What I am looking for is an alternative conditional to do this in users profiles as the above does not work in the other templates.

    I have also tried with no sucess:
    Code:
    <vb:if condition="$bbuserinfo['fieldx']">
    my link and image information
    </vb:if>
    It just seems to me that it would make sense to have $post['fieldx'] available in the user profiles.

    Can anyone help me Pleeeeeeease....

    Thank you in advance for any help
    http://www.progamerclans.com/forum/i...ine=1270765165

  • #2
    Originally posted by XLCR GODFATHER View Post
    I have found an endless supply of information on how to use conditionals for custom profile fields to show in postbit and postbit legacy.

    Code:
    <vb:if condition="$post['fieldx']">
    my link and image information
    </vb:if>
    What I am looking for is an alternative conditional to do this in users profiles as the above does not work in the other templates.

    I have also tried with no sucess:
    Code:
    <vb:if condition="$bbuserinfo['fieldx']">
    my link and image information
    </vb:if>
    It just seems to me that it would make sense to have $post['fieldx'] available in the user profiles.

    Can anyone help me Pleeeeeeease....

    Thank you in advance for any help
    Actually your logic is "flawed" post for postbit templates nothing to to with comments being posted or anything of that nature if that came to mind etc.

    Try $userinfo[fieldX]

    bbuserinfo would display YOUR field in the template not their field for you to see, got it?


    Former vBulletin Support Staff
    Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
    Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!
    Need a Host? - I recommend URLJet

    Comment


    • #3
      Yes that is the exact problem I had with bbuserinfo

      sorry I am very new to this

      is $userinfo['fieldx'] in the vb raw conditionals as well?

      will {vb:raw userinfo.fieldx} work in the other bits of the code?

      link example:
      Code:
      <a href="http://www.randomsite.com/profile/{vb:raw userinfo.fieldx}>click here</a>
      http://www.progamerclans.com/forum/i...ine=1270765165

      Comment


      • #4
        Originally posted by XLCR GODFATHER View Post
        Yes that is the exact problem I had with bbuserinfo

        sorry I am very new to this

        is $userinfo['fieldx'] in the vb raw conditionals as well?

        will {vb:raw userinfo.fieldx} work in the other bits of the code?

        link example:
        Code:
        <a href="http://www.randomsite.com/profile/{vb:raw userinfo.fieldx}>click here</a>
        Well...

        Only $userinfo['fieldx'] in the IF part of it i.e.

        Code:
        <vb:if condition="$userinfo['fieldx']"><a href="http://www.randomsite.com/profile/{vb:raw userinfo.fieldx}>click here</a></vb:if>
        SO that will only show the link IF that user enter in something into filed X o.e. your field ID number otherwise it will not show.

        $userinfo['fieldx'] in the Condition but the raw in the actual inner part of the code .


        Former vBulletin Support Staff
        Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
        Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!
        Need a Host? - I recommend URLJet

        Comment


        • #5
          This worked perfect thank you very very much!
          http://www.progamerclans.com/forum/i...ine=1270765165

          Comment


          • #6
            Originally posted by XLCR GODFATHER View Post
            This worked perfect thank you very very much!
            Great!!

            You have seen these posted by BBR correct? http://www.vbulletin.org/forum/showthread.php?t=231525 those come in handy when your doing "tinkering".

            And no problem , I was taking a break from working on a site so time to help others with theirs eh? Ok about time for this Night Owl to hit the hay .


            Former vBulletin Support Staff
            Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
            Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!
            Need a Host? - I recommend URLJet

            Comment


            • #7
              Excellent source of information thank you.

              Also now that I see your sig If your interested I have a code I need.

              The details can be found at http://www.vbulletin.org/forum/showt...73#post2089173
              http://www.progamerclans.com/forum/i...ine=1270765165

              Comment


              • #8
                Originally posted by XLCR GODFATHER View Post
                Excellent source of information thank you.

                Also now that I see your sig If your interested I have a code I need.

                The details can be found at http://www.vbulletin.org/forum/showt...73#post2089173
                Ahh we can't discuss such on here, imo your best bet is to leave that open and carefully review all who apply for the job then make an informed decision on who to go with, others out there besides me and the sig is to show of my new site and the free "Basics" forum which will have more new videos on the way it just happens that my logo has that phrase near the top is all, definitely not meant nor intended as a direct form of advertisement for services tbo, simply a cropped and shrunk version of my sites logo as many others use on occasion as well.

                ** Also many seem to forget that there is a Unpaid Request section on vBulletin.org as well here: http://www.vbulletin.org/forum/forumdisplay.php?f=112 so imo, post there a few days in advance and if you don't get a reply via pm or post then make a paid request here: http://www.vbulletin.org/forum/forumdisplay.php?f=30 and read the sticky threads at the top to become well informed, research any coders, view posts whatever you need to do to make an informed decision!


                Former vBulletin Support Staff
                Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
                Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!
                Need a Host? - I recommend URLJet

                Comment

                Related Topics

                Collapse

                Working...
                X