• Hi!
    How can i implement the player stats i found on poorpigs.de to my website (when i click the magnifying-glass it displays the stats under).

    Best regards
    Daniel


    Poorpigs.de

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Daniel,

    thanks for your question.

    This is actually not that easy, and the functionality is not directly using or depending on WP-Table Reloaded. Instead, it is custom JavaScript that will wait for “click” events on the links in the table rows, and then trigger an AJAX request for a file with the stats. That data is then added automatically as a new row. For details, you’ll want to take a look at the source code of that page, and especially at the JavaScript files in it.

    You could also try this with the DataTables library, like on http://datatables.net/examples/api/row_details.html .
    Please see http://wordpress.org/support/topic/plugin-wp-table-reloaded-details-column-and-more and http://wordpress.org/support/topic/plugin-wp-table-reloaded-wide-table-scroll-option for more on that.

    Regards,
    Tobias

    Thread Starter Slamisam

    (@slamisam)

    Thank you for your quick reply!

    My coding skills aren’t that good, sorry.

    I found this plugin called jQuery Collapse-O-Matic which works in my table with shortcode but i want it to expand the whole row under like on poorpigs.de. Now it expands only the cell i put it in. Looks kinda wierd.

    Any thoughts on this?

    Great plugin btw!

    Regards,
    Daniel

    jQuery Collapse-O-Matic

    Thread Starter Slamisam

    (@slamisam)

    One more question =)

    How can i remove the “edit” from just one special table. I have many different tables and i don’t want anyone to edit just that one and accidently mess it up.

    Thanks!

    /Daniel

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Daniel,

    I’m not familiar with that jQuery plugin, but I have written something similar actually for the WP-Table Reloaded website, see http://tobias.baethge.com/2009/07/expandhide-accordion-feature-explained/

    Now, unfortunately, this probably won’t directly help in getting the same effect as on poorpigs.de. For that, you’ll really need to look into the source code, or try the DataTables solution. I’d love to help more, but due to very heavy time constraints at work, I just can’t 🙁 Sorry.

    About hiding the “Edit” link: This is not directly possible in the user interface, but only with some custom PHP code. Please try adding the following code to the “functions.php” in your theme folder. Don’t forget to adjust the table ID in the code (from 123 to the correct ID). After that, save the table once, to refresh the cache.

    add_filter( 'wp_table_reloaded_frontend_output_options', 'wp_table_reloaded_remove_edit_link', 10, 3 );
    function wp_table_reloaded_remove_edit_link( $output_options, $table_id, $table ) {
      if ( 123 == $table_id )
        $output_options['edit_table_url'] = '';
      return $output_options;
    }

    Regards,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: WP-Table Reloaded] Player Stats’ is closed to new replies.