Tidy is a PHP extension for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipulate HTML documents, but also traverse the document tree. It's performance is great and you have a ton of features to make your html code or smarty output html compliant.
You can also use this plugin using another plugin in the PHP smarty template language.
Unfortunately tidy is not installed by default in most PHP distributions.
Here are the docs to set it up:
Tidy plugin installation on Windows
This is easy cheesy:
download your tidy.dll at the PHP4.4 dist or the one for PHP5 or even php6
copy this to your PHP extension dir e.g.
E:
mpp\php\extensions
add the following line to you php.ini that usually resides in a dir above
e.g. E:
mpp\php\
</p> <p>extension=php_tidy.dll</p> <p>
Tidy plugin installation on Linux
this is a bit tougher, and only explained for PHP4, as for PHP5 it only requires a
compile using the —with-tidy option. according to the PHP page
</p> <p>wget http://tidy.sourceforge.net/src/tidy_src.tgz</p> <p>tar -zxvf tidy_src</p> <p>cd tidy</p> <p>sh build/gnuauto/setup.sh<br /> ./configure —with-shared</p> <p>make</p> <p>make install</p> <p>
you should see something like
Libraries have been installed in: /usr/local/lib<br />
<br /> wget http://pecl.php.net/get/tidy-1.2.tgz<br /> tar -zxvf tidy-1.2.tgz<br /> cd tidy-1.2<br /> phpize<br /> ./configure<br /> make<br /> make install<br />
<br /> ll /usr/local/lib/php/extensions/<br />
<br /> extension=tidy.so<br />
to the block than holds these extension= lines
Useful pages and resources that helped me with this today:
Another setup tutorial where I used parts of
Recent comments
3 days 8 hours ago
4 days 23 hours ago
9 weeks 4 days ago
9 weeks 4 days ago
9 weeks 6 days ago
10 weeks 2 hours ago
10 weeks 6 days ago
18 weeks 2 days ago
20 weeks 4 days ago
20 weeks 6 days ago