Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • @matt082606

    Participant

    I haven’t modified any of that… here is the possible error I am getting:

    [20-Mar-2009 09:26:20] WordPress database error Table ‘my_database.wp_Array_options’ doesn’t exist for query SELECT * FROM wp_Array_options WHERE option_name = ‘siteurl’ made by get_blog_option

    it looks like wp_Array_options should be getting wp_X_options where X = the blogid number. Any ideas where this query would be taking place and why the variable would be an Array instead of just a number?

    I think maybe I might have used a variable somewhere I shouldn’t have maybe if I can do a search for that variable name and check all instances of it I can find where it is being set to an Array instead of just the blog_id.

    Thanks for all your help.

    @matt082606

    Participant

    Thanks for the response, the bp version is not RC1, it is 1.0, I am pretty sure that’s not the same thing but it may be.

    I have a very unique group of bloggers and I want to continue to attract folks from this group so I have modified many of the core files that are part of the upgrades to 2.7 and RC1 I probably broke this with one of those mods but I can’t understand how or why. I have too many features with too many hours to risk losing them all… I was hoping maybe someone had seen this.

    For instance when you click to go to a blog this line:

    <?php bloginfo(‘stylesheet_url’); ?>

    will return the stylesheet_url of the page you are leaving not the one that called it from that theme’s header file.

    if I just manually type in the URL and hit enter it loads just fine, I have tracked it to one of these site variables from either do_action or apply_filters:

    do_action:

    $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;

    apply_filters:

    $wp_filter, $merged_filters, $wp_current_filter;

    I’ll have to do some more digging I suppose,

    @matt082606

    Participant

    OH and to separate it from your “pages” list, just add an exclusion of that page on the widget for pages.

    @matt082606

    Participant

    You’re in luck I just had to do this myself, and here is how I did it.

    I created a new php file that I wanted to use for the page and added this to the top of the file:

    <?php

    /*

    Template Name: MY_TEMPLATE_NAME

    */

    ?>

    you can make, MY_TEMPLATE_NAME, whatever, but be careful there are some reserved template names.

    Save this file in the root directory of your home theme (i.e. wp-content/themes/buddypress-home) now under your admin blog write a new page (NOT POST), make the title relevant to what you want, but don’t put anything in the actual page.

    Scroll down to the “Page Template” menu and when expanded you should see a drop down box with the “MY_TEMPLATE_NAME” as an option. choose that and now just copy down your permalink, and that is the direct link to your newly created page. SIMPLE! I also added in my side_bar to the page I created so that the navigation menu stayed put as I move through all of my pages.

    @matt082606

    Participant

    I fixed this, I decided to come back and post the solution incase others try to use this same function throughout their site.

    I was right about the failure being “$bp”, all I did was finally hardcode the value of that into the db query. it should be wp_bp_friends if you left everything as default, but if for security reasons you used a different table header yours may look different so make sure you get it right or it will stop working for friend wire posting and other friend based features.

    The reason I use this is for a friends only posting feature I added to my site which allows users now to make a post that can only be read by those on the friends list.

    @matt082606

    Participant

    I found this looking for a possible solution to one of the problems discussed.

    The most important to me is showing more messages per page.

    Making changes to show less (i.e. header only) I can do fairly easy but when I started getting into the pagination I was quickly finding myself chasing my tail. I am sure I can sort it out, but if you could just point out quickly where the number of pages, and number of messages per loop is produced maybe that will help me and I will in turn post my solution to help others.

    Thanks!

    @matt082606

    Participant

    I guess I should start at the beginning.

    A) I’ve made LOTS of core mods, I have no plans of upgrading, as I am heavily customizing this and removing as many features as I will be adding.

    This particular thing comes from me adding 2 check boxes where you post a blog entry now the user has a choice of “keep private” “friends only” and “logged in members only” so when checking friends, or loggedin I set the post_status to friend, or loggedin respectively. This allows me when any theme calls “THE LOOP” as it were I can look at the post_status and decided if the user matches the credentials.

    As for now what I have working is if user is logged in the loggedin only posts show with all of the standard published posts no problem. if the user is the owner then everything shows, but if the user is a friend the friend check is failing and there-by not showing the friend only posts.

    The place I have injected this is in query.php file. I think I’m going to look through this quite a bit more today on my own… I’ll post the result in case others are trying to use this function from outside the bp-core.

    @matt082606

    Participant

    perhaps I posted wrong the line:

    <?php bp_friend_last_content_update() ?>

    doesn’t do much, you’ll need to decide what material you want to display there.. I assume this is going to be the “home” theme of the wordpress mu right?

    @matt082606

    Participant

    why couldn’t you just do this: (of course add style <div>’s etc… just hacking this out quickly)

    <?php if ( bp_has_friendships() ) : ?>

      <?php while ( bp_user_friendships() ) : bp_the_friendship(); ?>

    • <?php bp_friend_avatar_thumb() ?>

      <h4><?php bp_friend_link() ?></h4>

      <?php bp_friend_last_content_update() ?>

    • <?php endwhile; ?>

    <?php else: ?>

    <div id=”message” class=”info”>

    <p><?php bp_word_or_name( __( “You have no friends”, ‘buddypress’ ), __( “%s’s friends list is currently empty”, ‘buddypress’ ) ) ?></p>

    </div>

    <?php if ( bp_is_home() ) : ?>

    <h3><?php _e( ‘Why not make friends with some of these members?’, ‘buddypress’) ?></h3>

    <?php bp_friends_random_members() ?>

    <?php endif; ?>

    <?php endif;?>

    @matt082606

    Participant

    one more thing, this line specifically “$bp” inside of bp-friends-classes is where I feel that this is failing. now there is a global $wpdb, $bp; and again this will pass when being pulled from other pages within the core of bp…

    perhaps that will help, is there something I need to add to make sure that this will work?

    @matt082606

    Participant

    no I am doing this call from within the wp_query class function get_post. if I add wp(); I get server error, from I guess an infinite loop.

    I realize there has to be something missing from the bp, I just don’t know what that is, I’ve included everything I can think of, and I’ve added global $bp.

    In all honesty there is no reason this shouldn’t work but it’s not so there has to be something I am missing and when I find it I am sure it will be something that is so obvious, which makes this all the more painful.

    Just for more info, the function exists in bp-friends.php in the mu-plugins root. it makes the call to the function BP_Friends_Frienship::check_is_friend… now this class and function exists in the bp-friends-classes.php within the bp-friends folder. I also have an include to this. I tried including ALL the files that are included in bp-friends.php, even though that seems redundant.

    I don’t know what to do next, I think I am going to just create my own friend check function to query the db at this point.

    @matt082606

    Participant

    I know it’s only been one day, but here are some updates to what I’ve done to troubleshoot the problem.

    1) I placed an echo within the function friends_check_friendship that tells me what was returned and also tells me what the ID’s are for the two users being compared.

    This verified that I am passing correct data in and I am getting back ‘not_friend’ however when I go to the wire page, the same data goes in and I get back ‘is_friend’ so for some reason when calling this function from the wp-includesquery.php I am not getting back the correct data. I have also tried adding the following:

    require_once (./wp-content/mu-plugins/bp-core.php);

    include_once (./wp-content/mu-plugins/bp-friends/bp-friends-ajax.php); <- and all files in this folder, just like at the top of bp-friends.php

    Does ANYONE have a clue why this isn’t working?

Viewing 12 replies - 1 through 12 (of 12 total)
Skip to toolbar