Все работает большущее тебе спасибо,
beliyadm. Все работает, как часы
. И так, что бы автор отображался логином вместо имени, со ссылкой на профиль CB. Нужно:
В файле: components\com_content\models\article.php найти строчку
$query = 'SELECT a.*, u.name AS author, u.usertype, cc.title AS category, s.title AS section,' .
и заменить на
$query = 'SELECT a.*, u.name AS author, u.id AS userid, u.username AS article_username, u.usertype, cc.title AS category, s.title AS section,' .
Затем в файле components\com_content\models\section.php строчку
$query = 'SELECT 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,' .
заменить на
$query = 'SELECT a.id, a.title, a.title_alias, u.id AS userid, u.username AS article_username, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,' .
В файле components\com_content\models\category.php строчку
$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,' .
заменить на
$query = 'SELECT cc.title AS category, a.id, u.id AS userid, u.username AS article_username, 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,' .
После в файле:
components\com_content\views\article\tmpl\default.php найти строчку
<?php JText::printf( 'Written by', ($this->article->created_by_alias ? $this->article->created_by_alias : $this->article->author) ); ?>
и в файле article\tmpl\default.php заменить на:
<?php $cblink = '<a href="index.php?option=com_comprofiler&task=userProfile&user='.$this->article->userid.'">'.$this->article->article_username.'</a>'; JText::printf( 'Written by', ($cblink) );?>
и в файлах
components\com_content\views\cection\tmpl\blog_item.php
components\com_content\views\category\tmpl\blog_item.php найти:
<?php JText::printf( 'Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author) ); ?>
заменить на:
<?php $cblink = '<a href="index.php?option=com_comprofiler&task=userProfile&user='.$this->item->userid.'">'.$this->item->article_username.'</a>'; JText::printf( 'Written by', ($cblink) );?>