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

eZ debug

Timing: Jan 18 2025 16:10:38
Script start
Timing: Jan 18 2025 16:10:38
Module start 'content'
Timing: Jan 18 2025 16:10:38
Module end 'content'
Timing: Jan 18 2025 16:10:39
Script end

Main resources:

Total runtime0.1291 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.5625180.8438
Module start 'content' 0.00530.0042 770.4063102.3594
Module end 'content' 0.00950.1195 872.7656530.0000
Script end 0.1290  1,402.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00302.2977200.0001
Check MTime0.00120.9384200.0001
Mysql Total
Database connection0.00110.826710.0011
Mysqli_queries0.089269.12181410.0006
Looping result0.00110.85571390.0000
Template Total0.119292.410.1192
Template load0.00080.611510.0008
Template processing0.118491.758310.1184
Override
Cache load0.00060.426210.0006
Sytem overhead
Fetch class attribute can translate value0.00080.627510.0008
XML
Image XML parsing0.00030.207610.0003
General
dbfile0.00524.0068200.0003
String conversion0.00000.004630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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