WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Social share buttons next to search bar / filter field (6 posts)

  1. ethno
    Member
    Posted 1 year ago #

    Is it possible to place social buttons next the the search field, e.g. on the right side?

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    can you explain what you mean with "social buttons"? Links to social networks? Do you already have those or do you still need to create those?

    Moving them next to the "Search" field might be possible then, but it would be tricky, as the DataTables library creates the "Search" field dynamically and on the fly.

    Placing the social links somewhere else should be a lot easier.

    Regards,
    Tobias

  3. ethno
    Member
    Posted 1 year ago #

    Hello,

    I mean sharing buttons, e.g. Facebook send, Facebook like, Tweet or ShareThis / AddThis buttons.

    I already have those, either as javascript code or alternativaly as a wordpress shortcode.

    Do you think it is feasible to integrate the social share buttons to the left or right of the search field? Can this perhaps be done with a slight modification of the datatables javascript files?

    Thank you very much for the quick reply,
    ethno

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    unfortunately, I'm not really sure as to what the best approach to achieve this is... The reason is that the search field is added dynamically, in a place directly before the table code (in the DOM).

    The best approach might be to put the social buttons in a <div> and then shift that <div> to a new position (next to the search field), via CSS and maybe JS.

    Modifying the DataTables files is something that I would not recommend in general.

    Regards,
    Tobias

  5. ethno
    Member
    Posted 1 year ago #

    Hello,

    yes, I understand the problem but hoped you might come up with something that I could not possibly have considered. :-)

    I already guessed that there is no easy and elegant way to acheive this type of functionality.

    Thank you very much, anyways.

    PS: I just sent you 10€ via Paypal for making this excellent plugin. :-)

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    no, besides the suggestion above with moving a <div> container, I'm out of ideas here...
    The sDom parameter for DataTables (see http://datatables.net/usage/options#sDom) might be helpful here to create a target for the move process, if you want to use JS for that. If you stick to CSS, it might not be necessary, and CSS properties like "position" could be helpful.

    But mainly, this boils down to finding an elegant way of adding content to a place (in the DOM) that we can't access before the JS is evaluated.
    Maybe you could ask about this in the DataTables forums at http://www.datatables.net. You don't have to be specific about the type of content, as this basically could work for all content.

    And thanks for the donation, I really appreciate it!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic