summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-content/smarty-plugins/function.counter.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-08-29 12:10:12 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-08-29 12:10:12 +0000
commit96d2531821c13a5962b09a5b130d93c8d8b8a987 (patch)
treee257a4b90d1aadbfaec3763eefa1bf58dcab2af6 /wp-inst/wp-content/smarty-plugins/function.counter.php
parent04d51d5f3493a358f75449ac08425310978e5b24 (diff)
downloadwordpress-mu-96d2531821c13a5962b09a5b130d93c8d8b8a987.tar.gz
wordpress-mu-96d2531821c13a5962b09a5b130d93c8d8b8a987.tar.xz
wordpress-mu-96d2531821c13a5962b09a5b130d93c8d8b8a987.zip
Removed Smarty stuff
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@249 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-content/smarty-plugins/function.counter.php')
-rw-r--r--wp-inst/wp-content/smarty-plugins/function.counter.php79
1 files changed, 0 insertions, 79 deletions
diff --git a/wp-inst/wp-content/smarty-plugins/function.counter.php b/wp-inst/wp-content/smarty-plugins/function.counter.php
deleted file mode 100644
index cfe5dd8..0000000
--- a/wp-inst/wp-content/smarty-plugins/function.counter.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {counter} function plugin
- *
- * Type: function<br>
- * Name: counter<br>
- * Purpose: print out a counter value
- * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
- * (Smarty online manual)
- * @param array parameters
- * @param Smarty
- * @return string|null
- */
-function smarty_function_counter($params, &$smarty)
-{
- static $counters = array();
-
- $name = (isset($params['name'])) ? $params['name'] : 'default';
- if (!isset($counters[$name])) {
- $counters[$name] = array(
- 'start'=>1,
- 'skip'=>1,
- 'direction'=>'up',
- 'count'=>1
- );
- }
- $counter =& $counters[$name];
-
- if (isset($params['start'])) {
- $counter['start'] = $counter['count'] = (int)$params['start'];
- }
-
- if (!empty($params['assign'])) {
- $counter['assign'] = $params['assign'];
- }
-
- if (isset($counter['assign'])) {
- $smarty->assign($counter['assign'], $counter['count']);
- }
-
- if (isset($params['print'])) {
- $print = (bool)$params['print'];
- } else {
- $print = empty($counter['assign']);
- }
-
- if ($print) {
- $retval = $counter['count'];
- } else {
- $retval = null;
- }
-
- if (isset($params['skip'])) {
- $counter['skip'] = $params['skip'];
- }
-
- if (isset($params['direction'])) {
- $counter['direction'] = $params['direction'];
- }
-
- if ($counter['direction'] == "down")
- $counter['count'] -= $counter['skip'];
- else
- $counter['count'] += $counter['skip'];
-
- return $retval;
-
-}
-
-/* vim: set expandtab: */
-
-?>