Модуль DLE Парсер Автоматический поиск торрент раздач на AJAX 1.2

usergeyv

Пользователь
Регистрация
09.10.14
Сообщения
17
Реакции
0
Баллы
1


Поиск торрент файлов происходит по названию новости или дополнительному полю




Код:
Установка поиска раздач по {title}!
1 Распаковать архив и скопировать все в корень сайта
2 Открыть файл /engine/modules/show.full.php
Найти ниже DLE 10
$tpl->set( '{title}', $metatags['title'] );
Для DLE 10.1 выше
$tpl->set( '{title}', $row['title'] );
Ниже добавить $torInfo = <<<JS
<div id="torrent_info"></div>
<div id="torrent_loading" align="center"><img src="/images/loading.gif"><br><b>Поиск торрент раздач, пожалуйста подождите!</b></div>
<script type="text/javascript">
$(function(){ $('#torrent_loading').show(); $.post(dle_root + 'engine/ajax/torrents.php', {id: '{$row['id']}', title: '{$row['title']}'}, function(data){ $('#torrent_loading').hide(); $('#torrent_info').fadeIn(500).html(data); }); return false;
});
</script>
JS; $tpl->set( '{torrents}', $torInfo );
В шаблоне fullstory.tpl в любое место вставить
{torrents}
---------------------------------------------------------------------------------------------
Установка поиска раздач по дополнительному полю!
1 Залить все файлы на сервер
2 Открыть файл /engine/modules/show.full.php
Найти
Ниже DLE 10
$tpl->set( '{title}', $metatags['title'] );
Для DLE 10.1 выше
$tpl->set( '{title}', $row['title'] );
Ниже добавить $xfieldsdata = xfieldsdataload( $row['xfields'] ); $torInfo = <<<JS
<div id="torrent_info"></div>
<div id="torrent_loading" align="center"><img src="/images/loading.gif"><br><b>Поиск торрент раздач, пожалуйста подождите!</b></div>
<script type="text/javascript">
$(function(){ $('#torrent_loading').show(); $.post(dle_root + 'engine/ajax/torrents.php', {id: '{$row['id']}', title: '{$xfieldsdata['название доп поля']}'}, function(data){ $('#torrent_loading').hide(); $('#torrent_info').fadeIn(500).html(data); }); return false;
});
</script>
JS; $tpl->set( '{torrents}', $torInfo );
В шаблоне fullstory.tpl в любое место вставить
{torrents}
-----------------------------------------------------------------------------------

https://yadi.sk/d/UD4SZWxP3LdkcH
 

Статистика форума

Темы
200.634
Сообщения
380.522
Пользователи
327.876
Новый пользователь
pm1199
Сверху Снизу