The MU forums have moved to WordPress.org

How to make a simple thematically consistent Buddy press community... (24 posts)

  1. dainismichel
    Member
    Posted 14 years ago #

    Here's where I'm at:
    http://community.urine-therapy.org/testing/
    Uses my modification of "BuddyPress Social Network Parent Theme Members"

    and
    http://community.urine-therapy.org/testing2/
    usese my modification of "BuddyPress Default Members 1.1"

    as described here
    http://www.bp-tricks.com/design/member-blog-themes-to-match-your-buddypress-theme/comment-page-1/#comment-133

    Now, "testing2" is partially working, but

    1) I don't want the users adding widgets or changing themes...frankly, if they didn't have access to the dashboard and just had access to a Post editor, I'd be fine with that. Register, Make a blog, start posting, uploading PDF's, audios, videos, etc.

    2) So, how to create a standard member blog theme that shows all activity and widgets I select for them in the sidebars. I think hard coding is the way to go, but I'm not sure what code snippet to put where.

    Regarding the standard navigation, here's how I see things:

    Home should take you to the main site
    http://community.urine-therapy.org/
    not to the home of the member-blog. And it should have a running ticker of all activity (basically all blog posts).

    Blog should take you to your own blog (if you are a member)

    Members should take you to a sitewide list of members, not a list of the "members" of the member blog.

    Groups should show the groups created by members sitewide

    Forums (I think this can be removed for now).

    Blogs (this should be the same as members, since each member should only be able to create one blog).

    Can you see how I just want to enable a community, but I don't want to complicate things with blogs and sub blogs and members of sub blogs etc. etc. Basically a member gets a blog, everyone sees what that member does at that blog (summarized at the home page), and we all comment.

    Does that make sense?

    Best,
    Dainis

    PS: Top Nav bar should reflect the possibilities and restrictions outlined above

  2. mercime
    Member
    Posted 14 years ago #

    #1) dsaders Menu plugin takes care of what menus you want to allow your users to have in backend = http://wpmudevorg.wordpress.com/project/Menus
    #2) BuddyPress - you can enable or disable individual components of your BuddyPress install via dashboard BuddyPress menu just under Site Admin menu. In addition, if you want members to use a certain theme when they create a blog, use DeannaS' - http://wpmudevorg.wordpress.com/project/New-Blog-Defaults
    For more specific BP assistance, do go to http://buddypress.org/forums/

  3. dainismichel
    Member
    Posted 14 years ago #

    ...most importantly: how 2 specify member blog theme (done) and widgets (I don't know how to do this), and make sure members can change neither their theme nor their widgets.

    thanks... :-)

    ...used dsaders Menu plugin, however, the top horizontal menu bar still contains a few items I don't want my users to see, like "Switch theme." Where do I get rid of those drop down menu items?

    New Blog Defaults doesn't seem to let me specify what widgets to have where in the New Blog Defaut Theme. That seems to be my most "prominent" current missing step.

    I've seen discussions about "hard-coding" widget placements, but I don't know how to do that or where to grab the code from.

    The member blogs are going to look almost exactly like the main blog, however, it would be cool if there were a widget that I could put in the leftmost column on the user blogs that would do something like say "Personal Blog: UserName" or some kind of user-blog identifier.

    As a side note, the sitewide activity widget creates a button called "Profile," which as fas as I can tell, doesn't do anything. It says it creates a filter, but it doesn't seem to filter anything or provide any filtering options.

  4. mercime
    Member
    Posted 14 years ago #

    1. dsader's Menu plugin - takes care of the WPMU navigation. The horizontal menu at top is BuddyPress-generated, so you need to check out BP Codex - http://codex.buddypress.org/ or post your concerns at BP forums http://buddypress.org/forums/

    2. Hardcode template tags onto the sidebar of New Blogs Default Theme - Google or go to WordPress.org forums - http://wordpress.org/support/

    3. Sitewide Activity Widget - BP Forums

  5. dainismichel
    Member
    Posted 14 years ago #

    Still stuck on hard coding. If you visit:

    http://community.urine-therapy.org/testing2/

    you see a member blog with no widgets. I'm using the "default" theme that I renamed "default-members" in accordance with the bp-tricks link above...but that theme does not have a home.php file.

    1) So, not sure which files modify, when wanting to display things like "member posts" in the leftmost column of the member's blog

    2) Not sure what code to take

    Basically, if someone could say:

    Ahh, you are using the default theme, you renamed it and now it's the member theme...great, now open filename.php and, for example to just list the member's posts in the main column (the leftmost column in your case), just paste this code after where it says XYZ in filename.php.

    Then from that code, I will likely learn how to hardcode actual widgets into the sidebars. So, then, if I want to, for example, hard code "Recent Comments" into the member blog's home page rightmost sidebar, I just have to go into filename.php and past "this code" after where it says "this."

    I would thereby also be able to point to the code that answers the question: Why does this member theme:
    http://community.urine-therapy.org/testing/
    display a sample post
    while this one does not:
    http://community.urine-therapy.org/testing2/

    ...it's "hard coded" somewhere...I just don't know where. I'm happy to learn how to do this, and I'd be very grateful to have these knowledge gaps filled!

    Sincerely,
    Dainis

    Related Threads:
    http://wordpress.org/support/topic/345034?replies=7
    http://wordpress.org/support/topic/273111?replies=5
    http://wordpress.org/support/topic/245978?replies=8

  6. mercime
    Member
    Posted 14 years ago #

    In BP version 1.1.3, you should copy the bp-sn-parent theme and rename the folder something like bp-members. Open up the style.css of the new bp-members and change the Theme Name to bp-members.

    In BP version 1.2 in development, the bp-default theme is no longer the child theme of bp-sn-parent like it was in version 1.1.3. The 1.2 bp-default theme is now a parent theme with a cooler layout (2-column) and to me, a better forums layout as well. To check out how the upcoming 1.2 bp-default theme looks like go to http://testbp.org/

    Since you're currently in development, I recommend at least two things:

    1) Upgrade to WPMU 2.9.1 - before upgrading though, check this out http://ocaoimh.ie/wpmu-add-commentmeta/

    2) Download BuddyPress trunk version via SVN OR zipped file (which you'll find near the bottom of the page)
    - This is where the new bp-default theme you see at http://testbp.org is. Easier to customize and has a custom header where your users can upload their own headers.
    - For this new 1.2 default theme, the activity stream is already in the front page, you needn't worry anymore about hardcoding unless you want to hardcode the sidebar.php
    - Btw, if you're going to use this theme, either
    a) create a child theme based on new bp-default theme or
    b) change the name of folder and theme name in style.css so upgrading the BuddyPress plugin when the stable version is released won't override your customized theme.

  7. dainismichel
    Member
    Posted 14 years ago #

    OK, upgraded WPMU successfully, downloaded the new bp-default theme and I get:

    Warning: ksort() expects parameter 1 to be array, null given in path.../wp-content/plugins/buddypress/bp-core.php on line 810
    Urine Therapy Community
    
    Home
    Activity
    
    Fatal error: Call to undefined function bp_is_member() in path.../wp-content/themes/bp-default-ut-community-home/header.php on line 61

    Can you tell me how to hard code widgets into a theme? Can you give me an example?

  8. mercime
    Member
    Posted 14 years ago #

    downloaded the new bp-default theme

    What do you mean? You extract BuddyPress trunk zip file and within the trunk folder, you find bp-themes folder.
    - You upload the themes you find within bp-themes folder into wp-content/themes/ folder.
    - Go to Site > Themes and allow/enable bp-default and bp-sn-parent themes.
    - Go to main site dashboard and in Appearance > Themes, choose bp-default theme.

    Hardcoding widgets into a theme - I saw your post in BP forums and answered it there in a round-about way. You've got to study more about WordPress themes - http://codex.wordpress.org/Customizing_Your_Sidebar.

  9. andrea_r
    Moderator
    Posted 14 years ago #

    I know I havent; answered your questiosn elsewhere, but yeah - mercime nailed it.

    Before there were widgets, there was just copying and pasting template functions into sidebar.php. It;s no huge secrets and there are literally thousands of posts in hundred of WP blogs stating how to do up a sidebar the old fashioned way.

    Think about what you want in the sidebar. Take each one and look it up. The codex has it all.

    Heck, even look at a regular wordpress theme, and have a look at sidebar.php. Like in Classic. Which you have a copy of.

  10. dainismichel
    Member
    Posted 14 years ago #

    Short version of this post:
    Where do I put code for each sidebar separately in the "old" orange bp theme, once I've renamed it and used it as a member theme?

    Post:
    ...Thanks, getting closer,

    By "downloaded the new bp-default theme," yes, I mean the exact procedure described by mercime, and I got the error above.

    So, either I figure out how to use the new bp-default theme, which I have uploaded, but which, when selected, gives me the error above, or I figure out how to deal with the "old" bp-default theme.

    I made a copy of that theme and called it bp-default-members. Since it calls bp-sn-parent in style.css, I copied bp-sn-parent and named it bp-sn-parent-members.

    Now the style.css file of bp-default-members contains:

    /* Font styles */
    @import url( ../bp-sn-parent-members/_inc/css/fonts/12px.css );
    
    /* Layout styles for home page, internal pages and blog/directory pages */
    @import url( ../bp-sn-parent-members/_inc/css/layout/home-page/3c-right.css );
    @import url( ../bp-sn-parent-members/_inc/css/layout/internal-pages/3c-left.css );
    @import url( ../bp-sn-parent-members/_inc/css/layout/blog-dir-pages/2c-right.css );

    OK, when I open sidebar.php, I see the php if statement that includes this:

    <div class="widget-error">
    				<?php _e( 'Please log in and add widgets to this column.', 'buddypress' ) ?> <a href="<?php echo get_option('siteurl') ?>/wp-admin/widgets.php?s=&show=&sidebar=blog-sidebar"><?php _e( 'Add Widgets', 'buddypress' ) ?></a>
    			</div>

    ...but, the theme has 3 sidebars, let's call them left middle and right. It's apparent that the "please log in and add..." text is appearing in all 3 "sidebars." So, I have 2 steps:

    1) Figure out where the code is for each of the sidebars so I can hard code the widgets I want
    2) Make sure I know how to hard code widgets, so work from a working example

    Basically, I'd like to start with the following:
    Member Blog Home Page
    SidebarLeft: Some kind of username and avatar display at the top, then excerpts of all of that member's posts (normal blog index page)
    SidebarMiddle: Recent Posts on this members blog, Recent Comments on this members blog, This Member's Post Categories
    SidebarRight: Meta + ?

    Then, when browsing a post on a member blog, the right sidebar just shows what was in the Middle Sidebar on the member's blog home page, so Recent Posts, Comments, and Categories (of that member's blog).

    ...so, where I'm stuck right now is: where do I put the code for each of these sidebars? What file is it in? Right now, I see the same code being inserted into 3 sidebars, but I don't see where to paste different code for each sidebar.

    I checked out sidebar.php in the classic theme and found this:

    <?php wp_list_pages('title_li=' . __('Pages:')); ?>
    	<?php wp_list_bookmarks('title_after=&title_before='); ?>
    	<?php wp_list_categories('title_li=' . __('Categories:')); ?>

    So, if inserting that would hard code the widget, then I just need to know where to put that code so it goes into the appropriate sidebar, using either the new bp theme (which generates the error above) or the old orange bp theme (where I can find the text being inserted into all the sidebars, but where I can't find where to put code for each sidebar separately).

    Can you tell I've written loads of tech documentation? I hope so! :-)

    Thanks for your help, and we're super close...like I mentioned back in April or so of 2009, I'll still make a video showing others how to do this, if I'm shown.

  11. dainismichel
    Member
    Posted 14 years ago #

    can I put the hard code stuff into functions.php?

    If so, how?

  12. dainismichel
    Member
    Posted 14 years ago #

    Well, this didn't work:

    register_sidebars( 1,
    	array(
    		'name' => 'first-section',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2><p>hello</p>'
    	)
    );

    in funtions.php ... well, I'm giving this a real go... see how I tried to get hello to display...i have a few more minutes of dinking around in me...

  13. andrea_r
    Moderator
    Posted 14 years ago #

    "Where do I put code for each sidebar separately in the "old" orange bp theme, once I've renamed it and used it as a member theme?"

    Sidebar.php

    "Well, this didn't work:"
    Because that's code to register widgetized areas. you;re looking to hardcode stuff. ie; not widgets.

    "I checked out sidebar.php in the classic theme and found this:

    <?php wp_list_pages('title_li=' . __('Pages:')); ?>
    <?php wp_list_bookmarks('title_after=&title_before='); ?>
    <?php wp_list_categories('title_li=' . __('Categories:')); ?>

    "

    YES! :D That's exactly what you need. That code will show a list of pages, followed by Links, then Categories.

  14. dainismichel
    Member
    Posted 14 years ago #

    For example: Where would I put "<?php wp_list_categories('title_li=' . __('Categories:')); ?>" to have the categories show up in the rightmost sidebar?

    What file do I put the code into and where?
    Where do I put the code for each individual sidebar?

  15. iheartpgh
    Member
    Posted 14 years ago #

    I would like to do the same thing - one mail blog that shows content from subblogs - I don't want the subblogs to have different themes. I don't have buddypress installed - do I need to install that?
    Does anyone know of a simple tutorial for setting up wordpressmu to create a bunch of blogs that look the same?

  16. mercime
    Member
    Posted 14 years ago #

    @dainismichel - "What file do I put the code into and where?
    Where do I put the code for each individual sidebar? "
    - sidebar.php as andrea_r has posted above - read WP Codex - Template Hierarchy

    @iheartpgh - you don't need BuddyPress in order to have one theme for all subblogs. Copying my response to dainismichel above,
    "If you want members to use a certain theme when they create a blog, use DeannaS' - http://wpmudevorg.wordpress.com/project/New-Blog-Defaults".
    In Site Admin > Options, you choose the name of your chosen sitewide default theme, presumably the customized theme you want your members to use, and click Save. Btw, you should enable that customized theme in Site > Themes.

  17. dainismichel
    Member
    Posted 14 years ago #

    Looks like I'm starting to limp instead of being "stuck".

    Yay for progress... :-)

    Now I need to make the navigation work (so that it makes sense).

    I really would like to work one-on-one with someone who is at a high programming level, who knows BP and WPMU well, who could just tell me "this is here, that's there, this code means that, that code means this."

    As a non-programmer "former" tech writer, once I get to know my way around particular code, I get down and dirty fast. I really don't like code snobs or code hogs, and I've worked with quite a few of them, people who won't tell a tech writer why something does what, or won't really answer stuff about particular variables or functions, or they just start feeling threatened when you dig too deep into "their" sacred programmer's territory.

    ...this is just a bit of a rant/vent, since I've been at this BP WPMU thing since April, and right now, I'm looking at the navigation going, geeze, do I have to figure this out by trial and error now too...man...I want a coach.

    I like having stuff explained right there, "this is this, that's what you need to know right now to get done what you want to get done, and if you want to learn more, read this section of this book. Otherwise, you can make the modifications you need by doing X, then Y, then Z. Here is an example, and if you have any questions, let me know."

    It just sucks when the main question is "what's where" and "what does this do" and "how do I make it do X?" And it sucks when the answers are actually super simple, it's just a matter of knowing your way around a bit.

    Oh well, that's enough of a vent, this post has moved me along very well, and thanks for those who've participated.

    Ahma gonna move on to the navigation, and I hope I'll have a functioning beta community up soon.

    I'm more interested in the lives I'm saving and improving with the site I host than the programming itself...

    Alright, best to all...get in touch if you want to help...

    Cheers,
    Dainis

  18. andrea_r
    Moderator
    Posted 14 years ago #

    you know, something occurred to me.. you were talking about sidebars, but what you really meant were the widgetized areas in home.php in the blog's template files.

    For the member blogs, you won;t need the home.php file. you can delete it. The blog posts will show up just dandy, and there will be one sidebar.

    I understand you have a ton of questions and want to learn. :) The problem is, there's a VAST amount of stuff that needs explaining. :D

  19. dainismichel
    Member
    Posted 14 years ago #

    Yeah, isn't that something? Somehow, for me, everything pointed to the lingo being that those "widgetized areas" are internally called sidebars.

    So home.php determines the layout of the root blog, which file determines the layout of the member blogs?

    For the most part though, I'm through this issue, since I've customized the sidebar and will think about what widgets to hard code after spending some more time in codex.

    I was able to hard code the header navigation as well, and it works.

    Next, I don't get how to create forums the way buddypress did here:
    http://buddypress.org/forums/topic/how-to-create-forums-in-bbpress-within-buddypress?replies=4#post-34712

    ...I mean forum categories, or "boards" as SMF forum calls it.

    Best and thanks,
    Dainis

  20. andrea_r
    Moderator
    Posted 14 years ago #

    "So home.php determines the layout of the root blog, which file determines the layout of the member blogs?

    In that theme folder, home.php is shown on the front page of whatever blog you have it activated one.

    You made a second copy for member blogs. In that theme's folder, delete the home.php file. The blog look on those blogs will magically show up.

    For the forums question, you'll have to stick with what they're telling you in the BP forums.

  21. dainismichel
    Member
    Posted 14 years ago #

    Har har, can you share the "magic trick," so I can put member info on the front page of their blog?

  22. andrea_r
    Moderator
    Posted 14 years ago #

    What member info?

  23. dainismichel
    Member
    Posted 14 years ago #

    Even something as simple as a breadcrumbs type of thing that looks like

    Home --> BlogName

    possibly some fields from their profile.

  24. andrea_r
    Moderator
    Posted 14 years ago #

    The profiles are all done via the BP theme on the main (BP) blog.

About this Topic

  • Started 14 years ago by dainismichel
  • Latest reply from andrea_r