Documentation

Installation

Perform the following operations to install the Advertising module.
  1. Go to the page Modules and click Set beside the Advertising module.
  2. After the installation, go to the page Types of banners and create the required types of banners.
  3. In the HTML template of a site, allocate areas which will be used to display banners. After this, use the following model to display banners:

    <?
    // obtain the HTML code of banners before a page is displayed
    if (CModule::IncludeModule("advertising")):
    	$strBanner_top    = CAdvBanner::Show("TOP"); 
    	$strBanner_bottom = CAdvBanner::Show("BOTTOM"); 
    	$strBanner_left   = CAdvBanner::Show("LEFT"); 
    endif;
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head></head>
    <body>
    	<?
    	// display the banner HTML 
           // in the previously allocated advertising areas
    	echo $strBanner_top;
    	echo $strBanner_bottom;
    	echo $strBanner_left;
    	?>
    </body>
    </html>
    In other words, you should store the HTML of all banners in PHP variables prior to displaying the HTML content. Then, display them in the required design area.
© «Bitrix24», 2001-2024