Customizing SMF > Tips and Tricks

Tracking User Activity

<< < (66/68) > >>

matricrsult:
hmmm i was looking for that thanks for sharing

llyon:
This is great but I get the following errors:


( ! ) Notice: Undefined variable: function in Z:\wamp\www\tracker.php on line 61
Call Stack
#   Time   Memory   Function   Location
1   0.0025   173856   {main}( )   ..\tracker.php:0

( ! ) Notice: Undefined variable: function in Z:\wamp\www\tracker.php on line 74
Call Stack
#   Time   Memory   Function   Location
1   0.0025   173856   {main}( )   ..\tracker.php:0

( ! ) Notice: Undefined variable: function in Z:\wamp\www\tracker.php on line 101
Call Stack
#   Time   Memory   Function   Location
1   0.0025   173856   {main}( )   ..\tracker.php:0

Any ideas?

blevok:
I just found this, and it's very useful and working good on 2.0.11

I wanted to be the only one that can access it, despite there being other admins, so i changed this:

--- Code: --- // Set this to restrict access. Currently only admins are allowed.
$isstaff = $context['user']['is_admin'];
}
if (!$isstaff)
{
echo "ERROR: You are not an admin - ACCESS DENIED. ($isstaff)";
--- End code ---

to this:

--- Code: --- // Set this to restrict access to one user only.  Set $allowedid to the user you want to have access.
}
$allowedid = '3';
{
    if ($context['user']['id'] != $allowedid) {
echo "ERROR: ACCESS DENIED.";
--- End code ---

Deprecated:
Another trick is to create another Admin group and make your other admins faux Admins, then set their permissions such as to give them everything except what you want them to keep their fingers off of.

Technically there is no real Admin group since a real Admin has ALL privileges. By creating a named Admin permission group you can give them what you want and only what you want.

Grammy:
Downloading the updated file for 2.0 and simply dropping the file (as is) into my forum's root, where the SSI.php lives, results in a blank page.  I see that others with 2.0.11 have been successful:

http://www.simplemachines.org/community/index.php?topic=36793.msg3865821#msg3865821

Mike Bobbitt, we hardly knew ye!   :D

Hope you stop by, or someone with some know-how can walk me through this.  I've been looking for a way to track user activity for a long time and this is the only thing I've found (other than current activity, that goes away when the user logs off).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version