Welcome, Guest. Please login or register.

ShoutBox!

Scrubmeister

2024-04-19, 10:32:40
Good to see the site back faster than ever. :)
 

Skhilled

2024-04-18, 21:09:09
I've upgraded the server...more resources. ;)
 

Ken

2024-04-18, 20:57:10
Now that you mention it...  :D
 

Skhilled

2024-04-18, 20:47:19
...and, you should notice that the site is much faster.  :o
 

Ken

2024-04-18, 20:31:37
Hey Steve.
 

Skhilled

2024-04-18, 17:56:10
Re-read the message below...
 

Skhilled

2024-03-31, 15:22:06
Oh yeah, you need to upgrade the site first...
 

Ken

2024-03-30, 09:54:54
Whoops! I forgot that the SMF install here on OFF is out of date!  :'(
 

Ken

2024-03-30, 09:44:48
 Conga-Rats Steve!  :thumbup:
Me gonna install it here just for the fun of it!  :)
 

Skhilled

2024-03-29, 22:15:23
Released!  :D

Recent Topics

TP Articles


Search in titles
Search in article texts

Author Topic: [TIP/TRICK] Show Action and Subaction on "Unknown Action"  (Read 4880 times)

0 Members and 1 Guest are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11679
  • Gender: Male
  • View Gallery
[TIP/TRICK] Show Action and Subaction on "Unknown Action"
« on: July 27, 2010, 11:19:19 AM »
Finally did the edits to show the actual location of a member who is surfing the FamilyForum site, instead of showing them as an "Unknown Action"

In This Topic over on SMF we are told to edit as follows:
Question: How to show the action and subaction on the Who is Online screen if the action is unkown.

Some user admin like to know what some guest use as unknown action ;). With this small change you can see this.

Search in the $sourcedir/Who.php for

Code: [Select]
else
$data[$k] = $txt['who_unknown'];

and replace it with

Code: [Select]
else
$data[$k] = $txt['who_unknown'].
($user_info['is_admin'] ? (
(isset($actions['action']) ? ' <span class="smalltext">('.$txt['who_action'].': '.$actions['action'].
(isset($actions['sa']) ? ' -> '.$actions['sa'] : '').')</span>' : '')) : '');

Than after the "unknown action" stand for admins (Action: ACTION -> SUBACTION (if exist)).


So... those edits are now in place and if you click on the the line under 'Users Online', where it sez "4 Guests, 2 Users (0 Buddies, 2 Spiders), or something simular it will take you to a page where you can see where everyone is on the forum.  :disted:


As you can see it now adds a note to the Unknown Action that tells where the member actually is in within the forum.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11679
  • Gender: Male
  • View Gallery
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #1 on: July 27, 2010, 11:36:54 AM »
I've changed the code that sez...
($user_info['is_admin'] ? (
($user_info['is_member'] ? (  ... so that hopefully all members will be able to see the results

Please let me know if you look at the page and only see 'Unknown Action' by someones name.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11679
  • Gender: Male
  • View Gallery
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #2 on: July 27, 2010, 11:52:39 AM »
Well, that edit didn't work... had to change it back.  :08:
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Skhilled

  • Administrator
  • *
  • Posts: 9008
  • Gender: Male
  • All of my passwords are protected by amnesia...
  • View Gallery
    • Buildz Hosting
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #3 on: July 28, 2010, 09:16:38 AM »
The topic was from 2007. I seriously doubt that it would work now since SMF coding has changed a lot since then.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11679
  • Gender: Male
  • View Gallery
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #4 on: July 28, 2010, 09:56:47 AM »
The topic was from 2007. I seriously doubt that it would work now since SMF coding has changed a lot since then.

Actually it works OK for the Admin, but so far I'm not getting it to work for 'regular' members... my thinking is that the code could be adapted to include all members so that they could see the added action, but my coding is not correct yet.

If you look at the second screen shot in the OP it shows that the 'Unknown Action' has an added text for those entries, example; "(action: forum)"
That shows for me as admin, but when signed in as Jake it just shows the Unknown Action.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Skhilled

  • Administrator
  • *
  • Posts: 9008
  • Gender: Male
  • All of my passwords are protected by amnesia...
  • View Gallery
    • Buildz Hosting
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #5 on: July 29, 2010, 07:58:20 AM »
So then you would either have to add another entry to the who template and/or add or modify code to one of the permissions files. I would assume...if your modified code does not work.

Yes, I get "Unknown Action" when viewing "Who's Online".
« Last Edit: July 29, 2010, 08:04:27 AM by Skhilled »

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11679
  • Gender: Male
  • View Gallery
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #6 on: July 29, 2010, 08:16:54 AM »
So then you would either have to add another entry to the who template and/or add or modify code to one of the permissions files. I would assume...if your modified code does not work.

Yes, I get "Unknown Action" when viewing "Who's Online".

I've tried to edit the "($user_info['is_admin'] ? ( " line to different membergroups and also tried to add another line to include other groups, but so far nothing is working.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Skhilled

  • Administrator
  • *
  • Posts: 9008
  • Gender: Male
  • All of my passwords are protected by amnesia...
  • View Gallery
    • Buildz Hosting
Re: [TIP/TRICK] Show Action and Subaction on "Unknown Action"
« Reply #7 on: July 29, 2010, 08:49:10 AM »
Hmmm, must be something else then.  :undecided2: