Работающий результат
Заходим на сервере в components/com_content/models
И меняем все пхп файлы
И во всех .php
где есть строчка
$query = ....
#__content AS
Расширяем пример файл category.php:
function _buildQuery($state = 1)
{
global $mainframe;
// Get the page/component configuration
$params = &$mainframe->getParams();
// If voting is turned on, get voting data as well for the content items
$voting = ContentHelperQuery::buildVotingQuery($params);
// Get the WHERE and ORDER BY clauses for the query
$where = $this->_buildContentWhere($state);
$orderby = $this->_buildContentOrderBy($state);
$query = 'SELECT cc.title AS category, a.id, a.title, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,' .
' a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.attribs, a.hits, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access,' .
' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
' CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups'.$voting['select'] .
' FROM #__content AS a' .
' LEFT JOIN #__categories AS cc ON a.catid = cc.id' .
' LEFT JOIN #__users AS u ON u.id = a.created_by' .
' LEFT JOIN #__groups AS g ON a.access = g.id'.
$voting['join'].
$where.
$orderby;
return $query;
}
function _buildQuery($state = 1)
{
global $mainframe;
// Get the page/component configuration
$params = &$mainframe->getParams();
// If voting is turned on, get voting data as well for the content items
$voting = ContentHelperQuery::buildVotingQuery($params);
// Get the WHERE and ORDER BY clauses for the query
$where = $this->_buildContentWhere($state);
$orderby = $this->_buildContentOrderBy($state);
$registry =& JFactory::getConfig();
$defaultLang = $registry->getValue("config.defaultlang");
$lang = $registry->getValue("config.jflang");
$query = 'SELECT cc.title AS category, a.id, a.title, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,' .
' a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.attribs, a.hits, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access,' .
' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
' CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups'.$voting['select'] .
' FROM #__content AS
a' .
' LEFT JOIN #__categories AS cc ON a.catid = cc.id' .
' LEFT JOIN #__users AS u ON u.id = a.created_by' .
' LEFT JOIN #__groups AS g ON a.access = g.id'.
($lang!= $defaultLang?
' JOIN #__jf_content AS jfc ON jfc.reference_id = a.id and jfc.reference_table = \'content\' and jfc.reference_field=\'title\' and jfc.published= 1 JOIN #__languages lang on lang.id = jfc.language_id and lang.code = \''.$lang.'\'':"").
$voting['join'].
$where.
$orderby;
return $query;
}
Замечания:
Уже добавлена поддержка более чем 2-х языков
В некоторых файлах таких запросов по несколько, надо делать везде...
Кроме article.php там в функцие store не надо.
В некоторых случаях таблица #__content AS
a назывется
и соотвественно надо написать в добовляемом куске
Так же то же самое действие надо произвести с mod_newsflash, mod_lastnews и если где-то еще...
Прилагается файл со всеми исправлениями для Joomla 1.5.11
[вложение удалено Администратором]