MyBB Community Forums

Full Version: guests_and_lurker_message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(2009-06-14, 07:28 PM)babjusi Wrote: [ -> ]How exactly did you try it?

I tried replacing "there" in the language string with your suggested variable ($mybb->user[username]) as is, between curly brackets, single quotes, etc. but to no avail.

Cheers,
Gene
Atm I am about to log off gene, but I will have a look as soon as I will have some free time and let you know, ok? Unless someone with the solution will post it first.
(2009-06-14, 08:31 PM)babjusi Wrote: [ -> ]Atm I am about to log off gene, but I will have a look as soon as I will have some free time and let you know, ok? Unless someone with the solution will post it first.

Sounds good to me, thanks and take care.

Gene
(2009-06-14, 07:59 PM)Gene53 Wrote: [ -> ]
(2009-06-14, 07:28 PM)babjusi Wrote: [ -> ]How exactly did you try it?

I tried replacing "there" in the language string with your suggested variable ($mybb->user[username]) as is, between curly brackets, single quotes, etc. but to no avail.

Cheers,
Gene

I'm almost sure you can't do that replacing only lang files...

The only way I know is this:
Edit the lang file and add {1} where you want to put the username.
In my case:
$l['lurkers'] = 'Hello {1}!<br />';

Edit the plugin file and remplace line 60:
$lurkers = $lang->lurkers;
To:
$lurkers = $lang->sprintf($lang->lurkers, $mybb->user['username']);
Thank you for this Aquilez as I was wondering about it too. How can I make it that the message will be displayed inside the header instead as it is now? Thank you.
Move {$babjusi} in Header template...
Thanks Aquilez, I applied your code and it works like a charm.

Cheers,
Gene
Thanks for pr providing the solution for Gene53, Aquilez.
Very Good!
I released a second version of this plugin. In this new version, you can enable and disable the mod from the acp of your forum, where you can also enter the message that you want to
display to both guests and lurkers or even separately.

http://mods.mybboard.net/view/guests-and...-message-2
Pages: 1 2 3 4