How to Set Dashboard to Use One Column

I’m working on a plugin where I need the Dashboard to have one column for all users. While I could log into every user and change their Screen Options to one column, it would take next to forever with thousands of students accessing this site. Thankfully, I found this bit of code on Stackexchange (thanks sorich87!) and modified it for the Dashboard page. This will force all users to have one column on the Dashboard.

function screen_layout_columns( $columns ) {
$columns['dashboard'] = 1;
return $columns;
}
add_filter( 'screen_layout_columns', 'screen_layout_columns' );
function screen_layout_dashboard() {
return 1;
}
add_filter( 'get_user_option_screen_layout_dashboard', 'screen_layout_dashboard' );
view raw one-column-dashboard hosted with ❤ by GitHub

Find User ID by User MetaData

Slushman shares a custom function that allows you find a user’s ID by user metadata.

I just wrote this useful function and thought I’d share.  I’m working on a plugin for my employer, Belmont University, and I needed to find a user’s ID by the user’s barcode, which is stored as user metadata.  There’s not a built-in WordPress function to handle that, but this custom function works nicely.  You can add it to your theme’s functions.php file or to a plugin file (in my case, this is part of plugin).  Here’s the function:

https://gist.github.com/slushman/f236ae998f7b5cd7a49c

Keep in mind, this returns an array, not a string.

Announcing the ArtistDataPress plugin for WordPress

ArtistDataPress shows your shows calendar on your WordPress blog and automatically matches your theme!

If you’ve been using ArtistData and didn’t care for their iFrame calendar widget, I’ve got the solution for you: ArtistDataPress!  I wanted a way to display my band’s calendar on their site and on mine, but the AD iframe widget could only be styled once, which left my site with a calendar that didn’t match the rest of my theme.  ArtistDataPress takes the raw XML shows feed and makes it into an easy to style calendar for any page or post.  There’s even a sidebar widget!  You can choose what parts of the show information you want people to see through both the page and widget options.  You can download it from the WordPress Plugin Directory. You can read up on the plugin, it’s features, and get the FAQ on the plugin’s page.

Announcing the BP Profile Gallery Widget for BuddyPress

Slushman publishes the BP Profile Gallery Widget plugin, which displays either a Flickr, Picasa, or Photobucket slideshow.

I recently published a new BuddyPress plugin in the WordPress directory: BP Profile Gallery Widget. While working on the Towermix Network for Belmont University‘s Curb College, they wanted a way for the users to show off their work, specifically, photos they’ve taken or had taken of them. I put together this widget that displays a slideshow from either Flickr, Picasa, or Photobucket. You can download it from the WordPress Plugin Directory. You can read up on the plugin, it’s features, and get the FAQ on the plugin’s page.

Announcing the BP Profile Video Widget for BuddyPress

Slushman publishes the BP Profile Video Widget plugin, which displays a YouTube or Vimeo video on your BuddyPress profile.

I recently published a new BuddyPress plugin in the WordPress directory: BP Profile Video Widget. While working on the Towermix Network for Belmont University‘s Curb College, they wanted a way for the users to show off their work, specifically, videos they’ve made or been in. I put together this widget that displays a video from either YouTube or Vimeo. You can download it from the WordPress Plugin Directory. You can read up on the plugin, it’s features, and get the FAQ on the plugin’s page.

Announcing the BP Profile Music Widget for BuddyPress

Slushman publishes the BP Profile Music Widget plugin, which creates a player from either Bandcamp, Tunecore, Reverbnation, NoiseTrade, or SoundCloud.

I recently published a new BuddyPress plugin in the WordPress directory: BP Profile Music Widget. While working on the Towermix Network for Belmont University‘s Curb College, they wanted a way for the users to show off their work, specifically, music they’ve recorded or played on.  I put together this widget that displays one of the following music players: Bandcamp, Tunecore, Reverbnation, NoiseTrade, or SoundCloud.  You can download it from the WordPress Plugin Directory. You can read up on the plugin, it’s features, and get the FAQ on the plugin’s page.

Announcing the BuddyBar Widget for BuddyPress

Slushman publishes his first plugin, the BuddyBar Widget for BuddyPress. The widget places all the links on BuddyPress’s BuddyBar in a sidebar widget.

