Author:
vladG
Version:
1.0
Released:
4 June 2014

Description

Duration Field

Duration field for Symphony CMS.

Allows input of duration through duration settings:

  • weeks
  • days
  • hours
  • minutes
  • seconds
  • fractions (of a second)

Features:

  • enable / disable usage of each setting. At a very minimum, seconds are enforced.
  • sorting
  • filtering: mysql: value > 132456798.123. Supply a timestamp, including fractions of second if you want.

XML result

<duration>
    <timestamp>2044029.75</timestamp>
    <weeks>3</weeks>
    <days>2</days>
    <hours>15</hours>
    <minutes>47</minutes>
    <seconds>9</seconds>
    <fractions>75</fractions>
</duration>

Usage in forms

1_ Either send the duration:

fields[field-handle] = 123456789.123

2_ Or send desired duration settings. Any missing duration setting will default to 0:

fields[field-handle][weeks] = ...
fields[field-handle][days] = ...
fields[field-handle][hours] = ...
fields[field-handle][minutes] = ...
fields[field-handle][seconds] = ...
fields[field-handle][fractions] = ...

Repository

http://symphonyextensions.com/extensions/duration_field/

Discuss this Extension

Compatibility

2.7.10 Unsure
2.7.9 Unsure
2.7.8 Unsure
2.7.7 Unsure
2.7.6 Unsure
2.7.5 Unsure
2.7.4 Unsure
2.7.3 Unsure
2.7.2 Unsure
2.7.1 Unsure
2.7.0 Unsure
2.6.11 Unsure
2.6.10 Unsure
2.6.9 Unsure
2.6.8 Unsure
2.6.7 Unsure
2.6.6 Unsure
2.6.5 Unsure
2.6.4 Unsure
2.5.4 Unsure

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details