Need Help With Social Marketing

My site is: http://www.bigearthexplorers.com/

I would like to add the "Social Marketing" to an image/button so that when someone clicks, for example the "Try for Free" button on my main page, the plugin pops up.

Also, can I make the popup wider? Once they share the page, I'm giving them a form (MailChimp) to fill out instead of a coupon code and the way the page is now, the form gets cut off.

I left the Social Marketing box in my site to show you what I mean but ideally I'd like the box to disappear and just have the option to click the "Try for Free" button

Make sense?

Thanks for your help!

  • aecnu
    • WP Unicorn

    Greetings chelsearaeps,

    Thank you for being a WPMU Dev member!

    I would like to add the "Social Marketing" to an image/button so that when someone clicks, for example the "Try for Free" button on my main page, the plugin pops up.

    The custom code required to make this happen is entirely dependent on the url or action necessary to launch the plugin window. With that information you would want to integrate that custom code into the image to which you refer - "Try for Free" button.

    The code itself would be something like script between the <head> </head> tags of your specific page:

    <SCRIPT LANGUAGE="JavaScript">
     <!--
    function Start(page)
     {
     OpenWin = this.open(page, "CtrlWindow","toolbar=No,menubar=No,location=No,scrollbars=No,resizable=No,status=No,width=250,height=250,left=150,top=150,");
     }
     //-->
    </SCRIPT>

    then the action itself is called using:

    <a href="javascript:void(0);" onclick="javascript:Start ('popup.php');">My Page</a>

    which would be added to the graphic as its link.

    Also, can I make the popup wider?

    I believe this is done in the wdsm.css file with the following code controlling the popup width in min-width: 280px below:

    #wdsm-popup_wrapper {
    	overflow: hidden;
    	background-color: #f8f8f8;
    	padding: 4px;
    	border: 1px solid #ddd;
    	min-width: 280px;
    	width: 25%;

    Thanks again for being a WPMU Dev member!

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Cheers, Joe :slight_smile:

  • chelsearaeps
    • WPMU DEV Initiate

    Thanks for the help... still having problems tho.

    Changing the width of the plugin worked just fine but the other bit of code didn't

    I'd like the pop-up to come up when you click on an image. Using your code, I got the image to be clickable but instead of the pop-up coming up, I got a new small window (not the plugin pop-up but a basic web browser).

    Also, when the window came up, it said "Page Not Found" anyways.

    Is there another bit of code I can try?

  • chelsearaeps
    • WPMU DEV Initiate

    Hey... anyone have any ideas on how I can make the Social Marketing plugin work for my page?

    I know it was a three day weekend but 5 days later and no advice?

    Also having an issue with the Social Marketing box popping up behind the embedded youtube video on my page.

    Thanks

  • aecnu
    • WP Unicorn

    Greetings chelsearaeps,

    Thank you for being a WPMU Dev member!

    Did you put the Javascript portion of the code above in between the <head> and </head> tags?

    This has been accomplished and it did not work?

    I shall ask the lead developer of Social Marketing plugin to give us some advice/advise us of what may possibly be wrong or a better solution.

    Cheers, Joe :slight_smile:

  • chelsearaeps
    • WPMU DEV Initiate

    No, like I said before... "Using your code, I got the image to be clickable but instead of the pop-up coming up, I got a new small window (not the plugin pop-up but a basic web browser).
    Also, when the window came up, it said "Page Not Found" anyways."

    The second problem is that the pop-up (when I use it just as the normal shortcode) comes up BEHIND the embeded youtube video on my page.

  • Vladislav
    • Dead Eye Dev

    Hello,

    Thanks for sharing the link, it really helped understanding what should happen. To achieve what you want with the customized button on your page as it is right now, you will want to add this to the footer portion of your page:

    <script type="text/javascript">
    jQuery(function () {
    jQuery(".wdsm_ad").hide();
    jQuery(".size-full.wp-image-297")
    .unbind("click")
    .click(function () {jQuery(".wdsm_action_link").click(); return false;});
    });
    </script>

    Let's walk through the code, so you understand exactly what happens. The first and last lines ("jQuery(function () {" and "});") make sure that the rest of the code gets executed when your page is ready. Next, we hide the default Social Marketing blue box on line that says "jQuery(".wdsm_ad").hide();".

    Next couple of lines are the most important to re-bind the Social Marketing behavior. We first find your image like this: jQuery(".size-full.wp-image-297") - please note that if you change your image at some point, you'll have to edit this portion to find the proper image again.

    Next, we unbind any behavior that should happen when someone clicks the image, with this line: .unbind("click"). Lastly, the long line near the end will simulate a click event to the (hidden) Social Marketing action button. In effect, clicking on the image should behave exactly as if someone clicked on Social Marketing button.

  • chelsearaeps
    • WPMU DEV Initiate

    Thank you, thank you, thank you!

    I was beginning to think it wasn't possible since it had been over a week and no one had a suggestion that worked.

    Looks great but I'm still having the problem of the popup going behind the embedded youtube video on my site. Small issue and it isn't completely behind it but is this fixable?

    Thanks again VeBailovity! I really appreciate the help.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.