My first WordPress plugin was recently published in the WordPress directory: BuddyBar Widget. While working on the Towermix Network for Belmont University‘s Curb College, they asked about getting rid of the Admin Bar across the top of the page, which is part of the default installation of BuddyPress. Since the BuddyBar (as some call it) contains all the links necessary for managing one’s account, this posed a problem. After some hacking and research, I found out how those links were structured and put them all into a nice little sidebar widget. I’ve called it the BuddyBar Widget and you can download it from the WordPress Plugin Directory.  You can read up on the plugin, it’s features, and get the FAQ on the plugin’s page.

How to Hide the BuddyPress Admin Bar (aka BuddyBar)

Many sites tell you how to hide the BuddyPress Admin Bar (aka BuddyBar), but only this code eliminates it completely from your site.

I’ve seen a bunch of sites that supposedly show you how to do this, but none are complete.  I have a client who wants to use BuddyPress, but doesn’t want the Admin Bar (I call it the BuddyBar) across the top of every page.  So I’m building a plugin called BuddyBar Widget that includes a sidebar widget with all the BuddyBar links in it.  Another part of the plugin hides the BuddyBar completely, even when you’re on Dashboard.

To hide the BuddyBar from users that aren’t logged in, go to the BuddyPress General Settings page and select “Yes” for the Hide admin bar for logged out users? option.

That’s great, but it doesn’t hide it if you ARE logged in.  For that, we’ll need some code.

EDIT ( February 1, 2012):

Ignore the old post from below. After trying to get that to work properly, I’ve switched to something far more effective. Paste the code snippet below into your wp-config.php file. I put it right above the “Authentication Unique Keys and Salts.” comment block. This works for sure. It’s not what I had hoped to do, but it works.

https://gist.github.com/slushman/115c3fb781a921a9f593

I created a function (I’m calling it remove_buddyadminbar), then used define to tell WordPress to turn off the BuddyBar.  This, by itself, will turn off the BuddyBar.  It may complete overkill, but I also use remove_action hooks as well.  BuddyPress uses the add_action hook in the WordPress footer to activate the BuddyBar.  Remove_action simply negates that call from BuddyPress.  You’ll notice, I also include the call for the admin_footer, which should hide the bar on your admin pages, including Dashboard.

While that’s all well and good, now you’ll notice a nice gap at the top of your admin pages.  When you kill the BuddyBar for the Dashboard, it doesn’t undo the CSS formatting that creates room for it at the top of your admin pages.  This bit of CSS takes care of that:

CODE BLOCK REMOVED

Using those two bits of code will completely eliminate the BuddyBar from appearing on your site.  I’ll post again about this when the plugin is ready to ship.

How to Change the New Mail Sound in Office 2011 for Mac

Microsoft Office for Mac 2011 doesn’t have an easy way to replace the sound alerts, but with a little digging, it can be accomplished. “Message for you, sir!”

Outlook 2011 IconI just got Office for Mac 2011 yesterday and I’ve been putting it through its paces.  So far, I’m impressed.  Sure, the “Ribbon” takes some getting used to, but overall, I haven’t had any insurmountable issues.  Two things that I’d like to see improved: 1) there’s no way to create an automatic archive for back ups like on the PC Outlook.  2) There’s no easy way to change the sound alerts.

This second one began to bother me today.  I’m a fan of Monty Python and several years ago started changing my new mail alert to a recording from the Holy Grail when Lancelot’s trusty servant Concorde gets shot with an arrow and says “Message for you, sir!”  I wanted to change that setting in Office for Mac 2011, but the alert options only has a checkbox – the alert is either on or off.  After some Googling and digging, here’s how to customize your alerts sounds for Office for Mac 2011:

Close Outlook

Open your hard drive and go to Applications > Microsoft Office 2011 > Office

show-package-contents

Right-click (or control+click) on OutlookCore.framework and select Show Package Contents

resources-wavs

Inside the Resources folder are the wav files for the alerts sounds.  To change the “new mail” sound, we want to replace the newmail.wav file by renaming the new alert to the same name and copying it into this folder.  Select to replace the file when asked.

Open Outlook.

Now, when you get a new message, it will play your new message wav instead of the default one.  It would be nice if there was a way to do this without digging through framework files, but until then, this will work for you!