On Tue, Oct 7, 2008 at 9:19 PM, John Campbell <[EMAIL PROTECTED]> wrote:
> The safest approach is probably to pass the html through tidy, and > then into DOM, and traverse and count the length of text nodes, but > that would be quite slow if you ran it on every request. Right, +1 for Tidy and DOM, it's the "real" way to do it. You won't need to do it on every request -- you can either store the summary itself as a separate text field, or store the length of the summary as an integer. This is crying out for a web service: The Excerpter. POST markup, get the first X display characters back as a response, with embedded HTML intact. Chris Snyder http://chxor.chxo.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
