Search Results for 'custom activity page'
-
AuthorSearch Results
-
March 7, 2013 at 1:41 pm #155669
In reply to: Create private membership site with BuddyPress
bp-help
ParticipantAdd this to bp-custom.php https://codex.buddypress.org/developer/customizing/bp-custom-php/
and it will prevent non-logged in users from accessing BP pages.
`
/* Block BP Pages For Non-Logged In Visitors */
function bp_block_pages() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
// add components to be blocked to non-logged in visitors
if(!is_user_logged_in()) {
wp_redirect( get_option(‘siteurl’) . ‘/register’ );
} // Change /register to the page you want non-logged in visitors directed to
}
}
add_filter(‘get_header’,’bp_block_pages’,1);
/* End BP Blocked Pages */
/* Remove RSS Feeds */
function bp_remove_feeds() {
remove_action( ‘bp_actions’, ‘bp_activity_action_sitewide_feed’, 3 );
remove_action( ‘bp_actions’, ‘bp_activity_action_personal_feed’, 3 );
remove_action( ‘bp_actions’, ‘bp_activity_action_friends_feed’, 3 );
remove_action( ‘bp_actions’, ‘bp_activity_action_my_groups_feed’, 3 );
remove_action( ‘bp_actions’, ‘bp_activity_action_mentions_feed’, 3 );
remove_action( ‘bp_actions’, ‘bp_activity_action_favorites_feed’, 3 );
remove_action( ‘groups_action_group_feed’, ‘groups_action_group_feed’, 3 );
}
add_action(‘init’, ‘bp_remove_feeds’);
/* End Remove RSS Feeds */
`March 6, 2013 at 9:47 am #155235MatthewByrom
ParticipantHi, @shanebp
Oh no, not all this is happening in the one customised plugin. I was simply describing what appears to be happening in the system as a whole when you hit the Submit button in the customised post. This thing is one tortured mass of plugins. 🙁
The Custom post page is generated by Gravity Forms. This is the plugin that handles creating a post & saving it.
The Add-a-Post-to-Activity-Stream-so-it-sends-an-Email-Like-an-Update is provided by a custom plugin that extends the functionality of BuddyPress Group Email Subscription.
It just seems that the timing’s out a bit.
If I can make the postmeta handling occur before the post is added to the Activity Stream, then all will be well, as my own trivial addition to this will be fine.
I’ll take a look at wp_mail. I thought that Buddypress may override what happens in there.
Thanks for that & apologies for posting in the wrong part of the forum. Just noticed that.
February 24, 2013 at 11:11 pm #154020In reply to: Re-order Subnav tabs in profile page
bp-help
Participantdefine(‘BP_DEFAULT_COMPONENT’,’groups’);
you put this in bp-custom.php and that should set it. example:
define(‘BP_DEFAULT_COMPONENT’,’profile’);
or
define(‘BP_DEFAULT_COMPONENT’,’activity’);February 24, 2013 at 2:34 pm #153986In reply to: Re-order Subnav tabs in profile page
bp-help
Participant@fatche@bluelf, @modemlooper removed this plugin from the repository unfortunetly! you could try creating a bp-custom.php file in yoursite/wp-content/plugins directory and add the following between opening and closing php tags:
define(‘BP_DEFAULT_COMPONENT’,’groups’);
global $bp;
$bp->bp_nav[‘profile’][‘position’] = 20;
$bp->bp_nav[‘forum’][‘position’] = 30;
$bp->bp_nav[‘posts’][‘position’] = 40;
$bp->bp_nav[‘activity’][‘position’] = 50;
$bp->bp_nav[‘blogs’][‘position’] = 60;
$bp->bp_nav[‘friends’][‘position’] = 70;
$bp->bp_nav[‘messages’][‘position’] = 80;
$bp->bp_nav[‘groups’][‘position’] = 10;
$bp->bp_nav[‘settings’][‘position’] = 90;
}
add_action( ‘bp_init’, ‘tricks_change_bp_tag_position’, 999 );
}
add_action( ‘wp_head’, ‘tricks_change_bp_tag_position’,9 );The numbers in increments of ten correspond to the order in which they will be listed in the navigation.
February 24, 2013 at 1:20 am #153952bp-help
ParticipantTry this plugin:
https://wordpress.org/extend/plugins/restricted-site-access/`
Just place this between opening and closing php tags in the bp-custom.php file:`
On the below line you can change the /register to the page you want them redirected too!
wp_redirect( get_option(‘siteurl’) . ‘/register’ );
For example:
wp_redirect( get_option(‘siteurl’) . ‘/activity’ );February 23, 2013 at 9:27 pm #153935In reply to: How to Restrict Pages to Unregistered Members
mhannor
ParticipantSo I placed this in wp-content\plugins\bp-custom.php
Then I added:
function bp_guest_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() /*||
bbp_is_single_forum()*/ ||bp_is_forums_component() ||
bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
// enter the slug or component conditional here
if(!is_user_logged_in()) { // not logged in user
wp_redirect( get_option(‘siteurl’) . ‘/members-2’ );
} // user will be redirect to any link to want
}
}
add_filter(‘get_header’,’bp_guest_redirect’,1);
That didnt help the pages still show
February 23, 2013 at 8:47 pm #153925Kevin M. Schafer
Participant@mercime I understand what you’re saying, I really do. I tried everything. When I was able to successfully activate BP 1.7 beta, I received multiple posts on the activity stream — four of them right in a row. Here’s the really weird part. When I went to the BP default theme and posted from there, the little button wouldn’t appear to post the text. My site had some severe issues. It tried to, and a hard refresh sometimes made it appear. After making a post, the button disappeared again.
I ultimately reverted back to the Stable BP version, and everything worked fine. Then, to make sure I won’t face an upgrade issue down the road when the new release is issued, I uploaded everything from scratch. Totally wiped it all clean and created a new database with a different name.
I know this solution sounds like turning off a computer with the button on the tower — a big no no for professionals, but I’m still learning. A week ago I could barely navigate my multisite, and today I’m really moving through it. I even created custom page names this time to assign to BP.
Last week after I installed BP 1.7 beta, I tried several times to change me permalinks. Mostly due to appearance and robot spam (renaming register page to something else).
A new install today has afforded me the chance to really make a good solid base for any and all WordPress and BuddyPress upgrades in the future.
I’m really learning a lot about databases and domain add-ons (for clean URLs). This past week I’ve taught myself to use cPanel for almost everything. I use FileZilla now for mostly uploading zip files.
I hope I don’t wear out my welcome here with my issues. I really appreciate everyone’s help. I find myself often reading posts that are two and three years old. All informative. It’s all very interesting, and I’m really learning a lot.
Thank you for your time. I really appreciate it.
Kevin
February 22, 2013 at 4:23 pm #153746In reply to: [Resolved] Need some help for a customization.:)
@mercime
Participant@creativepixels There’s still hope. I overlooked the fact that you already went through the Appearance > BP Compatibility process. So here’s what you’ll do:
– Deactivate BP template pack plugin
– Remove the 6 BuddyPress folders transferred to your supreme theme’s folder in wp-content/themes/supreme-theme folder namely: /activity, /blogs, /forums, /groups, /members, and /registration.
– Clear cache and check your BP pages now.
February 21, 2013 at 4:20 pm #153609In reply to: Private Community with Public WordPress
bp-help
ParticipantIt stripped the code again. Just place this between opening and closing php tags in the bp-custom.php file:
`
function bp_guest_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
// enter the slug or component conditional here
if(!is_user_logged_in()) { // not logged in user
wp_redirect( get_option(‘siteurl’) . ‘/register’ );
} // user will be redirect to any link to want
}
}
add_filter(‘get_header’,’bp_guest_redirect’,1);
`February 20, 2013 at 8:54 am #153487In reply to: [Resolved -Tip] Page comments in activity stream?
Anonymous User 7600456
InactiveHooray! I worked it out in the end.
Here is how I did it:
1, If you don’t already have one create a blank page in ‘/wp-content/plugins’ called bp-custom.php (see this page for more info)
2, Paste this code into bp-custom.php: http://pastebin.com/Sk56iQQU
For reference these are the pages that helped me work it out:
https://buddypress.trac.wordpress.org/ticket/4784
https://buddypress.trac.wordpress.org/ticket/4106
https://codex.buddypress.org/developer/customizing/bp-custom-php/
Edit: I can’t get the ‘code’ tags to work. I have put it in a pastebin. Mods feel free to edit this to work and delete this note and the link to pastebin.
February 18, 2013 at 11:12 am #153326In reply to: Custom post types to activity
Unsal Korkmaz
ParticipantWell..
I found my problem..
Btw it seems it was a misunderstood that i was trying to show it on blogs directory as latest post.. Seems my problem is post_type = ‘post’ is hardcoded on buddypress:$paged_blogs[$i]->latest_post = $wpdb->get_row( "SELECT post_title, guid FROM {$blog_prefix}posts WHERE post_status = 'publish' AND post_type = 'post' AND id != 1 ORDER BY id DESC LIMIT 1" );
This is just.. wrong. Why not use {$blog_prefix}bp_activity table? why trying to connect to {$blog_prefix}posts?
February 5, 2013 at 6:23 pm #152445In reply to: bbPress menu: parent not highlighting
Mitesh Patel
ParticipantThanks @ubernaut. Yes, that’s a nice idea, but I do want to use site-wide forums.
The page structure is like this, but with more pages
Home
About
Community
-Forums
-Groups
-Activity
ContactAnyway, I don’t think it’s going to be possible without some devine intervention :), as I noticed in testbp.org site, the ‘discussion’ menu is highlighted only when you select it (the page is forum-index). When you go any deeper (select a forum or a topic), the highlight get’s lost, so the issue is, the custom menu is not able to acquire/implement the hierarchy info, which may or may not have been provided by bbpress itself.
The same problem is there with the link you posted as well. On the other hand, all the buddypress menus and sub-menus and sub-sub-menus can correctly highlight the parent ‘community’ page. So, it’s a bbPress/forum specific issue.
January 24, 2013 at 11:19 am #151629In reply to: Blog post comments in activity stream?
Clive Hetherington
ParticipantI’ve found that somewhere down the line a decision was made to only allow comments from posts into the activity stream.
My comments disappeared from activity because 99% of my comments are from pages.
I’m presuming this change was made to accommodate custom post types. I’d suggest that as these types of decision can sink the entire reason for a BP installation (in some cases) that they should be made with some thought or perhaps even a community vote?
Can BP make this an OPTION in the next version please?
Perhaps there should be an option to include or exclude each of the standard wp custom types on installation?
January 22, 2013 at 3:35 pm #151456In reply to: How can I remove the […] from my activity pages
danbpfr
Participanthi @fitnessblogger,
use this in wp-content/plugins/ bp-custom.php
(If you haven’t this file you have to create it first)Tested on 1.6.3
`function bpfr_excerpt($text) {
return trim($text,'[…]’);
}
add_filter(‘bp_activity_truncate_entry’, ‘bpfr_excerpt’, 3, 3 );`if you want to replace […] by ‘xxx’ you use this
`function bpfr_excerpt($text) {
return str_replace( ‘[…]’,’xxx’,$text );
}
add_filter(‘bp_activity_truncate_entry’, ‘bpfr_excerpt’, 3, 3 ); `Take care with copy/pasting from here. Quotes must be single quotes at least.
January 18, 2013 at 8:40 pm #151068In reply to: Activity story aligning
@mercime
Participant@ciumbargi know that those who help out in these forums are all volunteers who generously do their best to assist others even though they are not paid to do so. It is indeed unfortunate that you see an advice about how to find the correct selectors in different browsers as a negative even after some assistance was already given for what was not quite clear in the request.
As I see it, the issue is resolved in your site viewing it using Firefox. If it is not, then I advise you to post at the Pagelines forums and include info about what browser you’re using so that they can fix it … thereby benefiting the rest of the Pagelines customers.
Have a nice day.
January 13, 2013 at 5:54 am #150490In reply to: New filter request for bp_is_single_activity()
digitman2
ParticipantAgain, its not just the body class, as I said its the avatar as well, plus in future there might be other changes introduced which I’d like to be introduced in my custom pages as well. I don’t see why there can’t be a hook added to this function, it will be a one line change and its consistent with all the other hooks that are added.
Is it your decision to add/not add a hook?
January 8, 2013 at 9:50 pm #150027In reply to: How do I resize comment and activity avatar size!?
danbpfr
Participanthi,
see at the bottom of this page how to change avatar size
https://codex.buddypress.org/developer/customizing/changing-internal-configuration-settings/December 28, 2012 at 10:58 am #149120danbpfr
ParticipantHi,
did you set the permalinks to something other than default. Should be done.
Have you checked the yoast plugin ?
The error is probably due to PHPSESSID cookie.
Another cookie is comming from bp-activity-oldestpage. This is a custom setting Check it ! The normal name is bp-activity
December 28, 2012 at 7:49 am #149097In reply to: Group Page Styling/Theme Missing
seppy
ParticipantHi @sbla
On the groups pages (where the styling isn’t correct) it seems to still have in the ‘home’ class in your body tags (which has the transparent background)
`body class=”single-item groups group-home home custom-background”
`So it’s calling this CSS which you don’t want!
`
.home #wrapper {
background-color: transparent;
border: none;
margin: 20px auto 20px auto;
padding: 0;
}
`Where as the page that it is correctly styling hasn’t got “home” in the body classes.
`body class=”directory activity custom-background”`
How are you currently adding the ‘home’ class to body?
`function add_home_class($classes) {
if (is_front_page()) {
$classes[] = “home”
}
return $classes;
}
add_filter(‘body_class’, ‘add_home_class’);`December 25, 2012 at 4:31 pm #148913In reply to: Ideas for my website, need guidance
peterjhead
ParticipantTry this in bp-custom.php
function bp_non_member_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {if(!is_user_logged_in()) { // not logged in user
wp_redirect( get_option('siteurl') . '/register' );
} // user will be redirect to any link to want
}
}
add_filter('get_header','bp_non_member_redirect',1);
NOTE: If your using sitewide forums instead of group forums you will need to remove the comment /* */ around:
|| bbp_is_single_forum()
in the above code. Merry Christmas!December 21, 2012 at 2:22 am #148340In reply to: IE crashes on buddypress pages
samanthar
ParticipantGoing to Members Works
Going to Activity IE comes up with “Internet Explorer has stopped working” A problem caused the program to stop working correctly. Window will close the program and notify you if a solution is available. Close ProgramIt does the above a couple of times before coming up with a blank page.
WP 3.4.2
Buddypress 1.6.2I havent tried changing themes as i am worried about losing all the current customizations, but will do if we have too
December 20, 2012 at 12:47 am #148193In reply to: Collecting Activity ids and displaying them?
shanebp
Moderator>a page where my users can be curators and have collections of custom posts
CPs that they created ? Or created by anyone ?
Usually a profile extension is used for this.
But you say ‘outside of buddypress’ so you mean a WP page… ?
Then, because you want it driven by activity_ids, write a custom query.
Use each activity_id to find the user_id in the activity table, look for posts by that member in the posts table and show the results in a loop.
Use 2 queries if you can’t write a JOIN.December 19, 2012 at 11:54 pm #148187In reply to: Collecting Activity ids and displaying them?
designnz
ParticipantHi @shanebp, thanks for the reply. Im wanting to have a page where my users can be curators and have collections of custom posts (via activity_id). It will fall under its own page outside of buddypress with a special activity page for displaying items.
November 22, 2012 at 8:56 pm #145524drill_sgt.lewis
ParticipantAnother simpler approach would be to created a bp-custom.php and place it in the plugins directory and add the following code
`<?php
function bp_guest_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
// enter the slug or component conditional here
if(!is_user_logged_in()) { // not logged in user
wp_redirect( get_option(‘siteurl’) . ‘/register’ );
} // user will be redirect to any link to want
}
}
add_filter(‘get_header’,’bp_guest_redirect’,1);
?>`
This code will work to hide buddypress pages and group forums as is, if your using sitewide forums in line 4 remove the comments around:
|| bbp_is_single_forum()
Save and refresh. Works in current versions.November 20, 2012 at 10:10 am #145394In reply to: Buddypress pages suddenly blanko
gar976
ParticipantI have a custom menu but created long ago. In buddypress settings the component directories are set to active pages for activity streams, discussion forums, user groups and members.
Problem extends beyond this to main buddypress menu at top right of screen where profile edit etc are all blank too (not 404 page not found though). I have an active members widget in a sidebar which does actually work so i agree that it seems like a links issue – but the correct page URL displays when links are clicked.
-
AuthorSearch Results