Bonjour, j'aimerais savoir comment récupérer la variable avec l'auteur d'un article?
Merci
Merci
$document =& JFactory::getDocument();
$article =& $this->get('Article');
// récupérer l'auteur
$author = $article->author ;
$voting = ContentHelperQuery::buildVotingQuery($params);
// Get the WHERE clause
$where = $this->_buildContentWhere();
$query = 'SELECT a.*, u.name AS author, u.usertype, cc.title AS category, s.title AS section,' .
' 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,'.
' g.name AS groups, s.published AS sec_pub, cc.published AS cat_pub, s.access AS sec_access, cc.access AS cat_access '.$voting['select'].
' FROM #__content AS a' .
' LEFT JOIN #__categories AS cc ON cc.id = a.catid' .
' LEFT JOIN #__sections AS s ON s.id = cc.section AND s.scope = "content"' .
' LEFT JOIN #__users AS u ON u.id = a.created_by' .
' LEFT JOIN #__groups AS g ON a.access = g.id' .
$voting['join'].
$where;
$this->_db->setQuery($query);
$this->_article = $this->_db->loadObject();
$_REQUEST['tmpl'] = 'component';
$document =& JFactory::getDocument(); $article =& $this->get('Article'); // récupérer l'auteur $author = $article->author ;
index.php?option=com_flexicontent&view=toto
index.php?option=com_flexicontent&view=toto&layout=titi
Commentaire