Project

General

Profile

Actions

Feature proposal #4970

closed

Implement format functions inside format functions

Added by krileon about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
29 December 2014
Due date:
% Done:

100%

Estimated time:

Description

Implement support for format function usage inside of format functions. Example as follows.

strtotime(+1 DAY,strtotime([lastvisitdate]))

https://www.joomlapolis.com/forum/153-professional-member-support/227785-add-1-point-after-login?start=6

Actions #1

Updated by krileon about 9 years ago

Format function parsing isn't possible using the current structure. It needs to be changed to something that can be parsed better. Example as follows.

[cb:parse function="math"][FIELD_NAME] + [FIELD_NAME][/cb:parse]

This will beak B/C, but there's no other way as the structure has to be changed so it can be parsed properly.

Actions #2

Updated by krileon about 9 years ago

Additional examples of new usage as follows.

[cb:parse function="date" format="Y-m-d H:i:s"][lastvisitdate][/cb:parse]

[cb:parse function="date" format="Y-m-d H:i:s"][cb:parse function="time"][lastvisitdate][/cb:parse][/cb:parse]

[cb:parse function="date" format="Y-m-d H:i:s"][cb:parse function="time" format="+1 DAY"][lastvisitdate][/cb:parse][/cb:parse]

[cb:parse function="time"][lastvisitdate][/cb:parse]

[cb:parse function="time" format="+1 DAY"][lastvisitdate][/cb:parse]

[cb:parse function="math"]1 + 2[/cb:parse]

[cb:parse function="convert" format="int"][FIELD_NAME][/cb:parse]

[cb:parse function="encode" format="md5"][FIELD_NAME][/cb:parse]

Actions #3

Updated by krileon about 9 years ago

  • % Done changed from 0 to 50

All parsing usages are implemented and working. Reviewing possibility of additional format functions and backend params describing the usage need updated. The math behavior matches PHP parsing 100% so expect correct mathematical results.

Actions #4

Updated by krileon about 9 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 50 to 100
Actions #5

Updated by krileon about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF