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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:44:29
Script start
Timing: Jan 31 2025 03:44:29
Module start 'layout'
Timing: Jan 31 2025 03:44:29
Module start 'content'
Timing: Jan 31 2025 03:44:29
Module end 'content'
Timing: Jan 31 2025 03:44:29
Script end

Main resources:

Total runtime0.0254 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.5547151.1953
Module start 'layout' 0.00510.0041 739.7500221.1172
Module start 'content' 0.00920.0147 960.86721,006.2813
Module end 'content' 0.02390.0015 1,967.148441.9922
Script end 0.0254  2,009.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00259.9990140.0002
Check MTime0.00104.1205140.0001
Mysql Total
Database connection0.00072.823910.0007
Mysqli_queries0.002911.473730.0010
Looping result0.00000.055310.0000
Template Total0.00114.210.0011
Template load0.00083.189510.0008
Template processing0.00031.026610.0003
Override
Cache load0.00062.181710.0006
General
dbfile0.00228.541180.0003
String conversion0.00000.021640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs