BP Social child theme for blogs

Hi, I know that support for running BP Social on a blog is in the works at wpmudev, but in the meantime I thought I might share my own efforts on this. Attached (I hope) is a .tar.gz file with a child theme for blogs. This is a "bravehearts only" file, but perhaps if you were interested in a BP Social theme to run on individual blogs then this might be of interest.

One key thing that I addressed was the ability to set featured articles without having to go into the Theme Options page (*). So, if a post is made sticky, then it is treated as a feature article. Also, the image used for that post can be set with the "Set Featured Image" link in the WP image upload / gallery screen.

The theme has only two sidebars, as I felt that the rest were not needed for a blog theme. There are a number of other things that can be turned on/off with flags in functions.php if they aren't suitable for you.

I'd be happy to provide a live demo link, but not for a few days as there are a few infrastructure things I need to get in before broadcasting a link to the site. In the meantime please let me know here if you do try it. I'd also appreciate any comments on the code etc as I'm still wrestling with about a million new APIs. Thanks :wink:

(*) I've only just now discovered that Theme Options is only accessible to the global site adminstrator, and not to individual site admins. I will have to look into that tomorrow.

  • Tammie

    Going to flag Mason on this one as haven't a clue why you can't upload... you should be able to but it probably is too big I'm thinking that's your issue. Anyway lets get his thoughts. What size is it? On the theme options you have to make sure you are using the right edit_theme call this was also part of the theme updates due to be done to Social.

    This sort of raises the point why we want to keep updates in the core going on and not split versions just have children as things like that are essential, however we do understand that development has been slower on Social lately causing this need.

  • Mason

    Hiya JohnR,

    Sorry the forum upload doesn't appear to be working in the case. I'm not sure why either as .gz extensions should be accepted.

    If you want to send it over as an attachment, I'll take a look and see if I can't post it here on your behalf.
    Shoot it to the email contact [at] incsub [dot] com

    Please put my name (Mason) in the subject and a link to this thread in the email as well.

    Thanks again. Looking forward to taking a look myself! :smiley:

  • JohnR

    Hi Richie - that would be very cool if it were automatic like that.

    Anyway, Mason has the file, but here's a blog with the child theme installed on it (I guess no harm can come from this) : http://pittwaterspirit.com.au/macro/

    I'd prefer to have every blog have the same basic look/layout as the home page. Perhaps I've just spent too many years working with forums but this seems like a good idea to me.

    In order to get blog admins access to the theme options, the simplest solution seems to be to modify the parent bp-social theme: in bp-social/_inc/options-functions.php, change 'edit_themes' in the call to add_theme_page to 'switch_themes'. (I know this is naughty but I can't figure out the "right" way to do this at present...)

  • Richie_KS

    i see..
    your idea was using a global style for the theme.
    mean once you save the styling in theme options in main blog..it will automatically apply
    to other subblog..like if you have green color bg in main site using bp-social then
    subblog using bp-social also had green color bg...something like that:slight_smile:

    with the down side that subblog user will not have edit color options in theme options.
    mmm..this is something worth consider for multisite with bp or without bp installed.

    yeap...'edit_themes' were somewhat deprecated with new super admin role in 3.0 so using
    'switch_themes' or better yet 'edit_theme_options' should fix this issue.

    cheers

  • JohnR

    Hi Richie, actually - that isn't what I meant :slight_smile: The basic look/layout is bp-social with the default styling. However if an individual blog admin wants to make a green background then he/she can.

    This is good because by default all the blogs look good. If someone wants to mess with the blog, then there is a set of options that they can change (i.e. in Theme Options for their own blog).

    That way I only need to support one theme, and there's "enough" flexibility for most people.

  • JohnR

    One more change that I have to do in options-functions.php while I'm in there. Before:


    <div class="get-option">
    <h2><?php _e("Blog Intro CSS Settings",'bp-social') ?> <small><?php _e('*intro header can only be seen by non logged in user','bp-social'); ?></small></h2>

    add:

    <?php if (get_settings('home') == bp_get_root_domain()) : ?>

    and just before:

    <p id="top-margin" class="save-p">

    add:

    <?php endif; ?>

    This is to remove options from the Theme Options page that are not relevant for the individual blogs. It's a little coarse but it's close enough for my purposes. Again, I'm not able to see how to do this just within the child theme.

    Thanks :wink: