Support » Plugin: Simple Share Buttons Adder » very simple, easy, and customizable. Could use one option…

  • I really enjoy this plugin, came as advertised. Very simple to use and incorporate (and I’m not very fond of plugins usually).

    continually updated and improved.

    I would prefer an “open in iframe” or “open in modal” option. Now I have to build it in, but other than that this made my job much easier.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi dylarcher,

    just wondering how you added in the “open in modal” to these buttons…

    I’m not a developer, but seems like this shouldn’t be to tough. were you able to get it to work?

    -Tim

    Thread Starter dylarcher

    (@dylarcher)

    I didn’t actually make a “modal” for this plugin as time did not permit building it just yet, I did however, do a quick work around to make it play nice and not just open in a new tab. I used jquery to make it open in a new window that is centered on the page, you would just need to add this script into your footer and the facebook share link will popup in a 600×400 “new” window over your content.

    #ssba_facebook_share = facebook’s link ID
    #ssba_twitter_share = twitters
    #ssba_google_share … Etc.

    jQuery(document).ready(function ($) {
          $("#ssba_facebook_share").attr('title','opens in a new pop-up'); //set new title
          $("#ssba_facebook_share").click(function(){ //click action
            w = parseInt((screen.width - 600)/2); h = parseInt((screen.height - 400)/2);
            cwin = window.open($(this).attr('href'), 'closewin',
           'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=400,width=600');
            cwin.moveTo(w,h);
            return false;
          });
        });

    If you need help with anything don’t hesitate to ask.

    Thread Starter dylarcher

    (@dylarcher)

    This may help a little more, each ID now calls the same function.

    <script>
    function newSocialWindow(idString) {
        $(idString).attr('title','opens in a new pop-up');
        $(idString).click(function(){
            w = parseInt((screen.width - 600)/2); h = parseInt((screen.height - 400)/2);
            cwin = window.open($(this).attr('href'), 'closewin',
            'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=400,width=600');
            cwin.moveTo(w,h);
            return false;
        });
    }
    jQuery(document).ready(function ($) {
        newSocialWindow("#ssba_facebook_share");
        newSocialWindow("#ssba_twitter_share");
        newSocialWindow("#ssba_google_share");
        /* add more ID's if you're including more social icons */
    });
    </script>

    Thanks Donald

    Thanks for the response!

    Just tried adding to my footer.php, but didn’t seem to do anything. It was still opening the share windows in a new tab. Should I be adding this to another file?

    Or is there a certain place in the footer that I would need to paste that?

    Thx,

    -Dan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘very simple, easy, and customizable. Could use one option…’ is closed to new replies.