Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.5k views
in Q2A Core by

Hi gals 'n' guys,

Little mod here I discovered whilst making my theme.

Now I not sure how you would reorder your nav bar for user login, though I have made so many changes that I needed all the function to do so.

So all I did was copy line 448 - 472 of qa-theme-base.php
being function nav()

placed it in qa-theme.php

- Next I marked out -------------------------------------------------------

// if ($navtype=='user')
//                    $this->logged_in();

and placed $this->logged_in(); in qa-theme.php inbetween as such --------------
DIV output was taken out to see clearer, but wrap in DIV when your done for each.
function nav_main_sub()

{
            $this->nav('main'); // wrap in DIV to order it around
            $this->nav('user'); // wrap in DIV to order it around
            $this->nav('sub'); // wrap in DIV to order it around

$this->logged_in();  // wrap in DIV to order it around

}

Ok so, Now this part you can just add if you are not moving the logged_in() call to the function like i needed for my theme.
So just add this function below to see how it works to qa-theme.php

        function logged_in()
        {
            if (!empty($this->content['loggedin']))
            $this->output_split(@$this->content['loggedin'], 'qa-logged-in', 'DIV');
            else
            $this->output('<DIV CLASS="qa-logged-in">Hello Guest! What would you like to do today?</DIV>');
        }
 

 

Now as I said I have done a lot of changes to the base in qa-theme.php moved everything everywhere I wanted it. So cool!

Hope this was helpful.
Thanks. Jon.
 

 

Q2A version: 1.5.2

1 Answer

0 votes
by

I did not understand what to do ... could you please explain a little more detailing

by
Add this code to your theme.php file
function logged_in()
        {
            if (!empty($this->content['loggedin']))
            $this->output_split(@$this->content['loggedin'], 'qa-logged-in', 'DIV');
            else
            $this->output('<DIV CLASS="qa-logged-in">Hello Guest! What would you like to do today?</DIV>');
        }
...