General questions

This topic contains 22 replies, has 2 voices, and was last updated by  Alex Rollin 6 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #432515

    Gary Jones
    Free User
    Post count: 114

    As I said earlier I need to read up on using code snippets. This is the code for the iframe and all I’m asking is where I put this?

    <iframe
    id=”JotFormIFrame-81405304168855″
    onload=”window.parent.scrollTo(0,0)”
    allowtransparency=”true”
    allowfullscreen=”true”
    allow=”geolocation; microphone; camera”
    src=”https://form.jotform.co/81405304168855″
    frameborder=”0″
    style=”width: 1px;
    min-width: 100%;
    height:539px;
    border:none;”
    scrolling=”no”
    >
    </iframe>
    <script type=”text/javascript”>
    var ifr = document.getElementById(“JotFormIFrame-81405304168855”);
    if(window.location.href && window.location.href.indexOf(“?”) > -1) {
    var get = window.location.href.substr(window.location.href.indexOf(“?”) + 1);
    if(ifr && get.length > 0) {
    var src = ifr.src;
    src = src.indexOf(“?”) > -1 ? src + “&” + get : src + “?” + get;
    ifr.src = src;
    }
    }
    window.handleIFrameMessage = function(e) {
    var args = e.data.split(“:”);
    if (args.length > 2) { iframe = document.getElementById(“JotFormIFrame-” + args[(args.length – 1)]); } else { iframe = document.getElementById(“JotFormIFrame”); }
    if (!iframe) { return; }
    switch (args[0]) {
    case “scrollIntoView”:
    iframe.scrollIntoView();
    break;
    case “setHeight”:
    iframe.style.height = args[1] + “px”;
    break;
    case “collapseErrorPage”:
    if (iframe.clientHeight > window.innerHeight) {
    iframe.style.height = window.innerHeight + “px”;
    }
    break;
    case “reloadPage”:
    window.location.reload();
    break;
    case “loadScript”:
    var src = args[1];
    if (args.length > 3) {
    src = args[1] + ‘:’ + args[2];
    }
    var script = document.createElement(‘script’);
    script.src = src;
    script.type = ‘text/javascript’;
    document.body.appendChild(script);
    break;
    case “exitFullscreen”:
    if (window.document.exitFullscreen) window.document.exitFullscreen();
    else if (window.document.mozCancelFullScreen) window.document.mozCancelFullScreen();
    else if (window.document.mozCancelFullscreen) window.document.mozCancelFullScreen();
    else if (window.document.webkitExitFullscreen) window.document.webkitExitFullscreen();
    else if (window.document.msExitFullscreen) window.document.msExitFullscreen();
    break;
    }
    var isJotForm = (e.origin.indexOf(“jotform”) > -1) ? true : false;
    if(isJotForm && “contentWindow” in iframe && “postMessage” in iframe.contentWindow) {
    var urls = {“docurl”:encodeURIComponent(document.URL),”referrer”:encodeURIComponent(document.referrer)};
    iframe.contentWindow.postMessage(JSON.stringify({“type”:”urls”,”value”:urls}), “*”);
    }
    };
    if (window.addEventListener) {
    window.addEventListener(“message”, handleIFrameMessage, false);
    } else if (window.attachEvent) {
    window.attachEvent(“onmessage”, handleIFrameMessage);
    }
    </script>

    Thanks so much.

    #433132

    Gary Jones
    Free User
    Post count: 114

    With the admin custom login plugin this is the URL when I add /wp-admin to my site URL –

    http://www.ajijictoday.com.mx/wp-login.php?redirect_to=http%3A%2F%2Fajijictoday.com.mx%2Fwp-admin%2F&reauth=1

    If I am understanding what I’ve been told so far I need to use the login code snippet and use this URL as the redirect, correct?

    Is there documentation to tell me exactly how I use a code snippet? This will be my first attempt at this and I don’t want to screw it up. .

    Appreciate your help.

    #433133

    Alex Rollin
    Moderator
    Post count: 27815

    The snippet contains instructions, you can read them here:

    https://wpgeodirectory.com/docs/redirecting-the-login-page/

    It is a customization, but a needed one if you use a different plugin for login/registration but still want users to login and add listings. You may need to hire a developer if you need help with it.

    #435356

    Gary Jones
    Free User
    Post count: 114

    A quick follow-up to the log in question. I was able to redirect the normal WordPress login to the admin custom login plugin; however, the problem was it automatically showed my admin credentials, which would not work. The developer is amending the code to have it show blank and then people could either login or register as applicable.

    My question for GeoDirectory is once a user has logged in through some other procedure, such as the standard WordPress login, does GeoDirectory know that they are now logged in? I wouldn’t want users to need to login twice.

    As always, appreciate your help.

    #435365

    Alex Rollin
    Moderator
    Post count: 27815

    Yes, if a user logs into WordPress, then they are also logged in to GeoDirectory.

    #435374

    Gary Jones
    Free User
    Post count: 114

    Excellent! Thank you.

    #440805

    Gary Jones
    Free User
    Post count: 114

    I am still getting the recaptcha error. I have entered the site keys properly so I don’t know why I am getting this error. I believe I got two errors before, but now still getting one. No idea why.

    #440839

    Alex Rollin
    Moderator
    Post count: 27815

    Hi

    please open a new topic and describe the details of the issue so we can help with that.

Viewing 8 posts - 16 through 23 (of 23 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount