[TH] Date Field for Custom Fields (Custom Field XML) [Deleted]

Jon W

Well-known member
Waindigo submitted a new resource:

Date Field for Custom Fields by Waindigo (Custom Field XML) - Add date fields to your threads, posts, resources or user profile.

This is a date custom field.

This has been posted as an example of what can be achieved using the latest version of the Custom Fields by Waindigo add-on.

Installation:

Read more about this resource...
 
I want to create 1 field to enter the start time and end time, the time between start and finish, will display the message contents are operating in forum_view.

Can you guide me?
 
We release all of our add-ons for free to non-commercial sites because we want to support the XenForo Community. If you appreciate this and want to help us with some other causes we are championing, please consider donating to the Waindigo Foundation (registered charity number: 1150526).

I was looking to read more information on your Waindigo Foundation that you posted, but the link gives a page not found error when clicking it. It links to http://www.charitycommission.gov.uk...ramework.aspx?RegisteredCharityNumber=1150526 Figured you'd like to know so you can correct whatever is causing the error.

Am considering donating, can you give more info on what your Foundation does.
 
As per other thread!
My only suggestion would be to not autopopulate the date fields as if field isn't mandatory, you can't click on date highlight and then delete. You have to put cursor to right and then backspace, which could be confusing to users. Not a big deal though.
 
I was looking to read more information on your Waindigo Foundation that you posted, but the link gives a page not found error when clicking it. It links to http://www.charitycommission.gov.uk...ramework.aspx?RegisteredCharityNumber=1150526 Figured you'd like to know so you can correct whatever is causing the error.

Am considering donating, can you give more info on what your Foundation does.
Thanks for letting me know. I will fix the link. The charity is set up to provide support with web services to other charities. We are currently training volunteers through the charity to do this. We will be setting up a website shortly explaining everything. Obviously we could do all of this without setting up a charity, but I feel that this provides a guarantee that donations will be put towards good use (charities are very heavily regulated in the UK), as well as the other benefits that being a charity provides (such as lower PayPal fees).

Rather than a cash donation (or as well as, if you're feeling generous), I would be very interested to chat to you about donating hosting services to charities. Please let me know if you are interested.

Edit: the link in my signature is the correct one:
http://www.charitycommission.gov.uk/search-for-a-charity/?txt=1150526
 
Last edited:
As per other thread!
My only suggestion would be to not autopopulate the date fields as if field isn't mandatory, you can't click on date highlight and then delete. You have to put cursor to right and then backspace, which could be confusing to users. Not a big deal though.
Create a new file in library/Arms/ called CustomDate.php with the following contents:
PHP:
<?php

class Arms_CustomDate
{

    public static function render(XenForo_Template_Abstract $template, array $field)
    {
        if (!$field['field_value']) {
            $field['field_value'] = "";
            $field['field_value_choice'] = 'today';
        } else {
            $field['field_value'] = date("Y-m-d", intval($field['field_value']));
            $field['field_value_choice'] = 'other';
        }
        return $template->create('waindigo_date_input_customfields', array(
            'field' => $field
        ));
    }
}
then replace the PHP callback class for rendering the custom field to Arms_CustomDate.
 
I want to create 1 field to enter the start time and end time, the time between start and finish, will display the message contents are operating in forum_view.

Can you guide me?
Any reason this can't be done as two fields?
 
Quite possibly missed something key here.

Wish to add the custom date to the header template html. Using
Code:
{$customFields.waindigo_custom_date}
to insert into the header works ok BUT the date is outputted in unix format. Is it possible to output to the header in regular date format?

When "Viewable on Thread View" is selected in the custom thread field setting the date is then shown above message nicely formatted...
 
You can use any of the standard XenForo template helper functions.

For example:
Code:
{xen:datetime $customFields.waindigo_custom_date}
Code:
{xen:time $customFields.waindigo_custom_date}
 
Changing the years on these date fields are really hard. I think the browser developers should make it a priority to change years. Suppose I need to set the date as 1-2-1975 I need to click a lot
 
Back
Top Bottom