Minnestar

Reflections on Twin Cities tech‑community events—Minnebar, Minnedemo and more. I explain the origin of “Minnebar,” recap sessions I attended and celebrate the people powering our thriving tech scene.

    Adding Email Mention Notification to WordPress P2

    I’m using the P2 theme on a couple of websites, one of them is for the team minnestar to help coordination and collaboration. P2 supports the ability to use a @user notation to mention other users on the site, but it doesn’t do anything other than highlight the user. This snippet of PHP added to the bottom of the P2 functions.php will send email notifications on those mentions. This isn’t heavily tested but it works well for me.

    /**
     * Custom code added to P2 to enable email notifications
     * when a user is @mentioned in the site.
     *
     * Original at [trepmal.com/2011/06/2...](http://trepmal.com/2011/06/24/using-wordpress-multisite-p2-and-more/)
     * and modified from there.
     */
    add_action('publish_post','send_email_notification_once',9);
    function send_email_notification_once($postID) {
        $post = get_post($postID);
        $author = get_userdata($post->post_author);
        global $p2;
        $mentions = $p2->components['mentions']->find_mentions($post->post_content);
        $permalink = get_permalink($postID);
        $blog_title = get_bloginfo('name');
        foreach ( $mentions as $match ) {
            $email = get_user_by('slug',$match)->user_email;
            $message = "You have been mentioned in this post:\n $permalink 
    
     {$post->post_content} ";
            wp_mail($email, "[$blog_title] You've been mentioned by {$author->display_name}", $message);
        }
    }
    
    add_action('comment_post','send_email_notification_once_comment',9);
    function send_email_notification_once_comment($commentID){
        $comment = get_comment($commentID);
        global $p2;
        $mentions = $p2->components['mentions']->find_mentions($comment->comment_content);
        $permalink = get_permalink($comment->comment_post_ID);
        $blog_title = get_bloginfo('name');
        foreach ( $mentions as $match ) {
            $email = get_user_by('slug',$match)->user_email;
            $message = "You have been mentioned by {$comment->comment_author} in this comment:\n $permalink 
    
     {$comment->comment_content} ";
            wp_mail($email, "[$blog_title] You've been mentioned in a comment by {$comment->comment_author}", $message);
        }
    }
    

    My Running a VPS with Confidence session from Minnebar just got online.

    Minnebar 7

    Dug out my MinneBar 4 shirt for Minnebar 7.

    Final edits to the Minnebar 7 post event survey done.

    This year’s Minnebar shirt rocks!

    These earrings are awesome!

    Happy to have my Mophie Juice Pack Air for Minnebar day. No dead battery for me.

    git pulling my presentation

    Color Theory session by John Mindiola III at Minnebar was awesome.

    Crowd lined up for Maker Bot session at Minnebar.

    Large crowd of people mingling in a modern convention center atrium, many holding papers and name badges.

    MinneBar keeping BarCampy.

    Whiteboard schedule for Open Space Sessions divided into Texas, Nebraska, and Kansas rooms with handwritten time slots and session titles, as a person writes on it with a marker.

    Good Varnish session at Minnebar from Mike Willbanks.

    Presenting Running VPS with Confidence in 15 minutes.

    See also Minnebar collection.

    Panorama photo from the stage right before Minnebar 7 started.

    Large conference hall packed with attendees seated at round tables before the start of Minnebar 7, with a podium and microphone in the foreground.

    At the Minnebar preparty!

    MinneBar 7 Pre-Party sign taped to a dark podium outside a bar, Friday April 6 2012 from 7 to 10 PM, people visible inside through glass doors.

    Missing Minnedemo tonight. BIG customer launch. Will be a memorable event with Code42 announcement!

    Great Minnestar board meeting this morning with strong plans for Minnebar and Minnedemo in 2012!

    Great Minnestar board meeting this morning. Things are coming together nicely!

    One of my favorite photos from Minnebar. Paul DeBettignies prepared to deal with power challenges.

    Man in white dress shirt and name tag sits holding an orange extension cord and white power strip at an indoor conference event.

    MinneBar 6 Photos

    Yesterday was an absolutely great MinneBar event. I lugged the big camera around to get some shots. I didn’t get that many because I presented for the first three sessions. I got some good shots from the kick-off and a handful of others.

    Group of people waiting in line outside a modern building entrance, casting long shadows on the concrete sidewalk. Crowd of attendees waiting in a lobby near a reception desk and large windows at a conference event. Several people standing around blue-draped registration tables in a building lobby, reviewing printed papers and signing in. Rows of folded gray MinneBar t-shirts with an orange graphic logo laid out on a table at a conference event. Gray t-shirts stacked on a table, printed with an orange MinneBar MMXI logo featuring a city skyline and cartoon figures. Three people at a small table in a busy conference room reviewing printed documents and tablets during a group discussion. Large conference room filled with attendees seated at long tables, a man in a black sweater smiling at the camera in the foreground. Man in a green short-sleeve shirt holding a microphone and speaking at a conference, a presentation screen visible behind him. Three people on a stage at a conference, one man in a yellow t-shirt speaking into a handheld microphone, another man reading a booklet. Man in a yellow fox-on-bicycle T-shirt and glasses speaks into a handheld microphone at a podium, wearing a name tag reading Luke. Three presenters stand at the front of a conference room, one in a yellow t-shirt holding a microphone, while attendees sit at tables in the foreground. Three people standing at the front of a conference room, the person in front wearing a yellow shirt and glasses speaking into a microphone. Large conference room packed with attendees seated at tables facing three presenters standing near a screen displaying the 8th Bridge logo. Man sitting on the floor leaning against a pillar reading printed papers while a crowd of attendees sit at tables behind him. Man named Ben Edwards wearing a name tag speaks to an audience, gesturing with both hands, a presentation screen visible behind him. Man in black blazer and name tag stands at a wooden podium; woman in white cardigan sits at a table nearby writing notes. Small group of conference attendees wearing name tags seated in modern chairs, talking and smiling together in a meeting room. Man in white shirt and name tag sitting at a conference, holding a coiled orange extension cord and a power strip, with a bag at his feet Crowd of conference attendees mingling and chatting among rows of empty chairs in a large meeting room Crowded conference room with rows of attendees seated at tables with laptops, facing a presenter standing at a podium near a projection screen.
← Newer Posts Older Posts →