Support » Plugin: TablePress - Tables in WordPress made easy » Make rows clickable

  • Resolved gregounours

    (@gregounours)


    Hi Tobias,

    Great Plugin. Saved me a lot of time already.
    I was wondering if there is a way of making each row clickable. I am working on a directory of sort and would like each row to link to a person’s profile page.

    If this is not possible yet, this would be an amazing feature. A hidden column could contain the URLs. Since you are probably using onMouseover/onMouseout for highlighting that shouldn’t be too hard to implement using onClick.

    G.D.

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

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

    (@tobiasbg)

    Hi,

    thanks for your question.

    Actually, TablePress doesn’t use “onMouseover/onMouseout”. The hover feature only uses CSS (the :hover selector).
    Now, I can see what you are trying to do, but this is not really a feature that is suitable for a plugin that wants to make showing and managing of tables with data easier.
    However, as you already made the correct suggestion with “onclick” here, I suggest that you simply implement this directly for your site. Instead of using plain JS like this though, I suggest that you use the jQuery JavaScript library here, for which you can find a nice tutorial at http://jqfundamentals.com/
    With that, you can simply register a click on all table rows, and then trigger a click on a link in that row (and actual link/URL can actually even be hidden via CSS).

    Best wishes,
    Tobias

    Thread Starter gregounours

    (@gregounours)

    Thanks for your quick answer Tobias. I was just trying to save me from inserting links manually on 250 rows but I guess that’s what I am gonna have to do 🙂
    Keep up the good work. The more I toys with it the more I like the plugin.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Greg,

    well, you would have to add the links somewhere anyway, even for a “row click” JS solution…
    If you want to save the trouble of having to enter HTML or use the “Insert Link” button all the time, you could also use a small “TablePress Extension” that automatically converts all URLs in the table to clickable links (with the URL as the text). You can find that Extension at https://github.com/downloads/TobiasBg/TablePress-Extensions/tablepress-automatic-url-conversion.zip and it just needs to be installed and activated just like a regular WordPress plugin.
    After that, change the Shortcode of your table from something like

    [table id=123 /]

    to

    [table id=123 automatic_url_conversion=true /]

    After that, all plain URLs will be convert to the HTML code for the link, which is then clickable.

    Regards,
    Tobias

    I am baffled.

    This code [table id=1 automatic_url_conversion=true /] works fine on one website but not on another with the same configuration.

    This works:

    http://ntma.com/contractor-members/

    This doesn’t:
    http://dacadfw.org/wordpress/contractor-members/

    Any ideas on what else to try?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    That’s indeed weird. Are you sure that the same version of the Extension is installed on both sites, and that the Extension has actually been activated on the WordPress “Plugins” page, and that there are no typos in the Shortcode (please check in the “Text” and not the “Visual” editor)?

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Make rows clickable’ is closed to new replies.