Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • stoi2m1
    Participant

    @stoi2m1

    Ok, not a bug

    The function that returns the HTML exists in the bp-legacy theme. In buddypress/bp-templates/bp-legacy/buddypress-functions.php

    So I copied the file into my child theme and modified it to act like I wanted.

    Problem Solved!


    stoi2m1
    Participant

    @stoi2m1

    I found the default theme was also showing issues which I missed.

    I had both Groups and Members as a Child Page to My Activity Page, named Community. This was causing both single members profiles and single groups to not work. Until I find a solution I have made them Main Pages (no parent assigned). Is there a way to set the slug? I found these deprecated constants, is there some new way?

    Deprecated Method in bp-custom.php use:

    define ( 'BP_MEMBERS_SLUG', 'community/groups' );
    define ( 'BP_GROUPS_SLUG', 'community/members' );

    From the following link:

    Changing Internal Configuration Settings

    I also found my other issue in bp-custom.php. Forgot all about that one.

    I created an aggregate feed called “My Feed” to display a more personal feed (which is working just fine). I used it on both the Activity in Profiles and the Main Activity Stream (site wide). I am using the following function to change the default sub nav for activities in profiles (Profile >> Activity >> Default Sub Nav) to “My Feed”. This works for profiles but causes the Site Activity to stop working.

    function gzp_set_default_activity_sub_nav() {
     
        bp_core_new_nav_default (
            array(
                'parent_slug'       => buddypress()->activity->id,
                'subnav_slug'       => 'my-feed',
                'screen_function'   => 'gzp_bp_my_feed_screen_activity'
            )
        );
    }
    add_action( 'bp_setup_nav', 'gzp_set_default_activity_sub_nav', 20 );

    stoi2m1
    Participant

    @stoi2m1

    Super weird. I disabled all of my plugins except Buddypress, Activated the Parent Theme and still had issues. Copied over the BP Default theme and things work.

    I have not changed anything in the parent theme, very odd that it seems to be the issue. Maybe some of this happened when I upgraded to the most recent WP and BP.


    stoi2m1
    Participant

    @stoi2m1

    I found that my custom post type and page Im using for the archive have the same slug. I have read in various places that this commonly causes a 404 error. I added a submenu item for single posts to display under the pages slug like so.

    $single_item_link = $bp->current_item;
    
    if ( bp_is_my_custom_component() && bp_is_single_item() ) {
    
    	// Reset sub nav
    	$sub_nav = array();
    	
    	// Add single music page but dont display in navigation
    	$main_nav = array(
    		'name'                => __( 'Single Music', 'bp-music' ),
    		'slug'                => $single_item_link,
    		'position'            => -1, // Do not show in BuddyBar
    		'screen_function'     => 'custom_component_screen_single',
    		'default_subnav_slug' => $this->default_extension,
    		'item_css_id'         => $this->id
    	);
    }

    This menu item loads a function in the screens file of the component

    function custom_component_screen_single() {
    	
    	if ( ! bp_is_single_item() )
    		return false;
    	
    	$bp = buddypress();
    
    	do_action( 'custom_component_screen_single' );
    
    	
    	bp_core_load_template( apply_filters( 'custom_component_screen_single', 'custom-component/single/home' ) ); //this loads a template file within the template folder of the component or within the theme
    	
    }

    And for now all is good. I would still like to find a way to load my custom taxonomy into the permalink structure so things would look like this.

    mydomain.com/custom-component/custom-taxonomy/single-item

    If anyone has any ideas on how I can get this to work as well please let me know. My guess is I could make another menu item to capture that instance and if the genre exists then it loads a template file. Then I need to find a way to make sure a single item and a custom taxanomy dont end up with the same name.

    Thanks,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    I dont have a pre_get_posts for other post types I have defined, but those also do not have a bp component associated with them (those display just fine). I do not have a single-music.php file nor do I have a single-track.php file, however when I change my slug to track all is good. Like I said all of this worked in a previous theme I was using but now that I am writing a new theme things are not working for my single posts only for this custom post type which has an associated bp component and a page called music which this component is associated with.

    Thanks,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    Im finally getting back to this issue. I dont mind sharing my code. What part do you need to see?


    stoi2m1
    Participant

    @stoi2m1

    Well it seems if I just removed the need for comments to be paged my problem is solved. So for now thats what I have done. I have no idea if I am ever going to need them paged, but if I did does anyone have any feedback.

    I thinking I just add a subnav item into my component to handle the comment pages allowing it to be a variable or something been a while since I dabbled in there, and then probably give the subnav position value a negative value so its just not present on the subnav. Is this a solution? Is there a better or more proper way of doing this?

    Thanks,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    @modemlooper I am very familiar with that process and even reverting back to default theme to ensure things are working well at the basic level. However I have quite a few dependencies within my theme which require various functions from various plugins. If I go through and disable plugins and or the mu folder the theme will hardly load.

    I could add a pile of if statements to ensure the plugins and/or functions are available, but is there another option to find if there is a javascript conflict? Like looking for multiple versions of jQuery being loaded or???

    Jesse


    stoi2m1
    Participant

    @stoi2m1

    @henrywright Not quit.

    In global.js there is a line at line 376 jq(‘form.ac-form’).hide();

    Which on page load hides all of the comment boxes.

    Now when I click on the load more button at the bottom of the page (or one of the .item-list-tabs) new or more Buddypress content is loaded. One of the issues I am having is the comment forms are not being hidden on this new or added content. It is some what a comment issue when not proper calling the .click() function and a .on() or .live() function should be used instead. I have tried a couple of things I have read about causes for Ajax loaded content which doesnt have the existing javascript in the page applied to the newly loaded content, but nothing has worked. So I figured this might be something specific to the Buddypress plugin or something commonly interfering with it.


    stoi2m1
    Participant

    @stoi2m1

    from what i can tell in the template.php bp_example_has_items() function it checks the items_template to be empty and runs a query if so. If a page has been fetch the template is not empty and the same results are returned.

    I just passed the page variable and compared it to the items_template and made it null if the page was different


    stoi2m1
    Participant

    @stoi2m1

    Thanks for the article although it didnt have my answer it did help push me in a decent direction.

    I found that because my $item_template was already filled with the current pages data I had to compare the posted page to the current page and clear the variable if posted page was different then the current. Then my args would be evaluated and the query would be ran. Im sure this has to do with something with the skeleton custom component being set up a little different then the buddypress core components. Ive looked and compared and now that I have my queries working Im not really interested in why they are different.


    stoi2m1
    Participant

    @stoi2m1

    I have my custom component working with a custom post type. I found the tutorials written for the development of bp-checkins quite helpful. Info for others needing info on how I accomplished this can be found in these files ExtendBuddyPress-part1.pdf and ExtendBuddyPress-part2-en.pdf.

    I looked into the achievements plugin but couldn’t find if or how they were using taxonomies in the url of a custom component.

    Ive been thinking it might be easier to use subnavs and actions to accomplish what I want.
    Using a URL like this:
    http://www.domain.com/music/type/mix
    or
    http://www.domain.com/music/genre/rock-n-roll

    Where music is my component, type/genre is my subnav slug and mix/rock-n-roll is my action.

    This would give me a way to create an archive page for mixes/rock-n-roll. I would use a negative value for the position so the subnav is not visible on subnav menu.

    Are there any side effects or things I should be concerned with when using this method, like how would I implement pagination of the results or how to keep someone from creating a music item that is the same name as the subnav slugs i am using.

    Thanks,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    I dont think I shared enough info in my original post Im working with a custom component which uses a custom post type.

    Ive now got this working. The custom loop to I was using display posts within the pages of my component had some issues.


    stoi2m1
    Participant

    @stoi2m1

    I captured the ajax variable $_POST[‘page’] into a php variable within my ajax callback function. Where I am using locate_tempalte to insert my content area and loops.

    Now Im trying to get the page variable into the next iteration of my bp_component_has_items function. This is where Im pretty sure Im going about things the wrong way because I have found that my $item_template is not empty so Im not fetching the next page of posts.


    stoi2m1
    Participant

    @stoi2m1

    Update: Looks like I was missing a couple query args within my class for paged and per_page. Now I can enter the url manually and show the proper results with the proper pagination links displayed.

    Now my issue is getting things working with ajax. Im familiar with using wp_ajax_my_action. Im using this to determine what action item Im on and calling the proper template file. What Im having an issue with is passing the page variable to that template file and then my class.

    Jesse


    stoi2m1
    Participant

    @stoi2m1

    When I found Buddypress Media I was 50% on the way to having my own custom component developed and it sounded impressive but… I was hoping for so much more and when i fell short. For starters, I have my own custom player for the site, couldnt tie into well, and playlists where hurting. Ill just stop there.

    I just decided to continue building my own so… back to my question. Trying to add in custom taxonomy and post meta into the URL.

    I used the buddypress skeleton component to build my music component. Id say its about 80% done now. Really just looking for help to getting custom taxonomy and possibly post meta into the music component url.

    Thanks,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    Well I finally got this working.

    I had to setup a main menu item with a position of -1 which had a sub menu item set to the post_name (slug) of the post I wanted to display. I then had to setup a screen function to display it and then a template file for the content.

    All is good to this point, but I have just realized it might make since to add in some the genre and other custom taxonomy into the URL for sorting and filtering the music buy genre and music type. I have two music types (tracks and mixes) currently saved as post meat, but could be converted to a custom taxonomy if it will allow for better filtering. And I have a custom taxonomy called genre.

    How could I add these into my URL so it would look like this,
    http://www.domain.com/music/track-or-mix/genre/music-title

    Any feedback or guidance would be awesome,
    Thanks,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    BP uses an addition hook to add the bp_menus to the admin area
    add_action( 'admin_footer', 'bp_core_admin_bar' );
    i think this is missing form the codex

    To also add or remove bp_menus use the following hook
    add_action('admin_footer','my_alter_bp_adminbar');

    Good Luck,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    A little more info…

    The issue is specific to the dashboard and its on both the main blog and sub blogs. There are two parts which I can not get removed from the dashboard. They are the Dashboard menu and the Visit menu.

    Thank You,
    Jesse


    stoi2m1
    Participant

    @stoi2m1

    So I have managed to list all of the profile fields by including the edit.php file from my buddypress theme.

    I have then tried to trick the $bp object into looking like its setup for the profile component and edit action by setting the follow items like so:

    `$bp->current_action = ‘edit’;
    $bp->current_component = ‘profile’;
    $bp->displayed_user->ID = $user_id;
    $bp->displayed_user->userdata = $bp->loggedin_user->userdata;`

    How do I get the fields to populate with the current users data?


    stoi2m1
    Participant

    @stoi2m1

    Im using Buddypress version 1.5.1.

    I do not believe I have any membership plugins activated.

    The only thing I am doing is limiting each user to a single blog, auto creating that blog without user interaction and then auto assigning that member to the main blog.

    Edit: This is not happening to all of my members. Only recent ones, possibly after an upgrade of WordPress and Buddypress a few months back.


    stoi2m1
    Participant

    @stoi2m1

    Does anyone have any idea what would cause subscribers of a blog to have that blog listed as theirs too on the blogs component page?


    stoi2m1
    Participant

    @stoi2m1

    *bump


    stoi2m1
    Participant

    @stoi2m1

    I am only giving them subscriber.


    stoi2m1
    Participant

    @stoi2m1

    @feedmymedia where did you place this code to create the gallery page?

    Thanks, Jesse

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