
Хаки для dle который позволит вам установить в полной новости интернет-портала несколько постеров с переключением, как на представленной иллюстрации, что сделает кино порталы ещё более привлекательными, интересными и удобными. Работает на js-скрипте, простая установка и легкий код.
Хак для Dle несколько постеров с переключением
Инструкция по установке:
Открываем show.full.php
Находим:
$tpl->set( '{pages}', '' ); $row['full_story'] = preg_replace( "''si", "", $row['full_story'] ); } }
Вставляем после:
$sql_poster = $db->query( "SELECT images, news_id FROM " . PREFIX . "_images where news_id = '{$row['id']}'" ); $poster = $db->get_row($sql_poster);if ($poster['images'] != "") {$scrsList = explode('|||',$poster['images']); $scrs = ''; $cntscrs = count($scrsList); $ai = 0; foreach ($scrsList as $scr) { $ai++; $scr = trim($scr); $poster_temp = explode("/",$scr); $poster_name = $poster_temp[1]; $poster_data = substr($scr,0,8); if ($ai!="1") { if ($ai=="2"){ $cliker = "<input id="posters_q_1" onclick="jаvascript: posters1()" value="1" type="reset"><input id="posters_q_{$ai}" onclick="jаvascript: posters{$ai}()" value="{$ai}" type="reset">"; }else { $cliker = "<input id="posters_q_{$ai}" onclick="jаvascript: posters{$ai}()" value="{$ai}" type="reset">"; } $ai2++; $scrs .= '<div style="display:none;"><a href="'. $config ['http_home_url'] . 'uploads/posts/'.$poster_data.'/'.$poster_name.'" onclick="return hs.expand(this)" ><img src="'. $config ['http_home_url'] . 'uploads/posts/'.$poster_data.$poster_name.'" class="instant" width="300"></a></div>'.$cliker.''; } else $scrs .= '<div id="posters_q"><a href="'. $config ['http_home_url'] . 'uploads/posts/'.$poster_data.'/'.$poster_name.'" onclick="return hs.expand(this)" ><img src="'. $config ['http_home_url'] . 'uploads/posts/'.$poster_data.$poster_name.'" class="instant" width="300"></a></div>'; if ($ai<$cntscrs) $scrs .= '';$asdfgdfg.= <<<HTML<script type="text/javascript" src="/templates/Default/jquery.js"></script><script type="text/javascript">$("#posters_q_{$ai}").click(function(){$("#posters_q").html('<a href="{$config ['http_home_url']}uploads/posts/{$poster_data}/{$poster_name}" onclick="return hs.expand(this)" ><img src="{$config ['http_home_url']}uploads/posts/{$poster_data}{$poster_name}" class="instant" width="300"></a>');});</script>HTML;} unset($scrsList); if (!empty($poster['images'])) { $scrall= $posters_q.$scrs.$asdfgdfg;}$tpl->set ( '{poster}', $scrall);} else $tpl->set ( '{poster}', "" );
Далее вставляем в fullstory.tpl :
{poster}
«Автор:» toxx
Версия: 9.0-9.4 - 9.6
Примечание: если вы их не вставляли в новость но загрузили на сервер, они уже будут отображаться в новости.
Предлагаем хак для dle несколько постеров с переключением