|
Página 2 de 2
Atenção: os arquivos que serão
modificados a seguir utilizam a versão 1.0.15 do Joomla. Não esqueça de
fazer o backup do seu site Joomla! antes de proceder as modificações a
seguir.
1) Abra o arquivo components/com_content/content.php, procure as linhas abaixo (próximo à linha 1237) e comente o código, adicionando // (duas barras) antes delas :
if ( $descrip && $description->description ) {
echo $description->description;
}
Logo abaixo des linhas acima, adicione o código abaixo:
// HACK TO PARSE MAMBOTS IN SECTIONS AND CATEGORIES
// orginally written by John Cox
if ( $descrip && $description->description ) {
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$temp = new stdClass;
$temp->text = $description->description;
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$temp, &$params, 0 ), true );
echo $temp->text;
}
// HACK TO PARSE MAMBOTS IN SECTIONS AND CATEGORIES
2) Abra o arquivo components/com_content/content.html.php e procure logo no início do arquivo o seguinte código:
class HTML_content {
/**
* Draws a Content List
* Used by Content Category & Content Section
*/
function showContentList( $title, &$items, &$access,
$id=0, $sectionid=NULL, $gid, &$params, &$pageNav,
$other_categories,
global $Itemid, $mosConfig_live_site;
Logo abaixo das linhas acima, adicione o código abaixo:
// HACK TO PARSE MAMBOTS IN SECTIONS AND CATEGORIES
// orginally written by John Cox
if ( $title && $title->description ) {
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$temp = new stdClass;
$temp->text = $title->description;
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$temp, &$params, 0 ), true );
$title->description = $temp->text;
}
// HACK TO PARSE MAMBOTS IN SECTIONS AND CATEGORIES
Em seguida, procure próximo à linha 127 o seguinte código:
foreach ( $other_categories as $row ) {
Logo abaixo de linha acima, adicione o código abaixo:
// HACK TO PARSE MAMBOTS IN SECTIONS AND CATEGORIES
// orginally written by John Cox
if ( $row && $row->description ) {
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$temp = new stdClass;
$temp->text = $row->description;
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$temp, &$params, 0 ), true );
$row->description = $temp->text;
}
// HACK TO PARSE MAMBOTS IN SECTIONS AND CATEGORIES
Isso é tudo. Agora você já pode utilizar plugins na descrição de seções e categorias, tanto na visualização de tabela, como na visualização de blog.
Até a próxima.
Adicionar aos favoritos (8) | Coloque esse artigo em seu site | Views: 757
Only registered users can write comments. Please login or register. Powered by AkoComment Tweaked Special Edition v.1.4
<< Início < Anterior 1 2 Próximo > Fim >> |