Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
750 views
in Plugins by
Hi, I have customized my Q2A site to a certain extent. You can have a look at it  http://askvijayawada.com

I wanted to create a login form in the right side bar of this website. Can somebody please help me on how to create forms?

I have fair amount of knowledge regarding the functions of Q2A, as I started working on creating plugins very recently
Q2A version: 1.5.4

2 Answers

+2 votes
by
override sidebar() function in your theme, change HTML and CSS to fit it in sidebar(I just copy/pasted the html, you can remove table tags):

function sidebar()
{
    $sidebar=@$this->content['sidebar'];
    
    if (!empty($sidebar)) {
        $this->output('<aside CLASS="qa-sidebar">');
        $this->output_raw($sidebar);
        $this->output('</aside>', '');
    }
    $useid=qa_get_logged_in_userid();
    if (!isset($useid))
        echo '<h1>
            Log in
        </h1>
        <form method="POST" action="./index.php?qa=login&amp;to=index.php">
        <table class="qa-form-tall-table">
            <tbody><tr>
                <td class="qa-form-tall-label">
                    Email or Username:
                </td>
            </tr>
            <tr>
                <td class="qa-form-tall-data">
                    <input name="emailhandle" id="emailhandle" value="" class="qa-form-tall-text" type="text">
                </td>
            </tr>
            <tr>
                <td class="qa-form-tall-label">
                    Password:
                </td>
            </tr>
            <tr>
                <td class="qa-form-tall-data">
                    <input name="password" id="password" value="" class="qa-form-tall-text" type="password">
                    <div class="qa-form-tall-note"><a href="./index.php?qa=forgot">I forgot my password</a></div>
                </td>
            </tr>
            <tr>
                <td class="qa-form-tall-label">
                    <label>
                        <input name="remember" value="1" class="qa-form-tall-checkbox" type="checkbox">
                        Remember me on this computer
                    </label>
                </td>
            </tr>
            <tr>
                <td colspan="1" class="qa-form-tall-buttons">
                    <input value="Log In" title="" class="qa-form-tall-button qa-form-tall-button-login" onmouseover="this.className="qa-form-tall-hover qa-form-tall-hover-login";" onmouseout="this.className="qa-form-tall-button qa-form-tall-button-login";" type="submit">
                </td>
            </tr>
        </tbody></table>
        <input name="dologin" value="1" type="hidden">
        </form>
    ';
}
by
+1 great one...
0 votes
by

That easy! You can copy HTML of login form in top your page and paste it in to position where you want. Good choose is use Widget Anywhere for that.

...