Not Solved Pro Activity Master can see only by Admins
#1
Not Solved Star 
Hi there, can anyone help me to make some tweaks on this plugin? It looks like notification bar like FB and it's awesome. I want to avail this plugin only for Admins and other Staff Groups because even the registered user can see other users log in and out. It would be good if only the Staff Members can see the current logs to monitor them. I searched the author of this plugin but it seemed he's inactive here. Please help and thanks Smile

[Image: 9Sf3jDl.png]

this is the plugin

http://mods.mybb.com/view/pro-activity

Quote:EDIT:
I found this plugin, I'm not sure if it's compatible for hiding the Pro Activity Plugin, but I don't know how. Huh

http://mods.mybb.com/view/my-permissions
“I read, much of the night, and go south in the winter.”
― T.S. Eliot
Reply
#2
Not Solved
Sure you can: [Tutorial] My Permissions. I have added yours to the the first post ("Pro Activity by Jazza").
Reply
#3
Not Solved
Nevermind my reply, MyPermissions have a bug where it doesn't checks for the file while checking for the action.
Reply
#4
Not Solved
I tried it already, I thought that was mistake on putting activity.php, why is it? can anyone help me on this plugin? much appreciated
“I read, much of the night, and go south in the winter.”
― T.S. Eliot
Reply
#5
Not Solved
Around line 38 you'll find:

if ($mybb->usergroup['canmodcp'] == 1 || $mybb->usergroup['issupermod'] == 1)

Just put an else after it to stop normal users from accessing the page:

if ($mybb->usergroup['canmodcp'] == 1 || $mybb->usergroup['issupermod'] == 1) {
    $ismod = true;
} else {
    error_no_permission();
}

That'll take care of the full page view. To stop the dropdown menu appearing you can either use template conditionals or just edit inc/plugins/proactivity.php:

Around line 936 find:
	if ($mybb->user['uid'] || $mybb->settings['proactivity_guest_view'] == '1')
and replace it with
if ($mybb->usergroup['canmodcp'] == 1 || $mybb->usergroup['issupermod'] == 1)

and on line 1060 find:
eval("\$proactivity = \"".$templates->get("proactivity_guest_notice")."\";");
and replace it with:
$proactivity = "";



Some other thoughts:
- You'll also probably need to remove the settings links from the User CP sidebar
- If you want to make it public, but without some of the more 'sensitive' hooks, in inc/plugins/proactivity.php on line 29 you can remove the hooks you don't want logged.
Reply
#6
Not Solved
OMG! thank you! +1 rep. thanks for helping Big Grin

another request, how about for admins, they can see all the hooks but for members were limited or allowed hooks that I gave for them?

and what do you mean "- You'll also probably need to remove the settings links from the User CP sidebar"?

thanks again Big Grin
“I read, much of the night, and go south in the winter.”
― T.S. Eliot
Reply
#7
Not Solved
(2014-04-08, 10:55 AM)iceparticle Wrote: another request, how about for admins, they can see all the hooks but for members were limited or allowed hooks that I gave for them?

You'd need to edit the query in the proactivity_get_notifications function. You'll need to do a check if they are an admin or not, and if they aren't append something like "AND hookname NOT IN ('list', 'of', 'admin', 'only', 'hooks')" to the WHERE section of the query.

(2014-04-08, 10:55 AM)iceparticle Wrote: and what do you mean "- You'll also probably need to remove the settings links from the User CP sidebar"?

Oh, looks like the version of the plugin on GitHub was never updated to the one I was running (it was developed by the previous admin of my forum), it allowed users to select what types of notifications get shown. I'll see if I can find a copy of that version...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)