Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How / where do I edit the text before the "Login/Register" or "Hello X/My Account/Logout" section?

+1 vote
asked Sep 10, 2010 in Q2A Core by newguy
I would like to change/edit the text in the top corner of the page.  Rather than simply saying "Login / Register" or "Hello Username  / My Account / Logout" I would like to do the following:

When not logged in-
"Are you member? Sign In! - New User? Register"

And when logged in-
"Welcome back Username - My Account - Logout"

Which file/variable/etc do I need to edit?  Also, if I want to put additional html in this section (for example, a RSS feed icon) - where is this done?

Thanks for a great script!

1 Answer

0 votes
answered Sep 11, 2010 by gidgreen
Use an advanced theme (see docs) and override the nav(...) and/or logged_in(...) functions, to change the HTML output for these page sections. You can see how they currently work in qa-theme-base.php.
commented Sep 11, 2010 by newguy
Thanks for getting back to me.  I see the logged_in function, but there isn't one for not being logged in.  When trying to make edits, I want to be sure that what I do for non-users doesn't also appear for members.

I hope it's not asking too much, but are you able to quickly provide the syntax?  Thanks again.
commented Sep 12, 2010 by Scott
Surely this can be done through the language files? So where it says "Hello ^" or whatever, change to "Welcome back ^".
commented Sep 12, 2010 by gidgreen
Yes, it will work for the 'Hello' bit, but not for everything this person wants, if as I imagine they don't want entire phrases like "New User? Register" linked.
commented Sep 12, 2010 by newguy
Exactly... I can change "Hello" to "Welcome Back" in the language file which is perfect for those that are logged in.  But, still not sure what the best way to edit the theme-base php file so that I can add plain text/html before and after the "Login Register" area in the top corner of the screen.