Changeset 1012 in ExiteCMS


Ignore:
Timestamp:
10/24/07 21:03:42 (4 years ago)
Author:
root
Message:

Moved the get_ad() module out of the trunk and into the advertising module

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • modules/common/ad_side_panel/php-files/modules/ad_side_panel/ad_side_panel.php

    r996 r1012  
    1717} else { 
    1818 
    19     // load the locale for this module 
    20     require_once PATH_LOCALE.LOCALESET."admin/adverts.php"; 
     19    // check if the advertising module is installed 
     20    if (file_exists(PATH_MODULES."advertising/get_ad.php")) { 
    2121 
    22     // check if the advertising module is installed 
    23     if (file_exists(PATH_INCLUDES."advertisement.php")) { 
    24          
    25         // load the advertisement include module 
    26         require_once PATH_INCLUDES."advertisement.php"; 
     22        // load the locale for this panel 
     23        if (file_exists(PATH_MODULES."advertising/locale/".$settings['locale'].".php")) { 
     24                $locale_file = PATH_MODULES."advertising/locale/".$settings['locale'].".php"; 
     25        } else { 
     26                $locale_file = PATH_MODULES."advertising/locale/English.php"; 
     27        } 
     28        include $locale_file; 
     29 
     30        // load the ad include module 
     31        require_once PATH_MODULES."advertising/get_ad.php"; 
    2732     
    2833        // array's to store the variables for this panel 
    29         $ad = get_advert(0,0,0); 
     34        $ad = get_ad(0,0,0); 
    3035 
    3136    } else { 
  • trunk/forum/index.php

    r834 r1012  
    2525include PATH_LOCALE.LOCALESET."forum/main.php"; 
    2626 
    27 // load the advertisement include module 
    28 require_once PATH_INCLUDES."advertisement.php"; 
    29 $variables['advert'] = get_advert(array(1,2)); 
     27// load the advertisement include module and get an ad for this forum page 
     28if (file_exists(PATH_MODULES."advertising/get_ad.php")) { 
     29    // load the ad include module 
     30    require_once PATH_MODULES."advertising/get_ad.php"; 
     31    $variables['advert'] = get_ad(array(1,2)); 
     32} else { 
     33    $variables['advert'] = ""; 
     34} 
    3035 
    3136// when is a folder hot? 
  • trunk/forum/viewforum.php

    r834 r1012  
    3535require_once PATH_INCLUDES."forum_functions_include.php"; 
    3636 
    37 // load the advertisement include module 
    38 require_once PATH_INCLUDES."advertisement.php"; 
    39 $variables['advert'] = get_advert(array(1,2)); 
     37// load the advertisement include module and get an ad for this forum page 
     38if (file_exists(PATH_MODULES."advertising/get_ad.php")) { 
     39    require_once PATH_MODULES."advertising/get_ad.php"; 
     40    $variables['advert'] = get_ad(array(1,2)); 
     41} else { 
     42    $variables['advert'] = ""; 
     43} 
    4044 
    4145// define how many threads per page we want 
Note: See TracChangeset for help on using the changeset viewer.