Search Results for 'theme'
-
AuthorSearch Results
-
October 29, 2010 at 1:19 pm #96908
In reply to: Changing Group tab display defaults
Andrew Tegenkamp
Participant@r-a-y, thanks for this as it works great! To @Robcwright and others interested, I know it’s an old thread but have found this change will make it only do this for public groups or groups where you are a member and private groups will no longer redirect but keep the default setup. I put both in bp-custom.php and that seems to work great with a variety of child themes. If you want any other modifications for other cases I haven’t tried, just mention me in the reply and I’ll take a look when I can.
`
function redirect_to_forum() {
global $bp;
$path = clean_url( $_SERVER );
$path = apply_filters( ‘bp_uri’, $path );
if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false ) {
if ($bp->groups->current_group->is_user_member || $bp->groups->current_group->status == ‘public’) {
bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
}
}
}
add_action( ‘wp’, ‘redirect_to_forum’ );function my_bp_groups_forum_first_tab() {
global $bp;
if ($bp->groups->current_group->is_user_member || $bp->groups->current_group->status == ‘public’) {
$bp->bp_options_nav = ’50’;
$bp->bp_options_nav = ‘Activity’;
}
}
add_action(‘wp’, ‘my_bp_groups_forum_first_tab’);
`October 29, 2010 at 1:10 pm #96907Hugo Ashmore
ParticipantYou had it almost correct earlier a little more testing and playing around and you would have got there.
add back in the outer ‘if’ parent to check first whether the user is logged in so that is as I have shown before:
!is_user_logged_in()Then follow with the other ‘if’ as done before but make sure you have the ‘==’
so the conditional query says if the user is not logged in then run second ‘if’ and check to see id the constant BP_DISABLE_ADMIN_BAR has been set OR $bp->doing_admin_bar == false is set if either of these two conditions are met then run the following style tag
The !is_user_logged_in() should probably be run on the add_action rather than within the function to prevent a pointless function being parsed but that would need testing.
You shouldn’t need the
October 29, 2010 at 12:07 pm #96897anindyaray
MemberI tried this but it didn’t worked , same thing is happening , Sorry

