I tried that and when I make the change I only get a blank page in the browser. The code looks like this.
Quote:
// ------------------------------------------------------------------------ //
// Random Quotes Module for //
// XOOPS - PHP Content Management System 2.0 //
// Versión 1.0.0 //
// Copyright (c) 2002 Mario Figge //
// http://www.zona84.com //
// ------------------------------------------------------------------------- //
/******************************************************************************
* Function: random_quote_show
* Input : void
* Output : $texto: Text of the quote
$autor: Autor of the quote
******************************************************************************/
function random_quote_show() {
global $xoopsDB;
$block = array();
$result = $xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("citas"));
list($total_rows) = $xoopsDB->fetchRow($result);
$x = rand(1,$total_rows);
$result = $xoopsDB->query("SELECT texto, autor FROM ".$xoopsDB->prefix("citas")." WHERE id=".$x);
list($texto, $autor)= $xoopsDB->fetchRow($result);
$block['texto']=$texto;
$block['autor']=$autor;
return $block;
}
?>
What I did was replaced "return $block;" with $tpl->assign("quote", $texto);
I confirmed it was activated and then put <{$texto}> in the cell where I wanted it and now I get a blank page. If I switch back to the original Random Quote template it works ok but displays in the left block. Am I doing something wrong? :)
Thanks again for your help.