Search Results for 'custom activity page'
-
AuthorSearch Results
-
October 15, 2010 at 7:50 am #95230
Roger Coathup
ParticipantAre you using the default bp-custom.php or have you got a bespoke version?
October 13, 2010 at 8:58 am #95034Hugo Ashmore
ParticipantYou have got a huge heap of plugins running. The first rule of troubleshooting is to reduce down to the most basic functionality to produce a test case that demonstrates the issue or not, ideally one runs the basic installation which will not demonstrate the issue, then start to add back in plugins one by one checking each time to see if the issue kicks in again, or work that in reverse and start disabling plugins one by one checking as you go so that you know what plugin causes the problem.
This is exactly the same reason we ask that people drop back to the default theme as doing that tells us immediately if an issue is related to BP or a custom theme.
October 7, 2010 at 8:55 am #94453In reply to: no header/nav on individual activity page buddypress
Hugo Ashmore
ParticipantNot a similar issue, these sound like two separate issues.
Please do not post to a forum in this manner you must start your own thread and provide as much detail as possible if you want help.
@holgria Are you running a custom theme or BP-default? Without more detail than you have provided it won’t really be possible to help you.
@micb11 You should start your own thread on your issue, don’t assume it’s similar to someone else; there could be any number of reasons why you are having these issues, without some detail it’s impossible to help you -same question though custom theme or standard BP?
October 5, 2010 at 8:48 pm #94309In reply to: the bp_has_activities() loop filtering
Marcio Santos
MemberHey @nuprn1,
im just trying to filter some items in the bp_has_activities() function and cant seem to get it to work whenever I add more than one filter/parameter.
this works:
“this doesnt work:
“
or
“I think my syntax is wrong, or Im trying to mix the filters and parameters in the same place. Anyways, I dont know hot to work with this. Im referencing the following page:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
Any help will be much appreciated,
thanksOctober 4, 2010 at 6:10 pm #94202chouxpastry2002
ParticipantHello guys,
I think i have arrived at right thread to post my query at.I am looking to filter Group creation and member joining activity from Group activities.
I dont want to display “Member has joined this group” And “Member has created this group” in group activity stream.
Please tell me how to do it using custom-bp.php file or themes function.php file. I am ok with both the types.
Regards,
Sam.September 30, 2010 at 10:55 pm #93908Roger Coathup
ParticipantOk… there are few things you need to look at to achieve this:
You should create a new theme where you are going to implement your reworked profile / activity sub-nav menu. I suggest deriving this from the bp-default theme: https://codex.buddypress.org/extending-buddypress/building-a-buddypress-child-theme/
In the default theme, the activity sub-nav menu is created by a call to bp_get_options_nav() in /members/single/activity.php. It’s this call that you’ll either want to replace with your custom version (or apply filters / action hooks to get your desired result).
You should also take a look at how the activity stream is built – it’s quite easy to create your own activity loop that will return all the items for a given user merged into a single page (rather than the separate tabs): https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
Hopefully that’s enough to get you started.
September 29, 2010 at 7:30 pm #93791In reply to: Display recent 5 activities?
Hugo Ashmore
ParticipantThis page will show you the parameters that can be passed:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
What you show should work to limit the qnt returned
September 26, 2010 at 7:51 am #93439In reply to: Display recent group blog posts on home page?
Roger Coathup
ParticipantTo show blog activity you’d typically customise your home page template to include a customised activity loop that just shows blog posts.
Check under Docs… Custom buddypress loops on ths site for details on how to do that.
There might also be off the shelf widgets that will work for you, but you will need to have a widgetised home page theme
September 26, 2010 at 7:41 am #93437Roger Coathup
ParticipantFor the solution, please see this thread: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/customizing-buddypress-profile-page-default-tab-and-item-nav-order/?topic_page=1&num=15
September 25, 2010 at 7:45 pm #93404In reply to: How To Show “Status Updates” In The Frontpage?
Roger Coathup
ParticipantIf you want the activity stream as your front page – go to wp-admin … settings … reading … front page displays
If you just want a small area to show updates, try a widgetised theme, and add the sitewide activity widget
If you want something more bespoke, i.e. just status updates… you will have to write your own custom activity loop – check docs on this site for information on this. Make sure you do this in a new or child theme.
September 24, 2010 at 11:03 pm #93346Roger Coathup
Participant@jwack – you’ll hit some performance problems –
You’ll need to use switch_to_blog(blog_id) to change to each blog, and extract the post, author, etc. details.
Each call to switch_to_blog incurs a performance overhead.
Your alternative is to store the information you need in the activity stream when a post is saved:
Most of the information you need is already stored there for you. Take a look at the function: bp_blogs_record_activity()
You can then code a custom activity loop on your home page, that loops through activity items for new blog posts and checks whether they are in your list of featured blogs: https://codex.buddypress.org/developer-docs/custom-buddypress-loops/
September 24, 2010 at 2:59 pm #93314Bowe
Participant“Spam!!!”
*sees the topic is about his own theme*
“Absolutely NO problem with this!”
Thanks for creating this topic Ross, I’m really glad you like the theme I’m putting up for sale. And Boone thanks for promoting my already outdated video as well
My intention with the new BP-Tricks site is not to only sell a premium theme, and offer some kind of subscription service (I’m not a big fan of subscription models for Themes).BP-Tricks will hopefully become a resource for great BuddyPress tips and tricks. Selling the theme is just a great way for me to keep BP-Tricks running, earn some money and hopefully improve the quality of BuddyPress Child Themes.. The theme is GPL and cool stuff that I add to it will all be shared in the form of Tutorials on BP-Tricks. The actual design elements and the support are what people are paying for (similar as WooThemes does this for example).
Everyone can submit code/design/inspirational Tricks through a form or the backend, and by doing so you’ll earn Awards ( @DJPaul his Achievement Plugin FTW!) and badges awarded by me. The best new trick each month earns a nice price (currently a Free theme, but I’ll try to get some sponsors) and they get listed on the frontpage in Widget of Fame

