Implemented plugin architecture.

This commit is contained in:
andrey
2002-01-31 20:49:40 +00:00
parent 70b076bf0b
commit e6fc0e5291
69 changed files with 3561 additions and 1706 deletions

View File

@@ -0,0 +1,19 @@
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* Type: modifier
* Name: count_sentences
* Purpose: count the number of sentences in a text
* -------------------------------------------------------------
*/
function smarty_modifier_count_sentences($string)
{
// find periods with a word before but not after.
return preg_match_all('/[^\s]\.(?!\w)/', $string, $match);
}
/* vim: set expandtab: */
?>