Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 23 replies - 1 through 23 (of 23 total)

  • kizinko
    Participant

    @kizinko

    SOLUTION: I know this is an old post, but I figured I’d share that I found a solution in case anyone else stumbles across this thread. The solution that worked for me was simply re-saving my permalink structure at Settings > Permalinks.

    Not sure if other permalink structures will have issues, but mine is set to “/%postname%”.


    kizinko
    Participant

    @kizinko

    It was the php.ini file. Thanks.


    kizinko
    Participant

    @kizinko

    Thank you, but still having problems. :-(

    I removed everything from the server and started over. I completed the BuddyPress Setup steps and when I clicked Finish & Activate I got the same 500 error.

    Afterwards I updated wp-config.php, the .htaccess file, & upped the memory limits for the site. I tried in different browsers, but to no avail. I don’t have access to my php.ini file, so I’m hoping that’s not the problem. The site seems to be working fine, but the dashboard is still not functional.

    Here are the errors I got from the error log:
    [Thu Feb 09 18:21:21 2012] [warn] mod_fcgid: stderr: PHP Fatal error: Call to undefined function bp_is_active() in /home/httpd/vhosts/mydomain.com/httpdocs/wp-content/plugins/buddypress/bp-core/admin/bp-core-admin.php on line 45
    [Thu Feb 09 18:21:21 2012] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
    [Thu Feb 09 18:21:21 2012] [warn] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/httpd/vhosts/mydomain.com/httpdocs/wp-admin/includes/screen.php on line 480
    [Thu Feb 09 18:21:35 2012] [warn] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /home/httpd/vhosts/mydomain.com/httpdocs/wp-admin/includes/screen.php on line 395
    [Thu Feb 09 18:22:20 2012] [warn] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /home/httpd/vhosts/mydomain.com/httpdocs/wp-admin/includes/screen.php on line 395
    [Thu Feb 09 18:22:31 2012] [warn] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/httpd/vhosts/mydomain.com/httpdocs/wp-admin/includes/screen.php on line 51

    Please forgive my idiocy, but I have no clue what to make of that. Please help! :-) Are you able to tell what the problem is from those error logs?

    Thanks again!


    kizinko
    Participant

    @kizinko

    I have been trying a bunch of stuff, but I’m not even sure if I’m doing it right. Does this look right to you?

    if ( $bp->current_component != $bp->activity->slug || $bp->current_component != $bp->members->slug || is_null($bp->current_component) )

    On the home page the value of $bp->current_component is NULL.


    kizinko
    Participant

    @kizinko

    Well, thank you anyway for trying. Does anyone else have any ideas?


    kizinko
    Participant

    @kizinko

    No such luck.

    I replaced
    `if ( $bp->current_component != $bp->activity->slug )`
    with
    `if ( $bp->current_component != $bp->activity->slug || $bp->current_component == $bp->members->slug )`
    and the individual user activity still doesn’t show the activity from the selected groups.

    More importantly though, the content I’m trying to hide is still showing up on the home page. It is only being hidden from the individual user’s activity.


    kizinko
    Participant

    @kizinko

    Just realized that the code above works on an individual user’s activity stream (e.g. …/members/*username*/activity/groups/). It hides the activity from the group I want to hide, but I don’t want to hide it from here. I actually do want it to show up in the user’s activity stream, but not on the home page where all activity is displayed from every public group.


    kizinko
    Participant

    @kizinko

    Hey,

    I tried the following code from your post above, but it still isn’t working. :-( The activity from the group I’m trying to hide is still showing up on the home page.


    function bp_my_activity_filter( $a, $activities ) {
    global $bp;

    if ( $bp->current_component != $bp->activity->slug )
    return $activities;

    foreach( $activities->activities as $key => $activity ) {
    if ( $activity->type ==’activity_update’ && $activity->item_id == ‘131’ ) {
    unset( $activities->activities[$key] );
    $activities->total_activity_count = $activities->total_activity_count – 1;
    $activities->activity_count = $activities->activity_count – 1;
    }
    }

    $activities_new = array_values( $activities->activities );
    $activities->activities = $activities_new;
    return $activities;
    }
    add_action( ‘bp_has_activities’, ‘bp_my_activity_filter’, 10, 2 );

    I added the new file /wp-content/plugins/bp-custom.php. I got the group id by adding bp_group_id() into groups-loop.php which is 131 as dictated in the code above. I did a test and removed the first if statement, and it removed all of the activity on that group’s page successfully. Everything from that group was still visible on the home page though.

    By the way, thank you soooo much for helping me with this. I am totally lost on this thing.


    kizinko
    Participant

    @kizinko

    You can hide it using CSS.

    #members-personal-li {display:none;}


    kizinko
    Participant

    @kizinko

    Ok, so I definitely typed code in those back ticks from the post above, but it didn’t show up. The code without the php tags surrounding it is:

    while ( bp_activities() ) : bp_the_activity();
    if(bp_get_group_name() != ‘Failed SundayS’ ) :
    include( locate_template( array( ‘activity/entry.php’ ), false ) )
    endif;
    endwhile;


    kizinko
    Participant

    @kizinko

    Ok, so I finally got the code to do something without breaking the site, but it did the opposite of what I need. It still shows the posts on the home page for the group that I’m trying to hide, but the activity stream for that group no longer shows those posts…lol. I need the home page to hide those posts and the group activity stream for that group to show it’s own posts.

    The code I used is as follows:

    It is located in the file /buddypress/bp-themes/bp-default/activity/activity-loop.php. I am guessing I’m just working in the wrong file. Can anyone help me find where I need to insert this code (if it is even right)?


    kizinko
    Participant

    @kizinko

    Hello modemlooper,

    Thanks for your response. I still can’t quite get it to work though. I am not very good with PHP yet, so I assume it is my terrible coding. Here is how I tried to incorporate it into /buddypress/bp-themes/bp-default/activity/activity-loop.php:

    while ( bp_activities() ) : bp_the_activity();
    if(bp_get_group_name() != ‘Failed Sundays’ )
    include( locate_template( array( ‘activity/entry.php’ ), false ) )
    endif;
    endwhile;

    What am I doing wrong? Am I even in the right file?

    Sorry for being such a noob…..


    kizinko
    Participant

    @kizinko

    while ( bp_activities() ) : bp_the_activity();
    if(bp_get_group_name() != ‘Failed Sundays’ )
    include( locate_template( array( ‘activity/entry.php’ ), false ) )
    endif;
    endwhile;

    What am I doing wrong?


    kizinko
    Participant

    @kizinko

    Hello modemlooper,

    Thanks for your response. I still can’t quite get it to work though. I am not very good with PHP yet, so I assume it is my terrible coding. Here is how I tried to incorporate it into /buddypress/bp-themes/bp-default/activity/activity-loop.php:

    What am I doing wrong? Am I even in the right file?

    Sorry for being such a noob…..


    kizinko
    Participant

    @kizinko

    First thing, you need a child theme if you haven’t already created one. Doing a quick search online should find directions on how to do it if you need.

    Second, In that child theme you need a CSS file to make changes to your buddypress site’s style.

    Third, there is a buddypress file called default.css where all the default styling is set up. In many cases your CSS file and the default file will have conflicts, but not to worry…there is a solution.

    Using code from karmatosed from above, I’ve added a couple of modifications.
    a, a:link{color: #ffffff !important;}
    a:visited{color: #ffffff !important;}
    a:hover{color: #ffffff !important;}

    Hope this helps!


    kizinko
    Participant

    @kizinko

    *bump again* :-/


    kizinko
    Participant

    @kizinko

    *bump*


    kizinko
    Participant

    @kizinko

    Are you referring to a post in the activity feed or to a WordPress post being displayed in BuddyPress?

    Do you want to edit the content or the style of the post?


    kizinko
    Participant

    @kizinko

    Yes, what wilfil said will change the link color to a darker blue, but if you want more control over how dark it will be you can replace the word “blue” in his code “a {color:blue !important;}” to a hexadecimal value.

    After doing a quick google search I found http://www.2createawebsite.com/build/hex-colors.html. Scroll down to the color box and after you select the color just copy and paste the hex value from the bottom right of that box. You will need to include the “#” along with the six digits that follow it in your code.

    Example:
    a {color:#0C19A2 !important;}

    To further explain the “!important” exclamation, it just allows you to override CSS properties already assigned to an element. In this case the color property is being overridden from the default.css blue (which has already been set by buddypress) to your newly assigned color for the “a” element.

    Hope this helps!


    kizinko
    Participant

    @kizinko

    I was able to find the file causing the issue after renaming the /buddypress/ folder to /buddypress-abc/.

    After gaining access to the admin board I started deleting files one at a time and found that if I delete bp-forums.php in the main buddypress directory the dashboard problem was solved. That is, I was able to have buddypress working at the same time as my dashboard.

    I never installed a beta version. All I did was click the “enabled” option for forums in the Component Setup area of buddypress settings in the dashboard. Now that I’ve deleted the bp-forums.php file, that option is no longer available in my dashboard.

    If at all possible, I would love to be able to re-enable it if I can figure out how to get it to actually work. But if I upload the file back then the admin breaks again. Any ideas?


    kizinko
    Participant

    @kizinko

    *bump*

    Someone please help! I am completely without a wordpress admin dashboard and can’t continue working on the project until it is back up.


    kizinko
    Participant

    @kizinko

    This fix may not work for you, but what I did was I changed the header.php file by commenting out the following line (it was line 79 for me) like so:

    
    
    

    Then I manually added new links to my pages:

    
    <li><a href="http://yourwebsite.com/your-first-page/" title='Example Page 1'>Example Page 1</a></li>
    <li><a href="http://yourwebsite.com/your-second-page/" title='Example Page 2'>Example Page 2</a></li>
    

    It may not be the best way for you, but it definitely works.

    Hope this helps!

    Brandon~

    Home


    kizinko
    Participant

    @kizinko

    I took this issue to a buddy of mine and he found the answer. The first thing you need to do is create an anonymous user. Then access your database and find the user_id value for that user. In this example the user_id is 7. You’ll notice in the last step that we are setting the user_id to 7 if no one is logged in.

    wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
    Comment out line 118
    `
    /*if ( !is_user_logged_in() ) {
    echo ‘-1’;
    return false;
    }*/
    `

    wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/activity.php
    Pull locate_template out of if statement line 31

    wp-content/plugins/buddypress/bp-groups.php
    At line 1952 add
    `if( empty($user_id) )
    $user_id = 7;`
    And
    `
    if ($user_id != 7)
    {
    /* Be sure the user is a member of the group before posting. */
    if ( !is_super_admin() && !groups_is_user_member( $user_id, $group_id ) )
    return false;
    }
    `

    All of the credit goes to Jonathan Creamer from jcreamerlive.com!

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