Besides that the Activity Stream is purely meant to be a source of information displaying ONLY new Tricks, external Tricks (BP-Links from @MrMaz) and external member blogs from our members (if you blog about BuddyPress or anything related to it) you can add your RSS feed to your profile and people who follow you get your updates in their stream. This plugin will be released to the community when the site launches next week.
There’s also a customized search feature which only searches the BuddyPress network (BP.org, BP-Tricks, WPMU.org, Etivite.com, BuddyDev.com, ShabuShabu.eu etc) and a bunch of other stuff which I probably forgot to tell.
All the site features remain free, and also the site will be Ad free for as long as I earn enough to keep it running without loosing money on it.
I hope this makes my intentions clear, and that it will become a place where you can enjoy great BP Tricks from not only me, but from anyone, without getting the feeling that I’m out for someone’s money.. because that is certainly not my intention
If you want to have access to the site before launch to look around and submit some Tricks for the community just let me know, and I’ll make sure you’ll have access and be a part of the cool kids
September 23, 2010 at 7:52 pm #93231marcycapron
ParticipantI have no luck in changing the default to profile… despite having never changed the slug… I can change the order just fine, but the second I put the snippet in wp-config the base user profile (which default goes to activity) doesn’t work and goes to home page.
crap.
September 23, 2010 at 2:58 am #93168muchad
Participantput this in your functions.php in your theme
function my_custom_query_filter( $query_string ) {
$query_string .= ‘&per_page=10?;
return $query_string;
}
add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_custom_query_filter’ );you just change per_page option as you need…
it’s run for me, you can see here http://blog.uin-malang.ac.idSeptember 22, 2010 at 4:53 pm #93128In reply to: Add custom fields to activity stream
Nick
ParticipantI’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.
September 19, 2010 at 5:47 pm #92873In reply to: Add users profile fields to the activity page
Roger Coathup
ParticipantAre 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
September 16, 2010 at 3:18 pm #92610Mark
ParticipantCan 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?
September 16, 2010 at 2:28 pm #92606Mark
ParticipantAhh, thanks @nuprn1 – I have a bp-custom file, Im just being stupid. Just the numerical id to find. Thanks again.
September 16, 2010 at 2:16 pm #92605rich! @ etiviti
Participantsearch 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.
September 16, 2010 at 1:00 pm #92592rich! @ etiviti
Participantfunctions/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
September 16, 2010 at 12:23 pm #92587Roger Coathup
ParticipantYou 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
September 12, 2010 at 1:59 am #92200Pisanojm
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.jpgSeptember 10, 2010 at 2:51 pm #92085In reply to: Theme won’t update
strategicblend
ParticipantYeah 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.
September 8, 2010 at 9:10 pm #91906In reply to: Author's posts in his profile
Roger Coathup
ParticipantHej 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.
August 31, 2010 at 1:17 pm #91108In reply to: aggregate activity stream from public groups
lorenzo
MemberHi 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
-
AuthorSearch Results