Announcement

Collapse
No announcement yet.

Different forums, different headers

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

  • Different forums, different headers

    I run a banner rotation engine on my forums. It works fine with vB.
    Right now, all the same banners run on ALL the forums. I want one forum to run different banners. Where can I change the HTML for that particular forum ?

    I know I can change the HTML in the header variables, but that changes all the forums to the same thing.
    Thx,

    dave
    For some, marriage is a match made in Heaven. For others, it's a butane lighter from Hell :eek:

  • #2
    Use code like this in your header:

    Code:
    <if condition="$forumid == [color=red]X[/color]">
    	[color=red]BANNER CODE FOR FORUMID X[/color]
    <else />
    	[color=red]BANNER CODE FOR ALL OTHER FORUMS[/color]
    </if>

    Comment


    • #3
      Thanks Jake. I just looked at my server files and don't see where to upload the new file to.

      dave
      For some, marriage is a match made in Heaven. For others, it's a butane lighter from Hell :eek:

      Comment


      • #4
        Admin CP -> Styles & Templates -> Style Manager -> Common Templates (in the menu) -> header

        Comment


        • #5
          I amaze myself sometimes..
          I had it open right in front of me.

          Thx,

          dave
          For some, marriage is a match made in Heaven. For others, it's a butane lighter from Hell :eek:

          Comment


          • #6
            Originally posted by Jake Bunce
            Use code like this in your header:

            Code:
            <if condition="$forumid == [color=red]X[/color]">
            	[color=red]BANNER CODE FOR FORUMID X[/color]
            <else />
            	[color=red]BANNER CODE FOR ALL OTHER FORUMS[/color]
            </if>
            Jake if I want to add a few different conditionals how do I go about it?? I tried this but its not going good. Thanks

            Code:
            <center><if condition="$forumid == 115"><a href='http://www.axill.com/trackingcode.aspx?affid=8208&pid=1595&bid=4463&ad=8208'><img border=0 src= http://www.axill.com/banners/1595ax468x60.bmp></a><if condition="$forumid == 250"><a href='http://www.axill.com/trackingcode.aspx?affid=8208&pid=1726&bid=4499&s=8208'><img border=0 src= http://beemrdwn.com/imp.aspx?l=3491&c=1810></a><if condition="$forumid == 216"><a href='http://www.axill.com/trackingcode.aspx?affid=8208&pid=1619&bid=3964&s=8208'><img border=0 src= http://www.axill.com/banners/1619ax468x60a.gif></a><else /><!-- / GOOGLE ADS -->
            <br><script type="text/javascript"><!--
            google_ad_client = "pub-6600210273009452";
            google_ad_width = 728;
            google_ad_height = 90;
            google_ad_format = "728x90_as";
            google_ad_type = "text_image";
            google_ad_channel ="";
            google_color_border = "2D5893";
            google_color_bg = "99AACC";
            google_color_link = "000000";
            google_color_url = "000099";
            google_color_text = "003366";
            //--></script>
            <script type="text/javascript"
              src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script><br />
            </center><br /></if>
            <br />
            lincolnsofdistinction.org

            Comment


            • #7
              It is hard to follow your code when all of the conditional statements are in one line, but it looks like you aren't closing all of your "if" tags.

              For multiple banners in multiple forums you can just create multiple conditions:

              Code:
              <if condition="$forumid == [color=red]X[/color]">
              	[color=red]BANNER CODE FOR FORUMID X[/color]
              </if>
              <if condition="$forumid == [color=red]Y[/color]">
              	[color=red]BANNER CODE FOR FORUMID Y[/color]
              </if>
              <if condition="$forumid == [color=red]Z[/color]">
              	[color=red]BANNER CODE FOR FORUMID Z[/color]
              </if>

              Comment


              • #8
                yeah I didn't intend to do them all in one line It didn't appear like that in the template, sorry. I didn't know if I had to close each <if> thanks! I appreciate it!
                lincolnsofdistinction.org

                Comment


                • #9
                  Originally posted by Jake Bunce
                  It is hard to follow your code when all of the conditional statements are in one line, but it looks like you aren't closing all of your "if" tags.

                  For multiple banners in multiple forums you can just create multiple conditions:

                  Code:
                  <if condition="$forumid == [color=red]X[/color]">
                  	[color=red]BANNER CODE FOR FORUMID X[/color]
                  </if>
                  <if condition="$forumid == [color=red]Y[/color]">
                  	[color=red]BANNER CODE FOR FORUMID Y[/color]
                  </if>
                  <if condition="$forumid == [color=red]Z[/color]">
                  	[color=red]BANNER CODE FOR FORUMID Z[/color]
                  </if>
                  shoot! now they both show up together only in the specified forums that the <if> statements designate.

                  Code:
                  <center><if condition="$forumid == 115"><a href='http://www.axill.com/trackingcode.aspx?affid=8208&pid=1595&bid=4463&ad=8208'><img border=0 src= http://www.axill.com/banners/1595ax468x60.bmp></a></if>
                                 <if condition="$forumid == 250"><a href='http://www.axill.com/trackingcode.aspx?affid=8208&pid=1726&bid=4499&s=8208'><img border=0 src= http://beemrdwn.com/imp.aspx?l=3491&c=1810></a></if>
                                 <if condition="$forumid == 216"><a href='http://www.axill.com/trackingcode.aspx?affid=8208&pid=1619&bid=3964&s=8208'><img border=0 src= http://www.axill.com/banners/1619ax468x60a.gif></a></if>
                  <else><!-- / GOOGLE ADS -->
                  <br><script type="text/javascript"><!--
                  google_ad_client = "pub-6600210273009452";
                  google_ad_width = 728;
                  google_ad_height = 90;
                  google_ad_format = "728x90_as";
                  google_ad_type = "text_image";
                  google_ad_channel ="";
                  google_color_border = "2D5893";
                  google_color_bg = "99AACC";
                  google_color_link = "000000";
                  google_color_url = "000099";
                  google_color_text = "003366";
                  //--></script>
                  <script type="text/javascript"
                    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                  </script><br />
                  </center><br /><else />

                  Also, can I seperate the if statements? Or does space cause problems?
                  lincolnsofdistinction.org

                  Comment


                  • #10
                    Spaces don't matter.

                    Comment


                    • #11
                      ok but how do i fix that to not show the google banner when the other requirement is met? Its currently showing both banners when the specified forum is accessed.
                      lincolnsofdistinction.org

                      Comment


                      • #12
                        Can you post a picture or URL so I can see the problem? I don't understand what is happening.

                        The conditionals simply show or hide HTML code depending on the condition. You can place them do show / hide whatever you want. If you want to remove something, delete its HTML code. If you want to hide that thing except for inside of a certain forum, then surround it with an appropriate conditional. That is the basic concept.

                        Comment


                        • #13
                          no I hear you and got the concept of a conditional but the problem is pictured below. It shows forum 115 and is only supposed to reveal the top banner as the if conditional states, but instead it shows both. My seemingly obvious problem is that the exclusion of the google banner isn't occurring because the <else> conditional is wrong somehow.
                          Attached Files
                          lincolnsofdistinction.org

                          Comment


                          • #14
                            What is the code you are using? The basic structure should look like this:

                            Code:
                            <if condition="">
                            
                            <else />
                            
                            </if>

                            Comment


                            • #15
                              yes, I based it off of that but I wanted more then one conditional. Like a certain banner for different forums not just one like you had. You told me in post #7. Whereever I dont specify a specific banner I want the google one to show up.
                              lincolnsofdistinction.org

                              Comment

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