`
function cancel_header_padding_for_no_adminbar() {if(defined( ‘BP_DISABLE_ADMIN_BAR’ ) || $bp->doing_admin_bar == false && !is_user_logged_in()) ?>
body {padding-top:0;}
<?php
}
add_action( ‘wp_head’, ‘cancel_header_padding_for_no_adminbar’ );
`October 29, 2010 at 12:01 pm #96895anindyaray
MemberThank I’ll try and get back to you
October 29, 2010 at 9:40 am #96883Mark
ParticipantDoh! You know, I was using explode() later on to extract the individual elements – don’t know why I didn’t think of using implode() to clean up the array.
Thanks @hnla – that works now. For reference, here is the full code – basically this uses the data derived from checkboxes in the member’s profile (in this case it’s called “Areas of Interest” with the field ID of 25 – change this to reflect your name/field ID) to hunt down related content tags and display a random list of content relevant to that member (remember to put the code mentioned by @boonebgorges (above) in your theme’s functions.php):
`
<?php //for use in the loop, list 5 post titles related to user profile interest areas – checkboxes in extended profile
$backup = $post; // backup the current object
//Fetch profile tags from custom field ‘Areas of Interest’ and clean up data
$profileTagFull = xprofile_get_field_data( ’25’ , bp_loggedin_user_id() );//Fetch the text for the tags
$profileTagClean = implode( ‘, ‘, $profileTagFull);//Clean up the data$profileargs=array(
‘tag_slug__in’ => explode( ‘, ‘, $profileTagClean ),
‘post__not_in’ => array($post->ID),
‘showposts’=>5,
‘orderby’ => rand,
‘order’ => DESC,
‘caller_get_posts’=>1
);
?>
Content of Interest
()-
<?php
- cat_name . ‘: ‘; ?><a href="” rel=”bookmark” title=””>
- No related content
$profile_query = new WP_Query($profileargs);
if( $profile_query->have_posts() ) {
while ($profile_query->have_posts()) : $profile_query->the_post(); ?><?php endwhile;
} else { ?><?php }
$post = $orig_post;
wp_reset_query();
?>`
Thanks to @hnla @r-a-y and @boonebgorges for their help.October 29, 2010 at 9:08 am #96879Hugo Ashmore
ParticipantNo you’re over complicating you don’t need to add whatever is already stated i.e padding-top: 25px just remove it if certain conditions are met.
As Roger pointed out the single ‘=’ needs to become the correct ‘is equal to’ operator ‘==’
October 29, 2010 at 4:05 am #96867Round World Travels
ParticipantI’m using a theme called buddypress daily that I got from buddydress so yeah, I guess so.
October 29, 2010 at 3:49 am #96866Boone Gorges
KeymasterAre you using a custom theme?
October 29, 2010 at 2:19 am #96862anindyaray
Member@hnla , @rogercoathup : One thing I donot understand (surrendering that I am a novice) , the snippet suggest that `if user is logged in then the condition is to padd 0px` , but what is need according. to the scenario is `if a user id logged out the padd 0 px , else padd 25 px`
isn’t it ?`
function cancel_header_padding_for_no_adminbar() {
if (is_user_logged_in())
body {padding-top:25;}else(defined( ‘BP_DISABLE_ADMIN_BAR’ ) || $bp->doing_admin_bar = false) ?>
body {padding-top:0;}
<?php
}
add_action( ‘wp_head’, ‘cancel_header_padding_for_no_adminbar’ );
`could it be like this ? I have not tested as I think it has some syntax error
October 28, 2010 at 9:14 pm #96851Hugo Ashmore
ParticipantThere you go that was my bad as I wrote that incorrectly in the original and then completely overlooked it when testing it earlier, time to give up this coding game!
Good spot Roger
October 28, 2010 at 8:52 pm #96849Roger Coathup
Participantamongst other things, you are doing an assignment there (
, not a test for equality (=
. Bracketing the logical parts that belong together would also make your code easier to read.October 28, 2010 at 8:34 pm #96847In reply to: New theme – now available
pcwriter
ParticipantThanks! I’ve almost finished the illustrated theme manual to help newbies (like us!) to get started on customizing the basic theme. Then I still need to update the code for BP1.2.6
The whole impetus behind the development of this theme was to provide as simple a framework as possible while offering several options and as much easy customization as possible for non-techies. All that while keeping the pricetag low (premium = $20), yet still offset the time invested for development and support.
However, along with the unexpected code updates and my father’s declining health (I’m taking a week off to spend some time with him) comes an unfortunate delay: the freebie will be available by the end of the 2nd week of November, while the premium should follow a few weeks after that.
I apologize in advance for the delay everyone, but please take consolation in that the premium will include a few surprises.
Ooh… anticipation is a fun thing!
October 28, 2010 at 7:47 pm #96845In reply to: Kick (but not ban) a user from a a group?
r-a-y
KeymasterYou need to upgrade your Custom Community theme to take advantage of this.
Bug the theme author!Or you can manually do this by mirroring the changes made to /groups/single/admin.php.
October 28, 2010 at 7:44 pm #96844In reply to: Header image on network site
r-a-y
Keymaster@bazonline – You shouldn’t have much trouble then. Just activate bp-default on the community blog only and not on all the blogs. If you’re just having problem with the page `
`, go into your community blog’s general settings and change the blog title:
https://codex.wordpress.org/Settings_General_SubPanel@aweathers – Like I said, you need to modify the header.php file in your child theme to call the main site’s header image. Calling the main site’s header image requires a little bit of PHP coding. Or if you know you’re never going to change the header image, just hardcode the image URL into header.php.
October 28, 2010 at 7:07 pm #96079konradS
ParticipantPro version:
http://pro-community.themekraft.com/October 28, 2010 at 6:40 pm #96839pnm
ParticipantI have the same config as Falcon Show – WordPress – 3.0.1 and BuddyPress – 1.2.5.2
I couldn’t figure out where the option “user cannot delete itself” is, either in buddypress/wordpress dashboard. Can you please tell me where can I find this option? ( I am using default BuddyPress theme). Thanks.
October 28, 2010 at 6:32 pm #96837In reply to: eventpress question
ovizii
Participantthx. that helps a lot. not much documentation around your plugin so far

running a custom theme so will look into building my own templates….October 28, 2010 at 6:02 pm #96833In reply to: Header image on network site
A Weathers
Participanttried this last night as well and i run into the same issue as bazonline when i use the child theme, then all of the sites get the same child theme
October 28, 2010 at 4:17 pm #96817anindyaray
Member@hnla : Ok! but nothing to say sorry , Your tried to help me a lot , Thanks
October 28, 2010 at 4:04 pm #96813Hugo Ashmore
ParticipantNope can’t make it work tried many variances and approaches – sorry can’t really spend longer ion it I would now suggest you take this to the theme authors for support.
October 28, 2010 at 3:54 pm #96808In reply to: eventpress question
kunalb
Participant@ovizii That is not intended behaviour; the plugin has it’s own templates built off the default theme for BuddyPress; if you’re using a custom theme you’ll have to add your own templates. You might be able to get by with just changing the styles of the EventPress templates; the theme files are stored under eventpress/themes/bp and buddypress-custom-posts/themes/ . Any file you place in your own theme folder with the same name/relative path will directly over-ride these default theme files.
October 28, 2010 at 2:51 pm #96805anindyaray
Member@hnla:
Thanks
… but I had tried … , yet I tried once again … but in vain , I am pasteing the code`function cancel_header_padding_for_no_adminbar() {
if(defined( ‘BP_DISABLE_ADMIN_BAR’ ) || $bp->doing_admin_bar = false && !is_user_logged_in()) ?>body {padding-top:0;}
<?php
}
add_action( ‘wp_head’, ‘cancel_header_padding_for_no_adminbar’ );`this is what I tried
, but with no luckWith this function , with or without the && !is_user_logged_in() thing, padding is gone for everybody(logged in and logged out user both)
@rogercoathup : Thanks for the suggestion I will try to start learning , Everything has a first time
, actually I’m very much uncomfortable
October 28, 2010 at 9:34 am #96787Roger Coathup
Participant@anindyaray – to write your own theme for BuddyPress, you will need to have a basic knowledge of PHP. The PHP ‘if’ statement is fairly fundamental.
Checking the tutorial on the PHP site would be a good start: http://www.php.net/manual/en/index.php – then your questions on here can be BuddyPress specific, rather than PHP, allowing this forum to help you (and others) more effectively
October 28, 2010 at 9:18 am #96786Hugo Ashmore
ParticipantErm have you actually tried to add the above snippet adjustment, it’s really not hugely more difficult than the stage you must have already completed in copying my function to your functions.php file.
Take what I have shown above and add it to the end of the statements that live inside if ( ) so you’ll have a space then the &&
There is a certain level of code manipulation that you’ll need to get comfortable with doing so give it a go and if stuck post back showing what you tried.
October 28, 2010 at 8:29 am #96785anindyaray
MemberHello ! I need help ?
-
AuthorSearch Results