Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 1,601 through 1,625 (of 3,436 total)
  • Author
    Search Results
  • #153611
    Kevin M. Schafer
    Participant

    @bphelp I tried this and when I refreshed my site, all of your code appears below the admin bar on my site — above my header.

    I created a new page and named it “new page here.”

    Here’s your code with my info:

    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’) . ‘/new-page-here’ ); } // user will be redirect to any link to want } } add_filter(‘get_header’,’bp_guest_redirect’,1);

    Am I to insert my URL as well? I tried with and without changing it and that didn’t work either.

    Kevin

    #153609
    bp-help
    Participant

    It 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);
    `

    #153608
    bp-help
    Participant

    the above reply stripped out the code so hopefully this will print out!
    `

    `

    #153606
    bp-help
    Participant

    create a file named bp-custom.php that you will then place in yoursite/wp-content/plugins folder after you paste the following code in it:
    `

    `
    Just change the /register in the line :
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    to the page you want the logged out user to be directed too!
    I found this somewhere on the net so props to whomever coded it!

    #153578
    @mercime
    Participant

    to install the buddypress 1.7 plugin beta and it still not working.


    @jimah
    for BP 1.7 beta 1, go to Settings > BuddyPress > Components and enable (check) Private Messaging and Save.

    #153565
    freddy mcbob
    Participant

    this is what i have for my bp-custom.php file:
    `<?php

    function restrict_access(){
    global $bp, $bp_unfiltered_uri;

    if (!is_user_logged_in() &&
    (
    BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] ||
    BP_GROUPS_SLUG == $bp->current_component ||
    BP_BLOGS_SLUG == $bp->current_component ||
    ‘forums’ == $bp->current_component ||
    is_page_template(‘website here’)
    )
    ) {

    bp_core_redirect( get_option(‘home’) . “/private/” );

    }
    }

    add_action( ‘wp’, ‘restrict_access’, 3 );

    ?>`

    Hugo Ashmore
    Participant

    @xsci This is a year old thread and discusses an issue relating to BP 1.5.1;  BP is about to release version 1.7.

     

    Please open a new thread, describe the issues you are having and what versions of BP / WP  you are using and please test any issues you are having are not custom theme related by dropping back to the bp default theme

    xsci
    Participant

    Greetings,

    Has a patch been created for this yet? I’m not the programmer and would love an easier way to update this.

    Cheers!

    Teresa

    #153255
    modemlooper
    Moderator

    Why not just use groups as a “region”, make them all private

    #153175
    Renato Alves
    Moderator

    @sbrajesh Thank you for this one! 😉

    But I have another question, imagine I wanna to put the messages box (compose, reply, etc) in the side bar on a profile page only. As I saw, each instance of the private message comes with a url, like

     

    Compose …/compose

    Reply …/reply etc.

     

    Could you point me for a possible solution?

    #153174
    James
    Participant

    yeah, as always, tried tens of variations, not this one 🙂

    works excellent, thank you again, Brajesh!

    #153173
    Brajesh Singh
    Participant

    Hi James, Here is an example code

    http://pastebin.com/WA2rBjvH

    You are right about the url part 🙂

    #153171
    James
    Participant

    thanks Brajesh, recently wanted to write about it.

    As I understand, we should use this function as a href, but how to write the parameters in, since for some reason I cannot get it working. thanks!

    #153170
    Brajesh Singh
    Participant

    Ok, forum does not allow me to post the html code.

    After including the above code, you can use this function bp_custom_get_send_private_message_link to get the appropriate url.

    #153168
    Brajesh Singh
    Participant

    Here is a simple solution. You will need to add following lines to your theme’s functions.php or bp-custom.php

    `

    /**
    *
    * @param int $to_id the user id to whom we plan to send the message
    * @param string $subject : if you want to specifuy a predefined subject
    * @param string $message: any predefined message
    * @return string: link for sending message
    */
    function bp_custom_get_send_private_message_link($to_id,$subject=false,$message=false) {

    //if user is not logged, do not prepare the link
    if ( !is_user_logged_in() )
    return false;

    $compose_url=bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/compose/?’;
    if($to_id)
    $compose_url.=(‘r=’ . bp_core_get_username( $to_id ));
    if($subject)
    $compose_url.=(‘&subject=’.$subject);
    if($message)
    $compose_url.=(“&content=”.$message);

    return wp_nonce_url( $compose_url ) ;
    }

    //for auto populating message content
    add_filter(‘bp_get_messages_content_value’,’bp_custom_message_content_value’);
    function bp_custom_message_content_value($content){

    if(!empty ($content))
    return $content;
    $content=$_REQUEST[‘content’];

    return $content;
    }

    //for auto populating message subject

    add_filter(‘bp_get_messages_subject_value’,’bp_custom_get_messages_subject_value’);

    function bp_custom_get_messages_subject_value($subject){

    if(!empty($subject))
    return $subject;

    $subject=$_REQUEST[‘subject’];

    return $subject;

    }

    `

    and then, you can use following in your code to send the user with id:2 a message as

    `
    <a href="”>Send Message to xyz

    `

    hope that helps.

    #153158
    Renato Alves
    Moderator

    Hi @James,

     

    I’m also looking for a solution like this and haven’t found so far. I believe I’ll have to hard code it. If I come to a solution I’ll post here!

    #152880
    @mercime
    Participant

    thousands of private social networks within my site

    Sure. Not everything’s out of the box so one can only be limited by skillsets and server.

    #152779
    Florence
    Participant

    Ahh, I wanted to achieve something like this as well. Like you, I’m using S2members (which I absolutely love – lets you hide/text menu items, text, posts, pages, downloadable content ect based on user role).

    This is what I’ve done: For the registration process I’m using BAW invitation codes. Users need to register for a health course (using Event Espresso), and in the confirmation email they recieve an invitation code they can use to log in and access course materials.

    #152755
    k.gray
    Participant

    I am looking to do the same thing and installed WP-Members. I find that it allows me to moderate members signing up which is great, but even though I have it set to block all pages and posts from non-members they are still showing. I’m using the BP default theme.

    Anyone have suggestions?

    Here is the site – http://forums.saintelia.com/

    #152654
    @mercime
    Participant

    Given that you’re using a premium theme with customized forum templates, it would be guesswork . to help you with the styles aside from the fact that the site is private. Since you have access to the site, I suggest using Chrome where you can right click on the Topic tile and Inspect Element. The developer console would show up and highlight what you need to change.

    #152647
    PurnimaGore
    Participant

    Hi. They are group member forums so don’t have a public link to them as they within private members pages. I have uploaded the images to flickr though http://flic.kr/ps/Lvkkb and hopefully that will give you an idea. Thanks for having a look

    danbpfr
    Participant

    you may found these kind of information in the language pot file

    #: bp-messages/bp-messages-template.php:657
    msgid “Private Message”

    #: bp-activity/bp-activity-template.php:2430
    msgid “Public Message”

    etc

     

    I mean file which says: Mention this user in a new public message, this will send the user a notification to get their attention.

    Ok @hnla thanks, I mean where it says :`<a href="” title=””>`

    Not the functions. I have checked member-header.php but not there.

    what am trying to do is list mention and private message under Add friend button as li .

    I know how to do it but dont know where to locate the file anymore.

    Regards

    Hugo Ashmore
    Participant

    functions.php ?

Viewing 25 results - 1,601 through 1,625 (of 3,436 total)
Skip to toolbar