Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 401 through 425 (of 1,734 total)
  • @burtadsit

    Participant

    Here’s a good question for ya. Do you have any mods in bp-custom.php that mod the bp nav items? Like replace/modify them?

    I did. That’s why I was seeing it too. I turned off bp-custom.php temporarily by renaming it to something else and all works fine.

    :)

    @burtadsit

    Participant

    Hmm. Good question. You’re right doesn’t work.

    In reply to: News Control

    @burtadsit

    Participant

    alunsina, if you allow others to post to the main blog then then their posts will show up using the standard index.php template. When you select ‘blog’ from the home theme it runs a template called index.php. By default all posts in chronological order are displayed without any filtering by author. Whatever posts are most recent get displayed first. It doesn’t care who is the author.

    This really isn’t something that bp controls. It’s just normal blog behavior. You can change what index.php displays when it is run by modifying the index.php template. Or you can not allow other users to post to the main blog.

    @burtadsit

    Participant

    Where is your remove_action() call running in RC2? There is a filter now that might work better unless you are hooking up other menu items there also.

    apply_filters( ‘bp_admin_bar_logo_src’ …

    @burtadsit

    Participant

    Andy is aware of the issue and it’s on his massive list of things to do. Hang in there.

    @burtadsit

    Participant

    Ok, I surrender. I was wrong. Yes, changing the groups slug does trash the icons. I’m thinking to myself “These people are nuts. I just changed the BP_MEMBERS_SLUG to ‘boysinthehood’ and nothing changed”. I picked the only slug that doesn’t have a dependency in the member theme css for an icon.

    The member theme\’s userbar does bp_get_nav() which generates the html for the user nav bar. The individual nav items \’css_id\’ is the slug for each component. You change the slug you change the \’css_id\’ in the nav menu.

    This isn\’t a bug really. Its a side effect of having the flexibility to actually change the slug. The component slug is the only site wide identifier for a component.

    I don\’t see any easy way around this. The css defaults to what the component default slug is. Which is \’groups\’. Changing the slug invalidates the css.

    @burtadsit

    Participant

    How did you upgrade to 2.7.1 from download area or Site Admin > Upgrade?

    @burtadsit

    Participant

    I kinda figured that was the case. Sleeping at the kb and all. :)

    I wonder if people are actually running 2.7.1? I hit Site Admin > Upgrade and I\’m still on 2.7.1-beta1 but it happily goes thru and say success, done! It\’s not doing anything.

    The other problem is that 99% of bp users don’t have a test/dev site so any problems encountered are on a ‘live’ site.

    @burtadsit

    Participant

    Make sure you are updating your bp theme and it is in /wp-content/bp-themes

    Make sure you update the bp home theme

    Disable all other plugins

    @burtadsit

    Participant

    Not admin, site admin and nothing spectacular happens overtly. When you look at your tables with phpmyadmin do you see lots of tables of the format wp_user_xx_activity? One for each user on your site where ‘xx’ is their user id.

    @burtadsit

    Participant

    You don’t have to do anything except visit the back end admin area of wpmu logged in as site admin.

    @burtadsit

    Participant

    You have to visit the back end of wpmu as site admin to upgrade your tables to RC2. What it does is in sequence:

    1) Create a new site wide user activity table

    2) Move all the individual user activity table entries into the new site wide activity table

    3) Remove all the individual user activity tables

    4) Set a flag that this has been done in site options (meta) called ‘bp-activity-db-merge’

    bp-activity.php – bp_activity_install() Jeff.

    Did you visit the wpmu back end as site admin?

    @burtadsit

    Participant

    The action that triggers the ‘no linking’ workaround doesn’t exist in RC2. I made it easier to specify what fields you do not want linked. I haven’t tested this but it should work.

    function my_no_links(){

    remove_filter( ‘bp_the_profile_field_value’,’xprofile_filter_link_profile_data’, 2 );

    add_filter( ‘bp_the_profile_field_value’,’my_no_links_filter’, 2, 3 );

    }

    add_action(‘plugins_loaded’, ‘my_no_links’);

    function my_no_links_filter($field_value, $field_type = ‘textbox’, $field_id){

    $no_links = array(1,5,99);

    if ( in_array((int)$field_id, $no_links))

    return $field_value;

    else

    return xprofile_filter_link_profile_data($field_value, $field_type);

    }

    This is also up on http://buddypress.pastebin.com/f461fc21e

    Put the field ids that you do not want to have automatically linked in the $no_links array.

    @burtadsit

    Participant

    If you are running RC2 just go into the buddypress menu on the back end and disable the blogs and the groups components. BuddyPress > Component Setup.

    If not, then upgrade and then do that.

    @burtadsit

    Participant

    Jeff had it right the first time. You just need to supply the user id.

    bp_core_get_username( bp_the_site_member_user_id() );

    @burtadsit

    Participant

    FYI those filter calls I suggested were pulled directly from current bp code. I didn’t invent these things. There’s lots more and stuff under the hood that isn’t so obvious also.

    @burtadsit

    Participant

    I thought about the actual utility of pasting it there. One thing it does is get me thinking about the difference between programming for wpmu and wp.

    @burtadsit

    Participant

    This isn’t going to solve the problem completely. There has been a lot of added sanitization going on in bp. You really want to track these things down one by one?

    @burtadsit

    Participant

    In bp-xprofile-filters.php:

    add_filter( ‘bp_the_profile_field_value’, ‘wp_filter_kses’, 1 );

    Once again upgrading will be the best solution.

    @burtadsit

    Participant

    Upgrade would be the best solution. In the mean time, in bp-groups-filters.php add this:

    add_filter( ‘bp_group_name’, ‘wp_filter_kses’, 1 );

    @burtadsit

    Participant

    Calls to add_action() that don\’t have a priority have a default priority of 10. If the add_action() call you want to remove doesn\’t have a priority don\’t specify a priority. remove_action() will work fine.

    Priorities are how bp arranges the admin bar menu items. If you look at the bottom of the bp-core-adminbar.php you\’ll see all the add_action() calls have a priority. They all respond to the same event which is \’bp_adminbar_menus\’. Each of them has a different priority assigned to it and they are triggered in the sequence of their priority. Want to rearrange the menu or slide something in between bp\’s menu items?

    remove_action() them and then add_action() them again with different priorities for a different arrangement of menu items.

    Have fun. I\’m done for the day.

    @burtadsit

    Participant

    What I’m describing here is one method to alter bp’s behavior without modifying the core code. You can replace *any* bp function that responds to an action with the procedure similar to the one above.

    1) Determine where in the code your modification must be made. If the function that you need to modify is triggered by an action with something like: add_action(‘some_action’,’the_function_i_want_to_modify’); then you can replace it and modify the code to your hearts content.

    2) Make a copy of the function, calling it something else of course.

    3) Unhook the original function, preventing it from responding to the action.

    remove_action('some_action','the_function_i_want_to_modify')

    4) Hook your new function in the same manner as the old function. Replacing the call to the original function with a call to your new function.

    add_action('some_action','my_replacement_function')

    5) Make changes to the replacement function that suits you.

    One tip here. Functions get registered with wp to respond to actions with the add_action() call. The format you’ll see quite alot is:

    add_action('action_name_to_hook', 'function_to_call')

    You will also see:

    add_action('action_name_to_hook', 'function_to_call', 99)

    The 99 at the end there is the priority for the function call ‘function_to_call’. Think of it like this. If more than one function wants to hook ‘action_name_to_hook’ then wp queues them up and executes those functions in the order in which they were registered. To control when a function gets triggered by an action, the priority is taken into account.

    Functions with priority 1 get triggered before functions with priority 10. If a bp function registers itself with an action and specifies a priority then the only way to remove that function and replace it is to specify the removal with the same priority.

    The call above to add_action(…, 99) can only be removed with a remove_action(…, 99)

    @burtadsit

    Participant

    Limiting the creation of blogs to certain user roles such as Site Admin

    This thread describes how to modify the both the admin bar and the member theme navigation functions using bp-custom.php. No core mods needed. It can give you an idea of how to modify any bp function that responds to an action.

    https://buddypress.org/forums/topic.php?id=2283

    @burtadsit

    Participant

    @Tutsie, upgrade to RC2/trunk. That feature was added some time ago.

    @Hyrxx, you’d have to move the logo into the actual <ul><li> structure of the menu itself. Right now it sits outside of that. It’s not really part of the menu as of now. I just finished doing a tutorial on altering the admin bar as part of this thread: https://buddypress.org/forums/topic.php?id=2283

    Believe it or not I’m getting kinda burned out on the admin bar. I know it’s one of the most visible aspects of bp. It is also one of the easiest ways to allow your users to navigate to important areas of your site. I just don’t have time to tackle that right now. I have a project I’m working on that needs attention.

    @burtadsit

    Participant

    Back from break. Since I\’ve been creating this stuff out of thin air and it might be a good time to test this. brb.

    Well, something went right today. This seems to work. I had to add a hook for the \’wp_footer\’ action that actually triggers the admin menu. The code in a copy/paste format is available here:

    http://buddypress.pastebin.com/fce770ad

    Copy and paste that into your bp-custom.php file. You can then alter the minimal logic in the function my_can_user_create_a_blog() to determine who and when people can see the \’create a blog\’ menu items scattered throughout bp.

    Let me know how this works for you or if I’ve missed anything.

Viewing 25 replies - 401 through 425 (of 1,734 total)
Skip to toolbar