Skip to content

Instantly share code, notes, and snippets.

@dlenettr
Created October 11, 2014 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlenettr/fb4a6b2fba2154e997dc to your computer and use it in GitHub Desktop.
Save dlenettr/fb4a6b2fba2154e997dc to your computer and use it in GitHub Desktop.
Reklam Kodu 10.1 için (398)
if( $config['allow_banner'] ) include_once ENGINE_DIR . '/modules/banners.php';
if( $config['allow_banner'] AND count( $banners ) ) {
foreach ( $banners as $name => $value ) {
$tpl->result['content'] = str_replace( "{banner_" . $name . "}", $value, $tpl->result['content'] );
if ( $value ) {
$tpl->result['content'] = str_replace ( "[banner_" . $name . "]", "", $tpl->result['content'] );
$tpl->result['content'] = str_replace ( "[/banner_" . $name . "]", "", $tpl->result['content'] );
}
}
}
$tpl->result['content'] = preg_replace( "'{banner_(.*?)}'si", "", $tpl->result['content'] );
$tpl->result['content'] = preg_replace( "'\\[banner_(.*?)\\](.*?)\\[/banner_(.*?)\\]'si", "", $tpl->result['content'] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment