Announcement

Collapse
No announcement yet.

User profile field in postbit?

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

  • User profile field in postbit?

    So I did this in the postbit template... but it works for admins and not everybody else? Any clues?

    PHP Code:
    <if condition="$post['field11']">
         <if 
    condition="$post[field11] == Yes">
              
    $post[signature]
         </if>
    </if> 
    I'm trying to build something onto the postbit template that will allow mods to disable a user's signature if it's outside of the signature rules we have in place.

    For some reason, regular users can't see the $post[field11] variable.
    Kevlar
    Bimmerforums - The Ultimate BMW Forum

  • #2
    Is it a single selection menu? Does "Yes" mean the signature is shown? If so, try this:

    Code:
    <if condition="$post[field11] == 'Yes'">
    	$post[signature]
    </if>

    Comment


    • #3
      Originally posted by Jake Bunce
      Is it a single selection menu? Does "Yes" mean the signature is shown? If so, try this:

      Code:
      <if condition="$post[field11] == 'Yes'">
      	$post[signature]
      </if>
      Nope, when I put that it, it doesn't work... instead of just getting rid of one user's signature, it get's rid of everybody's signature. It works for admins, but general members it erases everyone's signature.

      If I even try to output the variable... the variable will show up for admins, but not for the regualar members.

      I've successfully used $post[field5] in the postbit template before, but for some reason, $post[field11] doesn't want to work
      Kevlar
      Bimmerforums - The Ultimate BMW Forum

      Comment


      • #4
        Found the problem... field11 was maked private, that means only admins can view it... not regular members.

        Thanks for the help.
        Kevlar
        Bimmerforums - The Ultimate BMW Forum

        Comment


        • #5
          I had to change the code slightly...

          Code:
          <if condition="$post[field11] != 'No'">
          because for some reason, when new people registered, the profile field won't default to "Yes". It defaults to blank even tho I set it in the administrator to default to the first value.
          Kevlar
          Bimmerforums - The Ultimate BMW Forum

          Comment


          • #6
            HOW DO I display &quot;Single-Selection Menu&quot; variable in postbit

            $post[field11] works fine for displaying a single-line profile variable but how does one display the contents of a "single-Selection (drop-down) Menu" profile field in, say, the postbit template? Something like just $post[field12]
            does not seem to work in this case.

            (I have a drop-down selection menu in my profiles for "country" which contains several dozen possible responses.)

            Thanks

            Comment


            • #7
              Originally posted by ataraxia
              $post[field11] works fine for displaying a single-line profile variable but how does one display the contents of a "single-Selection (drop-down) Menu" profile field in, say, the postbit template? Something like just $post[field12]
              does not seem to work in this case.

              (I have a drop-down selection menu in my profiles for "country" which contains several dozen possible responses.)

              Thanks
              It should work as long as you have the correct "fieldX".

              If you continue to have problems then I can take a look. Send me a PM with a URL and admin login to your forums.

              Comment

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