• DONATE to NULLED!
    Форуму и его команде можно помочь, мотивировать модераторов разделов.
    Помогите модератору этого раздела killoff лично.

Модуль Все грабберы для DLE

Статус
В этой теме нельзя размещать новые ответы.
Как исправить , возникает при попытке получить новости
engine/inc/rss.php: в удалил 29 строку
стало пускать в админку модуля
 

Вложения

  • 2010-02-04_224540.png
    2010-02-04_224540.png
    247,7 KB · Просмотры: 29
А версия граббера какая?
 
ребят скачал грабер последний, но почему то файл cron закодирован чтоли или кривой какой, там не код а не пойми что, набор буков и цифр это у всех так или у меня что не так? руки вроде не кривые, мож со зрением не так что)))
меня интересует крон, настроить сколько новостей и тп.
 
ребят скачал грабер последний, но почему то файл cron закодирован чтоли или кривой какой, там не код а не пойми что, набор буков и цифр это у всех так или у меня что не так? руки вроде не кривые, мож со зрением не так что)))
меня интересует крон, настроить сколько новостей и тп.
защита phplotkit 2.0.8,декодить могу,кинь файл в свой нынешний пост
 
сожержание файла крона:
PHP:
<?
@ini_set ('memory_limit',"128M");
@set_time_limit (0);
@ini_set ('max_execution_time',0);
@ini_set ('2048M');
@ini_set ('output_buffering','off');
@ob_end_clean ();
clearstatcache ();
ob_implicit_flush (TRUE);
error_reporting (1);
define('DATALIFEENGINE',true);
extract($_REQUEST,EXTR_SKIP);
define('ROOT_DIR',dirname(dirname(__FILE__)));
define('ENGINE_DIR',ROOT_DIR .'/engine');
require_once ENGINE_DIR .'/init.php';
require_once ENGINE_DIR .'/classes/parse.class.php';
include_once ENGINE_DIR.'/classes/rss.class.php';
$parse = new ParseFilter (array (),array (),1,1);
require_once ENGINE_DIR .'/inc/plugins/rss.classes.php';
require_once ENGINE_DIR .'/inc/plugins/rss.functions.php';
require_once ENGINE_DIR .'/inc/plugins/rss.parser.php';
if (ping_post() == true)msg ($lang_grabber['info'],$lang_grabber['info'],'Не законное использования скрипта!!!!!',$PHP_SELF);
$rss_cron_array = get_vars('cron.rss');
if (!$rss_cron_array) {
$rss_cron_array = array();
};
$found = false;
$sql_result = $db->query("SELECT * FROM ".PREFIX ."_rss WHERE allow_auto = '1'");
while ($row = $db->get_row($sql_result)) {
$channel_id = $row['id'];
$found		= in_array($channel_id,$rss_cron_array);
if (!$found) {
$rss_cron_array[] = $channel_id;
start_process($channel_id,$row);
break;
};
};
if ($found) $rss_cron_array = array();
set_vars('cron.rss',$rss_cron_array);
function start_process($channel_id,$channel_info)
{
@include(ENGINE_DIR.'/data/rss_config.php');
global $db,$parse,$config;
$end_title = explode ('==',$channel_info['end_title']);
$dop_sort = explode ('=',$channel_info['short_story']);
$dop_nast = explode ('=',$channel_info['dop_nast']);
$ctp = explode ('=',$channel_info['ctp']);
$start = stripslashes($channel_info['start']);
$finish = stripslashes($channel_info['finish']);
$start_template = stripslashes ($channel_info['start_template']);
$finish_template = stripslashes ($channel_info['finish_template']);
if (trim ($start) != ''and trim ($finish) != '')
{
$start = explode ('|',$start);
$finish = explode ('|',$finish);
}
$cookies = str_replace("|","; ",str_replace("\r","",stripslashes(rtrim($channel_info['cookies']))));
$allow_main	= $channel_info['allow_main'];
$allow_mod	= $channel_info['allow_mod'];
$allow_comm	= $channel_info['allow_comm'];
$allow_rate	= $channel_info['allow_rate'];
if ($allow_mod == 1){$allow_mod = "0";}else{$allow_mod = "1";}
$hide_leech = explode('=',$channel_info['end_short']);
$rss = $channel_info['rss'];
$rss_parser = new rss_parser();
$rss_parser->cp		= 'cp1251';
$rss_parser->stripHTML = false;
if ($rss == 1){
$rss_result = $rss_parser->Get ($channel_info['url'],$dop_nast[2]);
}else{
$URL = get_urls(trim($channel_info['url']));
$URLitems =	get_full ($URL[scheme],$URL['host'],$URL['path'],$URL['query'],$cookies,$dop_nast[2]);
if (charset($URLitems) != strtolower($config['charset']) AND $URLitems!= "") $URLitems = convert(charset($URLitems),strtolower($config['charset']).'//TRANSLIT',$URLitems);
$rss_result = get_page ($URLitems,$channel_info['ful_start']);
}
if ($rss_result) {
$i		 = 0;
if ($rss == 1){
$rss_items = $rss_result['items'];
}else{
$rss_items = $rss_result;
}
foreach ($rss_items as $item) {
if ($config_rss['news_limit'] =="") $config_rss['news_limit'] = '15';
if ($i == $config_rss['news_limit']) break;
$i++;
if ($rss == 1){
$news_tit = rss_strip ($item['title']);
$short_story = rss_strip($item['description']);
$news_link = stripslashes (rss_strip($item['link']));
$tags_tmp = rss_strip ($item['category']);
}else{
if (trim($channel_info['start_title']) != '')$news_tit = strip_tags(get_full_news($item,$channel_info['start_title']));else $news_tit = get_tit($item);
if ($channel_info['end_link'] != 1){
$short_story = get_short_news ($item,$channel_info['start_short']);
}else{
$short_story = get_full_news ($item,$channel_info['start_short']);
}
if (trim($channel_info['sart_link'])==''){
$news_link = 'http://'.$URL['host'].get_link ($item);
}else{
$news_lin = get_full_news($item,$channel_info['sart_link']);
$news_link = full_path_build ($news_lin,$URL['host']);
}
$tags_tmp =strip_tags(get_full_news($item,$channel_info['sart_cat']));
}
$alt_name = $db->safesql(totranslit ($news_tit));
$safeTitle	= $db->safesql($news_tit);
$sql_result = $db->query("SELECT * FROM ".PREFIX ."_post WHERE title = '$safeTitle' OR alt_name = '$alt_name'");
if ($db->num_rows($sql_result) == 0) 
{
$category = array();
$category_row = array();
$tags_tmps = replace_tags ($tags_tmp.','.$news_tit);
$tegs = $tags_tmps[0];
if ($channel_info['thumb_img'] == 1){
$gory = explode (",",$tags_tmps[1]);
foreach ($gory as $value) {
if (trim($value) != '')$sql_cat= $db->super_query ("SELECT * FROM ".PREFIX ."_category WHERE name like '".$db->safesql(trim($value))."%' or alt_name like '".$db->safesql(trim($value))."%'");
if ($sql_cat != "")
{
$category[]=$sql_cat['id'];
}
}
}
if (count($category) != '0'){
$category=implode (',',array_unique($category));
}else{
$category = $channel_info['category'];
}
if ($rss == 1){
if (trim ($news_link) == '')
{
$news_link = stripslashes ($item['guid']);
}
}
$link = replace_url(get_urls(trim($news_link)));
if ($dop_sort[0] == 0){
$short_story = parse_Thumb ($short_story);
if (trim ($start) != '')
{
$short_story = preg_replace ($start,$finish,$short_story);
}
$short_story = parse_rss ($short_story);
$short_story = $parse->decodeBBCodes ($short_story);
$short_story = rss_strip ($short_story);
$short_story = strip_tags ($short_story,'<object><embed><br /><br><BR><BR />');
$short_story = parse_host ($short_story,$link['host']);
}else{$short_story = '';}
if (trim ($start_template) != '')
{
$full = get_full ($link[scheme],$link['host'],$link['path'],$link['query'],$cookies,$dop_nast[2]);
}
else
{
$full = '';
}
if (trim ($full) != '')
{
if (trim($news_tit) == '') $news_tit = get_title($full);
if (trim($news_tit) != '')$news_title = $end_title[0].' '.$news_tit.' '.$end_title[1];
if (trim ($start_template) != '')
{
if (trim ($finish_template) != '')
{
$full_story = get_news ($full,$start_template,$finish_template);
}else{
if ($hide_leech[0] != 1){
$full_story = get_short_news ($full,$start_template);
}else{
$full_story = get_full_news ($full,$start_template);
}
}
$full_story = html_strip ($full_story);
if (charset($full) != strtolower($config['charset']) AND $full_story != "") {$full_story = convert(charset($full),strtolower($config['charset']).'//TRANSLIT',$full_story);}
$full_story = parse_Thumb ($full_story);
if (trim ($start) != "")
{
$full_story = preg_replace ($start,$finish,$full_story);
}
$full_story = parse_rss ($full_story);
$full_story = $parse->decodeBBCodes ($full_story);
$full_story = strip_tags ($full_story,'<object><embed><br /><br><BR><BR />');
$full_story = parse_host ($full_story,$link['host']);
}
}
else
{
$full_story = '';
}
if (trim ($channel_info['delate']) != '')
{
$delete = explode ('|',stripslashes($channel_info['delate']));
$insert = explode ('|',stripslashes($channel_info['inser']));
$short_story = str_replace ($delete,$insert,$short_story);
$full_story = str_replace ($delete,$insert,$full_story);
}
$short_story = create_URL ($short_story,$link['host']);
$full_story = create_URL ($full_story,$link['host']);
if ($dop_nast[1] == 1){
$short_story=preg_replace( "#(^|\s|>)((http://|https://|ftp://)\w+[^<\s\[\]]+)#i","\\1[url]\\2[/url]",$short_story );
$full_story=preg_replace( "#(^|\s|>)(([url]http://|https://|ftp://)\w+[/url][^<\s\[\]]+)#i","\\1[url]\\2[/url]",$full_story );
}
if ($hide_leech[1] == '1'){
$short_story = replace_hide ($short_story);
$full_story = replace_hide ($full_story);
}
if ($hide_leech[2] == '1'){
$short_story = replace_leech ($short_story);
$full_story = replace_leech ($full_story);
}
if ($dop_sort[1] == 1 or $dop_sort[0] == 1) $short_story = get_im ($full_story).$short_story;
if (($short_story == ''and $full_story != '') or (!eregi ('\\[img\\]',$short_story)and !eregi ('\\[thumb\\]',$short_story))) 
{$short_story = get_im ($full_story).$short_story;}
$short_story = replace_align ($short_story);
$full_story = replace_align ($full_story);
if ($dop_nast[10] == 1){
$short_story = $parse->decodeBBCodes ($short_story,false);
$full_story = $parse->decodeBBCodes ($full_story,false);
$short_story = trim(preg_replace('/[\r\n\n]+/mi','<br />',$short_story));
$full_story = trim(preg_replace('/[\r\n\n]+/mi','<br />',$full_story));
}
$news_title_out = $parse->decodeBBCodes($news_title);
$short_story = htmlspecialchars ($short_story);
$full_story = htmlspecialchars ($full_story);
if ($dop_sort[2] == 1) $full_story = $short_story.'<br /><br />'.$full_story;
if (!((!($channel_info['date_format'] == 0) AND !($channel_info['date_format'] == 1))))
{
$added_time_stamp = time () +$config['date_adjust'] * 60;
if ($channel_info['date_format'] == 1)
{
$interval = mt_rand ($config_rss['interval_start']*60,$config_rss['interval_finish']*60);
$added_time_stamp += $interval;
}
}
else
{
if ($rss == 1 ){
if ($channel_info['date_format'] == 2)
{
$added_time_stamp = strtotime ($item['pubDate']) -3600;
}
}else{$added_time_stamp = time () +$config['date_adjust'] * 60;}
}
$str_date = date( "Y-m-d H:i:s",$added_time_stamp);
$keywords = stripslashes ($channel_info['keywords']);
if (trim ($keywords) != '')
{
$allow_news = FALSE;
$keywords = explode ('|',$keywords);
foreach ($keywords as $word)
{
if (!((!eregi ($word,$short_story) AND !eregi ($word,$full_story) AND !eregi ($word,$news_title_out))))
{
$allow_news = TRUE;
}
}
}
else
{
$allow_news = TRUE;
}
$stkeywords = stripslashes ($channel_info['stkeywords']);
if (trim ($stkeywords) != '')
{
$stkeywords = explode ('|',$stkeywords);
foreach ($stkeywords as $word)
{
if (!(!eregi ($word,$short_story) AND !eregi ($word,$full_story)))
{
$allow_news = FALSE;
}
}
}
if ($allow_news)
{
$Autor = explode('=',$channel_info['Autors']);
if (trim($Autor[0]) != '')
{
$input=array ();
$autor = explode ("|",stripslashes($Autor[0]));
foreach ($autor as $value)
{
$input[] =trim($value);
}
}
else
{if (trim($Autor[1]) == '') $Autor[1] = $config_rss['reg_group'];
if (trim($Autor[1]) == '') $Autor[1] = 1;
$channel_infos = $db->query ("SELECT * FROM ".PREFIX ."_users WHERE user_group IN ({$Autor[1]})");
while ($channel_infon = $db->get_row($channel_infos)) {
$input[] = $channel_infon['name'];
}
}
$author	= $input[array_rand ($input)];
if ($config_rss['sinonim'] == 'yes')
{
include_once(ENGINE_DIR ."/inc/plugins/sinonims.php");
$short_story = sinonims ($short_story);
$full_story = sinonims ($full_story);
}
if ($channel_info['load_img'] == 1 or $dop_nast[11] == 1)
{
$xdoe = array();
$i_control = new image_controller ();
$i_control->short_story = $short_story;
$i_control->full_story = $full_story;
if($dop_nast[11] == 0 and $channel_info['load_img'] == 1)
{
$i_control->proxy = $dop_nast[2];
if ($channel_info['date'] != ''and strlen($channel_info['date']) != 10){$i_control->post = $channel_info['date'];}
if ($channel_info['allow_watermark'] == 1)
{
$i_control->allow_watermark = true;
}
if ($dop_nast[0] == 1)
{
$i_control->watermark_image_light = ROOT_DIR .$config_rss ['watermark_image_light'];
$i_control->watermark_image_dark = ROOT_DIR .$config_rss['watermark_image_dark'];
}
$i_control->x = $dop_nast[3];
$i_control->y = $dop_nast[4];
$i_control->margin = $dop_nast[12];
}else{$i_control->radikal = $dop_nast[11];}
if ($i_control->process()===false) {
$xdoe[] = '<i>'.$tit.'</i> ► '.$title;
}
$short_story	= $i_control->short_story;
$full_story = $i_control->full_story;
if (count ($i_control->upload_images) != 0)
{
define('FOLDER_PREFIX',date("Y-m"));
$im = '|||'.FOLDER_PREFIX.'/';
$images = implode ($im,$i_control->upload_images);
$images = $db->safesql (FOLDER_PREFIX.'/'.$images);
}
}
if ($channel_info['allow_more'] == 1)
{
$xfields = 'source_name|'.$channel_info['title'] .'||source_link|'.$full_news_link;
$xfields = $db->safesql($xfields);
}
if (trim($short_story) != ''and trim($news_title) != ''and trim($full_story) != ''){
$title= $db->safesql($parse->process($news_title),false);
$_POST['title'] = str_replace ("'",''',$title);
$full_story =$db->safesql($parse->BB_Parse($parse->process($full_story),false));
$short_story = $db->safesql($parse->BB_Parse($parse->process($short_story),false));
$short_story = rss_strip ($short_story);
$full_story = rss_strip ($full_story);
$metatags = create_metategs ($short_story.$full_story);
$db->connect(DBUSER,DBPASS,DBNAME,DBHOST);
$db->query("INSERT INTO ".PREFIX ."_post (autor, category, date, title, alt_name, short_story, full_story, xfields, allow_main, approve, allow_comm, allow_rate, allow_br, vote_num, news_read, fixed, descr, keywords, tags) VALUES ('$author', '$category', '$str_date', '$title', '$alt_name', '$short_story', '$full_story', '$xfields', '$allow_main', '$allow_mod', '$allow_comm', '$allow_rate', '1', '0', '0', '0', '{$metatags['description']}', '{$metatags['keywords']}', '$tegs')");
$news_id = $db->insert_id();
$date_time = time () +$config['date_adjust'] * 60;
$db->query ("UPDATE ".PREFIX ."_users SET news_num = news_num + 1, lastdate = '$date_time' WHERE name ='$author'");
if ($tegs != "") {
$tags = array();
$tegs = explode (",",$tegs);
foreach ($tegs as $value) {
if (trim($value) != '') $tags[] = "('$news_id', '".trim($value)."')";
}
$tags = implode(", ",$tags);
$db->query("INSERT INTO ".PREFIX."_tags (news_id, tag) VALUES ".$tags);
}
if (trim ($images) != '')
{
$db->query("INSERT INTO ".PREFIX ."_images (images, news_id, author, date) VALUES	('$images', '$news_id', '$author', '$date_time')");
}
}
}
}
if (trim ($channel_info['title']) != '')
{
$tit = stripslashes (strip_tags ($channel_info['title']));
if (50 <strlen ($tit))
{
$tit = substr ($tit,0,50) .'...';
}
}
else
{
$tit = 'Без названия...';
}
echo($news_id)?'<b style="color:blue;">'.$tit.'</b> ►<font color=red><b>'.$title.'</b></font><br>':'<b style="color:green;">'.$tit.'</b> ►<b>'.$news_tit.'</b><br>';
unset ($news_id);
};
}else{
return false;
}
if ($allow_mod == 1 and @file_exists(ENGINE_DIR .'/data/ping.php')){
include_once ENGINE_DIR .'/data/ping.php';
if( $ping['allow_post'] == "1"and $config_rss['allow_post'] == "1"and @file_exists(ENGINE_DIR .'/inc/ping/pingpost.php')) {
require_once ENGINE_DIR .'/inc/ping/pingpost.php';
}
}
$db->free();
clear_cache();
};
;echo '
';?>
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху