• Resolved Michael

    (@tony-alibaba)


    Hi, I love this plugin, my issue is this.
    (And I’ve read every post here but can’t find the answer.)

    When a guest user fills out the submission form and puts in their name and url, etc. and clicks posts, everything is good

    When looking at the post by the guest, I click their name and it takes me to a blank page like example.come/author/guest why?

    So my major question is,
    why doesn’t clicking the name of the guest author in the post take me to their submitted URL?

    https://www.ads-software.com/plugins/user-submitted-posts/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Michael

    (@tony-alibaba)

    Okay, i’ve read the read me file and know this is the code I need but where do I place it?

    <?php if (function_exists('usp_author_link')) usp_author_link(); ?>

    Thread Starter Michael

    (@tony-alibaba)

    Okay, I figured out where to put it ??

    Plugin Author Jeff Starr

    (@specialk)

    Hi Michael,

    That code goes in the theme template, wherever you would like to display the information. For example, if your theme has an index.php and/or single.php file, the code may be placed anywhere in the loop. To give you an idea of what to look for, many themes use the_author() or the_author_link() or something similar to display the author name and/or link.

    Thread Starter Michael

    (@tony-alibaba)

    Hey jeff, thank you for your time, just to repeat
    Okay, I figured out where to put it but now what happens is when I click
    the guests name as their link, it puts the link behind my own website url like

    mysite.com/guestlink.com

    instead of just

    guestlink.com

    any suggestions on what I should do?

    Plugin Author Jeff Starr

    (@specialk)

    It sounds like something is misconfigured somewhere.. do you have a link so I can take a look – feel free to send direct via https://perishablepress.com/contact/

    Thread Starter Michael

    (@tony-alibaba)

    Hey jeff, thanks for the extended help, I’m hoping to get this done on my theme’s end, as you suggested, I really appreciate you going out of your way to help. It means a lot to me!

    Plugin Author Jeff Starr

    (@specialk)

    Glad to help, Mike! Let me know if there are any further questions or concerns.

    Thread Starter Michael

    (@tony-alibaba)

    Hey jeff, how are you doing today?
    Hey, my good friend D4z helped me figure this out and it was
    the web address formatting, when I use just example.com
    I got the error but when I use https://
    the function works fine but most people really don’t bother putting in the https://
    is there a way to preset this into the form?
    or force the form to use https:// ?

    or change plug-in validation form to validate just urls with https:// or https://

    Thread Starter Michael

    (@tony-alibaba)

    Hey Maybe something like this, I just pulled this from google but not sure how to incorporate into the form?

    $url = htmlspecialchars($_POST[‘website’]);
    if (!preg_match(“/^(https?:\/\/+[\w\-]+\.[\w\-]+)/i”,$url))
    {
    die(“URL address not valid”);
    }

    Plugin Author Jeff Starr

    (@specialk)

    That might work, but it would probably be easiest to use jQuery, something like this:

    if(url.substr(0,7) != 'https://'){
        url = 'https://' + url;
    }
    if(url.substr(url.length-1, 1) != '/'){
        url = url + '/';
    }

    Source & more info: https://stackoverflow.com/questions/6122372/validate-a-url-with-jquery-and-add-http-and-final-if-needed

    Thread Starter Michael

    (@tony-alibaba)

    Hey jeff, thank you for the brilliant response, now I have a dumb question, where should I place the above code?

    Plugin Author Jeff Starr

    (@specialk)

    That code is just an example, you’ll need to modify it to work as required in your theme. Once you have it dialed in, you can add it via external JavaScript file, either via the plugin (“Include external JavaScript”), or via your theme’s JavaScript file (if applicable).

    Thread Starter Michael

    (@tony-alibaba)

    Thanks Jeff! Everything you said just brought me closer to the light,I will do some studying, I’m surprised that there is not an easier method, in all regards, I’m one step closer, have an awesome day!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Guest User's URL – One major question’ is closed to new replies.