MyBB Community Forums

Full Version: Edit php files like "{$lang->welcome_back}"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How could I edit php pages like {$lang->welcome_back}? I could not find them via Template Sets » Default Templates. I'd like to edit stuff inside those. I.e. the welcome_back is way to long with the time of last login and etc.

Thanks! (example down below in image)
You'll have to edit the language-files. They are located in "yourforum/inc/languages/english/". The $lang->text-things are in global.lang.php.

$modcplink and $admincplink get filled by the templates as "header_welcomeblock_member_moderator" and "header_welcomeblock_member_admin", respectively (and also link into global.lang.php). Hope this helps!
Width hight colors, and so on is in CSS, not in PHP. See at padding at the places you want to move

Or did I misunderstand
(2014-09-30, 12:10 PM)BaggerHD Wrote: [ -> ]Width hight colors, and so on is in CSS, not in PHP. See at padding at the places you want to move

Or did I misunderstand

Misunderstood just a little bit as I want to remove certain parts of it that I feel are unnecessary information

(2014-09-30, 09:54 AM)chriki Wrote: [ -> ]You'll have to edit the language-files. They are located in "yourforum/inc/languages/english/". The $lang->text-things are in global.lang.php.

$modcplink and $admincplink get filled by the templates as "header_welcomeblock_member_moderator" and "header_welcomeblock_member_admin", respectively (and also link into global.lang.php). Hope this helps!

I'm guessing there's no way to edit them via Admin CP?
EDIT: I only could find $modcp inside of "inc/languages/english/" I also checked "inc/languages/english/admin" and still no avail.
(2014-09-30, 07:55 PM)ErraticFox Wrote: [ -> ]
(2014-09-30, 09:54 AM)chriki Wrote: [ -> ]You'll have to edit the language-files. They are located in "yourforum/inc/languages/english/". The $lang->text-things are in global.lang.php.

$modcplink and $admincplink get filled by the templates as "header_welcomeblock_member_moderator" and "header_welcomeblock_member_admin", respectively (and also link into global.lang.php). Hope this helps!

I'm guessing there's no way to edit them via Admin CP?

Well, that depends on how flexible you want your solution to be. If you plan on having multiple languages, you won't be able to avoid editing PHP-files. If you just wish to have one language, you can go into the respective templates and simply replace the {$lang->xyz}-stuff with "real text". For example, header_welcomeblock_member_admin contains the following:
<li><a href="{$mybb->settings['bburl']}/{$admin_dir}/index.php" class="admincp">{$lang->welcome_admin}</a></li>

You can "minimize" it by entering any valid html in there, for example:
<li><a href="....." class="admincp">Random text here</a></li>

In retrospect, picking admincp as an example didn't make much sense, but I hope I got the point across somehow. Big Grin


edit: haha, didn't notice your most recent edit! The variables $modcplink and $admincplink get filled by the templates mentioned above. So, I guess what you are looking for, are the fields $l['welcome_admin'] and $l['welcome_modcp'] in global.lang.php. Wink
Edit: delayed response. Toungue

You can edit language variables via ACP -> configuration -> languages. Language variables are generally organized based on which pages require them, and any variable found in the header (including welcome variables) will be found in the global.lang.php file.

If you don't need multilanguage support, chriki's solution is probably a much simpler route.