Editing CB Login Greeting?

14 years 8 months ago #12475 by bdkyle
Editing CB Login Greeting? was created by bdkyle
Hi,

How do you modify the "greeting" displayed in the CB Login box?

I would like to change "Hi, FIRSTNAME" to "Hi FIRSTNAME. Welcome Back". Please note that the comma has been removed as well as adding text to the end.

I've searched and haven't come across anything obvious in the forums.

I would imagine that it's in the modules/mod_cb_login.php file. Something like this looks promising:

[code:1]
$avatarDisplayed = false;
if ($show_avatar == 0) {
if ($greeting) echo '<span id="mod_login_greeting'.$class_sfx.'">'._HI.$name.'</span>'$
} else {
[/code:1]

But I'm not exactly sure how to change it, if this even is the correct file or one of the relevant code snippets.

Thanks!

Please Log in to join the conversation.

14 years 8 months ago #12482 by homebrew
Replied by homebrew on topic Re:Editing CB Login Greeting?
It's in the language/english.php file, line 418.

[code:1]/** classes/html/usermenu.php */
DEFINE('_UMENU_TITLE','User Menu');
DEFINE('_HI','Hi, ');[/code:1]


I would say that you wanted to put something after it, do a ('_UMENU_WELCOMEBACK','. Welcome Back!');
and insert that into the cblogin module code where needed.

I changed my "Hi," but I haven't tried adding the welcome back yet.


Edit:

yup, it worked.

On line 279 and 285 of the modules/mod_cblogin.php I added my welcome code:
[code:1]if ($greeting) echo '<span id="mod_login_greeting'.$class_sfx.'">'._HI.$name._UMENU_WELCOMEBACK.'</span>'.($horizontal ? " " : ""«»);

if (($avatar_position=="default"«») and ($greeting)) echo '<span id="mod_login_greeting'.$class_sfx.'">'._HI.$name._UMENU_WELCOMEBACK.'</span>';
[/code:1]

Post edited by: homebrew, at: 2006/05/12 14:18

Post edited by: homebrew, at: 2006/05/13 01:58

Please Log in to join the conversation.

14 years 8 months ago #12540 by bdkyle
Replied by bdkyle on topic Re:Editing CB Login Greeting?
Thanks for the great reply. This worked perfectly.

As a small tip for those following along in the future, be sure to specify the same variable (i.e. _UMENU_WELCOME or _UMENU_WELCOMEBACK).

Thanks again!

Please Log in to join the conversation.

14 years 8 months ago #12646 by sanjiovani
Replied by sanjiovani on topic Re:Editing CB login Register text to image
How do i change the
No account yet? Register on the CB Login
to an image ?



Thanks
Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.514 seconds

Facebook Twitter LinkedIn