Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi Tanja,

    thanks for your post, and sorry for the trouble.

    This TablePress Extension could be helpful for that: https://tablepress.org/download/extension/tablepress-row-filter-date.zip

    With that, you can use a Shortcode like

    [table id=1 filter_date="future" filter_date_columns="1" cache_table_output=false /]

    That would show only rows where the date in column 1 is today or in the future.
    However, due to how your server is configured, this might require the English date format (mm/dd/yyyy), so that you might have to add an extra column to your table (that can be hidden from the visitor) where you have the date from the first column in the English format again.

    Regards,
    Tobias

    Thread Starter taro0904

    (@taro0904)

    You are my hero !! It works ?? THaaaaank youuu!!

    Is it possible to put a code somewhere in the template, that I dont have to change every shortcode ?

    One more question … ?? Maybe you can help me as well..? It would save a lot of work:
    Is it possible to import the dates with the Plugin WP ALL IMPORT via xml-import ? I tried some things, but it doesnt work..

    Thank you very much !!
    Tanja

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Tanja,

    good to hear that this works!
    if you really want this for all tables by default, without having to change every Shortcode, just change line 45 of the file tablepress-row-filter-date.php to

    $default_atts['filter_date'] = 'future'; // 'future', 'past', 'off'

    Note that you will then have to add filter_date="off" to every Shortcode that does not have dates in the first column.

    Regarding the import question: No sorry, I’m not aware of a way to import the dates as XML with that plugin. ?? TablePress does have several formats that it can import, but XML is not among them. But maybe you can try to import those dates somewhere else (Excel or something?) where you can then export a CSV file from?

    Best wishes,
    Tobias

    hi tobias, this is something id like to achieve for all tablepress tables across my site but when i tried the above method i get the following error

    Fatal error: Cannot call method self::_filter_date_is_future() or method does not exist in /var/sites/r/racecoursehospitality.net/public_html/wp-content/plugins/tablepress-row-filter-date/tablepress-row-filter-date.php on line 118

    is this because my dates are english (09/04/2015) rather than american (04/09/2015)

    Thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    are you using the latest version of the Extension from https://tablepress.org/download/extension/tablepress-row-filter-date.zip ? I’m asking because line 118 in that current version doesn’t contain a call to the mentioned function…

    I’m not sure about the date format at the moment. It might be possible that the American format is required, but that should not be what’s causing that error.

    Regards,
    Tobias

    i have just updated from the lastest download and im now getting this error

    Fatal error: Cannot call method self::_filter_date_is_future() or method does not exist in /var/sites/r/racecoursehospitality.net/public_html/wp-content/plugins/tablepress-row-filter-date/tablepress-row-filter-date.php on line 144

    Thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, that’s strange. Not sure why this is happening.
    I’ll have to do some testing on this, to see what’s wrong here… I’m pretty busy at the moment though, so I’m not sure when I’ll find the time for this. I hope it won’t be more than a few days. Sorry.
    I’ll reply here again as soon as I find something!

    Regards,
    Tobias

    Thanks Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure! You have made me curious about this now ??

    Regards,
    Tobias

    Hi Tobias, did you manage to ease your curiosity with this?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no, not yet, sorry ??
    I’ve been busy with other things the last few weeks and haven’t done much programming. I hope to find more time for that again towards the end of February. Thanks for your patience.

    Regards,
    Tobias

    Hi

    thanks for your info. It works well using for example
    [table id=1 filter_date=”future” filter_date_columns=”1″ cache_table_output=false /]. What can do to give a selection (radio button) to the user asking for all, past, future? How can this be integrated in the page?

    Many thanks
    huo

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Good to hear that this Shortcode helps! Unfortunately, I’m not aware of a direct solution for such radio buttons, and as that filtering works on the server only, it wouldn’t be possible without a request to the server anyway. Due to that, a solution might be to simply create three separate pages, where you each enter one of the three Shortcodes. Then, you could just add links to the other two pages on each page as well, so that the visitor can navigate.

    Regards,
    Tobias

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Show only future dates ?’ is closed to new replies.