Search Results for 'custom activity page'
-
AuthorSearch Results
-
December 6, 2013 at 5:31 pm #175189
In reply to: Changing default activity stream view
Shmoo
ParticipantI think it’s too complex for a Plugin because this is too specific to your needs , plugins are great when they serve lots of people. But you could alter the layouts if you know how the template structure in WordPress and BuddyPress works.
Give each page it’s own custom Activity-loop template and you should be able to make whatever view you want on each page that shows an Activity.
By default each page uses only one ( the default ) activity-loop template to create the activity content. But if you like you can duplicate those files and customize them for each page. Just duplicated the needed files and rename them to something like this: activity-groups-loop.php or activity-members-loop.php than make sure at the groups page the loop to the activity doesn’t load the default activity templates but your custom ( duplicated ) files.I really love how easy this works in WordPress and BuddyPress not a lot of CMS software have this easy to use template structure and logic.
The only real problem I found with this is that the Activity-contents are made by very dynamic code – it’s very difficult to alter the items that will be shown at the page such as time, name, avatar , activity-title and the real content compared to other BuddyPress pages.
I’ve made a Trac. Ticket for BuddyPress 2.0 , so lets hope somebody very smart could change the code a bit and we can really alter our Activity contents too.
https://buddypress.trac.wordpress.org/ticket/5261December 2, 2013 at 12:27 am #175027htrev
ParticipantJust to clarify what’s happening here:
The search results page I’d like to see is the standard WP one – i.e. showing matching blog posts. This is what happens when the home page is set to show latest posts (in Appearance > Customise > Site front page), which is fine. However my site’s home page is set it to show the default Buddypress Activity page, and now the search results (i.e. a URL of the form http://www.site.com/?s=query) shows matching activity updates. This applies whether I’m using a custom theme or the default Buddypress theme. Is there any way this can be configured so that this page shows matching blog posts instead?
November 24, 2013 at 4:48 pm #174737In reply to: Feedback: BP is getting better by each release-cycle
Shmoo
ParticipantTrue, but I was thinking of using the FitText.js plugin to prevent usernames from going to a second line when they become longer at this index page.
While working with min-heights on each element I try to control each member ‘widget’ having the same overall height.I would like to use BuddyPress as an upgrade (redesign) of an exciting bbPress site that has been broken from upgrading from bbPress 1.0 -> 2.0.
This site offers news articles, video + audio Post Formats and support trough bbPress but has grown into some very active ‘online-public-bar’ where people like to post a lot of Off Topic stuff mainly on the forum-side of the of the website while the homepage (news) is often overlooked.Using the Groups section for all Off Topic forum discussions and use the bbPress forums module only for real On Topic support would make this website more social and getting more people involved though the Activity-stream.
Plus I could make a custom audio-postformat (Podcasts) query on the BP Groups page to list all latest Podcasts.Redesign of the Groups section. Replacing the Avatar for an icon that will be the same through the entire site and people will recognize it as Off Topic stuff.
Maybe the font-size, spacing and coloring is still a bit off but I’ll look at this at the end, right now it using the Global styles.November 20, 2013 at 4:27 am #174517In reply to: 2.0 top features – ideas
Martyn_
Participant* Better customisation options of the activity stream: ie to be able to define a set of “or” filters for content type, and who. So (with plugin support) I can define a feed to include things from “me or friends or followers” showing “topics and topic replies and posts and new users” (and ideally be able to have a permalink to this with no other fluff on display). The current activity feed selectors are a mess and don’t provide what most people want to see.
* A way to select which filters and views are available in activity/, and persistently set the default activity feed view (from the admin panel)
* live activity updates
* A reply by PM hook into bbpress
* Better options for users to self delete
* Improved management/rethink of the tabs on profile pages (because this rapidly piles up as you add in plugins) : “Activity Profile Messages Friends Following Followers Location Groups Blog Forums Events Gallery Settings Links” Is not viable for a one line menu bar – this is maybe a display issue, but…!
* be able to pass a function to the members loop, thats called to determine the display order (e.g. so I can easily order by City or age or any xprofile field)
Maybe these are already there, but these are the things that are bugging me as a non-expert dev right now…
November 17, 2013 at 1:28 am #174322In reply to: Buddypress Custom Members Page Item Alignment
Henry
MemberAs an example, if you wanted to align-right the “active time ago” text you could put this in your theme’s style.css
.item-meta .activity { float: right; }
As I said though, there are many ways to do it depending on your exact needs.
text-align: right
is an example. Make the parent elementposition: relative;
and then useposition: absolute; right: 0; top: 0;
is another. The best approach will all come down to what you’re trying to achieve visually overall.November 2, 2013 at 7:55 pm #173719In reply to: Avatar-less
aces
Participant@barboncaves
Have you tried disabling Show Avatars in WordPress Admin > Settings > Discussion? ( – the avatars section is lower down the page )You might need to customise your child theme’s style sheet. Using bp-default the following might be useful:
.activity-list .activity-content { margin-left: 25px; }
I haven’t checked anywhere else…
October 25, 2013 at 12:41 am #173340In reply to: Customizing Page Templates
strangechild
ParticipantOh and I was able to get one of my pages out of “lockdown” temporarily.
October 18, 2013 at 10:52 am #173050In reply to: Linking user avatar to user profile page
binutz
ParticipantThank you for the response. I created a file named bp-custom.php in the plugin folder and added the code specified above into it. Unfortunately,it didn’t work!
However,it works when I add the same code into wp-config.php file.
Only issue that I find with this method is that it always redirects the logged in users to profile page bypassing the activity update. I would like to be redirected to activity updates after loging in. All I need is to show up the profile page when the profile avatar or the user name is clicked ,in the Members page. Can it be done anyway?October 15, 2013 at 8:36 pm #172893In reply to: Activity Stream post voting/sorting
danbp
ParticipantBP has no post, it’s WP. 😉
BP has no rating system, so you need to create it first or use a rating plugin for the blog posts. And probably the votes won’t show up in the activities. I’m afraid that what you want will need some custom coding. 😉Can’t help you more, but here are some usefull resource.
The codex Activity Loop page.
Some advice to modify the Activity
A detailed tutorial, by @imath
A configurable activity widget
October 6, 2013 at 4:39 pm #172370In reply to: [Resolved] How to redirect bp users to activity page
bp-help
Participant@tse11
Patience please! Deactivate the plugin you was using for redirecting and try this in bp-custom.php https://codex.buddypress.org/plugin-development/bp-custom-php/ :function bphelp_redirect() { if( is_user_logged_in() && is_super_admin && is_home) { // redirect to dashboard code bp_core_redirect( get_option( 'home' ) . '/wp-admin/' ); }else { if( is_user_loggedin() && !is_super_admin && is_home) { // redirect to activity code bp_core_redirect( get_option( 'home' ) . '/activity/' ); } } } add_action( 'template_redirect', 'bphelp_redirect', 1 );
October 6, 2013 at 8:37 am #172365In reply to: [Resolved] How to redirect bp users to activity page
bp-help
Participant@tse11
Search the forum. This has been covered before! You could create a conditional to do this. Basically an if and else statement. You would need to include is_super_admin in the conditional check and the user would be redirected appropriately. For instance:function bphelp_redirect() { if( is_user_logged_in() && is_super_admin ) { // redirect to dashboard code }else { if( is_user_loggedin() && !is_super_admin ) { // redirect to activity code } } } add_action( 'template_redirect', 'bphelp_redirect', 1 );
This would go in bp-custom.php:
https://codex.buddypress.org/plugin-development/bp-custom-php/September 20, 2013 at 4:10 am #171569geoffreysf
ParticipantPutting this in the functions or bp-custom.php files did not work.
I finally managed to get the admin and any other user excluded from the members directory by modifying the bp_had_members query that was already in my members-loop.php file.
<?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ).’&exclude=1,3,25′ . ‘&type=alphabetical&per_page=30’ ) ) : ?> <!– &exclude= user_ids of the people you want to exclude –>
By adding just this, it also removed the users from the total members count.
Note: I do not use friends or activity feeds on my site, so I have no idea if it hides from them, but I suppose it wouldn’t.
I have been looking high and low for the answer to this with my limited PHP knowledge… and wanted to share it back so other people could learn from it too.
And credit where it is due, this post led me to the answer.
https://buddypress.org/support/topic/member-parameters-not-working-with-bp_ajax_querystring/September 7, 2013 at 11:30 am #170989In reply to: Member counter on activity page not working
danbp
Participanthi @joesell89,
first, remove this wrong
add_filter( 'bp_get_total_member_count', 'bp_core_get_total_member_count' )
;
from your bp-custom.php. Correct references are in this file: bp-core-template.phpSee if things went well.
Pay attention to the cotes. In your example this line has another typo as the the one used for the function.
The mySql errors are due to mailchimp and wp slim stats plugins. Control first the slim stats settings or search for this problem on the plugin support forum.
Debug by deactivating both, and check if the errors remain.September 5, 2013 at 3:16 am #170864hornets2002
ParticipantI need this too.
I used to customize my member profile pages using the legacy template file, “profile.php”.
Now I’m flummoxed as to how I should proceed applying the same modifications in 1.8.
August 27, 2013 at 1:57 am #170488In reply to: two page home page?
bp-help
Participant@villnoweric
Just remove Home from the menu, then add activity to your custom menu. Then change the navigational label to “Activity Feed” or whatever you wish!August 27, 2013 at 1:05 am #170484In reply to: two page home page?
bp-help
Participant@villnoweric
Try this it is a slightly modified snippet I did earlier but fits your requirement. Follow the instructions in the code.`
// PLEASE NOTE FOR THIS TO WORK:
// Before adding this code to bp-custom.php
// https://codex.buddypress.org/developer/customizing/bp-custom-php/
// you will need to create a new page in the dashboard and name it
// something like “Dummy Page” for example or any name you choose.
// Do not add this page to your menu because it is just a dummy page
// for the redirect. Then go to Dashboard/Settings/Reading.
// Under “Front page displays” select “A static page.” Then use the
// “Front page” drop-down menu to select the page you created. In my
// example for instance I selected “Dummy Page” for my front page.
// Done! Now logged out visitors get redirected to the register page,
// and logged in users get redirected to the activity stream./* Redirects to profile upon login, and logged out users are redirected to register page */
function bp_help_redirect_to_profile(){
if( is_user_logged_in() && bp_is_front_page() ) {
bp_core_redirect( get_option( ‘home’ ) . ‘/activity/’ );}else {
if ( !is_user_logged_in() && !bp_is_register_page() && !bp_is_activation_page() )
bp_core_redirect( get_option( ‘home’ ) . ‘/register/’ );
}
}add_action( ‘get_header’, ‘bp_help_redirect_to_profile’,1 );
`August 22, 2013 at 4:06 pm #170240In reply to: Use a BP legacy template in a child theme
yannlossouarn
ParticipantHello,
In fact I’d like to have two distinct behaviours for people who visit http://fablab-lannion.org home page :
– simple visitors should show the carrousel
– logged-in users should show a personal, customized view, that would notably contain a filtered activity flow that concern them.Is that more clear ?
August 19, 2013 at 8:05 pm #170064neo-tronic
ParticipantI should have updated this thread ages ago. Yes, I have long had custom post types showing up in my activity stream and it is pretty rock solid.
I use this snippet (which I found someplace but don’t know where) and add it to bp-custom.php, which is a file you create in your plugins folder.
The snippet is currently written for MarketPress products, however, you can use it to support any custom post type. Edit the four things below to modify for your custom post type.
– Edit the function name to whatever you want, it just needs to be unique,
– Line 19 to be the the custom post type you want to use;
– Line 28 to reflect the activity record text you want,
– Line 62 to reflect the name of the function you created for your CPTI’m currently using about 7 different edits of it to support that many different CPTs in the activity stream and it works great. Yes, it works in BP 1.7
I’ve added this to my bp-custom.php file and get an error on the following Sektion. Can anyone help please? ( @prometheus-fire ? )
bp_blogs_record_activity( array( 'user_id' => (int)$post->post_author, 'action' => apply_filters( 'bp_blogs_activity_new_post_action', $activity_action, &$post, $post_permalink ), 'content' => apply_filters( 'bp_blogs_activity_new_post_content', $activity_content, &$post, $post_permalink ), 'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ), 'type' => 'new_blog_post', 'item_id' => $blog_id, 'secondary_item_id' => $post_id, 'recorded_time' => $post->post_modified_gmt
Here the error message: Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of apply_filters(). in /homepages/39/d415915588/htdocs/wp-content/plugins/bp-custom.php on line 35
August 14, 2013 at 7:31 pm #169857Siddharth Pereira
ParticipantOK. So i found a partial solution.
I tried adding the below pasted snippet to my bp-custom.php file inside my plugin folder and it worked for the activity page. I dont want to sound like a complete noob but can someone tell me how do i replicate this for the members and group page?
I tried variations of the code to support _groups_component and _members_component but that didnt work.
/* Prevent logged out users from accessing bp activity page */
function nonreg_visitor_redirect() {
global $bp;
if ( bp_is_activity_component() ) {
if(!is_user_logged_in()) { //just a visitor and not logged in
wp_redirect( get_option(‘siteurl’) . ‘/wp-login.php’ );
}
}
}
add_filter(‘get_header’,’nonreg_visitor_redirect’,1);August 6, 2013 at 1:44 pm #169445In reply to: Member counter on activity page not working
Anonymous User 7600456
Inactive1. Which version of WordPress are you running? – 3.6 (but the problem was there before upgrading from 3.5.2)
2. Did you install WordPress as a directory or subdomain install? – N/A
3. If a directory install, is it in root or in a subdirectory? – N/A
4. Did you upgrade from a previous version of WordPress? If so, from which version? – 3.5.2
5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. – N/A
6. Which version of BP are you running? – 1.8.1
7. Did you upgraded from a previous version of BP? If so, from which version? – 1.8
8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones? – Many but I have tried disabling them all except Buddypress and the problem is still there.
9. Are you using the standard BuddyPress themes or customized themes? – Customised theme but problem is persistent even with Twenty Twelve theme.
10. Have you modified the core files in any way? – No
11. Do you have any custom functions in bp-custom.php?
<?php // hacks and mods will go here function activity_publish_custom_post_types($cpts) { $cpts[] = 'page'; $cpts[] = 'attachment'; return $cpts; } add_filter ( 'bp_blogs_record_post_post_types', 'activity_publish_custom_post_types' ); add_filter ( 'bp_blogs_record_comment_post_types', 'activity_publish_custom_post_types' ); add_filter( ‘bp_get_total_member_count’, ‘bp_core_get_total_member_count’ ); ?>
12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? – 2.3.2
13. Please provide a list of any errors in your server’s log files.
text/x-generic error_log ASCII English text, with very long lines [31-Jul-2013 23:00:48 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE meta_key = 'entry_id' AND meta_value = '211'' at line 1 for query SELECT site_id FROM WHERE meta_key = 'entry_id' AND meta_value = '211' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array, call_user_func_array, GFPMoreStripe::parse_request, GFPMoreStripe::cancel_subscription, do_action('gform_subscription_canceled'), call_user_func_array, GFPMoreStripe::downgrade_stripe_user, GFUserData::get_site_by_entry_id [01-Aug-2013 04:22:39 UTC] wpMandrill Error: Error : [01-Aug-2013 04:22:39 UTC] 2013-08-01 04:22:39 wpMandrill::sendEmail: Exception Caught => Invalid API Key [01-Aug-2013 04:22:39 UTC] blah@blah.com ([blah blah] Password Reset) [01-Aug-2013 16:08:26 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE meta_key = 'entry_id' AND meta_value = '217'' at line 1 for query SELECT site_id FROM WHERE meta_key = 'entry_id' AND meta_value = '217' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array, call_user_func_array, GFPMoreStripe::parse_request, GFPMoreStripe::cancel_subscription, do_action('gform_subscription_canceled'), call_user_func_array, GFPMoreStripe::downgrade_stripe_user, GFUserData::get_site_by_entry_id [02-Aug-2013 13:43:45 UTC] wpMandrill Error: Error : [02-Aug-2013 13:43:45 UTC] 2013-08-02 13:43:45 wpMandrill::sendEmail: Exception Caught => Invalid API Key [02-Aug-2013 13:43:45 UTC] wpMandrill::wp_mail_native: blah@blah.net ([blah blah] First Order) [02-Aug-2013 17:07:36 UTC] wpMandrill Error: Error : [02-Aug-2013 17:07:36 UTC] 2013-08-02 17:07:36 wpMandrill::sendEmail: Exception Caught => Invalid API Key [02-Aug-2013 17:07:36 UTC] wpMandrill::wp_mail_native: blah@blah.net ([blah blah] First Order) [02-Aug-2013 21:57:15 UTC] wpMandrill Error: Error : [02-Aug-2013 21:57:15 UTC] 2013-08-02 21:57:15 wpMandrill::sendEmail: Exception Caught => Invalid API Key [02-Aug-2013 21:57:15 UTC] wpMandrill::wp_mail_native: blah@blah.com (Welcome to blahblah!) [06-Aug-2013 03:54:52 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE meta_key = 'entry_id' AND meta_value = '265'' at line 1 for query SELECT site_id FROM WHERE meta_key = 'entry_id' AND meta_value = '265' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array, call_user_func_array, GFPMoreStripe::parse_request, GFPMoreStripe::cancel_subscription, do_action('gform_subscription_canceled'), call_user_func_array, GFPMoreStripe::downgrade_stripe_user, GFUserData::get_site_by_entry_id [06-Aug-2013 13:23:34 UTC] WordPress database error Unknown column '$autopurge_interval' in 'where clause' for query DELETE ts FROM wp_slim_stats ts WHERE ts.dt < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $autopurge_interval DAY)) made by do_action_ref_array, call_user_func_array, wp_slimstat::wp_slimstat_purge
14. Which company provides your hosting? – OVH.com
15. Is your server running Windows, or if Linux; Apache, nginx or something else? – Apache
Thank you @mercime for your reply. I have disabled all plugins and used a fresh Twenty Twelve them and the problem is still there. Thanks in advance.
August 1, 2013 at 9:10 am #169202Roger Coathup
ParticipantYou shouldn’t be using Genesis Connect with current versions of BuddyPress.
From the Genesis Connect developer:
As of BP 1.7 you do not need to have GenesisConnect. We are currently maintaining it for customers who had BP installs prior to BP 1.7.
July 24, 2013 at 1:37 pm #168727In reply to: [Resolved] jQuery Easing Plugin Error
javiercenteno
ParticipantProblem solved. There was a conflict with other js libraries so I removed them and used only the ones that come with the default BuddyPress theme.
Now I have a separate issue where the Activity feed is not filtering when I select a filter. It works well in the Groups or Members page but not in the main “activity” page (or in my case “Newsfeed”). I’m going through each page in my custom theme and comparing it to the default theme to make sure I didn’t forget to include something. Hopefully I’ll figure it out soon!
July 24, 2013 at 4:15 am #168681In reply to: Activity Streams in Page and Groups
@mercime
Participant@rayela open up your own text editor – NotePad on PC or TextMate on Mac.
– File > New
– Add the content per what I posted above
– File > Save As – bp-custom.php (note select All Files in dropdown)
– Upload bp-custom.php via FTP/cpanel to where I noted it aboveJuly 24, 2013 at 12:09 am #168671In reply to: Activity Streams in Page and Groups
@mercime
Participant@rayela You create a file bp-custom.php and include the code there – make sure there’s no line or space above or beside opening <?
Then you upload that file from computer into your server wp-content/plugins/ folder via FTP or cpanel
July 23, 2013 at 11:51 pm #168670In reply to: Activity Streams in Page and Groups
Rachel Biel
Participant@hnla, since you have been patient with me so far, Hugo, can you help me with my initial question of the Activity streams? I found the following and made notes in my forum help area on my site:
I want to disable replies on the Activity Streams because they do not carry through to the original post in the Group Forums.
My notes on how to do this:
Post on why this is confusing: http://commonsinabox.org/groups/help-support/forum/topic/your-members-might-be-confused-activity-stream-comment-vs-group-forum-reply/
Discussion about this on GitHub: https://github.com/cuny-academic-commons/commons-in-a-box/issues/73
Solution by boonebgorges (one of the BuddyPress authors):
Putting this line in your functions.php or bp-custom.php file will disable all activity stream commenting:add_filter( ‘bp_activity_can_comment’, ‘__return_false’ );
Note on bp-custom.php file:
Creating your filebp-custom.php does not exist by default. If you don’t have a file located at /wp-content/plugins/bp-custom.php, go ahead and create a blank file with the following:
?
1
2
3
< ?php
// hacks and mods will go here
?>
Next, save the file as “bp-custom.php” and verify that this file is located at /wp-content/plugins/.Now, when you encounter a forum thread telling you to put a code snippet in bp-custom.php, you’ll know what to do!
See: https://codex.buddypress.org/developer/customizing/bp-custom-php/Action:
How is this done? Do I go to my control panel and create a file there? -
AuthorSearch Results