Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 351 through 375 (of 1,734 total)
  • In reply to: Members Directory

    @burtadsit

    Participant

    Once again the major restriction I’ve found is that the functions.php files in both the member theme and the home theme *must* register the same sidebars. They have to match. The member theme can not independently register a sidebar that doesn’t exist for blog id 1.

    I can live with that. :)

    In reply to: Members Directory

    @burtadsit

    Participant

    That\’s how I got the member theme to display a sidebar using the plugin-template.php and plugin-sidebar.php templates. You\’ll have to modify the directory templates to display a sidebar if you want them to show up there. All you have to do is include the sidebar div like:

    <div id="sidebar">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('member-sidebar') ) : ?>
    <?php endif; ?>
    </div>

    I stuck that each directory’s index.php template and modified the css to format things properly. Giving the new sidebar some room.

    In reply to: Members Directory

    @burtadsit

    Participant

    The last time i fooled around with the member theme at the sidebar/widget level I couldn’t use dynamic sidebars. It was just flatly impossible. Seems things have changed. I’ve gotten them running in the member theme but have only been able to select sidebars that are defined in whatever theme I have defined for the wp blog id 1 theme.

    Like I say it’s been quite awhile since I looked at this problem and to my surprise it actually works now. Sort of, with restrictions, kinda. Perhaps I’m just doing it the wrong way. I’ll tell you how I got it done.

    The problem really is that the member theme isn’t a real registered theme. You only get one theme per blog with wp. That one is the one activated for that particular blog. I currently have the bp home theme registered for blog id 1. It registers 3 sidebars and those are the ones that are available for the theme.

    The bp member theme doesn’t register any sidebars by default and doesn’t include the default sidebar template file either. I suggested above that you use the sidebar template from the home theme. That alone was not enough to get widgets into the member theme. I stuck the normal code for using dynamic sidebars into the sidebar template like this:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    <?php endif; ?>

    That got me exactly nothing. So I included sidebar registration code in the member theme’s functions.php file where it normally gets put.

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

    I named my new sidebar ‘member-sidebar’ thinking that it would show up in the back end of wp where I could then register some widgets for my ‘member-sidebar’. Nope. The ‘member-sidebar’ doesn’t show up.

    I did get the first sidebar to display in the member theme though. Whatever was defined in the wp theme as the first registered sidebar, showed in the member theme. Well this is progress ‘eh? Something is showing in the member theme. I had to mod the member theme css to have it appear though. The #sidebar div isn’t in the base.css for the member theme. I modified the #content div in base.css and included the new #sidebar div.

    Still with me? Now I have *a* sidebar with widgets in the member theme. Well I don’t want just any widgets, I want to specify what specific widgets get displayed right? Anyway I finally figured out that I have to register *all* the same sidebars that the wp theme on blog id 1 register. I copied all the function.php sidebar registration calls from the home theme’s function.php and stuffed them into the member theme’s function.php.

    Works like a charm. Now in my member theme template file plugin-sidebar.php I can specify which sidebar I want to display.

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('blog-sidebar') ) : ?>

    That above just happens to be the one I chose to test that I could have any sidebar I wanted in that template. Works. Well, I didn’t want one of those sidebars at all. I wanted a separate sidebar for my member theme. ‘member-sidebar’. That would not show up until I included the registration function in both the home theme and the member theme. Then I get to change the code above to be ‘member-sidebar’.

    Like I said I may be doing this all wrong and hope that someone comes up with a better solution but this is the one that works for me.

    1) Add another register sidebar call to the wp theme running on blog id 1. Like this in your blog id 1 functions.php file:

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

    I stuck that under the other 3 calls in the default home theme.

    2) Copy *all* the register_sidebars() calls from the home theme functions.php file to the member theme’s functions.php file. They should look the same now when it comes to sidebar registration calls.

    3) Copy the sidebar template file that is distributed with the home theme plugin-sidebar.php to the member theme dir.

    4) Modify the plugin-template.php file in the member theme to load the new sidebar template also.

    <?php get_header() ?>

    <div class="content-header">
    <?php do_action('bp_template_content_header') ?>
    </div>

    <div id="content">
    <h2><?php do_action('bp_template_title') ?></h2>

    <?php do_action('bp_template_content') ?>
    </div>
    <?php bp_get_plugin_sidebar(); ?>
    <?php get_footer() ?>

    That’s my plugin-template.php file that lives in my member theme.

    5) Modify the plugin-sidebar.php template in the member theme to look like this:

    <div id="sidebar">
    <?php do_action('bp_template_sidebar') ?>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('member-sidebar') ) : ?>
    <?php endif; ?>
    </div>

    6) Modify the member theme css to include the new #sidebar div that didn’t exist before. I just did it this way for the content and sidebar divs:

    #main #sidebar{
    margin-left:70%;
    margin-right:20px;
    }
    #main #content {
    float: left;
    width: 65%;
    position: relative;
    padding: 2em 3em;
    }

    Use whatever is appropriate for your member theme.

    7) Fire up the back end of wp and add widgets to the ‘member-sidebar’. Enjoy your new member theme sidebar.

    @burtadsit

    Participant
    In reply to: Members Directory

    @burtadsit

    Participant

    The 1.0 member theme plugin-template.php doesn’t include the sidebar. You’ll have to copy the plugin-sidebar.php template over to the member theme dir. Also the plugin-template.php file doesn’t include the call to launch it. If you look at the home theme’s plugin-template.php file you’ll see the difference. It has a diff set of divs and a call to bp_template_sidebar() which you’ll have to include in the member theme’s plugin-template.php.

    You do know that this doesn’t really setup a normal wp sidebar were you can install widgets from the back end of wp right? All the sidebar does is trigger an action that you have to trap in your code.

    In reply to: crash!!!

    @burtadsit

    Participant

    Warning: bp_show_register_page(BP_PLUGIN_DIR/bp-core/bp-core-signup.php) [function.bp-show-register-page]: failed to open stream: No such file or directory in /home/www/missionaries.net/wp-content/themes/buddypress-home/functions.php on line 70

    Did you deactivate the bp plugin? It doesn’t seem to be running. If it’s not available for selection then check the /wp-content/plugin dir for it’s existence. If it doesn’t exist reinstall it.

    Finding out why it got deactivated or it doesn’t exist anymore would be the next step.

    @burtadsit

    Participant

    custom.css doesn’t work in this case people? custom.css should override base.css without a direct edit of base.css. I’m just getting to this at the end of the discussion.

    @burtadsit

    Participant

    I’m not sure what that function does but perhaps echo get_cimyFieldValue(..) would work? Does it echo the results of what it does?

    @burtadsit

    Participant

    Yep. Bug in 1.0. Looking at it.

    https://trac.buddypress.org/ticket/729

    @burtadsit

    Participant

    This is a wpmu/bbpress integration issue not a bp issue as far as I can tell. Since this is not a bp support issue, marking the thread as such.

    @burtadsit

    Participant

    You installed bp 1.0 and wpmu 2.7.1, visited the back end of wpmu as site admin. Activated the bp plugin sitewide. All that?

    Sounds like bp can’t find any of it’s tables.

    @burtadsit

    Participant

    You’ve got the right idea. However the filter doesn’t exist until bp fires up completely. bp-custom.php gets loaded before bp. Try this:

    function stuff_i_want_triggered_after_bp_loads(){

    remove_filter( ‘xprofile_get_field_data’, ‘wp_filter_kses’, 1 );

    }

    add_action(‘wp’, ‘stuff_i_want_triggered_after_bp_loads’);

    @burtadsit

    Participant

    Just tested with 1.0 and works ok for me. Are you using a custom member theme?

    @burtadsit

    Participant

    bp requires wpmu.

    In reply to: What is Wire

    @burtadsit

    Participant

    LOL. alunsina most of the time I have *no idea* what the answer is either. I just jump right in and find the answer.

    @burtadsit

    Participant

    Changes 0.14

    – Fixed terms coming in from blog posts with only ‘names’ and not ‘slugs’ also. Propagating that fact down to term creation in bpcontents.

    – Added getting terms by array of ids in OCI_Term with one query like getting an array of items in OCI_Items

    – Removed the method OCI_Container::get_containers() as containers should manage tags and items only. Makes things simpler. Use the tree functions for container management and info.

    – Added OCI_Container::get() and get_by_meta() to allow quick path lookups of node id from node meta to eliminate mult queries when parsing the path

    – Nobody reads this stuff. I like cats more than I like dogs. Cats fend for themselves and enjoy killing small animals. I do too.

    – Added OCI_Item_User class. This allows users to be treated like content items. Bagged, tagged and categorized.

    – Created bpContents as a member theme component. Add a crude component function to the member theme. Same functionality as the oci-test-template.php. Just dumps the /recent container.

    – Testing the OCI_Item_User class by creating new user items, based on the content author, for each new content item created.

    – Reverted back to the oci-content directory structure. Still distributing as bpcontents.zip

    http://ourcommoninterest.org/downloads/bpcontents014.zip

    @burtadsit

    Participant

    Timoty West, put everything back to the way it was before the changes. Remove the slugs mods you made to BP_MEMBERS_SLUG and BP_GROUPS_SLUG and let me look at a real fix.

    You can either have slugs you want or wires. There is no middle ground at the moment.

    @burtadsit

    Participant

    Timothy, what is the incentive for them to give you their email address? What will they gain if they do? Change only occurs to gain something through self-centeredness or to avoid pain. Dangle a carrot while beating them with a stick.

    Come up with a feature that requires email.

    @burtadsit

    Participant

    LOL. “Didn’t think I could be that much of a pain already.”

    Well this is bbpress but lots of posts with multiple links get spammed by akismet. It’s not you, it’s the post.

    @burtadsit

    Participant

    http://ourcommoninterest.org/downloads/bpcontents013.zip

    Changes 0.13

    – Added OCI_Container::delete() to delete the current container and all it’s children

    – Removed OCI_Tree::tree_get_containers($node), added tree_get_children($node, $type)

    – Changing thing to remove php 5 dependencies.

    – Made all class methods static where possible, yes Andy it’s better this way

    – Added OCI_Template_Items class for container template loops in themes, no pretty bells and whistles yet. I cut out all non-essential things to understand it better.

    – Added a few oci_get_the_item_xxx(), oci_the_item_xxx() template tag functions to test the template class.

    – Added a oci-test-template.php file for testing the template class and template tags. I drop it into the bp home theme dir and create a wp page using that as a template for the page. It’ll show up as “OCI Test Template” in the wp back end.

    – To use the template you need to point the loop start tag to an existing container like “/recent” if you are testing using blog posts.

    <?php if ( oci_has_items(“/recent”)) : ?>

    Point it to where ever you are sending blog posts. The following in oci_contents_setup_globals() sends blog posts from any blog to /recent and /other/place

    $recent = new OCI_Container(“/recent”, true);

    $other = new OCI_Container(“/other/place”, true);

    $oci->listeners->blog_posts = new OCI_Item_Blog_Post_Listener();

    $oci->listeners->blog_posts->add_destination(“/recent”);

    $oci->listeners->blog_posts->add_destination(“/other/place”);

    So you can change the loop start tag to:

    <?php if ( oci_has_items(“/other/place”)) : ?>

    Then browse to your new test template page to view the results instead of using oci_test_print_tree.php to just dump the tree.

    @burtadsit

    Participant

    belogical

    $bp->example->image_base = BP_PLUGIN_URL . ‘/bp-example/images’;

    @burtadsit

    Participant

    I love it when a project finally starts to come together and I can add features without worrying too much about “Is it the new code or is the old code not working”. Things are beginning to accelerate.

    http://ourcommoninterest.org/downloads/bpcontents012.zip

    Changes 0.12

    – Added OCI_Term, OCI_Item delete rec prohibition to not allow deletion of a term or item if instances exist in the tree.

    – Added term, item delete record with deletion of all instances as well: $this->delete_instances_also()

    – Changed OCI_Item_Listener to delete the item and all instances on delete_item()

    – Removed the overly paranoid and incorrect assumption that mptt get() ops requires a table lock. Doing a table write lock when changing the table suspends all threads until that op is complete. Duh.

    – Added OCI_Walker_Container class derived from wp’s tree Walker class. Replaces the print_tree() guts with something useful and configurable down the road.

    – Added OCI_Container::print_tag_cloud() , generate_tag_cloud() both blatantly stolen from wp.

    @burtadsit

    Participant

    No questions will be answered without bp and wpmu versions being mentioned.

    @burtadsit

    Participant

    New version bpContents http://ourcommoninterest.org/downloads/bpcontents011.zip

    Changes 0.11

    – Reworked the OCI_Container class to be easier to use and less confusing.

    – Added explicit support for ‘tags’ as a container type OCI_TAG

    – Added a new table ‘oci_tree_meta’. Node meta table. Visit the back end as site admin to add the new table.

    Three new functions for node class: get_node_meta(), update_node_meta(), delete_node_meta(). Now any node can have meta data associated with it. Planning on using this for things like item sequencing for user defined sequencing of items within a tag. Item counts in tags for tag cloud generation. Etc…

    – Started to split up functions and classes: new file bpcontents-functions.php

    @burtadsit

    Participant

    I’ve posted the 0.1 alpha core code here: http://ourcommoninterest.org/downloads/bpcontents.zip

Viewing 25 replies - 351 through 375 (of 1,734 total)
Skip to toolbar