Dleshka.org
Авторизация

Хак Хак по показу баннеров между любыми новостями.

+11
TipTop 6-01-2010 Хаки DLE 2 комментария
Хак по показу баннеров между любыми новостями.


Хак, который позволяет ставить баннера между любой новостью.


идем engine/inc/banners.php
ищем:
echo makeDropDown


заменяем на :
echo makeDropDown( array ("0" => $lang['banners_s_0'], "1" => $lang['banners_s_1'], "2" => $lang['banners_s_2'], "3" => $lang['banners_s_3'], "4" => $lang['banners_s_4'], "5" => $lang['banners_s_5'], "6" => $lang['banners_s_6'], "7" => $lang['banners_s_7'], "8" => $lang['banners_s_8'], "9" => $lang['banners_s_9'], "10" => $lang['banners_s_10'], "11" => $lang['banners_s_11'] ), "short_place", $short_place );


идем engine/modules/banners.php
ищем:
switch ($value['short_place']) //выбираем расположение баннера
{


заменяем внутренность, т.е. все case на :
case 1 : //Между 1 и 2
$ban_short['onetwo'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 2 : //Между 2 и 3
$ban_short['twothird'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 3 : //Между 3 и 4
$ban_short['thirdfor'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 4 : //Между 4 и 5
$ban_short['forfift'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 5 : //Между 5 и 6
$ban_short['fiftsix'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 6 : //Между 6 и 7
$ban_short['sixseven'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 7 : //Между 7 и 8
$ban_short['seveneith'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 8 : //Между 8 и 9
$ban_short['eithnine'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 9 : //Между 9 и 10
$ban_short['nineten'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 10 : //Между 10 и 11
$ban_short['tenelewen'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;
case 11 : //Между 11 и 12
$ban_short['elewentwell'][] = array ("text" => $value['code'], "zakr" => $value['bstick'] );
break;


идем engine/modules/show.short.php
ищем:
if( isset( $ban_short ) ) {

заменяем внутренность на :
for($indx = 0, $max = sizeof( $ban_short['onetwo'] ), $banners_onetwo = ''; $indx < $max; $indx ++)
if( $ban_short['onetwo'][$indx]['zakr'] ) {
$banners_onetwo .= $ban_short['onetwo'][$indx]['text'];
unset( $ban_short['onetwo'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['twothird'] ), $banners_twothird = ''; $indx < $max; $indx ++)
if( $ban_short['twothird'][$indx]['zakr'] ) {
$banners_twothird .= $ban_short['twothird'][$indx]['text'];
unset( $ban_short['twothird'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['thirdfor'] ), $banners_thirdfor = ''; $indx < $max; $indx ++)
if( $ban_short['thirdfor'][$indx]['zakr'] ) {
$banners_thirdfor .= $ban_short['thirdfor'][$indx]['text'];
unset( $ban_short['thirdfor'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['forfift'] ), $banners_forfift = ''; $indx < $max; $indx ++)
if( $ban_short['forfift'][$indx]['zakr'] ) {
$banners_forfift .= $ban_short['forfift'][$indx]['text'];
unset( $ban_short['forfift'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['fiftsix'] ), $banners_fiftsix = ''; $indx < $max; $indx ++)
if( $ban_short['fiftsix'][$indx]['zakr'] ) {
$banners_fiftsix .= $ban_short['fiftsix'][$indx]['text'];
unset( $ban_short['fiftsix'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['sixseven'] ), $banners_sixseven = ''; $indx < $max; $indx ++)
if( $ban_short['sixseven'][$indx]['zakr'] ) {
$banners_sixseven .= $ban_short['sixseven'][$indx]['text'];
unset( $ban_short['sixseven'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['seveneith'] ), $banners_seveneith = ''; $indx < $max; $indx ++)
if( $ban_short['seveneith'][$indx]['zakr'] ) {
$banners_seveneith .= $ban_short['seveneith'][$indx]['text'];
unset( $ban_short['seveneith'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['eithnine'] ), $banners_eithnine = ''; $indx < $max; $indx ++)
if( $ban_short['eithnine'][$indx]['zakr'] ) {
$banners_eithnine .= $ban_short['eithnine'][$indx]['text'];
unset( $ban_short['eithnine'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['nineten'] ), $banners_nineten = ''; $indx < $max; $indx ++)
if( $ban_short['nineten'][$indx]['zakr'] ) {
$banners_nineten .= $ban_short['nineten'][$indx]['text'];
unset( $ban_short['nineten'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['tenelewen'] ), $banners_tenelewen = ''; $indx < $max; $indx ++)
if( $ban_short['tenelewen'][$indx]['zakr'] ) {
$banners_tenelewen .= $ban_short['tenelewen'][$indx]['text'];
unset( $ban_short['tenelewen'][$indx] );
}
for($indx = 0, $max = sizeof( $ban_short['elewentwell'] ), $banners_elewentwell = ''; $indx < $max; $indx ++)
if( $ban_short['elewentwell'][$indx]['zakr'] ) {
$banners_elewentwell .= $ban_short['elewentwell'][$indx]['text'];
unset( $ban_short['elewentwell'][$indx] );
}
$onetwo = floor($config['news_number'] - ($config['news_number'] -1));
$twothird = floor( $onetwo + 1 );
$thirdfor = floor( $onetwo + 2 );
$forfift = floor( $onetwo + 3 );
$fiftsix = floor( $onetwo + 4 );
$sixseven = floor( $onetwo + 5 );
$seveneith = floor( $onetwo + 6 );
$eithnine = floor( $onetwo + 7 );
$nineten = floor( $onetwo + 8 );
$tenelewen = floor( $onetwo + 9 );
$elewentwell = floor( $onetwo + 10 );


ниже по коду должно быть:
}
}

далее ниже ищем:
if( isset( $middle) ) {


заменяем все это на:
if( isset( $onetwo ) ) {
if( $news_c == $onetwo ) {
$tpl->copy_template .= bannermass( $banners_onetwo, $ban_short['onetwo'] );
} else if( $news_c == $twothird ) {
$tpl->copy_template .= bannermass( $banners_twothird, $ban_short['twothird'] );
} else if( $news_c == $thirdfor ) {
$tpl->copy_template .= bannermass( $banners_thirdfor, $ban_short['thirdfor'] );
} else if( $news_c == $forfift ) {
$tpl->copy_template .= bannermass( $banners_forfift, $ban_short['forfift'] );
} else if( $news_c == $fiftsix ) {
$tpl->copy_template .= bannermass( $banners_fiftsix, $ban_short['fiftsix'] );
} else if( $news_c == $sixseven ) {
$tpl->copy_template .= bannermass( $banners_sixseven, $ban_short['sixseven'] );
} else if( $news_c == $seveneith ) {
$tpl->copy_template .= bannermass( $banners_seveneith, $ban_short['seveneith'] );
} else if( $news_c == $eithnine ) {
$tpl->copy_template .= bannermass( $banners_eithnine, $ban_short['eithnine'] );
} else if( $news_c == $nineten ) {
$tpl->copy_template .= bannermass( $banners_nineten, $ban_short['nineten'] );
} else if( $news_c == $tenelewen ) {
$tpl->copy_template .= bannermass( $banners_tenelewen, $ban_short['tenelewen'] );
} else if( $news_c == $elewentwell ) {
$tpl->copy_template .= bannermass( $banners_elewentwell, $ban_short['elewentwell'] );
}
$news_c ++;
}


ниже по коду должно быть:
$i ++;



открываем adminpanel.lng
ищем все:
'banners_s_1' => ".....",


заменяем на:
'banners_s_1' => "Между 1 и 2",
'banners_s_2' => "Между 2 и 3",
'banners_s_3' => "Между 3 и 4",
'banners_s_4' => "Между 4 и 5",
'banners_s_5' => "Между 5 и 6",
'banners_s_6' => "Между 6 и 7",
'banners_s_7' => "Между 7 и 8",
'banners_s_8' => "Между 8 и 9",
'banners_s_9' => "Между 9 и 10",
'banners_s_10' => "Между 10 и 11",
'banners_s_11' => "Между 11 и 12",
Информация
Зарегистрируйтесь чтобы комментировать публикацию.
Roots69
16 марта 2010 12:58
+ 0 -
Нужный хак ! Спасибо smile
nastena2005
14 декабря 2010 22:30
+ 0 -
не выводит на сайте :sad:
Авторизация