Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 1,626 through 1,650 (of 3,460 total)
  • Author
    Search Results
  • #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 ?

    #152397
    Mitesh Patel
    Participant

    I finally yielded, and messed up (so to speak) the function messages_screen_compose, adding conditional custom redirects with if else statements like…

    `
    if(wp_get_referer()){//to check origin of form submission, returns false for self submission
    bp_core_redirect(wp_get_referer()); //custom redirect, as this isn’t self submission
    } else {
    bp_core_redirect( bp_loggedin_user_domain() . $bp->messages->slug . ‘/view/’ . $thread_id . ‘/’ );// this was originally there, for submission from original php file
    }
    `

    As I think the issue is ‘resolved’, for time being, I should document the solution here.

    I intended to use buddypress private messaging as feedback form, with various feedback options like Question, Suggestion, Feedback etc. Thus, I created corresponding users (Question, Suggestion, Feedback etc.) who will receive the feedback. The idea is super-elegant from my purpose, as not only the submissions be automatically segregated and stored in database, but responding to the feedbacks would be as simple as responding to PM, all without the hassle of email, spam etc. An added benifit is, users can draw attention to various issues site wide by @mension, like :@question What about this?”

    So I tried to imitate the buddypress compose form, and I succeeded, except the redirect problem as described here.
    https://buddypress.org/support/topic/create-a-feedback-form-using-buddypress-messaging-functionality/

    What I was doing was, creating a duplicate form, but calling the original form action (fooling buddypress 🙂 ). I did so, because, I don’t even know how to submit the copy-pasted form I created, and get the same thing done as the original compose.php was doing when it called itself (self submission).

    Anyways, this hack with unforgivable modifications in buddypress files works beautifully. I feel I’ll have to go through the plugin route finally though, as this is make-shift arrangement (but will work as long as I don’t update the buddypress plugin 🙂 ).

    Thanks shane for your help.

Viewing 25 results - 1,626 through 1,650 (of 3,460 total)
Skip to toolbar