Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 151 through 175 (of 1,734 total)
  • @burtadsit

    Participant

    Permissions on the /bp-themes dir strange?

    @burtadsit

    Participant

    Go into the wp backend Buddypress > General Settings

    Select theme to use for BuddyPress generated pages > Buddypress Default Member Theme 1.0.1

    Make sure that is selected and Save the settings

    @burtadsit

    Participant

    @Mike, Manoj and I are working on that. I did a little integration demo for him enabling tags in his plugin. He’s got a pre-release version of bpc alpha 3 to see how it’s done. Doesn’t take much really. I have to finish alpha 3. It’s got new features like hierarchical categories.

    Not sure what ‘user tagging’ is at all Mike.

    @burtadsit

    Participant

    Really? Well that would be useful. I took a quick look in Kakumei and didn’t see such an animal so I figured it didn’t exist.

    @burtadsit

    Participant

    Cool. Anyway you get your function into the mix is a ‘reasonable way’ of adding it. Unfortunately bbpress doesn’t have the concept of a functions.php like wp does in it’s themes. The only other alternative you have is a plugin. The plugin makes it available no matter what theme the user has selected. That’s the big difference.

    @burtadsit

    Participant

    I wasn’t really thinking of tables. More like .htaccess. I don’t see any bp related issues. You might be better off asking for help at https://mu.wordpress.org/forums/

    @burtadsit

    Participant

    Whew.

    @burtadsit

    Participant

    I created an account on your site and I think I understand how things are configured. You have wpmu installed with the subdirectory option for blogs.

    bp is installed on the blog http://www.518fever.com/profiles

    You have other blogs such as http://www.518fever.com/maria/

    Then again that might not be how things are configured at all. the ‘maria’ blog doesn’t show in the bp blogs directory. The blogs that are there have an url signature of:

    http://518fever.com/profiles/tony/

    I’m totally confused as to what the configuration is. I think wpmu and is also.

    @burtadsit

    Participant

    I just ran that last reply though google translate. You’re welcome.

    @burtadsit

    Participant

    Remind me not to end a post with the sentence “That code is totally untested”.

    The admin bar Visit > Random Blog is controlled by bp_blogs_redirect_to_random_blog() in bp-blogs.php. You get to play with that one. :)

    @burtadsit

    Participant
    $my_excluded = array('1','15','16','17','18','19','20','21');
    foreach ($this->blogs['blogs'] as $key => $value){
    if (in_array($value->blog_id, $my_excluded)){
    unset($this->blogs['blogs'][$key]);
    $this->blogs['total'] = ((int)$this->blogs['total'])-1;
    }
    }
    $this->blogs['blogs'] = array_merge( array(), $this->blogs['blogs'] );

    The above should fix the issues you were having. Use the foreach() loop instead of the for() loop.

    I tested this and excluded all blogs, some blogs, no blogs. Also with the letter select. The featured blogs loop in /directories/blogs/index.php needs a my_has_site_blogs() also.

    @burtadsit

    Participant

    Where are you putting the my_has_site_blogs() fn? That should go in /directories/blogs/blogs-loop.php. Right at the top like:

    <?php if ( my_has_site_blogs( ‘type=active&per_page=10’ ) ) : ?>

    @burtadsit

    Participant

    The reset keys thing is courtesy Andy, I remembered it from bp-core-catchuri.php. I just realized what he was doing there and why.

    @burtadsit

    Participant

    I hooked it up here locally. I see what you mean. Its because we have to reset all the array keys to start at zero and have no gaps. The template loop stuff is funny like that. :)

    $my_excluded = array();
    for ($i = 0; $i < count($this->blogs['blogs'])-1; $i++){
    if (in_array($this->blogs['blogs'][$i]->blog_id, $my_excluded)){
    unset($this->blogs['blogs'][$i]);
    $this->blogs['total'] = ((int)$this->blogs['total'])-1;
    }
    }
    $this->blogs['blogs'] = array_merge( array(), $this->blogs['blogs'] );

    The last bit with the array_merge() does that.

    http://buddypress.pastebin.com/m63458c5c

    @burtadsit

    Participant

    Don’t bother posting in trac. Somebody already did.

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

    @burtadsit

    Participant

    If it’s only with members then that sounds like a bug. Can you post this in trac please?

    https://trac.buddypress.org/newticket same credentials as here.

    @burtadsit

    Participant

    Andy found a problem with the custom class. The totals won’t reflect properly. So you need to modify the code like this one:

    http://buddypress.pastebin.com/m398024c5

    That decrements the blog count total.

    The next problem you’ll have is where to put this. If you put it in bp-custom.php like it is then it will crash and burn because the base class hasn’t been declared yet. So you’ll have to put that in a php file and include it *after* bp loads.

    function bp_loaded(){

    include(‘your-file-with-mods.php’);

    }

    add_action(‘plugins_loaded’,’bp_loaded’);

    If you put that in bp-custom.php it should work right.

    @burtadsit

    Participant

    My mod to the class constructor is in the spot where the comment // burt! is. Change the array of excluded blogs $my_excluded to reflect the blog ids of the blogs you don’t want to be in the listing.

    @burtadsit

    Participant

    Nope. There’s no hidden ‘exclude’ parameter. If you really need this you can:

    1) Derive a new class from BP_Blogs_Site_Blogs_Template modifying the constructor to exclude the blogs you want from the list of blogs returned by BP_Blogs_Blog::get_<whatever>()

    2) Create a new template tag that modifies the standard version of bp_has_site_blogs() to call your derived template class instead of the standard one.

    3) Modify your theme to use the new bp_has_site_blogs() template loop goodie.

    Like this code here: http://buddypress.pastebin.com/d12aa57a1

    That code is totally untested.

    @burtadsit

    Participant

    There sure is. Kinda.

    $forums = bp_forums_get_forum();
    if ($forums){
    foreach ($forums as $f){
    .. do something with each forum like..
    $topics = bp_forums_get_topics($f['forum_id'], 5);
    .. do something with each topic ..
    }
    }

    bp_forums_get_forum() returns bbpress forum records. Same info as in the bb_forums table.

    See:

    /bbpress/xmlrpc.php

    /buddypress/bp-forums.php

    /buddypress/bp-forums/bp-forums-bbpress-live.php

    /buddypress/bp-forums/bp-forums-templatetags.php

    The BP_Forums_Template_Forum template loop class iterates over one specific forum.

    @burtadsit

    Participant

    Nothing like that built into bp that I’m aware of. Somebody else wanted to do this also. They tried using Sam’s bbPress Live widget. The problem is that bp uses the bbpress live widget underneath for communications with bbpress. Conflicts ensued. I don’t have any easy solutions for you.

    @burtadsit

    Participant

    Well the deal with the is_there_a_bp() fn is that if it is in the activated list it just arbitrarily loads bp. That only happens once so it should be ok when bp actually gets to load in it’s natural seqence.

    If than fn finds bp installed it loads it. Don’t know how your plugin isn’t getting loaded.

    There is an issue with just doing require_once() for bp. The user may have bp deactivated. In that case your plugin shouldn’t just decide to run it. It should respect the wishes of the user.

    There is a long discussion about all this base plugin/dependent plugin stuff going on in the wp-hackers mailing list at the moment.

    @burtadsit

    Participant

    js apps just don’t play nice with each other.

    I ran into this issue before and had to hack the plugin that was relying on an older version of jquery. It worked but it was only going to work on my site. I couldn’t expect anyone else to do the same thing. I just abandoned the use of the plugin that relied on a prev version of jquery.

    @burtadsit

    Participant

    Sounds like your plugin is loading before bp is loaded. If the core fns aren’t there then bp is probably loading after yours. When you do the upgrade it now has a different sequence in the list of sitewide plugins.

    I think jeffsayre put some checking code into the bp skel component. I don’t know if it’s been released yet. In case it hasn’t this is what it looks like:

    /**
    * oci_load_buddypress()
    *
    * Checks to see of bp is active. Attempts to load it if it isn't.
    *
    * @return true if bp is installed and activated
    */
    function oci_load_buddypress() {
    if ( function_exists( 'bp_core_setup_globals' ) )
    return true;

    /* Get the list of active sitewide plugins */
    $active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );

    if ( !isset( $active_sidewide_plugins['buddypress/bp-loader.php'] ) )
    return false;

    if ( isset( $active_sidewide_plugins['buddypress/bp-loader.php'] ) &&
    !function_exists( 'bp_core_setup_globals' ) ) {
    require_once( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
    return true;
    }

    return false;
    }

    If this fn returns true then either bp is loaded, bp wasn’t loaded and it loaded it or false bp couldn’t be loaded.

    True is your plugin can continue, false is do some kind of graceful exit.

    @burtadsit

    Participant

    Got a link to your site we can see? What plugins exactly?

Viewing 25 replies - 151 through 175 (of 1,734 total)
Skip to toolbar