eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > International > Russian

Russian Форум, в котором eSyndiCat обсуждается на русском языке. Все вопросы о нашем скрипте директорий и ответы на них. Добро пожаловать!

Reply
 
Thread Tools Display Modes
Old 04-25-2010   #1
Romario
 
Join Date: Sep 2005
Location: Russia
Posts: 191
Romario has disabled reputation
Default Вывод всех ссылок на главной странице

Как сделать чтобы на главной странице выводились не только ссылки которые добавлены в Root а все ссылки из всех категорий...
Romario is offline   Reply With Quote
Old 04-26-2010   #2
Sergey Ten
eSyndiCat Lead Developer
 
Sergey Ten's Avatar
 
Join Date: Apr 2006
Location: Kyrgyzstan, Bishkek
Posts: 6,592
Sergey Ten is a jewel in the roughSergey Ten is a jewel in the roughSergey Ten is a jewel in the roughSergey Ten is a jewel in the rough
Default

Привет, Romario

Попробуйте применить эти изменения

[ Откройте свой index.php файл ]
[ Найдите код ]

PHP Code:
if(!$esynConfig->getConfig('show_children_listings')) 
[ Замените на ]

PHP Code:
if(!$esynConfig->getConfig('show_children_listings') && $category['id'] != '0'
[ Откройте свой includes/classes/esynListing.php ]
[ Найдите функцию getListingsByCategory ]
[ Замените весь код на ]

PHP Code:
$a $sqlFoundRows "SQL_CALC_FOUND_ROWS " '';

$sql 'SELECT '.$a.' DISTINCTROW `t1`.`id`, `t1`.*, ';
$sql .= "IF((`t1`.`date` + INTERVAL 7 DAY < NOW()), '0', '1') `interval`,";
$sql .= "IF((`t1`.`sponsored` = '1'), '3', IF((`t1`.`featured` = '1'), '2', IF((`t1`.`partner` = '1'), '1', '0'))) `listing_type`, ";
//$sql .= (!$this->mConfig['show_children_listings']) ? '' : '`t11`.`path` `path`, `t11`.`title` `category_title`, ';
$sql .= '`t11`.`path` `path`, `t11`.`title` `category_title`, ';
$sql .= $aAccount 'IF((`t1`.`account_id` = \'0\'), \'0\', \'1\') `account_id_edit`' '\'0\' `account_id_edit` ';
$sql .= ', IF((`t2`.`category_id` = \''.$aCategory.'\'), \'1\', \'0\') `crossed`, ';
$sql .= ($aAccount) ? "IF (`fav_accounts_set` LIKE '%{$aAccount},%', '1', '0') `favorite` " "'0' `favorite` ";

/*if(0 == $aCategory || !$this->mConfig['show_children_listings'])
{
    $sql .= 'FROM `'.$this->mPrefix.'listings` `t1` ';
}
else
{*/
    
$sql .= 'FROM `'.$this->mPrefix.'flat_structure` `t10` ';        
    
$sql .= 'LEFT JOIN `'.$this->mPrefix.'listings` `t1` ON `t10`.`category_id`=`t1`.`category_id` ';
    
$sql .= 'LEFT JOIN `'.$this->mPrefix.'categories` `t11` ON `t11`.`id`=`t1`.`category_id` ';            
//}
$sql .= 'LEFT JOIN `'.$this->mPrefix.'listing_categories` `t2` ON `t1`.`id`= `t2`.`listing_id` ';


if(
== $aCategory)
{
    
//$sql .= 'WHERE (`t2`.`category_id` = \''.$aCategory.'\' ';
    //$sql .= (!$this->mConfig['show_children_listings']) ? '' : 'OR `t10`.`parent_id` = \''.$aCategory.'\' ';
    //$sql .= 'OR `t1`.`category_id` = \''.$aCategory.'\') ';
    
$sql .= 'WHERE ';
    
$sql .= $aAccount '(`t1`.`status` = \'active\' OR `t1`.`account_id`='.$aAccount.') ' '`t1`.`status` = \'active\' ';
}
else
{
    
$sql .= 'WHERE (`t2`.`category_id` = \''.$aCategory.'\' ';
    
$sql .= (!$this->mConfig['show_children_listings']) ? '' 'OR `t10`.`parent_id` = \''.$aCategory.'\' ';
    
$sql .= 'OR `t1`.`category_id` = \''.$aCategory.'\') ';
    
$sql .= $aAccount 'AND (`t1`.`status` = \'active\' OR `t1`.`account_id`='.$aAccount.') ' 'AND `t1`.`status` = \'active\' ';
}

$sql .= 'ORDER BY ';
$sql .= '`listing_type` DESC, ';

// Default order
$order 'alphabetic' == $this->mConfig['listings_sorting'] ? 'title' $this->mConfig['listings_sorting'];
$order_type 'ascending' == $this->mConfig['listings_sorting_type'] ? 'ASC' 'DESC';
$sql .= '`t1`.`'.$order.'` '.$order_type.' ';
$sql .= $aLimit 'LIMIT '.$aStart.', '.$aLimit '';

return 
$this->getAll($sql); 
[ Сохраните изменения ]
__________________
Best regards,
Sergey Ten
sten at intelliants.com
eSyndiCat Directory Script
Sergey Ten is offline   Reply With Quote
Old 04-26-2010   #3
Romario
 
Join Date: Sep 2005
Location: Russia
Posts: 191
Romario has disabled reputation
Default

Спасибо, Сергей
Romario is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:31 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us | SEO Resources