Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 21,051 through 21,075 (of 31,072 total)
  • Author
    Search Results
  • #96908
    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’);
    `

    Hugo Ashmore
    Participant

    You 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

    anindyaray
    Member

    I 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’ );
    `

    anindyaray
    Member

    Thank I’ll try and get back to you

    Mark
    Participant

    Doh! 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
      $profile_query = new WP_Query($profileargs);
      if( $profile_query->have_posts() ) {
      while ($profile_query->have_posts()) : $profile_query->the_post(); ?>

    • cat_name . ‘: ‘; ?><a href="” rel=”bookmark” title=””>
    • <?php endwhile;
      } else { ?>

    • No related content
    • <?php }

      $post = $orig_post;
      wp_reset_query();
      ?>

    `
    Thanks to @hnla @r-a-y and @boonebgorges for their help.

    Hugo Ashmore
    Participant

    No 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 ‘==’

    #96867
    Round World Travels
    Participant

    I’m using a theme called buddypress daily that I got from buddydress so yeah, I guess so.

    #96866
    Boone Gorges
    Keymaster

    Are you using a custom theme?

    anindyaray
    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

    Hugo Ashmore
    Participant

    There 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

    Roger Coathup
    Participant

    amongst 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.

    #96847
    pcwriter
    Participant

    @roydeanjr

    Thanks! 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! :-)

    #96845
    r-a-y
    Keymaster

    You 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.

    #96844
    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:<br /> <a href="https://codex.wordpress.org/Settings_General_SubPanel" rel="nofollow">https://codex.wordpress.org/Settings_General_SubPanel</a></p> <p><a href='https://buddypress.org/community/members/aweathers/' rel='nofollow'> @aweathers</a> – 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.

    konradS
    Participant
    pnm
    Participant

    @helpy

    I 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.

    #96837

    In reply to: eventpress question

    ovizii
    Participant

    thx. that helps a lot. not much documentation around your plugin so far :-)
    running a custom theme so will look into building my own templates….

    #96833
    A Weathers
    Participant

    tried 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

    anindyaray
    Member

    @hnla : Ok! but nothing to say sorry , Your tried to help me a lot , Thanks :)

    Hugo Ashmore
    Participant

    Nope 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.

    #96808

    In 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.

    anindyaray
    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 luck

    With 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 :)

    Roger 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

    Hugo Ashmore
    Participant

    Erm 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.

    anindyaray
    Member

    Hello ! I need help ?

Viewing 25 results - 21,051 through 21,075 (of 31,072 total)
Skip to toolbar