Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 27,101 through 27,125 (of 69,108 total)
  • Author
    Search Results
  • #142300
    @mercime
    Participant

    @farandhigh you should be posting this at this in forums of buddyvents plugin author. I’ve added Buddyvents to the title of this post just in case someone who uses the plugin could help you.

    #142299
    @mercime
    Participant

    @raminjan open up your theme’s header.php and post in pastebin.com then post the generated URL here.

    #142298

    In reply to: Multiple Account Types

    infocoolsms
    Participant
    #142297
    Henry
    Participant

    Putting in my request for this. The workaround isn’t working for me and this keeps happening. Using 1.5

    Edit: Because I can’t add a new post – a request for a solution that works. Obviously. But thanks a lot for your helpful reply.

    #142294

    In reply to: New to BuddyPress

    clamoreaux
    Participant

    One more question — how do I add profile fields that can only be seen by the user that is setting it up? For example, I want the Name field hidden and the user known on the site by their username only. Right now it is showing as seen by Anyone. I can’t have that on the type of site I am building.

    And can fields be searched on?

    #142285
    calumac
    Member

    Sorry, can’t help but I’m experiencing similar problems having managed to get masonry to work with the Groups DIrectory I hit the tag & get nothing displayed, although I suspect that this is down to my css still being messy.

    Is it possible to write some sort of override function/ action for group-tags that also calls masonry reload (as you suggest) & put it into bp-custom.php which sits in your site’s plugin folder?

    Unfortunately I’m not familiar enough with Buddypress/ coding to know if this is possible – I guess it depends on whether it’s loaded before the group-tags plugin.

    #142280
    Eric Langley
    Participant

    If you need help with custom coding for your site you might want to check out https://buddypress.org/community/groups/bp-jobs-board/

    @elangley

    #142278
    modemlooper
    Moderator

    I think it’s just a sidebar widget containing page hierarchy.

    #142276
    Quint
    Participant

    @megainfo,

    Thanks. That does work to produce the excerpt at the right spot. However, it does not properly handle not cutting words in the middle nor putting the […] at the end. The following function in the core file (mentioned in my first comment) does that:

    `function bp_create_excerpt( $text, $length = 225, $options = array() ) {
    // Backward compatibility. The third argument used to be a boolean $filter_shortcodes
    $filter_shortcodes_default = is_bool( $options ) ? $options : true;

    $defaults = array(
    ‘ending’ => __( ‘ […]’, ‘buddypress’ ),
    ‘exact’ => false,
    ‘html’ => true,
    ‘filter_shortcodes’ => $filter_shortcodes_default
    );
    $r = wp_parse_args( $options, $defaults );
    extract( $r );

    // Save the original text, to be passed along to the filter
    $original_text = $text;

    // Allow plugins to modify these values globally
    $length = apply_filters( ‘bp_excerpt_length’, $length );
    $ending = apply_filters( ‘bp_excerpt_append_text’, $ending );

    // Remove shortcodes if necessary
    if ( !empty( $filter_shortcodes ) )
    $text = strip_shortcodes( $text );

    // When $html is true, the excerpt should be created without including HTML tags in the
    // excerpt length
    if ( !empty( $html ) ) {
    // The text is short enough. No need to truncate
    if ( mb_strlen( preg_replace( ‘//’, ”, $text ) ) <= $length ) {
    return $text;
    }

    $totalLength = mb_strlen( strip_tags( $ending ) );
    $openTags = array();
    $truncate = ”;

    // Find all the tags and put them in a stack for later use
    preg_match_all( ‘/(]*>)?([^]*)/’, $text, $tags, PREG_SET_ORDER );
    foreach ( $tags as $tag ) {
    // Process tags that need to be closed
    if ( !preg_match( ‘/img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param/s’, $tag[2] ) ) {
    if ( preg_match( ‘/]*>/s’, $tag[0] ) ) {
    array_unshift( $openTags, $tag[2] );
    } else if ( preg_match(‘/]*>/s’, $tag[0], $closeTag ) ) {
    $pos = array_search( $closeTag[1], $openTags );
    if ( $pos !== false ) {
    array_splice( $openTags, $pos, 1 );
    }
    }
    }
    $truncate .= $tag[1];

    $contentLength = mb_strlen( preg_replace( ‘/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i’, ‘ ‘, $tag[3] ) );
    if ( $contentLength + $totalLength > $length ) {
    $left = $length – $totalLength;
    $entitiesLength = 0;
    if ( preg_match_all( ‘/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i’, $tag[3], $entities, PREG_OFFSET_CAPTURE ) ) {
    foreach ( $entities[0] as $entity ) {
    if ( $entity[1] + 1 – $entitiesLength <= $left ) {
    $left–;
    $entitiesLength += mb_strlen( $entity[0] );
    } else {
    break;
    }
    }
    }

    $truncate .= mb_substr( $tag[3], 0 , $left + $entitiesLength );
    break;
    } else {
    $truncate .= $tag[3];
    $totalLength += $contentLength;
    }
    if ( $totalLength >= $length ) {
    break;
    }
    }
    } else {
    if ( mb_strlen( $text ) <= $length ) {
    return $text;
    } else {
    $truncate = mb_substr( $text, 0, $length – mb_strlen( $ending ) );
    }
    }

    // If $exact is false, we can’t break on words
    if ( empty( $exact ) ) {
    $spacepos = mb_strrpos( $truncate, ‘ ‘ );
    if ( isset( $spacepos ) ) {
    if ( $html ) {
    $bits = mb_substr( $truncate, $spacepos );
    preg_match_all( ‘//’, $bits, $droppedTags, PREG_SET_ORDER );
    if ( !empty( $droppedTags ) ) {
    foreach ( $droppedTags as $closingTag ) {
    if ( !in_array( $closingTag[1], $openTags ) ) {
    array_unshift( $openTags, $closingTag[1] );
    }
    }
    }
    }
    $truncate = mb_substr( $truncate, 0, $spacepos );
    }
    }
    $truncate .= $ending;

    if ( $html ) {
    foreach ( $openTags as $tag ) {
    $truncate .= ”;
    }
    }

    return apply_filters( ‘bp_create_excerpt’, $truncate, $original_text, $length, $options );

    }
    add_filter( ‘bp_create_excerpt’, ‘stripslashes_deep’ );
    add_filter( ‘bp_create_excerpt’, ‘force_balance_tags’ );
    `

    So, using that function in functions.php in the following does not work (I think it’s similar to a circular reference error in Excel):

    add_filter( ‘bp_get_group_description_excerpt’, ‘bp_create_excerpt’);

    This results in the white screen of death, though it’s probably close. Anyway, thanks for your help.

    #142275
    meg@info
    Participant

    hi @qrahaman , try this,

    function bp_excerpt_group_description( $description ) {

    // your exceprt code
    $length = 30;
    $description = substr($description,0,$length);
    return $description;
    }

    add_filter( ‘bp_get_group_description_excerpt’, ‘bp_excerpt_group_description’);

    #142274
    meg@info
    Participant

    hi @farandhigh,

    with this code, you can create a private community, just logged members, can access to buddypress page.


    /**
    * Privacy
    * @return [type] [description]
    */
    function restrict_access(){
    global $bp, $bp_unfiltered_uri;

    // If user is not logged in and
    if (!is_user_logged_in() &&
    // The current page is not register or activation
    !bp_is_register_page() &&
    !bp_is_activation_page() &&
    // The current pas is not blog page
    !bp_is_blog_page() )
    // Redirect to registration page. Change /register to your register page slug
    bp_core_redirect( get_option('home') . '/register' );
    }

    // here, you can add som config paramt to check if private community is enabled
    add_action( 'wp', 'restrict_access', 3 );

    #142273
    Ttemplate
    Participant

    tunelessly, i don’t have enough knowledge in PHP.
    i tried a lot, but nothing came out of it.

    i don’t know where is the exact function.php that i need to edit, where to insert the code, and where to change to code so he will fit my post types name.

    help? anyone? :}

    infocoolsms
    Participant
    #142267
    infocoolsms
    Participant
    #142266

    @rhondaramsey,Use a good faq or q and a plugin, create a new page add the faq short code provided by the plugin and write your q and a accordingly. then redirect your user there at their first login.

    Thats what i did on one of my website.

    Regards

    #142265
    raminjan
    Participant

    @mercime what I want is that i want to make my site logo like facebook’s so that each member can go back to their own activity page even when they click on the site’s logo. and No i don’t think I have multisite installed.

    #142261
    @mercime
    Participant

    If you deactivate s2member plugin and change to bp-default theme, does regular registration work?

    #142260
    @mercime
    Participant

    @raminjan Multisite installation? Open up your theme’s header.php file and check if the site homepage URL was hardcoded on the logo

    #142259

    In reply to: New to BuddyPress

    @mercime
    Participant

    == It was installed with Fantastico. Is that a problem for BuddyPress? ==

    @clamoreaux There have been issues using a webhost script with BuddyPress https://codex.buddypress.org/getting-started/before-installing/#system-and-server-requirements

    == Do I have to use WPMU to use BuddyPress? ==

    No. You can install BuddyPress on single WP installation since BP 1.2

    == Is there any good documentation that walks one through setting up and using BuddyPress? ==

    The BuddyPress Codex is your friend
    https://codex.buddypress.org/getting-started/before-installing/
    https://codex.buddypress.org/getting-started/setting-up-a-new-installation/installation-wizard/
    https://codex.buddypress.org/getting-started/configure-buddypress-components/
    https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    #142257
    shanebp
    Moderator
    #142256
    4ella
    Participant

    Somebody already wrote that, but I don’t remember who and where and forum searching doesn’t work and if I am trying to publish that code here for you it says : It looks like you’ve already said that! :-(

    #142255
    John
    Member

    Was able to track down the Buddy Press Function list which defines a function that may function for me.
    http://phpxref.ftwr.co.uk/buddypress/nav.html?_functions/index.html – line 264.

    `bp_has_members( $args = ” )` & the ‘meta_value’ argument

    #142253

    In reply to: New to BuddyPress

    clamoreaux
    Participant

    Is there any good documentation that walks one through setting up and using BuddyPress?

    #142246
    Quint
    Participant

    @megainfo,

    Sorry, I most certainly wasn’t clear. What you provided works in the Group’s main page where the description length is fine (which is good, since I may want to modify that later).

    What I wanted to do was specify the length of excerpt on the group directory page. So, given what you laid out, is there a hook that could be applied for that location? The groups loop is calling bp_group_description_excerpt().

    Hopefully, that’s clearer. Thanks again.

    #142242
    meg@info
    Participant

    Hi @qrahaman,

    i dont understand exactly what you want,if you want to excerpt of the description of group in the group page. this code work fine :

    function bp_excerpt_group_description( $description ) {

    // your exceprt code
    $length = 30;
    $description = substr($description,0,$length);
    return $description;
    }

    add_filter( 'bp_get_group_description', 'bp_excerpt_group_description');

Viewing 25 results - 27,101 through 27,125 (of 69,108 total)
Skip to toolbar