You are here: Re: Issue Extending Smarty an using Output Filters « Smarty Templates Posts « IT news, forums, messages
Re: Issue Extending Smarty an using Output Filters

Posted by Mauricio Araya V. on 05/12/05 18:42

Hello there!

This is an auto-answer just to say that I found my error.

This is the fix:

class myClass extends Smarty {
....
public function beautifyCode ($code){
$beauty = new XML_Beautifier( );
$beautycode = $beauty->formatString($code);
if (is_object($beautycode)){
return $code;
}else{
return $beautycode;
}
}

...

public function publishContent ( ){
$this->register_outputfilter(array(&$this, "beautifyCode"));
$this->display($this->template_file);
}
...
}

The problem occurred just because of a mistake in the template. I
didn't close the "head" tag resulting in a malformed XML, so return
$beauty->formatString($code); was returning an object.

Thanks anyways,

-Mauricio

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация