Stealth Mode for Buddypress Site Admin Plugin

Jotted by Brajesh Singh in Buddypress, Buddypress Premium Plugins, Buddypress Tricks, Plugins, premium on December 26, 2009

Well, thanks goes to mercime for the idea of this plugin. As he suggested to create something which will allow site admins to anonymously do updates/testing on site without appearing in the recent online members list/ who is online members list.

Checkout the suggestion of mercime here http://buddydev.com/forums/topic/stealth-mode-for-site-admins

So, I came up with this plugin, called BpDev Stealth Mode for Site admins(s)

What It Does

  • It allows Site Admins to control whether they want to appear in the online members/ recently active members list or not.

How It works

  • When A user logs in, If the User is one of the SiteAdmin(In case you have multiple site admin account), The plugin puts the User in Stealth Mode. Here stealth mode is nothing, but simply stops buddypress for recording the last activity time of the user.
  • From the admin bar drop down, the site admin and turn off/on the stealth mode.  The stealth mode will be toggled and the user will be redirected back to the page, where he was earlier.

Download

Download this plugin from here http://buddydev.com/http//buddydev.com/download/bpdev-stealth-mode-for-siteadmin.zip

Installation

1. Download bpdev-stealth-mode-for-siteadmin.zip, if you have not yet downloaded

2. Unzip the plugin

3. Upload bpdev-stealth-mode-for-siteadmin to wp-content/plugins

4. Login as Site Admin and Go to Dashboard->Plugins->Installed

5.  Activate “BpDev Stealth Mode for Site admin” Sitewide

How to Use

When You are logged in as one of the Site Administrator, you will see and extra menu appearing in the admin bar. Here is a screenshot.

Stealth Mode menuBy clicking the option from Drop Down, you can toggle the stealth mode. here is what happens, if you toggle the stealth mode.

sm-off-notification-redirectYou will receive a message, something similar to the above and will be redirected back to the page, where you had tried to toggle the option. You can see from the drop down, that the option is toggled .

Note: Please Note, for every time, a site admin is logged, the stealth mode is always set to On, so you must disable it from the drop down to appear in the who is online widget/ recently active members list.

Special thanks Goes to mercime for the Idea.

Another Alternative, with less features

Ok,  Now for all of you who have yet not joined, buddydev Premium, well, you can use an alternative.

Put this code in bp-custom.php and None of the site admin activity ime will be recorded.So if you are a site admin, you will never appear in the Who is Online/ recently active members widget.


add_action("plugins_loaded","bpdev_init_sm_mode");
function bpdev_init_sm_mode(){
if(is_site_admin())
remove_action("wp_head","bp_core_record_activity");//id SM is on, remove the record activity hook
}

btw, If you have not yet joined buddydev, Please have a look at out premium plugins and I will appreciate you joining the buddydev premium. It costs just $30 for 3 months.

Thanks

Brajesh

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • BlinkList
  • DZone
  • FriendFeed
  • IndianPad
  • MySpace
  • Netvouz
  • Reddit
  • SphereIt
  • StumbleUpon
  • Technorati

Related posts:

  1. Remove Buddypress admin bar from all blog except the main buddypress site
  2. Bp Gallery: The ultimate photo gallery for your buddypress powered site
  3. Introducing Global sitewide forums plugin for Buddypress
  4. Sitewide Footer Content Plugin for wpmu/buddypress
  5. Playing With buddypress and Wordpress, some codes for the site admins

8 Comments Already!

Leave a Reply

Name [*]

Email [*]

Website Optional

Comment [*]

Please Note,The fields marked as * are required fields*


Get Adobe Flash playerPlugin by wpburn.com wordpress themes