summaryrefslogtreecommitdiff
path: root/smartyplugins/function.jscalendar.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/function.jscalendar.php')
-rwxr-xr-xsmartyplugins/function.jscalendar.php63
1 files changed, 0 insertions, 63 deletions
diff --git a/smartyplugins/function.jscalendar.php b/smartyplugins/function.jscalendar.php
deleted file mode 100755
index 64631cb..0000000
--- a/smartyplugins/function.jscalendar.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-namespace Bitweaver\Plugins;
-
-use Bitweaver\BitDate;
-
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {jscalendar} plugin
- *
- * Type: function<br>
- * Name: jscalendar<br>
- * Purpose: Prints the dropdowns for date selection.
- *
- * ChangeLog:<br>
- * - 1.0 initial release
- * @version 1.0
- * @author Stephan Borg
- * @param array
- * @param array Smarty
- * @return string
-*/
-function smarty_function_jscalendar($params, &$gBitSmarty) {
- global $gBitSystem;
- if( $gBitSystem->isFeatureActive( 'site_use_jscalendar' ) ) {
-
- // Default values
- $inputField = ''; // ID of the input field
- $fieldFormat = '%s'; // format of the input field
- $electric = 'false'; // ID of the span where the date is to be shown
- $time = time(); // override the currently set date
- $onUpdate = ''; // execute the following javascript function when a link is pressed
- $daFormat = $gBitSystem->getConfig( 'site_short_date_format' ).' '.$gBitSystem->getConfig( 'site_short_time_format' ); // format of output date
- $displayArea = '';
-
- // override default values
- extract( $params );
-
- $time = $gBitSystem->mServerTimestamp->getDisplayDateFromUTC( $time );
- $time = BitDate::strftime( "%m/%d/%Y %H:%M", $time );
-
- $html_result = $readonly ? $time
- : "<script type=\"text/javascript\">//<![CDATA[
- Calendar.setup({
- date : \"$time\",
- inputField : \"$inputField\",
- ifFormat : \"$fieldFormat\",
- daFormat : \"$daFormat\",
- displayArea : \"$displayArea\",
- electric : $electric,
- onUpdate : $onUpdate
- });
- //]]></script>";
-
- return $html_result;
- }
- return '';
-
-}