Search Results for 'private'
-
AuthorSearch Results
-
February 21, 2013 at 4:20 pm #153609
In reply to: Private Community with Public WordPress
bp-help
ParticipantIt 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);
`February 21, 2013 at 4:18 pm #153608In reply to: Private Community with Public WordPress
bp-help
Participantthe above reply stripped out the code so hopefully this will print out!
``
February 21, 2013 at 4:15 pm #153606In reply to: Private Community with Public WordPress
bp-help
Participantcreate 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!February 21, 2013 at 2:47 am #153578In reply to: Private Message Not Working
@mercime
Participantto 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.February 20, 2013 at 11:42 pm #153565In reply to: redirect – if not logged in – for some sections
freddy mcbob
Participantthis is what i have for my bp-custom.php file:
`<?phpfunction 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 );
?>`
February 20, 2013 at 9:11 pm #153548Hugo 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
February 20, 2013 at 8:46 pm #153543xsci
ParticipantGreetings,
Has a patch been created for this yet? I’m not the programmer and would love an easier way to update this.
Cheers!
Teresa
February 17, 2013 at 4:46 am #153255In reply to: HELP Locations Content filtering and more!
modemlooper
ModeratorWhy not just use groups as a “region”, make them all private
February 16, 2013 at 11:43 am #153175In reply to: Link to a private message
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?
February 16, 2013 at 8:58 am #153174In reply to: Link to a private message
James
Participantyeah, as always, tried tens of variations, not this one 🙂
works excellent, thank you again, Brajesh!
February 16, 2013 at 8:31 am #153173In reply to: Link to a private message
Brajesh Singh
ParticipantFebruary 16, 2013 at 8:07 am #153171In reply to: Link to a private message
James
Participantthanks 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!
February 16, 2013 at 7:56 am #153170In reply to: Link to a private message
Brajesh Singh
ParticipantOk, 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.
February 16, 2013 at 7:41 am #153168In reply to: Link to a private message
Brajesh Singh
ParticipantHere 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.
February 15, 2013 at 11:54 pm #153158In reply to: Link to a private message
Renato Alves
ModeratorHi @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!
February 12, 2013 at 8:03 am #152880In reply to: Buddypress with GEO Theme
@mercime
Participantthousands 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.
February 10, 2013 at 10:38 am #152779In reply to: Create private membership site with BuddyPress
Florence
ParticipantAhh, 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.
February 10, 2013 at 12:04 am #152755In reply to: Create private membership site with BuddyPress
k.gray
ParticipantI 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/
February 8, 2013 at 3:27 pm #152654In reply to: [Resolved] CSS for Group Forums
@mercime
ParticipantGiven 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.
February 8, 2013 at 2:37 pm #152647In reply to: [Resolved] CSS for Group Forums
PurnimaGore
ParticipantHi. 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
February 8, 2013 at 12:10 am #152612danbpfr
Participantyou 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
February 6, 2013 at 11:58 am #152480Prince Abiola Ogundipe
ParticipantI mean file which says: Mention this user in a new public message, this will send the user a notification to get their attention.
February 6, 2013 at 11:49 am #152479Prince Abiola Ogundipe
ParticipantOk @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
February 6, 2013 at 11:24 am #152477Hugo Ashmore
Participantfunctions.php ?
February 4, 2013 at 11:59 pm #152397In reply to: how to override buddypress function using hook?
Mitesh Patel
ParticipantI 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.
-
AuthorSearch Results