Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    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)

    The only differences between the two functions.php files were, the Softaculous has no imported option.php file require( ABSPATH . WPINC . '/option.php' );, instead it is just an inline code in the functions.php file.

    There were no CSS overrides and the only thing missing from the functions.php in the softaculous install, was half the option.php file from the Fantastico De Luxe installation (The missing code is at the bottom of this post), after placing this missing code into the function.php file in the softaculous install it didn’t apply any changes to the admin panel.

    I may have to get a friend who is more familiar with php to go through this and troubleshoot it more than I can.

    [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

    Thread Starter dylarcher

    (@dylarcher)

    Looks like these two function.php files are VERY different.

    Thank you very much for pointing me in the right direction, I’m still familiarizing myself with WordPress so that was very helpful. I’ll let you know if I need anymore direction after I’ve compared the two files more.

    Thanks again.

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