No announcement yet.

Ads in forum headers cause problems in vb3.. open for suggestions

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ads in forum headers cause problems in vb3.. open for suggestions


    I have some html in some of my forum headers via a replacement variable. You can see the two ads in my forum headers at (in the category and Michigan Fishing category). They still work with vb3. The problem comes if you click on the forum header itself for that category to show only the forums in that category.

    As you can see at:

    I get some extra junk in the trunk at the top of the page. Any suggestions?

  • #2
    You put the ad code in the forum description, along with some fancy HTML to format the appearance of the ad. On forumdisplay pages the meta description tag uses the description of the current forum for its content. The HTML in your forum description is breaking the meta description tag which is causing the "extra junk."

    You can either change your strategy for inserting the ads (don't use the forum description field) or you can remove the description tag from your headinclude template:

    Admin CP -> Styles & Templates -> Style Manager -> Common Templates (in the menu)

    Remove this code from the headinclude template:

    <meta name="description" content="$vboptions[description]" />
    The only adverse effect that removing this code could have is that some search engines might not index your site as well. But most search engines today index based on page content instead of the meta description tag.


    • #3
      For now I'll get rid of the meta code, but I'm open for alternate suggestions for putting a banner in a category header.


      • #4
        Hmmm, that didn't seem to do the trick. Something wrt this must have changed since vb2 as I didn't have this problem with that version.


        • #5
          Are you viewing the same style you are editing? I really thought this would work.

          If you are still having problems can you send me a private message with an admin login for your forums so I can take a look?


          • #6
            I believe so.... yes. I edited the top level style in my heirarchy. PM sent....


            • #7


              • #8
                I replied to your PM:

                Originally posted by Jake Bunce
                The HTML was still in your forum descriptions by way of replacement variables. I changed the way your ads are displayed.

                I added this code to your phpinclude_start template:

                PHP Code:
                $forumads[2] = "{GeneralFishing}";
                $forumads[6] = "{michigantroutstreams}"
                Where the numbers are the forumids of your forums with ads. The values in quotes are the values that used to be in your forum descriptions.

                And I added the red code to your forumhome_forumbit_level1_nopost template:

                			<if condition="$show['forumdescription'] [color=red]OR $GLOBALS['forumads'][$forum['forumid']][/color]"><div class="smallfont">$forum[description][color=red]{$GLOBALS['forumads'][$forum['forumid']]}[/color]</div></if>
                Now if you want to display an ad for a category, just edit your phpinclude_start template to assign the ad code to a variable with the forum's forumid.

                Let me know if you have any questions about the method I implemented.