Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How to change the Sign In button URL for jsConnect?

jcwebdevjcwebdev New
edited June 2012 in Vanilla 2.0 - 2.8

Hi folks,

I'm using jsConnect with Wordpress and Vanilla for a pretty much seamless setup. I've used CSS to remove the signin/register buttons that appear by default in the sign in widget so I just want to modify the Sign In URL to point to the Wordpress redirect login instead of the default Vanilla login page.

The Sign Out button URL is perfect as-is so I'd really like to keep it in place. How can I modify the Sign In URL?

Tagged:

Comments

  • Options
    peregrineperegrine MVP
    edited June 2012

    maybe you could use the routing in the dashboard or if that does not work, couldn't you change the .htaccess.

    or modify discussion/index.php

    or

    jQuery(document).ready(function($) {
        $(".P>.SignInPopup").html('<a class="Button SignInPopup" href="localhost.com">Sign In</a>')
        }); 
    

    or modify the link in

    default.master.php

    or modify

    default.master.tpl

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Routes and .htaccess rewrites are basically the same. Setting up either one causes the popup to load but show 'Page not found'.

    jQuery is an option but I'd rather tackle the problem at its route and either replace the link URL or solve the reason as to why the popup doesn't load. Again, modifying templates isn't the route I want to go down in case the theme is changed down-the-line.

  • Options

    Trying to get the route of the problem, the popup works until I enable SSL Controllers. With SSL Controllers turned on, the popup loads but no content appears.

  • Options

    Turns out that SSL Controllers cause problems with the sign in popup. The popup loads using AJAX and as the user is trying to request encrypted information from a non-encrypted page, nothing happens. The link itself does work however, as it takes the visitor to an encrypted page, from where they can securely login. Remove the class that triggers the popup and you are laughing.

    I did this by creating a custom plugin and running the following code:

    class CustomJSPlugin extends Gdn_Plugin {
    public function Base_Render_Before(&$Sender)
    {
    $JavaScript = '

    $(document).ready(function() { $("#Frame ul li a").removeClass("SignInPopup"); });

    ';
    // Send it to the Header of the page
    $Sender->Head->AddString($JavaScript);
    }
    }

Sign In or Register to comment.