• Resolved joneskc_uk

    (@joneskc_uk)


    Tobias,
    Do you have some documentation on this extension? Its mentioned and can be downloaded from a support posting but there no mention on your web site. I wondered whether it could be used to filter out the next (weekly) sports fixture from a table of all the seasons fixture. ie a future search only show the next one?

    https://www.ads-software.com/plugins/tablepress/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Yeah, the Extension is not yet documented on the website, but only here in the forums, e.g. at https://www.ads-software.com/support/topic/show-only-future-dates?replies=4#post-6080471

    While it should be possible to use for showing the future sports fixtures, I can’t think of a way to limit this to only one event, except maybe with CSS. Sorry.

    Regards,
    Tobias

    Thread Starter joneskc_uk

    (@joneskc_uk)

    Another strategy might be to use the existing row filtering extension? If I add a column to the fixture table called ‘week’ and populate each row with the week number eg ‘Week 40’ etc, can I use the other row filtering extension by passing it a variable from the page? e.g. the following shortcode works where the Week 40 is fixed but can it be populated from say a page variable e.g capturing the $week variable and concatenating it with text?

    [table id=21 table_foot=”0″ filter=”Week 40″ /]
    amended to
    [table id=21 table_foot=”0″ filter=”$Week_Number” /] ?

    Tks
    Kevin

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Kevin,

    yes, that should also work, but you’d need to use either the PHP template tag to construct the new Shortcode, or write a small new wrapper Shortcode that adds the extra parameter and uses the template tag internally.

    Regards,
    Tobias

    Thread Starter joneskc_uk

    (@joneskc_uk)

    Tobias,
    Yes, you are correct. I had some fun with syntax etc of the filter statement but after adding a ‘week’ column to the table and populating records with a week number Week 44, week 45 etc I then embedded the following statements in the page template.

    <?php $week = date(‘W’); ?>
    <?php echo do_shortcode( ‘[table id=21 table_foot=”0″ show_columns=”1,2,3,4″ hide_columns=”5″ column_widths=”50px|100px|50px|50px” filter=”Week&&’.$week.'” /]’ ); ?>

    I’m still doing some configuration of the look & feel of the tables otherwise this now seems to work, displaying only the next match only for the three teams (three tables = three shortcodes) we run at the club.

    Thanks again for your help.

    Rgds
    Kevin

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Hi, complete wordpress novice here.

    I am using an events database in multiple ways on different pages and have a question about the filter by date functionality – I can get events from past dates displayed, and future dates, but how can I get it to display only rows from today’s date? I tried editing the plugin by adding a bit of code to include a “now” variable as well as “future” and “past”, and changed the if statement later in the code to a “nested if” – but that hasnt worked so my 20 year old programming skills need some assistance.

    Sorry to hijack this thread but on another page I want to display every event in the current month. I am also using the DataTables ColumnFilterWidgets – so I wondered if there was a way to feed a default value into that (for both problems)? So that a user could have, say all of the current month’s events listed as a default but then select next month’s? Or just the current days events, but then select another date?

    Sorry if this is obvious but have had a good old search for the answer!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Extending the Row Filter Date Extension to also support “today”, additionally to “future” and “past” should not be too difficult, from what I remember about the code. You’d basically only need to extend one if-check and then add another comparision method. Unfortunately, I’m very busy at the moment and just don’t have to the time to add this to the Extension myself. ??

    Regardless, this would actually not be helpful for that second idea with the ColumnFilterWidgets Extension, as the two Extensions are completely independent from each other. This would then actually mean that you could never select a different day or month from a dropdown, as the corresponding rows would never be in the page.
    Now, adding drop downs for the dates and months should not be too difficult. The one for the dates should be there directly after installing the Extension. The one for the months could be added after you add an extra column to the table, which basically holds the month value for that row’s date again. We’d then hide that column to the user, but get the extra drop down as a result.
    Selecting a default value from the drop down should also be possible with some extra JavaScript code, like this: https://www.ads-software.com/support/topic/auto-display-of-customized-filter-widgets?replies=7

    Regards,
    Tobias

    Many thanks for your prompt reply – looks a neat solution, will try that out this evening!

    Let me just echo what everyone else says – great plugin and top class support too!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this will help!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Row filter by date extension’ is closed to new replies.