Search Results for 'custom activity page'
-
AuthorSearch Results
-
August 25, 2011 at 3:50 pm #119061
kizinko
ParticipantHey,
I tried the following code from your post above, but it still isn’t working.
The activity from the group I’m trying to hide is still showing up on the home page.
‘
function bp_my_activity_filter( $a, $activities ) {
global $bp;if ( $bp->current_component != $bp->activity->slug )
return $activities;foreach( $activities->activities as $key => $activity ) {
if ( $activity->type ==’activity_update’ && $activity->item_id == ‘131’ ) {
unset( $activities->activities[$key] );
$activities->total_activity_count = $activities->total_activity_count – 1;
$activities->activity_count = $activities->activity_count – 1;
}
}$activities_new = array_values( $activities->activities );
$activities->activities = $activities_new;
return $activities;
}
add_action( ‘bp_has_activities’, ‘bp_my_activity_filter’, 10, 2 );
‘I added the new file /wp-content/plugins/bp-custom.php. I got the group id by adding bp_group_id() into groups-loop.php which is 131 as dictated in the code above. I did a test and removed the first if statement, and it removed all of the activity on that group’s page successfully. Everything from that group was still visible on the home page though.
By the way, thank you soooo much for helping me with this. I am totally lost on this thing.
August 25, 2011 at 12:53 am #119024modemlooper
ModeratorOk, so tried to move some code from core to create a custom component and nothing worked. Never got a page to create and not sure how to link it to template files.
For example: in bp-activity it has a file bp-activity-template.php and in include array there’s an entry ‘template’. Is this pointing to that file? Do we need to include all these files listed in the array? If I had bp-example-template.php in my array id still use ‘template’?
To me it seemed much easier to create components before. I know I can still use old method but that won’t last forever.
Can somebody update the skeleton component to reflect the new method?
August 21, 2011 at 7:54 pm #118808modemlooper
Moderatorcreate a file bp-custom.php and add to /wp-content/plugins/bp-custom.php
add this code to file:
`<?php
define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ );
?>`To change other settings read this page: https://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/
August 14, 2011 at 8:22 pm #118431In reply to: Customizing profile page.
alfredojp
ParticipantThank you @shapherd and @Stigmartyr
But i’m not sure you guys are understanding me heheWhen I go to my profile or any profile i see under the avatar:
Activity
Profile
Friends
Groups
MessagesWhat i want is:
News*
Profile
Activity
Friends
etcI also would like to know how you take one out
Thank you for your time and help. I greatly appreciate it. Let me know if you have a possible solution or anything else that might help
August 14, 2011 at 4:57 pm #118420Boone Gorges
KeymasterI know what the problem is, but not necessarily how to solve it.
These JS rich text editors work by hiding the HTML textarea, and hijacking the form submit process; when you submit the form, the CKeditor takes the content of its custom editor and puts it into the hidden textarea before the form is submitted for processing. The problem with the activity update form is that it’s submitted with ajax rather than with a regular HTML form submission (which requires a page load).
TinyMCE has a method called .triggerSave() that you can call manually on an event (such as (‘#whats-new-submit’).click()) that will do this content shuffling without a regular form submit. It’s possible that CKeditor has something similar.
August 11, 2011 at 9:35 am #118202Stigmartyr
Member@r-a-y – hey man thanks for being a great help here to the community. I’ve been reading most of your posts in the forums over the past several hours fighting with my permalinks in activity streams.
I saw your .htaccess redirect post for mismatch 301 and tried it but I think I need it customized for activity streams?
In my example, certain activity posts are just going to the front page of my site rather than the post itself, they’re all coded like: http://www.site.com/activity/p/0001 when you click ‘view’ it just goes to the home page
Pulling my hair out trying to figure out how to get them to refresh or something. My permalink structure is /%post_id%/%postname%
It’s making me crazy lol
August 10, 2011 at 6:35 am #118116In reply to: how to remove a page from buddypress nav menu
@mercime
Participantdelete activity
`
<li class=”selected”>
<a href="//” title=””>`
and groups link
`<li class=”selected”>
<a href="//” title=””>
`Or, you might consider changing main navigation to a custom menu http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus
August 9, 2011 at 10:08 pm #118088In reply to: “My Favorites” Plugin
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?
August 5, 2011 at 6:30 am #117757In reply to: 1.5 beta2 – Activity and member pages redirecting
Paul Wong-Gibbs
KeymasterIf you think it’s a theme, you could try emptying functions.php to remove any custom code in there?
August 3, 2011 at 2:45 pm #117525In reply to: Lenght of Activitystream
Prince Abiola Ogundipe
Participantyou 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
July 26, 2011 at 3:55 pm #116949Sarah Minx
MemberHey 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/ApacheHere 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!
July 5, 2011 at 12:58 am #115733In reply to: Adding Posts to a BuddyPress Group
sdls
MemberTo 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 );//
July 2, 2011 at 4:16 pm #115567Hugo Ashmore
Participantcouple 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?
July 1, 2011 at 10:39 am #115511In reply to: Members’ privacy: how can I hide members’ profiles?
aces
ParticipantDerived 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….June 11, 2011 at 5:48 pm #114355In reply to: Template File For Single Activity?
@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-widthYou should also correct the width of the site when in permalink view
` body.activity-permalink {
min-width: 960px;
max-width: 960px;
}`
change to 1000pxJune 1, 2011 at 7:35 pm #113613In reply to: non members block
shanebp
ModeratorCreate 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.3May 17, 2011 at 5:47 am #112446stwc
ParticipantTerrible 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.
May 5, 2011 at 4:04 am #111623In reply to: Subdomain Install – Pages Not Found
allanf72
MemberThank 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.
April 28, 2011 at 7:09 pm #111267In reply to: redirect to activity after login?
chrisreg1
MemberR-a-y – that doesn’t work for me unfortunately.
I am using the:
– latest version of WordPress 3.1.2
– Child theme of SuffusionAnd the latest plugins for Suffusion BP Pack (1.02), BuddyPress (1.2.
, 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!
April 28, 2011 at 8:26 am #111239In reply to: CSS help: Ask A Question Button
Hugo Ashmore
Participantfor 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.April 28, 2011 at 6:47 am #111230In reply to: “Show Updates” as default in activity?
nit3watch
ParticipantYou 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 );`April 23, 2011 at 3:08 pm #110799In reply to: URGENT – How To Set Default Values?
Boone Gorges
KeymasterIt 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.
April 18, 2011 at 8:24 pm #110522In reply to: Members show up twice in group
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 UsersApril 13, 2011 at 12:55 am #110127@mikey3d
ParticipantI 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’ );`April 9, 2011 at 1:01 am #109855In reply to: Activity box on static front page – not on sidebar
Marcos Nobre
ParticipantDid you try adding the activity loop?
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
-
AuthorSearch Results