Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 476 through 500 (of 838 total)
  • Author
    Search Results
  • #155669
    bp-help
    Participant

    Add this to bp-custom.php https://codex.buddypress.org/developer/customizing/bp-custom-php/
    and it will prevent non-logged in users from accessing BP pages.
    `
    /* Block BP Pages For Non-Logged In Visitors */
    function bp_block_pages() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    // add components to be blocked to non-logged in visitors
    if(!is_user_logged_in()) {
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    } // Change /register to the page you want non-logged in visitors directed to
    }
    }
    add_filter(‘get_header’,’bp_block_pages’,1);
    /* End BP Blocked Pages */
    /* Remove RSS Feeds */
    function bp_remove_feeds() {
    remove_action( ‘bp_actions’, ‘bp_activity_action_sitewide_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_personal_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_friends_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_my_groups_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_mentions_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_favorites_feed’, 3 );
    remove_action( ‘groups_action_group_feed’, ‘groups_action_group_feed’, 3 );
    }
    add_action(‘init’, ‘bp_remove_feeds’);
    /* End Remove RSS Feeds */
    `

    MatthewByrom
    Participant

    Hi, @shanebp

    Oh no, not all this is happening in the one customised plugin. I was simply describing what appears to be happening in the system as a whole when you hit the Submit button in the customised post. This thing is one tortured mass of plugins. 🙁

    The Custom post page is generated by Gravity Forms. This is the plugin that handles creating a post & saving it.

    The Add-a-Post-to-Activity-Stream-so-it-sends-an-Email-Like-an-Update is provided by a custom plugin that extends the functionality of BuddyPress Group Email Subscription.

    It just seems that the timing’s out a bit.

    If I can make the postmeta handling occur before the post is added to the Activity Stream, then all will be well, as my own trivial addition to this will be fine.

    I’ll take a look at wp_mail. I thought that Buddypress may override what happens in there.

    Thanks for that & apologies for posting in the wrong part of the forum. Just noticed that.

    #154020
    bp-help
    Participant

    define(‘BP_DEFAULT_COMPONENT’,’groups’);
    you put this in bp-custom.php and that should set it. example:
    define(‘BP_DEFAULT_COMPONENT’,’profile’);
    or
    define(‘BP_DEFAULT_COMPONENT’,’activity’);

    #153986
    bp-help
    Participant

    @fatche@bluelf, @modemlooper removed this plugin from the repository unfortunetly! you could try creating a bp-custom.php file in yoursite/wp-content/plugins directory and add the following between opening and closing php tags:

    define(‘BP_DEFAULT_COMPONENT’,’groups’);
    global $bp;
    $bp->bp_nav[‘profile’][‘position’] = 20;
    $bp->bp_nav[‘forum’][‘position’] = 30;
    $bp->bp_nav[‘posts’][‘position’] = 40;
    $bp->bp_nav[‘activity’][‘position’] = 50;
    $bp->bp_nav[‘blogs’][‘position’] = 60;
    $bp->bp_nav[‘friends’][‘position’] = 70;
    $bp->bp_nav[‘messages’][‘position’] = 80;
    $bp->bp_nav[‘groups’][‘position’] = 10;
    $bp->bp_nav[‘settings’][‘position’] = 90;
    }
    add_action( ‘bp_init’, ‘tricks_change_bp_tag_position’, 999 );
    }
    add_action( ‘wp_head’, ‘tricks_change_bp_tag_position’,9 );

    The numbers in increments of ten correspond to the order in which they will be listed in the navigation.

    #153952
    bp-help
    Participant

    Try this plugin:
    https://wordpress.org/extend/plugins/restricted-site-access/

    `
    Just place this between opening and closing php tags in the bp-custom.php file:

    `
    On the below line you can change the /register to the page you want them redirected too!
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    For example:
    wp_redirect( get_option(‘siteurl’) . ‘/activity’ );

    #153935
    mhannor
    Participant

    So I placed this in wp-content\plugins\bp-custom.php

    Then I added:

    function bp_guest_redirect() {

    global $bp;

    if ( bp_is_activity_component() || bp_is_groups_component() /*||

    bbp_is_single_forum()*/ ||bp_is_forums_component() ||

    bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {

    // enter the slug or component conditional here

    if(!is_user_logged_in()) { // not logged in user

    wp_redirect( get_option(‘siteurl’) . ‘/members-2’ );

    } // user will be redirect to any link to want

    }

    }

    add_filter(‘get_header’,’bp_guest_redirect’,1);

     

    That didnt help the pages still show

    #153925
    Kevin M. Schafer
    Participant

    @mercime I understand what you’re saying, I really do. I tried everything. When I was able to successfully activate BP 1.7 beta, I received multiple posts on the activity stream — four of them right in a row. Here’s the really weird part. When I went to the BP default theme and posted from there, the little button wouldn’t appear to post the text. My site had some severe issues. It tried to, and a hard refresh sometimes made it appear. After making a post, the button disappeared again.

    I ultimately reverted back to the Stable BP version, and everything worked fine. Then, to make sure I won’t face an upgrade issue down the road when the new release is issued, I uploaded everything from scratch. Totally wiped it all clean and created a new database with a different name.

    I know this solution sounds like turning off a computer with the button on the tower — a big no no for professionals, but I’m still learning. A week ago I could barely navigate my multisite, and today I’m really moving through it. I even created custom page names this time to assign to BP.

    Last week after I installed BP 1.7 beta, I tried several times to change me permalinks. Mostly due to appearance and robot spam (renaming register page to something else).

    A new install today has afforded me the chance to really make a good solid base for any and all WordPress and BuddyPress upgrades in the future.

    I’m really learning a lot about databases and domain add-ons (for clean URLs). This past week I’ve taught myself to use cPanel for almost everything. I use FileZilla now for mostly uploading zip files.

    I hope I don’t wear out my welcome here with my issues. I really appreciate everyone’s help. I find myself often reading posts that are two and three years old. All informative. It’s all very interesting, and I’m really learning a lot.

    Thank you for your time. I really appreciate it.

    Kevin

    #153746
    @mercime
    Participant

    @creativepixels There’s still hope. I overlooked the fact that you already went through the Appearance > BP Compatibility process. So here’s what you’ll do:

    – Deactivate BP template pack plugin

    – Remove the 6 BuddyPress folders transferred to your supreme theme’s folder in wp-content/themes/supreme-theme folder namely: /activity, /blogs, /forums, /groups, /members, and /registration.

    – Clear cache and check your BP pages now.

    #153609
    bp-help
    Participant

    It stripped the code again. Just place this between opening and closing php tags in the bp-custom.php file:
    `
    function bp_guest_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    // enter the slug or component conditional here
    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    } // user will be redirect to any link to want
    }
    }
    add_filter(‘get_header’,’bp_guest_redirect’,1);
    `

    #153487
    Anonymous User 7600456
    Inactive

    Hooray! I worked it out in the end.

    Here is how I did it:

    1, If you don’t already have one create a blank page in ‘/wp-content/plugins’ called bp-custom.php (see this page for more info)

    2, Paste this code into bp-custom.php: http://pastebin.com/Sk56iQQU

    For reference these are the pages that helped me work it out:

    https://buddypress.trac.wordpress.org/ticket/4784

    https://buddypress.trac.wordpress.org/ticket/4106

    https://codex.buddypress.org/developer/customizing/bp-custom-php/

    Edit: I can’t get the ‘code’ tags to work. I have put it in a pastebin. Mods feel free to edit this to work and delete this note and the link to pastebin.

    #153326
    Unsal Korkmaz
    Participant

    Well..
    I found my problem..
    Btw it seems it was a misunderstood that i was trying to show it on blogs directory as latest post.. Seems my problem is post_type = ‘post’ is hardcoded on buddypress:

     $paged_blogs[$i]->latest_post = $wpdb->get_row( "SELECT post_title, guid FROM {$blog_prefix}posts WHERE post_status = 'publish' AND post_type = 'post' AND id != 1 ORDER BY id DESC LIMIT 1" );
    

    This is just.. wrong. Why not use {$blog_prefix}bp_activity table? why trying to connect to {$blog_prefix}posts?

    #152445
    Mitesh Patel
    Participant

    Thanks @ubernaut. Yes, that’s a nice idea, but I do want to use site-wide forums.

    The page structure is like this, but with more pages

    Home
    About
    Community
    -Forums
    -Groups
    -Activity
    Contact

    Anyway, I don’t think it’s going to be possible without some devine intervention :), as I noticed in testbp.org site, the ‘discussion’ menu is highlighted only when you select it (the page is forum-index). When you go any deeper (select a forum or a topic), the highlight get’s lost, so the issue is, the custom menu is not able to acquire/implement the hierarchy info, which may or may not have been provided by bbpress itself.

    The same problem is there with the link you posted as well. On the other hand, all the buddypress menus and sub-menus and sub-sub-menus can correctly highlight the parent ‘community’ page. So, it’s a bbPress/forum specific issue.

    #151629
    Clive Hetherington
    Participant

    I’ve found that somewhere down the line a decision was made to only allow comments from posts into the activity stream.

    My comments disappeared from activity because 99% of my comments are from pages.

    I’m presuming this change was made to accommodate custom post types. I’d suggest that as these types of decision can sink the entire reason for a BP installation (in some cases) that they should be made with some thought or perhaps even a community vote?

    Can BP make this an OPTION in the next version please?

    Perhaps there should be an option to include or exclude each of the standard wp custom types on installation?

    #151456
    danbpfr
    Participant

    hi @fitnessblogger,

    use this in wp-content/plugins/ bp-custom.php
    (If you haven’t this file you have to create it first)

    Tested on 1.6.3

    `function bpfr_excerpt($text) {
    return trim($text,'[…]’);
    }
    add_filter(‘bp_activity_truncate_entry’, ‘bpfr_excerpt’, 3, 3 );`

    if you want to replace […] by ‘xxx’ you use this

    `function bpfr_excerpt($text) {
    return str_replace( ‘[…]’,’xxx’,$text );
    }
    add_filter(‘bp_activity_truncate_entry’, ‘bpfr_excerpt’, 3, 3 ); `

    Take care with copy/pasting from here. Quotes must be single quotes at least.

    #151068
    @mercime
    Participant

    @ciumbargi know that those who help out in these forums are all volunteers who generously do their best to assist others even though they are not paid to do so. It is indeed unfortunate that you see an advice about how to find the correct selectors in different browsers as a negative even after some assistance was already given for what was not quite clear in the request.

    As I see it, the issue is resolved in your site viewing it using Firefox. If it is not, then I advise you to post at the Pagelines forums and include info about what browser you’re using so that they can fix it … thereby benefiting the rest of the Pagelines customers.

    Have a nice day.

    #150490
    digitman2
    Participant

    Again, its not just the body class, as I said its the avatar as well, plus in future there might be other changes introduced which I’d like to be introduced in my custom pages as well. I don’t see why there can’t be a hook added to this function, it will be a one line change and its consistent with all the other hooks that are added.

    Is it your decision to add/not add a hook?

    #150027
    danbpfr
    Participant

    hi,

    see at the bottom of this page how to change avatar size
    https://codex.buddypress.org/developer/customizing/changing-internal-configuration-settings/

    #149120
    danbpfr
    Participant

    Hi,

    did you set the permalinks to something other than default. Should be done.

    Have you checked the yoast plugin ?

    The error is probably due to PHPSESSID cookie.

    Another cookie is comming from bp-activity-oldestpage. This is a custom setting  Check it ! The normal name is bp-activity

    #149097
    seppy
    Participant

    Hi @sbla

    On the groups pages (where the styling isn’t correct) it seems to still have in the ‘home’ class in your body tags (which has the transparent background)
    `body class=”single-item groups group-home home custom-background”
    `

    So it’s calling this CSS which you don’t want!
    `
    .home #wrapper {
    background-color: transparent;
    border: none;
    margin: 20px auto 20px auto;
    padding: 0;
    }
    `

    Where as the page that it is correctly styling hasn’t got “home” in the body classes.

    `body class=”directory activity custom-background”`

    How are you currently adding the ‘home’ class to body?

    `function add_home_class($classes) {
    if (is_front_page()) {
    $classes[] = “home”
    }
    return $classes;
    }
    add_filter(‘body_class’, ‘add_home_class’);`

    #148913
    peterjhead
    Participant

    Try this in bp-custom.php

    function bp_non_member_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {

    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option('siteurl') . '/register' );
    } // user will be redirect to any link to want
    }
    }
    add_filter('get_header','bp_non_member_redirect',1);

    NOTE: If your using sitewide forums instead of group forums you will need to remove the comment /* */ around:
    || bbp_is_single_forum()
    in the above code. Merry Christmas!

    #148340
    samanthar
    Participant

    Going to Members Works
    Going to Activity IE comes up with “Internet Explorer has stopped working” A problem caused the program to stop working correctly. Window will close the program and notify you if a solution is available. Close Program

    It does the above a couple of times before coming up with a blank page.

    WP 3.4.2
    Buddypress 1.6.2

    I havent tried changing themes as i am worried about losing all the current customizations, but will do if we have too

    #148193
    shanebp
    Moderator

    >a page where my users can be curators and have collections of custom posts

    CPs that they created ? Or created by anyone ?

    Usually a profile extension is used for this.

    But you say ‘outside of buddypress’ so you mean a WP page… ?
    Then, because you want it driven by activity_ids, write a custom query.
    Use each activity_id to find the user_id in the activity table, look for posts by that member in the posts table and show the results in a loop.
    Use 2 queries if you can’t write a JOIN.

    #148187
    designnz
    Participant

    Hi @shanebp, thanks for the reply. Im wanting to have a page where my users can be curators and have collections of custom posts (via activity_id). It will fall under its own page outside of buddypress with a special activity page for displaying items.

    #145524
    drill_sgt.lewis
    Participant

    Another simpler approach would be to created a bp-custom.php and place it in the plugins directory and add the following code
    `<?php
    function bp_guest_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    // enter the slug or component conditional here
    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    } // user will be redirect to any link to want
    }
    }
    add_filter(‘get_header’,’bp_guest_redirect’,1);
    ?>`
    This code will work to hide buddypress pages and group forums as is, if your using sitewide forums in line 4 remove the comments around:
    || bbp_is_single_forum()
    Save and refresh. Works in current versions.

    #145394
    gar976
    Participant

    I have a custom menu but created long ago. In buddypress settings the component directories are set to active pages for activity streams, discussion forums, user groups and members.

    Problem extends beyond this to main buddypress menu at top right of screen where profile edit etc are all blank too (not 404 page not found though). I have an active members widget in a sidebar which does actually work so i agree that it seems like a links issue – but the correct page URL displays when links are clicked.

Viewing 25 results - 476 through 500 (of 838 total)
Skip to toolbar