Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 676 through 700 (of 831 total)
  • Author
    Search Results
  • #93128
    Nick
    Participant

    I’m open to any other thoughts.

    I’m after something like this on the homepage:

    http://www.nibydesigngroup.com/TUmailer/community.jpg

    I think it’s going to be some major code hacking unless someone has other thoughts.

    #92873
    Roger Coathup
    Participant

    Are you using the default theme?

    The default theme shows the profile on a separate tab when you visit the member’s page. If you want to move the view profile content onto the activity tab you can look at copying the content from members/single/profile.php into members/single/activity.php (do this in a child theme of course).

    If you want something more sophisticated, take a look at the custom loop examples under Support …. Docs on this site

    Mark
    Participant

    Can anyone else think of any other snippets I can add to the bp-custom.php to block new posts in one specific blog showing up in the activity stream?

    ie. My blog_id is 282 and I have tried the 2 codes above?

    Mark
    Participant

    Ahh, thanks @nuprn1 – I have a bp-custom file, Im just being stupid. Just the numerical id to find. Thanks again.

    rich! @ etiviti
    Participant

    search up on placing code snippets in the theme’s function.php or creating a bp-custom.php

    the blog_id is not the name of the blog but rather the numerical value in the db for that blog.

    rich! @ etiviti
    Participant

    functions/bp-custom file – but with that code snippet you won’t be able to recover the data going forward (blocked from the db) – make sure you test it

    Roger Coathup
    Participant

    @markhahnel

    You can adapt the code snippet in here by changing the blog id: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/posts-of-the-main-blog-in-site-wide-activity/

    If your theme follows the default structure, you’ll find your activity loop in my-theme/activity/activity-loop.php

    Also have a look at the custom loop documentation (click documentation under support tab) on this site

    Pisanojm
    Participant

    @nuprn1 @mercime @boonebgorges

    Thank you for leading me to the code to get to this… I basically just did a super-slight mod of Rich’s code. Here is what I used and I put it in the the bp-custom.php file in the plugins directory:

    `<? 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’ => 1, // 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’ => ‘new_forum_topic’, // 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-descb" id="activity-“>

    Latest Topic Activity in the Group:

    <a href="”>

    <?php endwhile;

    }

    add_action( ‘bp_directory_groups_item’, ‘my_group_loop_activity_item’ );
    ?>`

    I also added this to the default.css to give me a little more control of the output (changed the div in the original to match below):

    ` ul.item-list li div.item-descb {
    margin: 10px 0 0 64px;
    font-size: 11px;
    color: #888;
    width: 85%;
    }
    `

    THANKS AGAIN! Here is a pict completed:
    http://mustech.net/holder/grouptopic2.jpg

    #92085

    In reply to: Theme won’t update

    strategicblend
    Participant

    Yeah you probably shouldn’t visit the URL – its a live staging site and always changing. I only placed it above per forum etiquette. If you need examples of actual code or the actual php files themselves I can certainly provide.

    (UPDATE: I’ve told the dev team to temporarily hault any activity so you should be able to see the fully rendered site at that URL and specifically note the pages aren’t changing).

    When I switch to the original BP theme everything DOES work. But just to note, I don’t have the option of using that theme – it has to be my own custom theme.

    #91906
    Roger Coathup
    Participant

    Hej Patrik – are you building your own theme for this (writing PHP, HTML templates, etc.)?

    You’ll have to modify the templates for your profile page (e.g. members/single/home.php in the default theme) to include your custom activity loop.

    You can access the current user_id within that page, and pass it to your custom loop.

    #91108
    lorenzo
    Member

    Hi Roger (and everyone else!), i think i’m going somewhere now, but will need some extra input. hopefully the thread will be an additional useful example!

    ok, this is where i am at: default theme with the ajax controllers at the top of the activity stream. in the activity folder of the child theme i have an index.php and activity-loop.php and and entry.php.

    basically i’ve got a ‘private’ area with content accessible only to staff. for normal post/pages i have is an extra check based on a custom field for posts and the category for pages like the following and then based on the group membership i either show a message or the actual content:

    http://pastebin.com/E4cnkwZS (top)

    now, because the group is private, the BP stuff is not showing in the activity stream already, which is good, but the posts/pages bypass my checks and come up in the list of activities showing the actual content which should be private instead.

    so, here is what i came up with so far. using the index.php i check the group membership and then load two different activity-loops:
    http://pastebin.com/E4cnkwZS (bottom)

    how would you exclude stuff? in the bp_has_activity function there is an ‘include’ option which allows to filter content, but not an ‘exclude’ one. it might be trivial to go around it, but not sure how. furthermore if you use the dropdown filter i have the impression that the arguments are passed dynamically resetting whatever is passed in the original query (like in your example and some i’ve tried using the same model).

    i would very much appreciate any further suggestion! thanks

    #90740
    govpatel
    Participant

    I am using latest wordpress 3.0.1 and default twentyten child theme and all i did was transfer folders using buddypress theme pack and go in menu and create a custom menu and use it as primary menu add all the pages in menu and than create custom links for buddypress like for /activity /members/ /forums and so on and they work fine.

    #90689
    Roger Coathup
    Participant

    @javipas – you need to be a little clearer on your setup. In the default setup / theme, the activity stream is a separate page, and not something that shows up on individual blogs / blog pages.

    Are you using a custom theme with a custom activity stream, or an activity stream widget in your blogs?

    The standard activity stream loop shows activity across your entire BuddyPress installation. If you want to filter the activity steam to just show comments relating to a specific blog, you can write your own custom activity loop:

    Take a look at this documentation, in particular filtering on the primary_id to just show posts for a specific blog id: https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    #90472
    Hugo Ashmore
    Participant

    You’ll probably want to create a custom loop then in whatever page, have a look at this page of the codex:
    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    #90364
    John
    Participant

    Hello,

    Thanks you very much for helping me.

    I’ve followed your link but I’ve got a problem.

    (3) Keep your old BuddyPress user / group avatars
    I don’t find my file bp-custom.php (at the following location : wp-content/plugins/buddypress/), should I create one or is it at an another location ? I’ve looked but I didn’t find anything.

    (4) Redirect previous BuddyPress permalinks
    I’ve edited my .htaccess but when I click on my name from a comment I’ve made on a post on the blog’s network or if I try to view an activity I end up on the same page : the Members Directory. I’m using the default buddypress theme on the blog.

    Did I make a mistake on my .htaccess ?

    Here’s the path of my installation, using Wamp :
    http://127.0.0.1/themainblog/ – the main blog
    http://127.0.0.1/themainblog/network/ – where buddypress is enabled.
    http://127.0.0.1/themainblog/blogname/ – a blog from the network

    Here’s how I edited my htaccess :

    RewriteEngine On
    RewriteBase /themainblog/
    RewriteRule ^index.php$ – [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    RedirectMatch 301 ^/members/(.*)$ http://127.0.0.1/themainblog/network/members/$1
    RedirectMatch 301 ^/groups/(.*)$ http://127.0.0.1/themainblog/network/groups/$1
    RedirectMatch 301 ^/blogs/(.*)$ http://127.0.0.1/themainblog/network/blogs/$1
    RedirectMatch 301 ^/forums/(.*)$ http://127.0.0.1/themainblog/network/forums/$1

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]

    Best regards,

    #89058
    Hugo Ashmore
    Participant

    That sounds like you actually need a custom front page, but what do mean by ‘click it’ that’s a rather loose term click what?

    Why does that page not simply have the text/content you want with a simple link to the registration page and also a simple login, registered users will login and be directed to their profile page by the plugin mentioned earlier. What you do with the main site home link is another question, suppose it’s possible to have that custom frontpage display your intro page to all logged out users and once logged in if a member navigates back to that page it will display ? activity loop / main site blog posts

    #88915
    Nahum
    Participant

    @modemlooper contextual sidebars a definite must when working towards the perfect bp theme, as mentioned by nit3watch. I hate having to create them and loading up the sidebar.php with if statements to know what page you are on. Also a blog network focused theme combining the groups/blog components to work together. as mentioned here. https://buddypress.org/community/groups/requests-feedback/forum/topic/why-couldnt-the-groups-component-structure-work-for-blogs/
    Custom field and post tags,cats, recognition by the activity stream with index file that can be manipulated to function like a site wide tags replacement.
    Tagging and categorization for blogs. widgets and page templates for each.
    Bring more individual blog info out front(posts, comment_counts, ) so that member blogs content can be categorized, highlighted and maneuvered more easily.
    Pull in user blog info into their profiles, posts count, draft counts, quick links to their blog admin, widgets. Blog management options or panel.
    Include follow blog streams feature, similar to follow people, but instead it pulls in new_blog_post activity into Blogs I follow activity tab.
    The perfect blog network bptheme, basically.

    justbishop
    Member

    @mattmct: Or you could use conditional statements in a custom template. It would go something like this:

    http://pastebin.com/EbBhUtaC

    Roger Coathup
    Participant

    @hnla, @nuprn1

    The constant is supposed to set the default tab that is active when you visit a profile.

    In my case, although I’ve made activity the 3rd tab, it is still the default active one when I visit the profile.

    Defining BP_DEFAULT_COMPONENT in wp_config.php is now working for me – provided I use my new slug (‘account’) instead of ‘profile’. Also, as @nuprn1 points out – it won’t work if you cut and paste the code from this thread (because the quotes are mangled).

    Thanks for the help on this guys. Much appreciated.

    Roger Coathup
    Participant

    Ok… I cut and pasted the code, and that had introduced some control characters that messed everything up.

    However, the routine to change the tab order is not working for me… I went for the following:

    function ka_change_profile_tab_order() {
    global $bp;

    $bp->bp_nav = 10;
    $bp->bp_nav = 20;
    $bp->bp_nav = 30;
    $bp->bp_nav = 50;
    $bp->bp_nav = 60;
    $bp->bp_nav = 70;
    }

    add_action( ‘bp_setup_nav’, ‘ka_change_profile_tab_order’, 999 );

    But, that results in some strange markup being created:

    A new tab is displayed at the start with no content –
    [li id=”-personal-li”]
    [a id=”user-” href][/a]
    [/li]

    and the profile and messages tabs are not in the right order. I get the following rendered:

    nonsense (see above) – messages – profile – activity – groups – following – settings

    #86499
    r-a-y
    Keymaster

    I’d just create a custom page template and create a RSS feed from a filtered, BuddyPress activity loop that only outputs blog posts.

    Here’s a guide that will help you create the custom RSS page template:
    http://yoast.com/custom-rss-feeds-wordpress/

    Here’s the activity loop codex page:
    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    *Set the action to “new_blog_post”

    #86455
    Korhan Ekinci
    Participant

    Hello,

    Thnx Roger. I did make some research and found this post:
    https://buddypress.org/community/groups/creating-extending/forum/topic/how-to-add-per_page35-without-messing-up-load-more-link/

    Since I also have this code in my activity-loop.php:
    php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) ) ) :

    Thanks to @Boone :
    https://buddypress.org/community/groups/creating-extending/forum/topic/how-to-add-per_page35-without-messing-up-load-more-link/#post-45733

    I did this in my child theme’s function.php file:

    function my_custom_query_filter( $query_string ) {
    $query_string .= ‘&action=activity_update’;

    return $query_string;
    }
    add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_custom_query_filter’ );

    It seems to work! I now just need to get rid of the dropdown filter boxes!

    #86453
    Roger Coathup
    Participant

    Hi,

    I advise doing this in your own child theme:

    You’ll have to modify the /activity/index.php file. In there you can change your activity stream loop to just return status updates, and you can also remove the dropdown filter.

    This page gives some guidance on modifying the activity stream loop, including the filter you’ll need just for status updates:
    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    Cheers,
    Roger

    xrun
    Member

    @boonebgorges the load more link has shown up at the bottom in the activity feed, the list currently has 13 entries. I’d like to cap it at somewhere between 5 and 10, and then extend the list to another 10 each time the load more-link is hit.
    I have removed the custom php-file temporarily, but while testing this I found that when I clicked the link it wouldn’t do anything, was just sitting there and accepting clicks without loading more.

    #85556
    Roger Coathup
    Participant

    And this page details how to change the default tab:

    https://codex.buddypress.org/how-to-guides/changing-internal-configuration-settings/

    Good luck… let me know if it works!

Viewing 25 results - 676 through 700 (of 831 total)
Skip to toolbar