Display the viewers username

A place to suggest possible new mods or to suggest abandoned mods to take over.
Post Reply
MudkipzRule
New member
New member
Posts: 5
Joined: 19 Aug 2012, 01:31

Display the viewers username

Post by MudkipzRule »

Is there any way to do this on phpbb 3? I saw a link on google for a old mod here for the same thing. URL was broken and I couldn't find the topic. Any help?
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6242
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Display the viewers username

Post by RMcGirr83 »

Display the viewers username where?
MudkipzRule
New member
New member
Posts: 5
Joined: 19 Aug 2012, 01:31

Re: Display the viewers username

Post by MudkipzRule »

I was thinking in a BBCode but it doesn't have to be that. I'm trying to display the viewers username in Handyman's AJAX Chat. We have custom chat commands that can parse php so it could easily be any type of php code.
User avatar
tumba25
Supporter
Supporter
Posts: 1049
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: Display the viewers username

Post by tumba25 »

In something using the phpBB template system.

Code: Select all

{S_USERNAME}


Or in a php file.

Code: Select all

$user->data['username']
MudkipzRule
New member
New member
Posts: 5
Joined: 19 Aug 2012, 01:31

Re: Display the viewers username

Post by MudkipzRule »

That does not work in a chat, it only displays the shouter's username to everyone.
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6242
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Display the viewers username

Post by RMcGirr83 »

The viewers username is already displayed in that mod no matter if the user made a shout or not...eg

Noname.jpg


and I made no message in that chat.
MudkipzRule
New member
New member
Posts: 5
Joined: 19 Aug 2012, 01:31

Re: Display the viewers username

Post by MudkipzRule »

I'm not trying to display their name in the online list, I have chat commands and I was going to make a command like !viewer. So it would be used like: Hello, !viewer.
!viewer would be replace with the username of the viewer.
Post Reply