Search Results for 'custom activity page'
-
AuthorSearch Results
-
February 27, 2010 at 8:41 am #65814
In reply to: How to set Friends Activity page as home?
nickrita
ParticipantSimilar question here. I want to see New Blog posts as default.
I already read this: https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
but it doesn’t help, becaus there is not one example for the complete code, only the snippets.
February 24, 2010 at 3:43 am #65237sawyerh
ParticipantHi Guys,
Still haven’t been able to find a solution to this problem and would love to figure this out.
Here’s an update on the what’s working and what is not:
The initial problem was the username wasn’t being displayed at the end of the member’s links which was causing the links to redirect to the homepage. This problem was sitewide EXCEPT when on the forum topics (weird). By adding
define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true );to /wp-content/plugins/bp-custom.php, I was able to get the username to display at the end of the member’s links inside the Member’s list, but by doing so, it is now causing the problem to occur on member’s links on forum topics. The problem is also still occurring in the activity streams.Any help?
Thanks!
February 22, 2010 at 12:46 pm #64767Hugo Ashmore
ParticipantOh dear not the response I was hoping for

So it is an issue and frankly a horrendous one, blogs are offered to users as fully functioning ones.
Sadly it’s not necessarily a straightforward matter to upgrade, at the moment I would have to run the backwards-compatibility plugin as I have got the community up and running based on a child theme overriding bp-sn file where necessary, in tests on local dev install upgrade to 1.2 I had to do a fair bit of work to get the existing theme running again and to rework styles to accommodate the new activity stream layout.
Thanks for the quick response though DJPaul I have to now figure how we proceed as too many aspects of the 1.x are demonstrating problems and I’m beginning to wish we had been able to wait for 1.2 to be released.
One point of interest though on another of the many test installs I keep running and one that I have kept pretty close to the production site in plugins and customizations this issue doesn’t arise and I can create pages quite happily so this can’t simply be a inherent BP issue but triggered by some action or plugin but don’t see what at this stage.
February 22, 2010 at 5:40 am #64719In reply to: Alternate Stylesheets for different sections
@mercime
Participant@Michaelmarian, For the Members subsection, easiest way is as Boone Gorges mentioned using body classes: e.g. Member’s Profile page use selector body.profile; Member’s Blog Page use selector body.my-blogs; Member’s Message Page use selector body.messages; etc.
However, if you still want to use conditional statements see
https://codex.buddypress.org/developer-docs/conditional-template-tags/
Thing is, locate_template array did not work for me in all the different incarnations of custom child themes I made before so this method might help you too
<?php
if (bp_is_profile_component()) {
include ('mystuff1.php');
}
elseif (bp_is_activity_component()) {
include ('mystuff2.php');
}
elseif (bp_is_friends_component()) {
include ('mystuff3.php');
}
else {
include ('mystuff4.php');
}
?>– For more specificity you could probably add – && bp_is_page(‘members’) – or whatever slug you used
– Add wp_reset_query(); right after the opening <?php if this query is placed latter part of the page or add the reset just before ?> if placed near top of the page.
February 21, 2010 at 3:16 pm #64569In reply to: Indexation of content
podictionary
ParticipantIndex and search are important related issues. A few points:
1) Database content search throughout needs serious thinking. How to include (and how to distinguish in results) blogposts, comments, activity updates, forums…
2) Indexing for search engines needs thought. What serious website doesn’t want to show up in Google?
3) A Google custom search is an option but shows up the problems of appearing in Google results; namely that scrolling activity lists result in indexes pointing to pages that no longer hold that content.
@nexia I see that at wordpress.com there is “search wordpress.com blogs” so MU can and does somehow allow for this.
February 18, 2010 at 2:49 pm #63961In reply to: Default Activity Streams Are Backwards IMHO
John James Jacoby
Keymaster/* Bounce user to their profile when logging in */
function custom_login_redirect_to_profile( $url, $isset, $user ) {
return bp_core_get_user_domain( $user->ID );
}
add_filter( 'login_redirect', 'custom_login_redirect_to_profile', 11, 3 );You could also make a child theme of your own, and use home.php as members/single/activity.php. Or instead of using home.php, make a custom page template and assign that page as your front page.
February 18, 2010 at 11:10 am #63924In reply to: Custom buddypress loop isn't working
lhnz
Participant<?php bp_has_activities(‘per_page=25’);
while ( bp_activities() ) : bp_the_activity(); ?>
<div><?php bp_activity_content() ?></div>
<?php endwhile; ?>
This worked. Frankly the lack of documentation and my lack of time is making this a nightmare to code…
February 17, 2010 at 9:09 pm #63815In reply to: Default Activity Streams Are Backwards IMHO
gregfielding
ParticipantGreat idea…think of the customization options that this could bring…
Logged in users could see activity from their friends, groups, blogs they “follow”, and even sitewide posts by certain category or tag.
Maybe there would be defaults where certain “top news” posts are displayed to everyone. (which would be incredible for my real estate site)
It could be like an igoogle page…
February 10, 2010 at 10:27 pm #63035In reply to: Rearrange order of tabs "home" "activity" "members"
danbpfr
Participant1 – manually, you have to rearrange the list order in header.php
how to do that ?
if you use 1.2 inspire you with this:
https://buddypress.org/forums/topic/bp-12-how-to-add-a-custom-tab-on-the-home-activity-section
3 – yes, and on each individual blog page too or by typing “wp-admin” at the end of your url: hxxp://exemple.com/wp-admin
February 9, 2010 at 12:26 pm #62835In reply to: Set activity filter to specific value
_tomr
ParticipantI did it! Jesus Christ, took me more than 4 hours to find that one line. It’s in activity-loop.php. Now, that was the easy part.
<?php if ( bp_has_activities( 'action=activity_update' ) ) : ?>that’s how it’s supposed to look if you want to hard code the filter to one specific value. The hard part was finding out the proper argument for the bp_has_activities function. Well, now I got it. But seriously, why are you making it so hard for users to modify?
Anyway, thats how it looked before editing:
<?php if ( bp_has_activities( bp_dtheme_ajax_querystring( 'activity' ) ) ) : ?>I tried using the docs for buddypress, specifically this page:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
But is it outdated, or is it just the wrong page for what I was looking for?
February 5, 2010 at 2:06 pm #62470Mike Pratt
Participantso here’s a tweaked version and the latest in my custom tab efforts, fyi:
// passes MyClass scope into ajax query for custom Class Year activity filter
function bn_ajax_querystring_activity_filter( $query_string, $object, $filter, $scope, $page, $search_terms, $extras ) {
global $bp;
if ( !is_user_logged_in() || $object != 'activity' )
return $query_string;
$args = array();
parse_str( $query_string, $args );
$args['object'] = $bp->groups->id;
switch ($scope){
case 'myclass':
$slug = "usma-". bp_get_profile_field_data( array('field'=> 'Class Year', 'user_id' => $bp->loggedin_user->id));
$groupid = BP_Groups_Group::get_id_from_slug($slug);
$args['primary_id'] = $groupid;
break;
case 'mycadetco':
$slug = bp_get_profile_field_data( array('field'=> 'Cadet Company', 'user_id' => $bp->loggedin_user->id));
$groupid = BP_Groups_Group::get_id_from_slug($slug);
$args['primary_id'] = $groupid;
break;
case 'mybranch':
$slug = sanitize_title(bp_get_profile_field_data( array('field'=> 'Branch', 'user_id' => $bp->loggedin_user->id)));
$groupid = BP_Groups_Group::get_id_from_slug($slug);
$args['primary_id'] = $groupid;
break;
default:
return $query_string;
}
return http_build_query( $args );
}
add_filter( 'bp_dtheme_ajax_querystring', 'bn_ajax_querystring_activity_filter', 1, 7 );and the action:
function bn_add_activity_tab() {
if ( !is_user_logged_in() )
return false;
?>
<!-- default item-list-tabs activity-type-tabs
<ul> -->
</div><!-- default item-list-tabs activity-type-tabs -->
<div class="item-list-tabs activity-type-tabs" id="bn-tabs">
</ul>
<ul>
<li id="activity-myclass">
<a>" title="<?php _e( 'Activity for my Class Year', 'buddypress' ) ?>">
<?php printf( __( 'My Class', 'buddypress' ) ) ?>
</a>
<li id="activity-mycadetco">
<a>" title="<?php _e( 'Activity for my Cadet Company', 'buddypress' ) ?>">
<?php printf( __( 'My Cadet Company', 'buddypress' ) ) ?>
</a>
<li id="activity-mybranch">
<a>" title="<?php _e( 'Activity for my Army Branch', 'buddypress' ) ?>">
<?php printf( __( 'My Branch', 'buddypress' ) ) ?>
</a>
<?php
}
add_action( 'bp_activity_type_tabs', 'bn_add_activity_tab', 1, 2 );A few things to note:
1. use the WP function sanitize_title() if you have a field that might return more than one word e.g. the group ‘Military Police’ returns ‘military police’ but transforms into ‘military-police’ (a pretty slug0 which gives you a correct slug now.
2. I added addl markup to force my new tabs into their own element.
3. Don’t be shy to make suggestions and keep improving this technique. I think many will use it to customize their installs.
February 4, 2010 at 3:18 pm #62376MrMaz
ParticipantUPDATE:
The filtering has been consolidated and drastically improved as of revision 2580. Here is an updated example:
function my_activity_filter( $query_string, $object, $filter, $scope, $page, $search_terms, $extras ) {
global $bp;
if ( $object != 'activity' || $scope != 'myclass' || !is_user_logged_in() )
return $query_string;
$args = array();
parse_str( $query_string, $args );
$args['object'] = $bp->groups->id;
$args['primary_id'] = function_to_get_group_id_for_logged_in_user();
return http_build_query( $args );
}
add_filter( 'bp_dtheme_ajax_querystring', 'my_activity_filter', 1, 7 );As you can see a TON more information about the request is being passed to the filtering, so you can more easily determine what you need to do to handle it properly.
January 27, 2010 at 8:29 pm #61842In reply to: adding content to the 1.2 default theme homepage
lautering
ParticipantJust to add more detail: this is what renders the activity stream on the homepage. Commenting out the small amount of code in home.php doesn’t seem to do anything. Commenting this out in functions.php seems to break things.
Is there a way to either eliminate the option to set what appears on your homepage, thus giving you complete control over what appears there (and maybe building/adding a special “Activity” page to replace it), or to amend this function in some way that let’s you call modify how it renders?
function bp_dtheme_show_on_frontpage() {
$settings = get_option( 'bp_dtheme_options' );
if ( empty( $settings['show_on_frontpage'] ) || 'blog' == $settings['show_on_frontpage'] )
return 'blog';
return 'activity';
}I completely understand the easy-to-use, out-of-the-box logic behind the setting for what appears on your homepage, and it’s certainly Facebook-like, but I’m using the default template to build out a full site that needs to have a unique hompeage with other content elements. The activity stream is a small part of it, and I’d like to have it there in some way, but certainly not as prominent as it is now.
This is the code that’s in home.php (all of it):
<?php
/***
* Should we show the blog on the front page, or the activity stream?
* This is set in wp-admin > Appearance > Theme Options
*/
if ( 'blog' == bp_dtheme_show_on_frontpage() )
locate_template( array( 'index.php' ), true );
else
locate_template( array( 'activity/index.php' ), true );
?>The comment obviously notes the intention of activity stream OR blog, but what about ‘neither’? I’m going to work on this later, but one idea I have is to try to add a third option of “custom”, which would pull something like “custom.php”. Sound right? Something else?
Thanks in advance!
January 26, 2010 at 6:32 pm #61726bbrian017
ParticipantI got the site running the latest trunk version.
I lost out in 80 USD it seems for the custom template (maybe)
I’m having issues with the forums loading now. It’s saying page not found.
See here, https://buddypress.org/forums/topic/forums-not-showing-up-after-trunk-update
January 22, 2010 at 6:02 pm #61384dainismichel
ParticipantOK, went in and selected the same theme for
http://community.urine-therapy.org/testing2/ that
http://community.urine-therapy.org/testing3/ uses,
but the changes I made to sidebar.php have affected testing2 and not testing3. I’m actually pretty sure I am using the same theme on both of these test member blogs. Maybe I have to go in and reselect the theme for the changes to take effect? I don’t know on that one.
Now, why don’t
Blog
Members
Groups
Forums
Blogs
work in either testing2 or testing3?
Basically, I just want those links to go to the links of the main site.
Is the logic that I make a blog and people come and make blogs and each blog gets members and sub members?
Basically, what I am going for is:
Members join and make a profile page and a blog.
They can post but not make pages
Their posts appear in sitewide activity
When you visit their blog you see only the member’s posts
There are no sub-sub members (members don’t have members)
There are no sub-sub-blogs members only get one blog and that’s it
I am starting to make some changes, but I really don’t know why just yet.
January 14, 2010 at 6:38 pm #60767In reply to: Broken delete buttons in 1.1.3
peterverkooijen
ParticipantHave you tried scattering alert statements to see where in the ajax process things are getting hung up?
I can’t find a function in ajax.js with “delete-activity”, the class on the delete button, so I don’t no where to put that test. Is that function supposed to be there?
In the 1.0 version of my site I had no classes at all on the delete link (custom theme). Deleting an item does not have fancy Ajax; the page reloads with “Wire message successfully deleted” in <div id=”message”>.
At least that works! I’d like to just recreate that for my 1.1.3 version.
So I tried removing the following:
class="item-button delete-activity confirm"from the delete button link in bp-activity-templatetags.php.
That kills the ugly “Are you sure?” popup, but it then goes to “Page Not Found’ and when you go back to the page the item is still there. So it also kills the delete process…
Next trying to spot the differences with the process in version 1.0…
How do those wpnonce links work? What do they do? There’s nothing about them in the codex.
January 14, 2010 at 3:06 pm #60753In reply to: Wire Posts in bp 1.2
Mike Pratt
ParticipantExcellent point. Not all is lost but I will take this opportunity to provide some feedback to @jjj and @apeatling re 1.2 in it’s current state
1. I get the use of the Twitter @ metaphor and adding “mentions” to the filters. Cool. BUT, it introduces a potential UI snag for users. Throughout 1.2 you make nice use of Display Name which users will become accustomed to and identify with. Now, you are identifying users by their user name as well (mixing metaphors, so to speak) as in ->
John Doe
and
Given people’s tendencies to use whacky usernames, thee is a big risk of confusion when both start popping up around the site. Not sure what the solution is but I think it’s not a trivial point, imho.
2. Now that the wire has disappeared and along comes the concept of “Send Public Message” (I get it) let’s look at what vehicle we’re making use of and what it may mean to users. As it currently stands in 1.2, to “Send Public Message” you click that button on someone’s profile and you are taken to your own Status Update field with an @username filled in.
a. the cursor is highlighted just before the @username not after (don’t forget to include a space) – this will only cause people to write the pubic message and push the @username to the end of the message. clunky
b. You’ll probably need to include a @mentions on each person’s profile page otherwise, you’ll never be able to easily see the public message to @username you just wrote. The key point being, you want this to show up on THEIR profile.
c. Probably worth considering including a notification to @username of said public message via email (make optional)
d. Q: Will these @’s be co-mingled in your own status updates and, thus create confusion. Maybe that doesn’t matter and i am overthinking it.On the activity stream, it says John Doe posted an update, when he really sent @username a public message. In Twitter when @ leads a message as 1st character, it has different context than everywhere else in the Tweet. Perhaps -> John Doe sent @username a public message ? or something.
I know I am getting fine grained here but theses (excellent) feature adds need to be over the top intuitive when introduced or they will breed unintended usages.
January 5, 2010 at 9:20 pm #60108In reply to: Friends and Groups for BuddyPress 1.3
Paul Wong-Gibbs
KeymasterTLDR version: Introduce types of groups. e.g. “User group” type – it has no forum, no “Home” page, just members listing and activity stream. This group added to Activity Stream filters where relevant.
Would have to filter out custom group type “User group” out of the /groups/directory page & member profile group page.
These custom group types could be set so they are publicly visible/private to those members involved/or hidden (visible to the creator only). As per current Group privacy settings.
Could add e.g. “Friends”, “Colleagues” and “Fans” as default, empty groups for each user on user registration. Obviously revise theme to make the “Friends” page (“Connections”, maybe) look like the Friends page rather than a regular Group.
Different users might create “User group” types with the same name but with different meaning (“Fans” could be interpreted several ways for example). This is no problem as such categorisation is defined — and belongs to — the user who does it. Might need some semantic group kind/type identifier in the code to allow FOAF/SIOC RDF profiles to be able to assigned to these “User groups”.
December 29, 2009 at 7:37 pm #59694In reply to: Buddypress Theme with WPTHEME
@mercime
ParticipantThe bp-default and bp-parent-themes are theme frameworks for the BuddyPress plugin. They show what can be done with the BuddyPress plugin and I appreciate that a lot.
For a current project with WPMU as CMS plus BP for an organization, I went with creating a customized child theme using the bp-sn-parent throughout the site including all blogs for a consistent look and feel.
Aware of the time I could allocate for this project and my average skillset, creating a child theme was the path of least resistance during continuous trunk upgrades of WPMU and BP since I started this project late September for a tentative launch mid to late January. And I would say the time I invested in creating customized child themes was worth it, 10x over.
At this time, all I have to watch for in my child themes are code changes in the files from upgraded parent themes – header.php, footer.php, sidebar.php, home.php, functions.php, style.css, and some new page templates I created.
When the new bp-default theme came out for BP 1.2 trunk, I made a new child theme based on that for blog_id_1 (BP install) specifically because of the new forums layout
My only question for the new bp-default parent theme is:why is it that the only way I could find to avoid getting a white screen when I activate my bp-default’s child theme (with own home.php) is by consistently copying the code of bp-default/activity/index.php over bp-default/home.php ?
December 27, 2009 at 2:52 pm #59550In reply to: Single WP supported on latest trunk
jedbarish
ParticipantI already set up the permalinks under custom as /%category%/%postname%/ so it went to a blog but not for members and other sections. On the front page of activity stream kept showing the loading icon. It displayed my new post update but appeared with another theme (header). I located the bpthemes under wp-content/themes and everything else in right place. Maybe there is an issue when wp installed under sub-directory like domain.com/wpdn?
December 26, 2009 at 10:12 pm #59526In reply to: New BuddyPress 1.2 default theme
@mercime
ParticipantWPMU 2.9 trunk-r2041 and BP 1.2 trunk-r2207
– BP on blog_ID_1 and WPMU used as CMS
Feedback: Child theme of 1.2 trunk bp-default theme
Getting white screen in front end (all sections) when creating a new Child theme based on new bp-default theme.
– If I add customized header.php and footer.php (with only additional divs), I get white screen,
– If I do not upload header.php and footer.php but add customized home.php, I get white screen.
– Note: the only way I got the child theme recognized was by copying code of activity/index.php over home.php in bp-default theme folder, but like mentioned above, other customizations except the sidebar.php, white screened on me. Too much eggnog last night?
Feedback: Child theme of 1.2 trunk bp-sn-parent theme
– custom Child themes of old bp-sn-parent theme transition well to new bp-sn-parents theme generally except Forums pages – only one group shown and nothing else
December 23, 2009 at 7:43 pm #59440In reply to: Friends and Groups for BuddyPress 1.3
Bowe
ParticipantHi everyone,
I made a mock-up of how I picture this “friend” page.. Actually a better name for it would be “My Network” or simply “Home”
The screenshot can be viewed here: http://www.bp-tricks.com/wp-content/uploads/my_friendsv1.jpg
The design is my own, but the functionality could be used for the new BP theme as well:
Left: The activity stream as we all know it from the upcoming BP 1.2. Added the options to filter activity based on “Friend Categories”. This works with a vertical dropdown menu so if a user has many friend categories you won’t run out of horizontal space. It would be cool if the same could be done with Groups. So you can not only show activity from all groups but also from specific groups. This would make the activity stream even better imo! In the example I added a custom filter which could be added by a Twitter plugin. It allows the user to filter the Tweets from their friends!
The right side is filled with boxes which display useful information for the user. It shows:
– Quick Links: Links to pages which might get used a lot. Users can add their own links to pages they visit often.
– Friend Categories: Show the 5 most recent friends from every category
– Groups: The groups a member is part of and an options to show all their groups
– Custom boxes: these are boxes that are added by the users or by plugins. See it as widgets but then for an individual user. In my example I’ve made two widgets:
A quick tweet widget: Allows a user to send a tweet to twitter easily
An RSS widget: The user fills in one (or more) RSS feeds which get displayed in the widget.
Personally I think this would be a great step forward for BuddyPress profiles. If there would be a “Profile API” similar to the current group API, which allows developers to easily integrate widgets or activity stream filters for their plugins, it would be really great! Some other examples could be:
Quick Photo uploads (quickly add photos to your album from your “Home”)
Submit link (BP-Links widget to quickly submit a link)
It would be even better if users could also drag and drop the widgets to their liking. I’m interested in what others think of my mock-up, and the way I think the Stream/Friend Categories should be handled.
December 14, 2009 at 10:24 am #58684Brajesh Singh
Participantthanks.
you mean the discussion topics shown at the bottom of the home page.
well, I am using external bbpress with deep integration to buddypress/wordpress mu.
The topics are coming from https://wordpress.org/extend/plugins/bbpress-latest-discussion/ plugin.
Though, if you want to do the same using internal integration
have a look here
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
specifying the action as “new_forum _post” should do that.
Hope it helps
December 11, 2009 at 4:18 pm #58487In reply to: Selective content on site wide activity feed
Mike Pratt
Participantyou should all check out the bleeding edge trunk 2161. It’s pretty stable and likely addresses all your SWA filtering and grouping needs, with the ability to be tweaked further.
SWA customization really boils down to the ability for a user to choose any combination of “who’s” and “what’s” which is what 1.2 does exactly. so, for ex. you can combine My Friends (who) and Forum Posts Only (what) You can create custom “who”s eg a particular group and add that button or combinations of “what’s’ if it suits your site’s m.o. Combine this with 1.2’s inline commenting and people will never leave your home page

You can see an example on my dev site -> http://mjpratt.com
November 9, 2009 at 5:40 pm #56277In reply to: Re-do output bp_activity_content()
Andy Peatling
KeymasterAll of the content that is output with bp_activity_content() is stored in the database. This is mostly for performance reasons. If this data had to be recreated on each page load, you’d be looking at hundreds and hundreds of queries.
You can modify it with a filter though, but you’re limited to string replacement and css modifications:
function my_function( $content ) {
return $content; // do something with the content first
}
add_filter( 'bp_get_activity_content', 'my_function' );You can put this in your own plugin, or in bp-custom.php.
-
AuthorSearch Results