Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 97 total)
  • Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    @henrywright

    Thanks but that didn’t seem to do much either. I even checked back to other BP_Component examples and i’m using the same hooks. I’m guessing this is something “weird” (or something i’m not aware of) with bbPress. I just went ahead and created the bbPress forum and connected it to the BP group in my plugin manually. I hate to do that – if bbPress decides to change something my plugin is going to be out of date, but such is life.

    Thanks for the attempts.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    BTW, thanks for the responses @shanebp @danbp

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Thanks. Sadly this isn’t working out. I’m going to post this here in case someone can tinker with it (you’ll need BP and bbPress installed):

    https://dl.dropboxusercontent.com/u/14006840/curriki-group-import.zip

    Yeah, i’m trying to use the BP native functions and hooks. I have no problem with the BuddyPress flow – just when it comes to relying on bbPress to create the forums is when it falls apart.

    If anyone figures this out, i’ll throw them some PayPal change for some coffee. :)

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    @shanebp

    Thanks for the response. That in a nutshell is what i’m doing right now with the change you suggest. Loader.php loads the file that contains the code above via bp_loaded. Then i try to initialize my class CurrikiGroupImport. So it’s a chicken and egg thing – either I can init my class and get the plugin loaded and showing up in the WP admin menu and can’t get bbPress loaded first OR bbPress seems to load but my plugin doesn’t show up.

    If it helps, I can zip up a simple version of the plugin and assuming you have BP and BBPRESS loaded you can give it a spin.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    @shanebp

    The change to ‘bp_ready’ gets past the “crapstop” but my plugin no longer shows up in the menu. Although i’ve always thought ‘bp_loaded’ was the proper hook here, for the moment i’ll take it.

    Here’s the full bit of code. Perhaps i’m not init the class properly here?


    function curgi_group_import_init() {

    if ( !function_exists('bp_forums_new_forum') ) { echo "crapstop"; exit; }

    buddypress()->curgi_group_import = new CurrikiGroupImport();

    }
    add_action( 'bp_ready', 'curgi_group_import_init', 20 );

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Furthermore, I can create a group with my plugin WITH the “this groups has a forum” checkmark (but remember – my problem is that i can’t ACTUALLY create the forum). I can go into the “groups” area in the WP backend and simply edit the group and hit ‘update’ and WordPress DOES create the group. So it works there, but not in myplugin. I’m thinking that bbPress simply isn’t being loaded or activated prior to my plugin but I can’t figure it where or why.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    @shanebp – I have looked at that. function groups_new_group_forum is called by function groups_edit_group_settings which i’m calling. The “checkbox” for groups to have a forum is updated but no forum is created.

    Here’s the lines of code in groups_edit_group_settings() in bp-groups-functions.php

    
    	// If forums have been enabled, and a forum does not yet exist, we need to create one.
    	if ( $group->enable_forum ) {
    		if ( bp_is_active( 'forums' ) && !groups_get_groupmeta( $group->id, 'forum_id' ) ) {
    			groups_new_group_forum( $group->id, $group->name, $group->description );
    		}
    	}
    

    I believe the bp_is_active( ‘forums’ ) never is true for when my plugin calls it. Therefore the groups_new_group_forum never gets run. I tried calling the groups_new_group_forum directly but that doesn’t work either. Here’s the key part in groups_new_group_forum:


    $forum_id = bp_forums_new_forum( array(
    'forum_name' => $group_name,
    'forum_desc' => $group_desc
    ) );

    That bp_forums_new_forum doesn’t exist. So I could change my oringial code example above to this to illustrate the same problem (the result of the code below is ‘crapstop’ showing):


    function curgi_group_import_init() {

    if ( !function_exists('bp_forums_new_forum') ) { echo "crapstop"; exit; }

    }
    add_action( 'bp_loaded', 'curgi_group_import_init' );

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Hi @henrywright. Thanks for responding.

    BTW, I want to apologize a little… for some reason I thought you were the author of the plugin… but Jeff Farthing is. That’s what I was picking on you (thought you said it was your plugin in another thread?).

    So with that being said – plus your response – i’m going to climb inside later and see if i can locate the issue. If anyone sees anything in the meantime, feel free to add to this thread. Either way, i’ll plan on updating the plugin’s support forum in some fashion soon (thanks @rosyteddy).

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Just wanted to say thanks (sorry for the delayed response) and i’ll look into this. Report back one way or the other.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Sorry, when i said “trying this one more time” I had difficulties posting this to the forum. Got white screen. So ignore that attitude.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Thanks. I’m holding to make sure this is what the client wanted, but i do eventually want to remove the unused avatar photos.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Think i figured it out. There was some read/write permissions on the folders – i changed everything to full permissions (this is on my local server) and it SEEMS to be working. I’m also noticing that no additional files are added “one level up” either. Still, no past avatar photos (-bpfull.jpg, -bpthumb.jpg) deleted.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Here’s the before (current avatars created the normal cropped BP way):

    https://dl.dropboxusercontent.com/u/14006840/before.png

    Here’s the after (notice the additional graphic one level up):

    https://dl.dropboxusercontent.com/u/14006840/after.png

    I’m looking over the code again top to bottom. If i understood how in this process BP knows where and what to look for in an avatar (filename wise), i properly wouldn’t be asking this stupid of a question.

    I’ll also take a look at bp_core_avatar_handle_upload ($file) as well.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    The old avatar images, generated by the normal BP avatar upload process. This is for a single user (the logged in user) only. The $args array seems good before the core cropping function is called.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Awesome. Thanks for clearing that up. :)

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Odd. I used the code you referred to in your first post and added a breakpoint. Saw the break on members directory but not on the group members page, which is why i concluded what i did.

    I’ll give your new example and the old one additional consideration though. Thank you VERY much for your reply and with any success, i’ll update this ticket.

    I personally hope my ticket request is considered though. :)

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Ok, you can’t mean edit BP Core… what exactly do you mean by manually?

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    @shanebp – those examples and hooks don’t apply to group member pages (which you assumed correctly, that’s what i’m currently playing with).

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Just for the record, I created the ticket: https://buddypress.trac.wordpress.org/ticket/5356#ticket

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Thanks guys. I’ll take a look at this today. Sorry for the late response. apparently the “notify me of follow ups replies via email” is taking a vacation.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    BTW, the sort in this instance is sorting with user meta. Not the best setup, I admit. But my point was that i want to be able to generate my own SQL and pass it back in somewhere along the line.

    And yes, using BuddyPress 1.9.1. and i’ve traced it all from the template all the way down. :)

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    i share @shanebp confusion, there’s no naming convention (in BP I can refer to a BP field by it’s ID or what i named it). I wish i knew more about the BP Integration Add On.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Not easily out of the box, from what I know. Why on the groups pages? Are you wanting a registration to be associated with the group that they registered from?

    If i had to do this, I would use either build a form and put it on the group’s home template or use a third party plugin like Gravity Forms to add a form via shortcode on the template. There are pros/cons to either method.

    If all you are doing is associating a group with a registration, then having a link to the BuddyPress registration page (via a querystring – say ?groupid=1 or ?groupname=test-group) and have that registration page include that group id in a hidden field (that gets added as a BP profile field upon submission/registration).

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Hey Joel,

    Feel Free to reach out to me – i might be interested, but I can help spread the word for you as well. Just to clarify that this is a paying gig… you used the magic words “this is a great opportunity” and in my experience, well… you know.:)

    My contact form is at davidbisset.com.

    Profile photo of David Bisset
    David Bisset
    Participant

    @dimensionmedia

    Thanks. I’m preparing some credentials. Will email you as soon as i have something for you.

Viewing 25 replies - 1 through 25 (of 97 total)