Welcome, Guest. Please login or register.

ShoutBox!

 

Skhilled

2024-08-09, 18:19:29
Awww! Poor thing! LOL
 

Ken

2024-08-09, 09:20:52
 

Skhilled

2024-07-06, 10:33:18
 :D
 

Ken

2024-07-06, 06:40:47
Happy Saturday after the 4th of July!
 :fireworks:
 

Skhilled

2024-07-04, 20:27:02
Happy Day Off From Work!  :D
 

Ken

2024-06-25, 06:23:12
84... who knew?  laughing7
...2013 was my *magic* year
 

Skhilled

2024-06-14, 22:09:12
I hope so! LOL
 

Ken

2024-06-14, 21:41:30
My B-Day is forthcoming and maybe it will be far enough along so that I can be a regular Dancing Fool for that day!!! :banana: :2funny:
 

Ken

2024-06-14, 21:38:38
Happy Friday everyone! I'm  SOOO glad to see Friday and not just because it's the weekend, but because it marks one more day in the recovery of my foot!  laughing7

Scrubmeister

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

Recent Topics

TP Articles


Search in titles
Search in article texts

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

0 Members and 4 Guests are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11937
  • 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: 11937
  • 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: 11937
  • 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: 9424
  • 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: 11937
  • 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: 9424
  • 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: 11937
  • 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: 9424
  • 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: