Announcement

Collapse
No announcement yet.

Different forums, different headers

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

  • #16
    already a solution for this problem? I have the same problem... showing 2 banners in a certain forum. So it seems something is wrong with the if else statement.

    Code:
    <if condition="$forumid == 17">
        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="images_pb/shark/17/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
    </if>
    <else />
        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
    </if>

    Comment


    • #17
      Your conditional structure is wrong. You are ending the first "if" before the "else" such that the else belongs to no "if" statement. Remove the red code and it will be syntactically correct:

      Code:
      <if condition="$forumid == 17">
      	<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="images_pb/shark/17/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
      [color=red]</if>[/color]
      <else />
      	<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
      </if>

      Comment


      • #18
        Thanks! It works... is it possible to give more forumid's in the same if statement? Or do I have to make a new if statement for each forumid?

        Comment


        • #19
          okay, found it..

          <if condition="$forumid == 17 OR $forumid == 18">

          Comment


          • #20
            That works, but I like this method better:

            Code:
            <if condition="in_array($forumid, array(17,18))">

            Comment


            • #21
              Okay, no I have the same problem again, showing 2 banners, instead of one. Probably I'm missing something.

              Code:
              [COLOR=black]<if condition="in_array($forumid, array(20,26,27,5))">
              [/COLOR][COLOR=black]SHOW PICTURE
              [/COLOR]
              [COLOR=black]<if condition="in_array($forumid, array(17,30))">[/COLOR]
              [COLOR=black]SHOW PICTURE [/COLOR]
                
              [COLOR=black]<else />[/COLOR]
              SHOW PICTURE
              [COLOR=black]</if>[/COLOR]

              Comment


              • #22
                Well, I thought I would try to solve this by myself... I was looking into the code of this and other vbulletin stuff, but then I had to ask myself in which language this is written? The if/else statement above is not php. So which language do I have to learn so I know how to program in vbulletin? xhtml I see in the headers, but then I still can't find any info on the if/else statement as used here... Can anyone tell me???

                Noob trying to become a non-noob.

                Comment


                • #23
                  I learned if else statements in C++, maybe thats the part of it
                  lincolnsofdistinction.org

                  Comment


                  • #24
                    I thought I would put the same piece of code translated to php into the header, but it still gives 2 banners next to each other.

                    Code:
                    if (condition="in_array($forumid, array(20,26,27,5))")
                    {
                        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="../rotator/sharkbait/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
                    }
                    
                    else if (condition="in_array($forumid, array(17,30))")
                    {
                        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="../rotator/sp-atl/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
                    }
                    
                    else
                    {
                        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="../rotator/shark/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
                    }
                    Help!

                    Comment


                    • #25
                      Found the solution:

                      Code:
                      <if condition="in_array($forumid, array(20,26,27,5))">
                          <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="../rotator/sharkbait/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
                      
                      <else />
                          <if condition="in_array($forumid, array(17,30))">
                              <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="../rotator/sp-atl/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
                          <else />
                              <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="../rotator/shark/rotator.php" border="0" alt="$vboptions[bbtitle]" /></a></td>
                          </if>
                      </if>
                      more info on: http://www.vbulletin.com/docs/html/t...e_conditionals

                      Comment


                      • #26
                        Will this rotate a banner without using a banner hack?

                        http://www.vbulletin.org/forum/showt...hp?t=89327#top
                        http://www.vbulletin.org/forum/showp...24&postcount=4

                        Comment


                        • #27
                          No, but this might work for you.

                          Comment


                          • #28
                            Thank you for the information, until I can figure out phpAdsNew. I think I will try your method instead .

                            Thanks once again Jake.
                            Last edited by Jose Amaral Rego; Mon 5 Dec '05, 10:27am.

                            Comment


                            • #29
                              For me this will rotate a banner, but you need to use the rotator.php file. You just simply make some banners and put them in a directory together with the rotator.php file. Then you'll link to the rotator.php file for the image, and the file will send everytime a different banner.
                              With the piece of code above I can use different kind of banner rotations for different kind of forums. Works pretty nice and very easy to update! Only upload the banner into the correct directory.
                              Last edited by Jorg; Sat 12 Nov '05, 11:53pm.

                              Comment


                              • #30
                                Can you show me an example (or link) on how to do this with a different footer as well so I can put in a right column of ads (open <TD> in header, close it in the footer to get the right column displayed)? (Using 3.5)

                                Comment

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