Announcement

Collapse
No announcement yet.

Postbit conditional question

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

  • Postbit conditional question

    I know next to nothing about all of this, so please be patient.

    I want to write a conditional into the postbit that relegates avatars to only certain forums on my board. I have a friend who has this on her board, and she said I would need to list forumids. That is no problem, but I just don't understand how the actual conditional will read or where exactly to place it.

    If someone wouldn't mind helping me and being incredibly specific, I would be ever so grateful.

    Thanks in advance.

  • #2
    OK, first open postbit template, and find
    <if condition="$show['avatar']">

    Then replace it with
    <if condition="$show['avatar']" AND $thread[forumid] == X>
    "X" is a forumid that avatars are displayed.

    If you want avatars to show in multiple forums, use the conditional below.
    <if condition="$show['avatar']" AND ($thread[forumid] == X OR $thread[forumid] == Y OR...)>

    I think this will be fine.
    Last edited by tantei3; Mon 24 Jan '05, 1:09am.

    Comment


    • #3
      Thank you so much. That worked perfectly.

      I can't thank you enough.

      Comment


      • #4
        Ok, maybe I was looking at the wrong thing when I posted before, but this does not actually seem to be working.

        When I add the conditional and save the template I get this message: The following error occurred when attempting to evaluate this template:
        "Parse error: parse error, unexpected '\"' in /home/twinshoc/public_html/forums/includes/adminfunctions_template.php(3054) : eval()'d code on line 38

        This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish."

        Can anyone help me?

        Comment


        • #5
          Which version of vB are you running? For 3.0.6, line 38 is:

          'editor_styles_button_normal',
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment


          • #6
            I am using 3.0.5 with the security patch applied. Also, I do not get the error message if the conditional isn't in the postbit template.

            Comment


            • #7
              Nevermind this. One of my members is a coder and was able to figure out the problem. Apparently, one of the " was in the wrong location; there should be no close quotation mark after the initial ['avatar].

              Comment

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