• That’s an interesting plugin and it definitely deserves either 5 stars (if you are a programmer with high IQ) or 1 star (if you are not). LOL
    The author made a nice tool but it’s a nice only if you know what to do and have time to look trough his code if needed.

    One question – is there any way to add pagination, let say if I have a table with 20K records to prevent it loading as a whole in the admin panel? If not is there an easy way to accomplish this (being able to perform a search on the whole table if needed), thanks.

    EDIT (for those that don’t like to read docs):
    – to enable the plugin capabilities (to appear in the Admin menu) you must have the table defined already in the database and in functions.php (or elsewhere) to add at least a single line of code (example at the end);
    – to be able to add new lines, there should be a column “ID” or if it is different, to use the specific config rule;
    – the pagination is not needed at all – it’s super fast with large tables (>20K lines).

    Example code to enable the plugin in theme’s functions.php:

    if(function_exists('add_db_table_editor')){
      add_db_table_editor('title=THE_TITLE_FOR_ADMIN_AREA&table=the_table_name');
    }
    • This topic was modified 6 years, 4 months ago by dingdang.
    • This topic was modified 6 years, 4 months ago by dingdang.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author bobbysmith007

    (@bobbysmith007)

    Howdy, thanks for your review, this plugin was definitely written by a full time programmer for programmers.

    I have added manual pagination based on date ranges / years, etc, by changing what query is used, based on query string parameters. There are some examples of this in “examples/paging.php”.

    At one point I started working on ajax data feeds to allow continuous scrolling of “unlimited” data with it being loaded as needed. I dont remember what the outcome of that work was, but it never came to full fruition. Looking through the code for async_data might yield more information.

    Glad you find this plugin useful

    Thread Starter dingdang

    (@dingdang)

    Yes but as I can guess if the pagination is done by a limited query the search would be limited to only that page but not the whole table contents?

    My idea however is the following:
    – have the full table loaded (which is OK for all browsers to handle 10-20K lines BUT in memory)
    – display just part of them, and pagination would work just to show next part and hide the current part of data displayed
    – so search would work as it is now, using the full amount of data

    I guess this can be done by just adding a little javascript in the table view page.. but is this done by someone already?

    So to resolve this – can you tell me how your search works? where it checks for matches? Will it work if some lines of the table are hidden (display: none or height:0)?
    If the answer is yes then a pretty simple universal javascript can be embedded that would hide everything but N lines of the table and when you scroll it would dynamically show more (before of after the current set depending on the scroll direction) and hide the same amount of lines that are off screen. That way dynamically only slice of the data would be visible.

    Thread Starter dingdang

    (@dingdang)

    P.S. an excellent implementation for clustering a big table is done here: https://clusterize.js.org/

    There is an example of a table with 400,000 lines nicely handled by the browser

    • This reply was modified 6 years, 4 months ago by dingdang.
    Thread Starter dingdang

    (@dingdang)

    P.P.S. Actually just to note for anyone interested:
    my previous thoughts were theoretical and I supposed that the scrolling would be slow based on some other table plugins experience (which were really slow with 10K lines).
    To my surprise this one handles 10K lines super fast including the search.
    So I would give it 10 starts if it was possible. ??

    IMPORTANT: The only problem is that possibly I found a bug – with the large table the row “NEW” is missing and at the console there is a message (which seems is related):

    Couldnt find a column: id defaulting to noedit

    Could you look into this?

    Plugin Author bobbysmith007

    (@bobbysmith007)

    >IMPORTANT: The only problem is that possibly I found a bug – with the large table the row “NEW” is missing and at the console there is a message (which seems is related):

    >Couldnt find a column: id defaulting to noedit

    If the new row is missing it is because you dont have edit permissions, or there is no id column specified. The table MUST have a single column unique id in order for the plugin to work. By default it assumes the column name is id, however you can set it to one of the other columns as long as it is unique. What I tend to do is just add a new id auto_increment column to any table missing one, even if its only use is for this plugin.

    SlickGrid is the underlying project used for table rendering, and I have found it to be a pretty dang good implementation!

    Thread Starter dingdang

    (@dingdang)

    Yes I just found out myself about the column name “id” (in my big test table the column name was different). Also noted the SlickGrid implementation – so you already have everything in the box and actually the pagination is not needed at all in that case.

    Thanks! Everything works excellent.

    A recommendation: you may consider to make it usable for those that don’t like to read the documentation: after the installation you can add a link under the plugin called “HOWTO” or something like that with just a sentence on the next page: “If it seems that the plugin is not working this is because you haven’t spent a minute to look at the docs, so click here and read it” hehe

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Nice: Working excellent, MUST read the docs first!’ is closed to new replies.