Closed (duplicate)
Project:
Custom Formatters
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2012 at 12:44 UTC
Updated:
24 Feb 2012 at 12:38 UTC
I find that Basic HTML is too simple, and the advanced PHP too complicated. It is not intuitive how to format the PHP, unless you know (a) how Drupal expects the code (b) How to access the fields.
Ideally, I'd like to use tokens in PHP, without the extra formating. For example, I have a CCK integer field that stored "seconds", that I want to output in minutes and seconds. It would be intuitive to enter:
echo (int) ([field_time-seconds] / 60) . "mins " . [field_time-seconds] % 60 . "secs";
or
echo date("i \m\i\n\s s \s\e\c\s", [field_time-seconds]);
If it is assume that this is always an output, then the "echo" does not required.
Comments
Comment #1
iantresman commentedAppears to be a duplicate of "Allow tokens in advanced mode"