Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: xXiNiXx - marraskuu 06, 2013, 08:52:50 AP

Otsikko: Howto: display custom actions on "Who is online" page
Kirjoitti: xXiNiXx - marraskuu 06, 2013, 08:52:50 AP
I've added some custom actions to my forum to display other information. When I look at the "who is online" page, a user, looking at a custom action, will be displayed with action: Unknown action. What do I have to change to modify this text?

My SMF version: 2.0.6, with no addons, just my custom addons

Thanks in advance.
Otsikko: Re: Howto: display custom actions on "Who is online" page
Kirjoitti: Arantor - marraskuu 06, 2013, 09:54:26 AP
What are the actions in question? Do they have subactions?
Otsikko: Re: Howto: display custom actions on "Who is online" page
Kirjoitti: xXiNiXx - marraskuu 06, 2013, 10:05:43 AP
Yes, the action has subactions. For example:

action=games;sa=list;
will show a list of games

action=games;sa=view;in=1
will show the detail of a game

The name for these don't need te be detailed, just some other info than "Unknown action"
Otsikko: Re: Howto: display custom actions on "Who is online" page
Kirjoitti: Arantor - marraskuu 06, 2013, 10:11:40 AP
You add them to Theme/default/languages/Who.english.php

$txt['whoall_games'] = 'Viewing games';
$txt['whoall_games_list'] = 'Viewing the list of games';
$txt['whoall_games_view'] = 'Viewing a game';


Tweak to suit :)
Otsikko: Re: Howto: display custom actions on "Who is online" page
Kirjoitti: xXiNiXx - marraskuu 06, 2013, 10:14:46 AP
Cool! Thank you for your quick response