• Resolved gcarnegie

    (@gcarnegie)


    Hi there,
    I have some quite long comments in some of the cells and I was hoping to enable vertical scrolling within the cells themselves.
    Perhaps there is a way to surround each cell data with:

    <div style="max-height: 200px; overflow-y: auto;">
    CELL_DATA
    </div>

    many thanks
    Guy

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You would either have to add this HTML code into cells manually, or maybe try doing it programmatically, using the tablepress_cell_content filter hook.

    Regards,
    Tobias

    Thread Starter gcarnegie

    (@gcarnegie)

    Thanks Tobias,
    I’ve managed to find the view-edit.php file to make the edit table cells a little larger, but can you please let me know which file contains the PHP which renders the user-viewable table? I can’t seem to find it.

    • This reply was modified 4 years, 11 months ago by gcarnegie.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that’s all in classes/class-render.php. However, I strongly discourage editing this file directly, as you will lose these modifications again, after updating TablePress to a new version!
    Instead, please use the plugin filter hook, with some small custom PHP code, e.g. in your theme.

    Regards,
    Tobias

    Thread Starter gcarnegie

    (@gcarnegie)

    Thanks Tobias.
    I need to learn how to use hooks etc. Currently I can do bits and pieces with php and have updated the file accordingly, but as you say that is not a good way to work. I’ve tweaked a few of my plugins this way (with two or three lines of code modified) and now – as you say – I’m stuck with out of date versions. Would be good to run a comparison with the “stock” code to remind myself of what changes I’ve made and then implement hooks as you suggest to replicate the function.
    Do you know of any good resources which will give me exercises etc on the use of hooks and filters etc?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I don’t really have specific recommendations, but if you search for WordPress plugin development, this will be one of the first concepts that will be presented.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Vertical Scrolling within cells’ is closed to new replies.