User Tools

Site Tools


products:stewkint

Join the Fox Hunt !

Helpful tools for phpfox webmasters, designer and developers.

  • Display template variables easily on the page

What is Kint?

http://raveren.github.io/kint/ is “zero setup” debugging tool.

Really, it is glorified var_dump. Phpfox users prior to V2 will remember when this came for free with smarty templates. Now you can have it again!

The kint outputs directly to your site. The template data is shown as a tree. Click the plus sign to expand any node.

Looks like this:

Sample kint output on fox site

There is much more you can do with Kint if you want. Refer to their site for documentation.

Every time you use the plugin call, Kint spits a new tree. In this way you may be able to figure out how your templates are built up within each other.

Installation

Unzip and upload

Same as every other phpfox module:

1. Unzip the product file (eg phpfox-product-stewkint-14.06.15.zip)

2. Copy or ftp the contents of upload to your website's root folder

Add plugin call to templates

Nothing happens until you add a call to Kint in your template.

See the Kint site for many interesting ways to use Kint.

The simplest thing to do with phpfox, is to add this line to the bottom of your main template:

		</div>
        {plugin call='stewkint.kint'}
    </body>
</html>
{/if}

Notice we placed it just before the body end.

This file is theme/frontend/default/template/template.html.php

You may be using nebula or your own templates.

You can put this line in any number of places. So if you are developing a particular template, it may be more convenient to put it at the end of your template.

Kint dumps out what has been added o the template so far.

Only the vary last one (just before body end) will have all the template data for the whole page.

How to turn it on

AdminCP setting

adminCP >settings > Debug > Kint Enabled > True or False

dev.sett.php

Add the following to include/settings/dev.sett.php

define('STEWHUNT_KINT', true);

To disable again, comment the line out.

On the fly

This will not work everywhere and may depend on your site configuration…

But for many pages you can just add “/stewkint_on” to the url.

That will turn it on for that one page, that one time, only. Very convenient!

Where to use Kint

On your development site.

Notice that Kint says:

“You should probably avoid using this tool in non-development environment settings, I cannot be held responsible for the performance, security and/or stability issues Kint may cause.”

Demo

Pricing and Support

Free of charge. No official support. Find steward at phpfox.org forums

Download

products/stewkint.txt · Last modified: 2014/06/15 09:27 by steward