[SMARTY] refreshing required to see content

Darren Crotchett <[email protected]> Mon, 12 Feb 2007 10:21:12 -0800 (PST)
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
I am having a problem implementing Pear::Auth with Smarty.  My login
is working to the extent that I can put in valid information and it
will let me through.  But, after providing valid credentials, I'm
just presented with a blank screen.  I have to refresh the page to
see the content.  Unfortunately, I'm new to Pear::Auth, too.  And,
I'm not finding a lot of documentation on it.

I would very much appreciate some help with this.

Here's some code snippets (I'll try to provide enough, but not too
much):

(index.php)
if($homepage->checkAuth())
  $homepage->displayLinks($homepage->getEntriesByCategory());
else
  $homepage->displayLogin();

(mylibrary.php)
function displayLinks($data) {
// -- tpl is an instance of Homepage_Smarty which extends Smarty.
// -- $data in an array that my template parses
$this->tpl->assign('link', $data);
$this->tpl->display('index.tpl');
}

function displayLogin() {
/* show the authorization form */
$this->auth->start();
$this->tpl->display('index.tpl');
}

getEntriesByCategory() {
// this returns an array of results from a SQL query
// I don't think it important to this
}

TIA,
Darren


 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php