and at the bottom of the same file, replace
`
@mercime thanks for the reply
im using wordpress 3.1.2, buddypress 1.2.8, directory install, wp functioning properly, bbpress built-in,
standard theme.plugins:
jet event system
bp moderation
cubepoints
private bp
google analytics
erocks dashboard lockdown
bp privacy
bp profile search
bp album+
thanks you for the help
greetings!
Usually add to the functions.php file of the active theme. So if you’re using a WP Theme with BP Template Pack, then it would be referring to your WP theme’s functions.php
13 BuddyPress template files were transferred to your active WordPress theme during the BP template pack process. Download said 13 BP template files to your computer and start making the following revisions starting with the activity/index.php file:
At the top of the file, replace:
`
with
`
and at the bottom of the same file, replace
`
`
with
`
`
Save and do the same for the remaining 12 BP template files. Upload to server.
Check this page for other tips: https://codex.buddypress.org/theme-development/bp-template-pack-walkthrough-level-easy-2/
How do you mean ‘prefix’? prefixed to each selector or the body/html tags? BP tokenises itself on the body tag already so you can use that.
What you are really having an issue with is specificity and the weight of selectors and that just has to be understood and allowed for also understanding the cascade is important.
While it’s true that where you have plugins or modules – not just in WP land – it is often essential, if they supply required styles, that those are prefixed with a unique name as the author will not be able to account for what other rules might be in play and using the same element names so adding their own unique prefix ensures that clashes can’t occur – ThickBox is a good example where all selectors carry a unique name – adding prefixes to BP rules could just start getting messy and adding file weight, this notion of taking existing themes and attempting to make them BP compatible is a bit of a hack and is often going to produce not hugely favorable code the correct approach tbh would be to start styling from the ground up rather than attempting to mix major stylesheets.
Work continues on getting the theme working well with BP.
This is the page I’m struggling with. I was able to adjust the avatar margin-top and the form#whatisnew … but can’t get activity-inner to adjust.
http://www.thechembook.com/chemistrycircle
The bp.css from the template pack is loading but I want to be able to adjust
`
All of the css I’ve tried is not making any adjustments. FF firebug isn’t giving any clues (or I’m not understanding the clues given).
The bubble that I created on this page is what I’m after …
http://www.thechembook.com/groups/advanced-placement-chemistry-learners/forum/topic/the-atom-fast-facts-a-summary-sheet/
Does anyone have any suggestions on how to modify the css for activity-inner on the activity stream page?
hi thanks for the reply. However i’m not sure what code out of those comments you mean. I don’t see anything in there about a redirect to registration page.
and I have 2 function files… one in my buddypress theme folder and one in the wp theme default folder. wich one is it.
Theoretically it should show up at the top of the post that was edited, right beside the #. Are you using the bp-default theme?
my-columns will have it’s own style.css (as it is a clone of bp columns which has one) and that is where you change the font sizes and colours etc. It will overwrite the css in buddypress default theme. So you could change the font size by writing
`body {
font-size: 14px;
}`
in the my columns style.css file….
You can quite often see what needs to be changed using developer tools built into ie8 or firebug in firefox (and equivalents for other browsers). Firebug has a neat trick of being able to show changes as you make them….
As you are creating a child of bp default your changes won’t be lost when bp default is upgraded… bp columns is now a different theme and if it is upgraded you would need to compare the changes manually…
I actually used this method with bp columns to create the child of bp default I used here
You might also find https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/ useful if you haven’t already seen it!
Nope. Just make the changes @aces gave you, and you’ll be ready to edit how you please
You’ll only to change the css in your new my_columns theme.
Thanks aces,
I think I understand, but all the CSS style changes in Columns are borrowed from BP Default. Wouldn’t I need to save those style changes made in Default somewhere also? so when Default is upgraded I won’t lose all the style changes I made…This is where I pretty much get lost as to how not to lose the style changes when I’m using the Columns child theme and style changes are required to be made in BP default because Columns child does not have it’s own CSS — ? its sort of confusing to me.
Try the following:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-make-a-private-community/?topic_page=2&num=15#post-44616
Add the code to your theme’s functions.php.
I’m still new to BuddyPress, so this may not be the best approach, but here’s what I’ve done:
1. Copy bp-default > groups > index.php into your own child-theme (make sure you keep the same directory structure)
2. Open the newly copied groups > index.php that is located in your child-theme
3. Find: “
4. Edit it by adding is_super_admin() to the if expression so it’s “ This is to check to see if user is logged in AND is a super_admin. If true then display the “create group button” if false then don’t.
In your theme’s activity/entry.php file change:
`
<a href="” class=”acomment-reply” id=”acomment-comment-“> ()
`
to:
`
if ( my_bp_activity_type_is_new_forum_post() ) {
<a href="” class=”acomment-reply” id=”acomment-comment-“>
} else {
<a href="” class=”acomment-reply” id=”acomment-comment-“> ()
}
`
and add the following to your theme’s functions.php file:
`function my_bp_activity_type_is_new_forum_post() {
( ‘new_forum_post’ == bp_get_activity_type() ) ? return true : return false;
}`
I would suggest making a copy of bp columns ie making a directory in your themes directory called my-columns and putting all the contents of bp-columns in it.
Then redo the details at the top of the style.css sheet – change:
` Theme Name: BP Columns `
to:
` Theme Name: My Columns `
leave
`Template: bp-default`
as it is.
Then you should find My Columns available to activate in the appearance > themes > Manage themes area.
Then make your changes to the new directory which is / will still be a child of bp-default…
Do not touch the bp default theme.
TIs me
Love to see it pass and trying out the next version.
Nope, not on a child theme or the bp-default.
I’m running Buddypress on a multisite install with subdomains. My main domain is http://www.astromono.com and i have two other subdomains: comic.astromono.com (with comicpress) and saril.astromono.com (with buddypress). When I try to edit the theme that’s on the main domain, I go to Network Admin, look for the theme and then try to edit the main php template (index.php).
Before I installed Buddypress, I got access to the main php template just fine, but now when I try to edit it, I get the Buddypress main php template instead of the one that comes with my theme. This issue was happening before I installed and used the BP Template Pack in order to make my theme compatible with BP.
I found something close with the default theme’s activity page. Still searching for the tags, though. I totally accidentally the buddypress theme
Sorry hnla, you’re right; if you’re not using ajax, the code should be:
<li id="forums-newttab" class="no-ajax"><a href="YOUR LINK">Another Forum Loop</a></li>
tubruk – if you upgrade BP, you will lose your changes made to bp-default/_inc/ajax.php. I would recommend the filter available in the bp_dtheme_ajax_querystring() function.
Okay. I’ve finally been able to test the code I gave you. There was an issue with the retrieval of the $user_id during log in, so nothing was being saved. I’ll post below with the updated code. The code works as far as saving/retrieving/displaying the IP address. If the IP address continues to be your address, and you are using the code I give you below, then the problem is with the part of the function that determines the IP address. I have not tested whether that works. I’m trusting that you’ve done your homework and found the right one.
These first two functions will go in your bp-custom.php file or in your themes functions.php file:
`function my_update_user_IP( $user_login = ” ) {
$user = get_user_by( ‘login’, $user_login );
$user_id = (int) $user->ID;
if(!empty($_SERVER)) {
$ip_address = $_SERVER;
} else if(!empty($_SERVER)) {
$ip_address = $_SERVER;
} else if(!empty($_SERVER)) {
$ip_address = $_SERVER;
} else {
$ip_address = ”;
}
if(strpos($ip_address, ‘,’) !== false) {
$ip_address = explode(‘,’, $ip_address);
$ip_address = $ip_address[0];
}
if ( update_user_meta( $user_id, ‘ip_address’, $ip_address ) )
return $ip_address;
else
return false;
}
add_action( ‘wp_login’, ‘my_update_user_IP’ );
function my_get_IP( $user_id = false ) {
if ( empty( $user_id ) )
return false;
$ip_address = esc_attr( trim( get_user_meta( $user_id, ‘ip_address’, true ) ) );
if ( $ip_address = esc_attr( trim( get_user_meta( $user_id, ‘ip_address’, true ) ) ) )
return $ip_address;
else
return false;
}`
The next bit of code will go within the members loop of your themes groups/members.php file:
``
“YOUR LINK” is the link you want to set. This is only useful if you want to link to a new page (like your new forum loop) and you don’t want to use AJAX.
However, it seems like you want to use AJAX, so you’ll have to manipulate the AJAX querystring so BuddyPress knows how to load your new custom forum loop. If you go this route, remember to remove the “no-ajax” CSS class from your tab.
The way you name your tab class is important.
In the example above, “forums-newtab”, BP’s AJAX will see “newtab” as the forum’s scope. You’ll then need to manipulate the AJAX querystring to add your forum IDs only when the forum scope is set to “newtab”.
Check out the bp_dtheme_ajax_querystring() in /bp-default/_inc/ajax.php and try to analyze lines 43-50. See how when the scope is set to “personal” that BP changes the `user_id`. You’ll need to do something similar with the `forum_id` parameter when the `scope` is set to “newtab” and when the `object` is set to “forums”.
Once you get a grasp of this, then you can write your filter to do your manipulation.
Glad its working now alice, and i think the css isn’t needed, but if you want to test it -> wp-content-> themes -> bp-columns ->custom.css
What i usually do is scroll down to the very bottom and type this
`/* Custom Modifications */`
then my css code, to keep it separate from the default css
where would you like to show the comments? Buddypress does this by default for logged in user via the reply link : reply(#comments).
I did this to my website and it works a treat. This applies if you are using the default BP theme, or a child theme. You will need to go to <b>wp-content/plugins/buddypress/bp-themes/bp-default/header.php</b>
At approximately line 47, you will see the opening tags <div id="header"> Look to about line 52, and you will see the code for the home tab. Replace the code with this
<li class="selected">
<a href="yoursite.com/activity" title=""></a>
</li>
<b> Remember to add http: // before the yoursite.com/activity, for some reason it doesn’t show when I type the full URL in here.</b>
If you look below that, you should see the code for the activity tab, delete this code. You should now have removed the activity tab from the menu, and the Home tab has now been changed so it directs to the activity stream. Any problems message me.
I’m having the same problem. My site is set as UTC. The Birthday plugin works and puts the right date in the widget. When editing, it says the right date. But in the public profile, it is one day earlier. (ex. July 10 is showing as July 9) Using latest version of Buddypress, BuddyPress Corporate 1.3.4 Theme, and WordPress 3.1.1.
Also, when requiring a date on registration, the date field acts as if it’s not filled out. Keeps showing red and saying “Required Field.” I was putting in a date of January 1, 1970.
@tubruk – Check out bp-themes/bp-default/forums/index.php.
In that file is a hook to add more tabs:
eg. Add this to your theme’s functions.php:
function my_new_fantabulous_forum_tab() {
?>
<li id="forums-newttab no-ajax"><a href="YOUR LINK">Another Forum Loop</a></li>
<?php
}
add_action( 'bp_forums_directory_group_types', 'my_new_fantabulous_forum_tab' );
If you want your tab to be AJAX-ifed, you’ll need to remove the “no-ajax” CSS class from the tab and write an AJAX hook as well.
Check out the “bp_dtheme_ajax_querystring” filter in /bp-default/_inc/ajax.php. It’s a little complicated, but once you get the jist of it, it makes things a little easier.
There’s a few posts on these forums about it:
http://www.google.com/search?hl=en&hs=6eV&rls=en&channel=suggest&q=%22bp_dtheme_ajax_querystring%22+filter&aq=f&aqi=&aql=&oq=
Hopefully that helps somewhat.
You can override this by copying /bp-themes/bp-default/sidebar.php into your child theme and making the necessary edits there.
If you haven’t built a child theme, follow this guide:
https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/