• Resolved whcc

    (@whcc)


    I have a table to list birth month and day (mm/dd) for students. I can sort by class or by birthdate, but I would like to know if I can automatically highlight just the rows that have the current birth month.

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I see what you mean, but unfortunately, I’m not aware of an existing and directly usable solution for this. While there is a TablePress Extension that can highlight rows that contain pre-defined search terms, this does not currently offer a way to highlight by dynamically changing terms, like the month of the year. ?? You would have to add support for this with custom code.

    Regards,
    Tobias

    Thread Starter whcc

    (@whcc)

    Thank you for your answer. It’s not a problem, just something I was hoping to be able to do. I love to use Tablepress for so many things. Thanks again for your help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Sorry again that I couldn’t offer a solution.

    Best wishes,
    Tobias

    I’ve come up with an approximate solution that uses the PHP code in table cells extention and a bit of CSS.

    It won’t highlight a row, but it can highlight a cell (or add content such as “Happy Birthday!” using the CSS ::after pseudo-element, after the cell contents).

    (I tried combining the PHP code in table cells extension with the Row highlighting extension, but the latter doesn’t work. My hunch is that the latter extension is “looking at” the cell contents before the cell contents are generated by the PHP code.)

    If you’re comfortable with PHP, I can share my code and a screenshot of the results. Lemme know.

    PS: How do we share php code snippets and screen shots in this forum?

    • This reply was modified 2 years, 5 months ago by Jeff Cohan.
    Thread Starter whcc

    (@whcc)

    I really appreciate your response, but I think php code is above my basic skill level. Thank you for looking at this and trying to help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for sending me the code, Jeff! I’ll take a look asap!

    Best wishes,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘highlight rows with current month/day’ is closed to new replies.