mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 12:51:52 +02:00
Modification to plugin.xml and theme.xml spec. 'lan=' instead of 'lang='.
Added <summary> and <keywords> Plugin builder enhanced to match these changes
This commit is contained in:
@@ -540,6 +540,7 @@ class e_form
|
||||
* @param array or str
|
||||
* @example $frm->datepicker('my_field',time(),'type=date');
|
||||
* @example $frm->datepicker('my_field',time(),'type=datetime&inline=1');
|
||||
* @example $frm->datepicker('my_field',time(),'type=date&dateformat=yy-mm-dd');
|
||||
*
|
||||
* @url http://trentrichardson.com/examples/timepicker/
|
||||
*/
|
||||
@@ -557,37 +558,10 @@ class e_form
|
||||
|
||||
// echo "TYPE=".$type;
|
||||
|
||||
$ampm = (preg_match("/%l|%I|%p|%P/",$timeFormat)) ? 'true' : 'false';
|
||||
|
||||
$convert = array(
|
||||
'%d' => 'dd',
|
||||
'%m' => 'mm',
|
||||
'%y' => 'y',
|
||||
'%Y' => 'yy',
|
||||
|
||||
'%a' => 'D', // An abbreviated textual representation of the day
|
||||
'%A' => 'DD', // A full textual representation of the day
|
||||
'%B' => 'MM', // Full month name, based on the locale
|
||||
'%b' => 'M', // Abbreviated month name, based on the locale
|
||||
'%h' => 'M', // Abbreviated month name, based on the locale (an alias of %b)
|
||||
|
||||
'%l' => 'h', // 12 hour format - no leading zero
|
||||
'%I' => 'hh', // 12 hour format - leading zero
|
||||
'%H' => 'hh', // 24 hour format - leading zero
|
||||
'%M' => 'mm',
|
||||
'%S' => 'ss',
|
||||
'%p' => 'TT', // %p UPPER-CASE 'AM' or 'PM' based on the given time
|
||||
'%P' => 'tt', // %P lower-case 'am' or 'pm' based on the given time
|
||||
'%T' => 'hh:mm:ss',
|
||||
'%r' => "hh:mmm:ss TT" // 12 hour format
|
||||
|
||||
);
|
||||
|
||||
$s = array_keys($convert);
|
||||
$r = array_values($convert);
|
||||
|
||||
$dformat = str_replace($s,$r,$dateFormat);
|
||||
$tformat = str_replace($s,$r,$timeFormat);
|
||||
$ampm = (preg_match("/%l|%I|%p|%P/",$timeFormat)) ? 'true' : 'false';
|
||||
|
||||
$dformat = e107::getDate()->toMask($dateFormat);
|
||||
$tformat = e107::getDate()->toMask($timeFormat);
|
||||
|
||||
$id = $this->name2id($name);
|
||||
|
||||
@@ -604,6 +578,7 @@ class e_form
|
||||
);
|
||||
|
||||
$defdisp = (isset($def[$type])) ? $def[$type] : $def['date'];
|
||||
$defdisp = e107::getDate()->toMask($defdisp);
|
||||
|
||||
if ($datestamp)
|
||||
{
|
||||
@@ -611,7 +586,8 @@ class e_form
|
||||
}
|
||||
|
||||
$text = "";
|
||||
|
||||
// $text .= 'dformat='.$dformat.' defdisp='.$defdisp;
|
||||
|
||||
$class = (isset($classes[$type])) ? $classes[$type] : "tbox e-date";
|
||||
$size = vartrue($options['size']) ? intval($options['size']) : 40;
|
||||
$required = vartrue($options['required']) ? "required" : "";
|
||||
@@ -628,55 +604,7 @@ class e_form
|
||||
}
|
||||
|
||||
return $text;
|
||||
// Keep this info here:
|
||||
/*
|
||||
* $options allowed keys:
|
||||
|
||||
*
|
||||
* d - day of month (no leading zero)
|
||||
dd - day of month (two digit)
|
||||
o - day of the year (no leading zeros)
|
||||
oo - day of the year (three digit)
|
||||
D - day name short
|
||||
DD - day name long
|
||||
m - month of year (no leading zero)
|
||||
mm - month of year (two digit)
|
||||
M - month name short
|
||||
MM - month name long
|
||||
y - year (two digit)
|
||||
yy - year (four digit)
|
||||
@ - Unix timestamp (ms since 01/01/1970)
|
||||
! - Windows ticks (100ns since 01/01/0001)
|
||||
'...' - literal text
|
||||
'' - single quote
|
||||
anything else - literal text
|
||||
|
||||
ATOM - 'yy-mm-dd' (Same as RFC 3339/ISO 8601)
|
||||
COOKIE - 'D, dd M yy'
|
||||
ISO_8601 - 'yy-mm-dd'
|
||||
RFC_822 - 'D, d M y' (See RFC 822)
|
||||
RFC_850 - 'DD, dd-M-y' (See RFC 850)
|
||||
RFC_1036 - 'D, d M y' (See RFC 1036)
|
||||
RFC_1123 - 'D, d M yy' (See RFC 1123)
|
||||
RFC_2822 - 'D, d M yy' (See RFC 2822)
|
||||
RSS - 'D, d M y' (Same as RFC 822)
|
||||
TICKS - '!'
|
||||
TIMESTAMP - '@'
|
||||
W3C - 'yy-mm-dd' (Same as ISO 8601)
|
||||
*
|
||||
* h Hour with no leading 0
|
||||
* hh Hour with leading 0
|
||||
* m Minute with no leading 0
|
||||
* mm Minute with leading 0
|
||||
* s Second with no leading 0
|
||||
* ss Second with leading 0
|
||||
* l Milliseconds always with leading 0
|
||||
* t a or p for AM/PM
|
||||
* T A or P for AM/PM
|
||||
* tt am or pm for AM/PM
|
||||
* TT AM or PM for AM/PM
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user