BuddyPress, bbPress, Event specific sidebars

This code snippet creates sidebars for Events, BuddyPress, and bbPress
and includes conditional logic to display these sidebars according to
the page being viewed