Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 601 through 625 (of 831 total)
  • Author
    Search Results
  • #118088
    sidjags
    Member

    @r-a-y @kateM82 what you guys suggested for “favoriting” posts from across a network worked great… but it doenst hold good with bp 1.5 beta 2… i still have the same code in bp-custom.php in the plugins folder… and i still have the same code in single.php… when i mouseover the link it does show me a “post id”… so thats not the problem.. and it does say… domain.com/activity/favorite/POST_ID/xxx …. so what then is the problem!? Could it be that in 1.5 beta 2… u have to assign a “page” for activity… and thats why its not working right?

    #117757
    Paul Wong-Gibbs
    Keymaster

    If you think it’s a theme, you could try emptying functions.php to remove any custom code in there?

    #117525

    you can simple put the followung code into your theme function.php without editing core file.

    /*Change the number of activity items to show per page */

    `function my_custom_query_filter( $query_string ) {
    $query_string .= ‘&per_page=11’;
    return $query_string;
    }
    add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_custom_query_filter’ );`

    worked for me

    Sarah Minx
    Member

    Hey there,

    Thanks for your reply.

    I just tried this… I even changed the structure, saved, and changed it back to my current settings of: Day and name (http://totallymi.com/2011/07/26/sample-post/)

    1. Which version of WordPress are you running? 3.2.1
    2. Did you install WordPress as a directory or subdomain install? Totallymi.com
    3. If a directory install, is it in root or in a subdirectory? Root
    4. Did you upgrade from a previous version of WordPress? If so, from which version? 3.2
    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. Not an issue with WordPress (Yes)
    6. Which version of BP are you running? Updated to 1.2.9 last night
    7. Did you upgraded from a previous version of BP? If so, from which version? Whatever version was used a month or two ago, downloaded from WP Plugins site.
    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    Akismet | Version 2.5.3
    BuddyPress | Version 1.2.9
    BuddyPress Activity Comment Notifier | Version 1.0.3
    BuddyPress Activity Plus | Version 1.2
    BuddyPress Activity Stream Bar | Version 1.3.2
    BuddyPress Backwards Compatibilty | Version 0.6
    BuddyPress Gifts | Version 1.1
    BuddyPress Live Notification | Version 1.0
    BuddyPress Template Pack | Version 1.1.3
    BuddyStream | Version 2.1 | By Peter Hofman | Visit plugin site
    CubePoints | Version 3.0.3
    CubePoints Buddypress Integration | Version 1.9.2
    Dynamic Widgets | Version 1.4.1
    Google +1 | Version 1.0.4
    GTranslate | Version 1.0.26
    Sidebar Login | Version 2.3.2
    WordPress e-Cards | Version 0.1
    WP-DownloadManager | Version 1.60
    WP-Memory-Usage | Version 1.2.1
    WP-Polls | Version 2.61
    Zazzle Store Gallery | Version 1.0
    9. Are you using the standard BuddyPress themes or customized themes? Arras 1.5.1.1 custom
    10. Have you modified the core files in any way? Just theme related files
    11. Do you have any custom functions in bp-custom.php? No
    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? Don’t think so
    13. Please provide a list of any errors in your server’s log files. No errors
    14. Which company provides your hosting? 1and1 (Business Package)
    15. Is your server running Windows, or if Linux; Apache, nginx or something else? Linux/Apache

    Here is some additional information — I don’t really think that it will make much difference — but if so, awesome.

    Side note, I did edit my theme’s function.php to hard code in the address of http://totallymi.com but it did not change the fact that the BP activity stream is redirecting to the homepage vs the appropriate member’s stream.

    Thanks!

    #115733
    sdls
    Member

    To be a more concise with the requirement.

    Allow members of a group to create posts within that group.
    ________________

    > Add new Post to Group (including media pop-up, RTE, taxonomy relation)
    > Edit existing Post in Group (including media pop-up, RTE, taxonomy relation)
    > Browse my Group Posts
    > Integrating the creating of new posts and commenting of posts within a group into buddypress components such as activity feed, plug-ins such as subscribe to group by email, ect…ect…
    ________________

    The above work is what I’m scared of ,,,,,, using custom taxonomy you associate posts to a group with a few lines of code…..

    add to….. groups / single / forum.php

    //
    global $bp;
    $group_id = $bp->groups->current_group->id;
    $group = groups_get_group( array( ‘group_id’ => $group_id ) );
    $group_slug = $group -> slug;

    $args=array(
    ‘group_terms’ => $group_slug,
    ‘post_type’ => ‘nuggets’,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => -1,
    ‘caller_get_posts’=> 1
    );
    query_posts( $args );

    //

    Hugo Ashmore
    Participant

    :) couple of old classic links there


    @andrewbuzz
    the table aspect for layout has been mentioned, but I really need to just labour a point, tables for layout are absolutely not the way to markup pages, it’s taken a few years to get everyone on board with this but nowadays you wil no one creating layouts this way. I suspect that you have ‘designed’ your layout in PS? and then have used a tool such as DW? to construct a layout.

    I would urge you to stop and reconsider before you go too much further, table layouts are highly inflexible, next to impossible to re-factor (one of the main points with CSS-P ) not search engine friendly and a whole heap of other reasons.

    Are you preparing this layout for a client or is this an existing layout the client has come to you with?

    aces
    Participant

    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-make-a-private-community?topic_page=6&num=15#post-86316

    Derived from the above link, I use the following in a bp-custom.php file to exclude users that are not logged in from seeing the activity or members areas.

    function sh_walled_garden()
    {
    global $bp;

    if( bp_is_register_page() || bp_is_activation_page() || bp_is_page( BP_FORUMS_SLUG ) || bp_is_page( BP_GROUPS_SLUG ) )
    return;

    if( ! bp_is_blog_page() && ! is_user_logged_in() )
    bp_core_redirect( $bp->root_domain .'/'. BP_REGISTER_SLUG );
    }
    add_action( 'get_header', 'sh_walled_garden' );

    In bp-custom.php the above needs to be placed in a plain text file with “ at the end of the file….

    #114355
    @mercime
    Participant

    == I think i have the activity in between the sidebars and looking OK. ==

    Confirming that it’s looking good :-)

    == I just have the admin bar width issue to figure out ==

    The adminbar in that permalink page is styled like so in bp-default adminbar.css
    ` body#bp-default.activity-permalink #wp-admin-bar .padder {
    min-width: 960px;
    max-width: 960px;
    }`
    I see you have a fixed width of 1000px for your site. So if you have custom.css listed after the @import of adminbar.css, just add this
    ` body#bp-default.activity-permalink #wp-admin-bar .padder {
    min-width: 1000px;
    max-width: 1000px;
    }`
    but if you use stylesheet listed before @import of adminbar.css, you’d have to add `!important` to your min-width and max-width

    You should also correct the width of the site when in permalink view
    ` body.activity-permalink {
    min-width: 960px;
    max-width: 960px;
    }`
    change to 1000px

    #113613

    In reply to: non members block

    shanebp
    Moderator

    Create a file called bp-custom.php – it will go in your plugins directory.

    Put this code in it:

    function visitor_intercept(){
    global $bp_unfiltered_uri;
    
    if ( !is_user_logged_in() ) {
    if ( ($bp_unfiltered_uri[0] == BP_MEMBERS_SLUG) || ($bp_unfiltered_uri[0] == BP_ACTIVITY_SLUG) ) {
    bp_core_redirect( get_option('siteurl')."/some-page" );
    }
    }
    }
    add_action( 'wp', 'visitor_intercept', 3 );
    

    Change “same-page” to where ever you want to send them or remove to send them to front page.
    Note: this may not work if you are using BP 1.3

    stwc
    Participant

    Terrible advice in this thread from people recommending edits to core bp files — any changes to them will be lost next time you upgrade Buddypress. Never edit core. Use the custom query filter instead.

    #111623
    allanf72
    Member

    Thank you all for posting this! I’ve been reading for hours and this has fixed my issues.

    I’m running BP on a network install and want ALL subdomains to have use of BP. It was working on the main install but as I created subdomains, the BP pages (Activity, Members, etc,) was giving me 404 errors. I went down the htaccess rabbit hole for a while and gave up. Started at the beginning and reading thru all the forums that looked related and found this.

    @WesCleveland – The bp-custom.php works like a charm so far. Thanks for posting your solution.

    #111267
    chrisreg1
    Member

    R-a-y – that doesn’t work for me unfortunately.

    I am using the:
    – latest version of WordPress 3.1.2
    – Child theme of Suffusion

    And the latest plugins for Suffusion BP Pack (1.02), BuddyPress (1.2.8), and s2Member (3.5.7).

    Using the s2Member plugin settings, I have set my site to redirect users to a “Member Home” page upon logging in. This function used to work before I added BuddyPress + Suffusion BP Pack. However, since adding those plugins, I initially could not figure out why it no longer worked upon logging in. Currently, when a user logs in, the site just directs them to the main page (the default WordPress & site address). I disabled the other plugins and determined that it was BuddyPress handling the redirection.

    So I made a bp-custom.php and added that code just to see if I can test the redirection function itself and it didn’t work. I even tweaked his code as well to try add_filter(“login_redirect”,”bpdev_redirect_to_profile”,100,3); Did I need to do anything else to activate the plugin or did it automatically run and link to BuddyPress?

    Ultimately, it seems like I may have to implement a technique that onyx mentioned or something like http://www.thinkinginwordpress.com/2009/12/tweak-your-buddypress-login-to-redirect-to-the-page-user-was-viewing-while-login/

    Does anyone have any thoughts? Thanks!

    #111239
    Hugo Ashmore
    Participant

    for the record I have just done this with your page and it works as expected!

    `
    /*
    WOO CUSTOM STYLESHEET



    Instructions:

    Add your custom styles here instead of style.css so it
    is easier to update the theme. Simply copy an existing
    style from style.css to this file, and modify it to
    your liking.

    */
    #activity-stream .activity-content .activity-inner {background: red;}
    `
    Use this stylesheet they provide for most of your customisations rather than squirting them into the head.

    #111230
    nit3watch
    Participant

    You can thank Boone for the answer below. Replace scope=groups with what ever filter you’d like to apply.

    Changing the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.

    Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.

    `function bbg_my_groups_activity_default( $qs ) {
    if ( empty( $qs ) && empty( $_POST ) ) {
    $qs = ‘scope=groups’;
    }

    return $qs;
    }
    add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );`

    #110799
    Boone Gorges
    Keymaster

    It looks like you need to do two things.

    1) Don’t do bp_ajax_querystring( ‘friends’ ). The function does not take arguments like ‘friends’. Just do bp_ajax_querystring() in the template file.
    2) Here is a function that, when placed in wp-content/plugins/bp-custom.php, will do what you want:
    `function bbg_my_friends_activity_default( $qs ) {
    if ( is_user_logged_in() && empty( $qs ) && empty( $_POST ) ) {
    $qs = ‘scope=friends’;
    }

    return $qs;
    }
    add_filter( ‘bp_ajax_querystring’, ‘bbg_my_friends_activity_default’, 999 );`

    The problem is that this is almost certain not to work correctly with the function you have in your template file:
    `function my_query_filter_new ( $query_string ) {
    $query_string .= ‘&per_page=10’;
    return $query_string; }
    add_filter( ‘bp_ajax_querystring’, ‘my_query_filter_new’ );`

    If you need this latter functionality, I would try to do some work to combine the functions so that the query strings are added in the proper order.

    #110522
    ultimateuser
    Participant

    @DJPaul These are the plugins im using:

    Add Logo to Admin
    Akismet
    BackupWordpress
    BPAlbum
    BP-Youtube Feed
    BP Profile Search
    BP Redirect to Profile for Buddypress
    BP Xtra Signup
    BuddyPress Announce Group
    Buddypress Auto Group Join
    BuddyPress Block Activity Stream Types
    Buddypress Community Stats
    Buddypress Mandatory Groups
    BuddyPress Mobile
    Buddypress Moderation
    BuddyPress Registration Groups
    BuddyPress Restrict Group Creation
    BuddyPress RSS Character Fixer
    Buddypress Topic Mover
    Capability Manager
    Custom Profile Filters for BuddyPress
    Email Login
    Erocks Dashboard Lockdown
    Fast Secure Contact Form
    Forum Attachments for BuddyPress
    Mail From
    PHP Exec
    Simple Page Ordering
    Twitter Goodies
    Users to CSV
    W3 Total Cache
    Welcome Pack
    WP-Invites
    WP-TwitterBadge
    WP Activate Users

    @mikey3d
    Participant

    I just try it above muchad’s code and put that in your child theme function.php. It works, why? Because the characters are messing it up. Here’s workable code:
    `//=Change the number of activity items to show per page
    function my_custom_query_filter( $query_string ) {
    $query_string .= ‘&per_page=30’;
    return $query_string;
    }
    add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_custom_query_filter’ );`

    #109855
    Marcos Nobre
    Participant
    #109370
    Virtuali
    Participant

    <i> How can I make it so it displays the users by nicknames, not by their names?</i>

    That is what Buddypress does currently. It displays their “RealName” rather than their Username across the site.

    <i> how can I add Activity and Members links in the adminbar?</i>

    Add this to your bp-custom.php:

    function pages(){
    ?>
    
    <li class="no-arrow"><a href="yoursite.com/activity">Activity</a>
    
    <li class="no-arrow"><a href="yoursite.com/groups/">Groups</a>
    
    <?php
    }
    add_action( 'bp_adminbar_menus', 'pages', 15 );
    Virtuali
    Participant

    or, :) you can redirect the “Reply” button to the “Leave a reply” textarea in the forums, and so on in the comments:

    `
    function cac_insert_comment_reply_links( $has_comments ) {
    global $activities_template, $wpdb, $bbdb;

    do_action( ‘bbpress_init’ );

    $topics_data = array();
    $posts_data = array();
    foreach( $activities_template->activities as $key => $activity ) {
    if ( $activity->type == ‘new_forum_topic’ ) {
    $topic_id = $activity->secondary_item_id;
    $topics_data[$topic_id] = $activity->primary_link;
    $topics_data[$topic_id] = $key;
    }

    if ( $activity->type == ‘new_forum_post’ ) {
    $post_id = $activity->secondary_item_id;
    $posts_data[$post_id] = array_pop( array_reverse( explode( ‘#’, $activity->primary_link ) ) );
    $posts_data[$post_id] = $key;
    }
    }

    // In cases where we only have the post id, we must do an extra query to get topic ids
    if ( !empty( $posts_data ) ) {
    $post_ids = array_keys( $posts_data );
    $post_ids_sql = implode( ‘,’, $post_ids );
    $sql = $wpdb->prepare( “SELECT topic_id, post_id FROM {$bbdb->posts} WHERE post_id IN ({$post_ids_sql})” );
    $post_topic_ids = $wpdb->get_results( $sql );

    // Now that we have the topic IDs, we can add that info to $topics_data for the main query
    foreach( $post_topic_ids as $post_topic ) {
    $topics_data[$post_topic->topic_id] = $posts_data[$post_topic->post_id];
    }
    }

    // Now for the main event
    // First, make a topic list and get all the associated posts
    $topic_ids = implode( ‘,’, array_keys( $topics_data ) );
    $sql = $wpdb->prepare( “SELECT topic_id, post_id FROM {$bbdb->posts} WHERE topic_id IN ({$topic_ids})” );
    $posts = $wpdb->get_results( $sql );

    // Now we get counts. BTW it sucks to do it this way
    $counter = array();
    foreach( $posts as $post ) {
    if ( empty( $counter[$post->topic_id] ) )
    $counter[$post->topic_id] = 1;
    else
    $counter[$post->topic_id]++;
    }

    // Finally, concatenate the reply url and put it in the activities_template
    foreach( $topics_data as $topic_id => $data ) {
    $total_pages = ceil( $counter[$topic_id] / 15 );
    $reply_url = cac_forum_reply_url( $data, $total_pages, 15 );
    $key = $data;
    $activities_template->activities[$key]->reply_url = $reply_url;
    }

    return $has_comments;
    }
    add_action( ‘bp_has_activities’, ‘cac_insert_comment_reply_links’ );

    /**
    * Filters the url of the activity reply link to use reply_url, if present
    */
    function cac_filter_activity_reply_link( $link ) {
    global $activities_template;

    if ( !empty( $activities_template->activity->reply_url ) )
    return $activities_template->activity->reply_url;
    else
    return $link;
    }
    add_action( ‘bp_get_activity_comment_link’, ‘cac_filter_activity_reply_link’ );

    /**
    * Echoes the proper CSS class for the activity reply link. This is necessary to ensure that
    * the JS slider does not appear when we have a custom reply_url.
    */
    function cac_activity_reply_link_class() {
    global $activities_template;

    if ( !empty( $activities_template->activity->reply_url ) )
    echo ‘class=”acomment-reply-nojs”‘;
    else
    echo ‘class=”acomment-reply”‘;
    }

    /**
    * A replacement for bp_activity_can_comment(). Todo: deprecate into a filter when BP 1.3 comes out
    */
    function cac_activity_can_comment() {
    global $activities_template, $bp;

    if ( false === $activities_template->disable_blogforum_replies || (int)$activities_template->disable_blogforum_replies ) {
    // If we’ve got a manually created reply_url (see cac_insert_comment_reply_links(), return true
    if ( !empty( $activities_template->activity->reply_url ) )
    return true;

    if ( ‘new_blog_post’ == bp_get_activity_action_name() || ‘new_blog_comment’ == bp_get_activity_action_name() || ‘new_forum_topic’ == bp_get_activity_action_name() || ‘new_forum_post’ == bp_get_activity_action_name() )
    return false;
    }

    return true;
    }`

    #108835
    @mercime
    Participant

    You/re welcome.

    #108834
    dukehm
    Member

    @mercime Thank you!

    #108833
    @mercime
    Participant

    – Create a child theme.

    – Copy over the file index.php from activity folder of bp-default theme to childtheme/activity/index.php
    https://trac.buddypress.org/browser/tags/1.2.8/bp-themes/bp-default/activity/index.php#L10

    – Add the slider to above or within the content div or wherever you want in that index.php file

    #107717
    Virtuali
    Participant

    This only works on the group-loop (group index), you could probably hook it into others as well.

    Put in bp-custom

    `function my_group_loop_activity_item() {
    global $bp, $activities_template;

    if ( !bp_is_active( ‘activity’ ) )
    return;

    if ( !bp_group_is_visible() )
    return;

    $show_hidden = false;

    /* Group filtering */
    $object = $bp->groups->id;
    $primary_id = bp_get_group_id();

    if ( ‘public’ != $bp->groups->current_group->status && groups_is_user_member( $bp->loggedin_user->id, bp_get_group_id() ) )
    $show_hidden = true;

    /* Note: any params used for filtering can be a single value, or multiple values comma separated. */
    $defaults = array(
    ‘display_comments’ => false, // false for none, stream/threaded – show comments in the stream or threaded under items
    ‘sort’ => ‘DESC’, // sort DESC or ASC
    ‘page’ => 1, // which page to load
    ‘per_page’ => false, // number of items per page
    ‘max’ => 2, // max number to return
    ‘include’ => false, // pass an activity_id or string of ID’s comma separated
    ‘show_hidden’ => $show_hidden, // Show activity items that are hidden site-wide?

    /* Filtering */
    ‘object’ => $object, // object to filter on e.g. groups, profile, status, friends
    ‘primary_id’ => $primary_id, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    ‘action’ => false, // action to filter on e.g. activity_update, new_forum_post, profile_updated
    ‘secondary_id’ => false, // secondary object ID to filter on e.g. a post_id

    /* Searching */
    ‘search_terms’ => false // specify terms to search on
    );

    $r = wp_parse_args( $args, $defaults );
    extract( $r );

    $filter = array( ‘user_id’ => false, ‘object’ => $object, ‘action’ => $action, ‘primary_id’ => $primary_id, ‘secondary_id’ => $secondary_id );

    $activities_template = new BP_Activity_Template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden );

    while ( bp_activities() ) : bp_the_activity(); ?>
    <div class="item-desc" id="activity-“>

    <a href="”>

    <?php endwhile;

    }
    add_action( ‘bp_directory_groups_item’, ‘my_group_loop_activity_item’ );`

    #107440
    imjscn
    Participant

    @pcwriter , I currently use otto’s /%year%/%postname%/ with some pityful feeling of missing the “category”, Now I see your new structure, I like the idea :-)
    By the way, you didn’t mention the default blog/ before the custom structure. Did you remove it already? I know there’s a way to remove the blog/ — from the site edit page. But I’m not sure if it is the correct way — what’s your opinion?

Viewing 25 results - 601 through 625 (of 831 total)
Skip to toolbar