Insert username...

Support area for phpBB's mChat extension
User avatar
Distinguished Donor
Posts: 26
Joined: 26 Aug 2018, 02:16
Location: Idaho

Insert username...

Post by wads24 »

How would I add variable username in the language file for announcing user logged in?
I am a crazed lunatic that has desires... :lol: :lol: :D
User avatar
mChat developer
Posts: 1154
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: Insert username...

Post by kasimi »

  • Open ext/dmzx/mchat/core/notifications.php
  • Find, around line 286:

    Code: Select all

    $row['message'] = $this->lang->lang_array($lang_key, $lang_args);
  • Add after:

    Code: Select all

    if (in_array($type, [self::LOGIN_VISIBLE, self::LOGIN_HIDDEN]))
        $lang_args[] = $row['username'];
Now you can use %s in this language key to get the name of the user who just logged in: ... on.php#L81

Who is online

Users browsing this forum: CCBot [Bot] and 0 guests