Forums / Developer / Tidy output extension?

Tidy output extension?

Author Message

Kristof Coomans

Sunday 11 February 2007 11:08:03 pm

Hi Andrew

I think this can help you: http://subversion.tigris.org/faq.html#proxy

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Andrew K

Monday 12 February 2007 7:49:08 am

Ok. It's finally in pubsvn (http://pubsvn.ez.no/community/trunk/extension/eztidy/ ). I did not put any comments in the code, which I plan to do, but it should be pretty self-explanatory. Let me know what you think.

I think putting the tidy path into a settings file would be good and maybe a switch for the user to either select the tidy method (php functions or executable) or have it choose automatically like it does now. The tidy.ini file is a tidy config file which both the cli and the php function can accept, so I would think we'd want to keep it in that format.

--Andrew

kracker (the)

Monday 12 February 2007 8:36:26 am

Andrew,

Many thanks for your contribution!

You took the additional responsibility as a challenge and the results show it! Well done.

Cheers,
//kracker

Clint Mansell & Kronos Quartet - Dreams III

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Kristof Coomans

Monday 12 February 2007 11:07:15 am

Well done Andrew! I added a reference to your operator on http://ezpedia.org/wiki/en/ez/template_language_for_php_developers

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Softriva .com

Wednesday 07 March 2007 10:36:41 pm

Hello

How can I use the operator?

I tried

{$module_result.content|eztidy}

I ended up with empty page. Then I tried the following and the page is shown but the code is not tidyed.

{$module_result.content|tidy('string')}
{$module_result.content|tidy()}
{$module_result.content|tidy}

Andrew K

Thursday 08 March 2007 7:44:34 am

OOzy Pal,

Try eztidy($module_result.content). That should work.

--Andrew

Heath

Thursday 08 March 2007 8:59:35 am

Thank you Andrew.

I have updated the example usage in eZpedia documentation,
http://ezpedia.org/wiki/en/ez/tidy#eztoc98287_2

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Softriva .com

Thursday 08 March 2007 9:54:32 am

I did not work for me. I am sure I am doing something wrong but can't seem to figure it out. I did activate the extension in the override site.ini.append.php.

Can some help me troubleshoot the problem?

Andrew K

Thursday 08 March 2007 10:07:31 am

Then the next step would be to see if your php has the tidy functions. Go to Setup -> System Information in your eZ admin and see if "tidy" is listed in the PHP, Extensions section.

If it's not there, then eztidy will try to use a tidy binary. There is a $tidy_path variable in eztidy/autoloads/eztidy.php that holds the path to the tidy executable. Make sure that path is correct.

--Andrew