WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Problem Filtering Numbers (9 posts)

  1. richardr
    Member
    Posted 1 year ago #

    Hi,

    Thanks for a great plugin.

    I am having a problem with sorting numbers in a column.

    The link to the table is http://www.richardrawlings.co.uk/league/results/top-scorers/

    It is going to be a top scorer table, so what I am looking to do is sort Points table with most points at the top, least at the bottom.

    The shortcode I have tried to use is [table id=1 row_order="sort" row_order_sort_column="E" row_order_sort_direction="ASC" /]

    Here is the debug and version info :-
    · TablePress: 0.9-RC
    · TablePress (DB): 17
    · TablePress table scheme: 3
    · Plugin installed: 2013/04/15 16:17:25
    · WordPress: 3.5.1
    · Multisite: no
    · PHP: 5.3.19
    · mySQL (Server): 5.1.68-cll
    · mySQL (Client): 5.1.68
    · ZIP support: yes
    · UTF-8 conversion: yes
    · WP Memory Limit: 40M
    · Server Memory Limit: 164M
    · Magic Quotes: on
    · WP_DEBUG: false

    The Table Press extensions I have installed are :-
    - DataTables HTML Numbers in Tables
    - Data Tables Sorting Plugins
    - Row Filtering
    - Table Row Ordering.

    Any help would be greatly appreciated.
    Thanks
    Richard

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Richard,

    thanks for your post, and sorry for the trouble!

    So, the problem is that the order of the rows is wrong?
    From what I can see, everything is exactly as you have told the plugin via the Shortcode, where you have specified ascending (ASC) sorting.
    You might want to change that to descending (DESC) sorting, i.e. changing your Shortcode to

    [table id=1 row_order="sort" row_order_sort_column="E" row_order_sort_direction="DESC" /]

    Could you try that, please?

    Note that you will not need the Extensions
    - DataTables HTML Numbers in Tables
    - Data Tables Sorting Plugins
    - Row Filtering
    for this, so you can remove them again (unless you are using them on other tables, of course).

    Regards,
    Tobias

  3. richardr
    Member
    Posted 1 year ago #

    Hi Tobias.

    Many Thanks for your prompt reply.

    Yes, the issue is that I would like the numbers is descending order.

    I have tried the new shortcode, however unfortunately this hasn't worked.

    The header for the 5th column is Points, so would I need to try :-

    [table id=1 row_order="sort" row_order_sort_column="Points" row_order_sort_direction="DESC" /]

    So changing the row_order_sort_column to the header of the column?

    Many Thanks once again.
    Richard

  4. richardr
    Member
    Posted 1 year ago #

    Hi Tobias

    I think I have now fixed the issue.

    Thanks very much
    Richard

  5. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Richard,

    no, "Points" as the value of that parameter would be wrong, as that parameter requires the column name as a letter or number (of the position).

    Now you have also added the JS sorting functions (which is fine). However, due to the CSS code in your theme, we'll need a small fix for the positioning of the sorting arrows. Therefore, please add this to the "Custom CSS" textarea on the "Plugin Options" screen of TablePress:

    #main .tablepress thead tr .sorting,
    #main .tablepress thead tr .sorting_asc,
    #main .tablepress thead tr .sorting_desc {
      padding-right: 20px;
    }

    Regards,
    Tobias

  6. richardr
    Member
    Posted 1 year ago #

    Hi Tobias

    Thanks for your reply.

    You are correct is saying I haven't fixed it. In my haste, I neglected to notice that it wasn't sorting in Descending order.

    I have now adjusted the shortcode back to :-

    [table id=1 row_order="sort" row_order_sort_column="E" row_order_sort_direction="DESC" /]

    Unfortunately, this still doesn't load the table in descending order. I am a bit stumped now.

    Thank you for the CSS coding for the arrows. I have added this and this has made a huge improvement to the look of the table.

    Do I need to add any additional custom commands from the DataTables documentation?

    Thanks Tobias
    Richard

  7. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Richard,

    no, nothing else is needed for DataTables, as the sorting we want is independent here.

    Just to double-check: Is the "Table Row Order Extension" activated on your "Plugins" screen?

    If that still does not help, please send me an email with the details to a temporary admin account, and I'll take a look at this directly on your site. My address is in the main plugin file "tablepress.php".

    Regards,
    Tobias

  8. richardr
    Member
    Posted 1 year ago #

    Hi Tobias

    Thank you for your continued support.

    I am really sorry, the Table Row Order Extension wasn't activated. I thought I had, I am so sorry. I feel so stupid, lol.

    Thanks for your help.

    Kind regards
    Richard

  9. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Richard,

    ah, that explains it :-) And don't worry, no problem at all!
    Great to hear that you can use this feature now!

    Best wishes,
    Tobias

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic