Info
- 3 posts
- 2 voices
- Started 2 years ago by nickaster
- Latest reply from nickaster
- This topic is resolved
Php help - Welcome Message
-
- Posted 2 years ago #
Okay - so I'm trying to change my Welcome MEssage on the home page. Right now it says:
"Welcome back Welcome, USERNAME!"The code that produces this looks like this:
<?php if ( !in_array( bb_get_location(), array( 'login-page', 'register-page' ) ) ) login_form(); ?>That's utter gobbledy gook as far as I"m concerned. Can anyone decifer it? Why is "welcome" appearing twice? Where are the words coming from? Whay if I wanted it to say "Go away USERNAME"? Where is that php getting it's information from?
Second line looks like this, which is fine:
"User Options: Admin | Log Out"Since I'm admin, I assume that's why I see admin. Other users would just see Log Out? or what? The code producing that is equally cryptic. Where does it come from? What if I wanted to, say, change the p class that gets slapped around that?
Thanks!
-
- Posted 2 years ago #
The words are stored in a file called
logged-in.phpin your theme.In Kakumei (the default), it looks like this:
<p class="login"> <?php printf(__('Welcome, %1$s'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?> <?php bb_admin_link( 'before= | ' );?> | <?php bb_logout_link(); ?> </p>Using
__(translates into the appropriate language, and %1$s is a placeholder that gets replaced by the user's nameNot sure why it's saying Welcome twice though
-
- Posted 2 years ago #
Excellent thanks a lot, that worked perfectly. (The double welcome was bad code from the themer)
-
You must log in to post.