XF 2.0 Custom thread field with date and time

cosmin85

Active member
Hi
I am working on my forum and i create a custom field ( price) and i need
to add also the date and time from value display HTML if is possible .
Example :
Price valid at (date and time ) (date of thread)
2018-03-27 20_35_27-Ulefone T1 Premium Edition Phablet 4G - Negro _ Gadgetinos - foro para co...webp
 
Go to custom_fields_macros template, find
<xf:macro name="custom_field_value" arg-definition="!" arg-value="!">(...)</xf:macro>
add before </xf:macro>:
HTML:
    <xf:if is="{$__globals.thread.custom_fields.your_custom_field_id}">
        (valid price at {{date_time($__globals.thread.post_date)}})
    </xf:if>
 
Go to custom_fields_macros template, find
<xf:macro name="custom_field_value" arg-definition="!" arg-value="!">(...)</xf:macro>
add before </xf:macro>:
HTML:
    <xf:if is="{$__globals.thread.custom_fields.your_custom_field_id}">
        (valid price at {{date_time($__globals.thread.post_date)}})
    </xf:if>
Have you tested ? not working for me ... :confused:
 
Back
Top Bottom