Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 1,351 through 1,375 (of 3,450 total)
  • Author
    Search Results
  • #168679
    EE
    Participant

    @modemlooper, thanks again for your help. I know nothing about javascript so I’ll keep my fingers crossed I don’t run into any issues with the plugin in the future! 🙂

    #168662
    modemlooper
    Moderator

    like I said all that header info breaks page when you try to do a redirect before page load. You can always do a javascript redirect but that is after page load and not any faster than using one of the plugins. You maybe able to remove the header comment text.

    #168659
    EE
    Participant

    `###############################################################################################
    #
    # Looking for the header content? You’ll find it inside “header-default.php”
    #
    ###############################################################################################

    /* This page does nothing. It exists for custom template files and plugins that load content
    * outside the theme structure using direct calls to “the_header()” and “the_footer()”.
    * You should not add anything to this file. If you want to modify header functions or layouts
    * please look at “header-default.php” or “design-header.php”
    */

    ?>

    header.php contains that, so I tried in design-header.php which loaded a blank page, and header-default.php got the same error message… (by the way, I DO appreciate your help!) I just don’t think it should be this hard… I really don’t want to go back to having all groups be private and all members having to change their profile privacy settings 🙁

    #168656
    modemlooper
    Moderator

    Custom page templates will break whenever you add a filter to get_header because of the page template header info. This is really not a BuddyPress issue. There are other ways to redirect the page but they will work just like any plugin. The reason they maybe slow to redirect is because they redirect after page load so you are waiting on header and content.

    Try this, add code to bp-custom.php but not the add filter line, then in header.php before anything else add:

    <?php bp_communituy_redirect(); ?>

    #168643
    EE
    Participant

    `Warning: Cannot modify header information – headers already sent by (output started at /home/content/56/9819056/html/wp-content/themes/parallelus-salutation/design.php:1) in /home/content/56/9819056/html/wp-includes/pluggable.php on line 876

    #168641
    EE
    Participant

    Does this go in functions.php or bp-custom.php?

    #168639
    modemlooper
    Moderator
    function bp_communituy_redirect() {
    
    	if( !is_user_logged_in() && $_SERVER['REQUEST_URI'] != '/community/' && !is_home() ) { 	
    		wp_redirect( get_option('siteurl') . '/community/'  ); exit;
    	}
    		
    }
    add_filter( 'get_header','bp_communituy_redirect', 1 );
    
    #168588
    @mercime
    Participant

    You’d find the basic information about BuddyPress components at https://codex.buddypress.org/user/buddypress-components-and-features/

    Limiting the number of groups which can be created by user is plugin territory https://wordpress.org/plugins/limit-groups-per-user/

    #168448
    tduschei
    Participant

    Thanks. I doublechecked after reading your reply.

    Unfortunately still no luck.

    I went to settings>Private Community For BP.

    Next to unblocked page one I typed in without any quotes:
    profile

    But when I go to the following profile I still get redirected:
    http://www.ukraxdemo.com/members/newadmin/profile/

    Thoughts? Thanks @bphelp

    -Tom

    #168445
    bp-help
    Participant

    @tduschei
    By default the front page you set in dashboard/settings/reading is not blocked. To un-block a page with a url like this for example: http://your-site/sample-page/
    You would go to dashboard/settings/privatecommunitybp and in one of the unblocked page fields you would only need to enter: sample-page because it already gets the rest of the url dynamically. Make sure to save it at the bottom. For you to see how it works you would have be logged out of course. Good luck!

    #168437
    nando99
    Participant

    aha not front page but site wide sidebar… its ok, thanks for trying tho…

    #168436
    David Cavins
    Keymaster

    Sorry, I think I misunderstood your question from the beginning. You’re not trying to display topics on the front page of a group. You’re trying to show topics on the site’s front page? If so, what I’ve talked about won’t help at all. 🙁

    In looking into bbPress, I can’t really see how a particular forum is associated with a group. So I’m afraid I’m not going to be much help. Maybe someone else knows more about bbPress’s group forum integration?

    #168430
    nando99
    Participant
    #168429
    nando99
    Participant

    i’m using a premium theme, cinimatix…

    if i remove the “if bp_group_is_visible” conditional it works fine but shows all topics… i didnt try the second conditional bc its not even reading the group id..

    #168428
    David Cavins
    Keymaster

    That’s too bad. A couple of questions I should have asked at the beginning:

    1. What theme are you using?
    2. If you remove the conditional we added, does bbPress return topics for the correct group?
    #168426
    nando99
    Participant

    it shows a zero 🙁

    #168425
    David Cavins
    Keymaster

    Put this before the code we’ve been talking about, and see what it displays on the page:

    $test_id = bp_get_current_group_id();
    echo 'The current group ID is:' . $test_id;

    If it returns a number besides zero (zero means that it can’t figure out which group is the current group, a non-zero number is the current group ID), then you could probably adjust the conditional code:

    if ( bp_group_is_visible( bp_get_current_group_id() ) ) {
    //do the topics loop here
    }

    Fingers crossed.

    #168423
    nando99
    Participant

    it doesnt work as in: no posts show up at all :/

    it is on the sidebar… how would i pass the group_id and give bbp_topics access… pretty much a noob here, sorry…

    thanks in advance!

    #168383
    David Cavins
    Keymaster

    When you say it didn’t work, do you mean that people who should see the topics couldn’t, or that no one could see the topics, or that everyone could see the topics? Was it too generous in letting people through or did it keep everyone out? 😉

    Also, could it be that this is this being used in a sidebar? I’m wondering if the placement on the page means that the group context is not certain, so you’d need to pass the group_id into bp_group_is_visible. Although I’d expect the bbp_topics to need to access the group_id as well.

    #168377
    nando99
    Participant

    i tried using the code you provided but nothing i tried worked… the latest forum topic is a widget so i tried putting it around the widget but that of course didnt work…

    so i dug deeper and found the template for the actual link and wrapped the code around that and it didnt work either 🙁

    the widget code: http://pastebin.com/cWrRkF1H

    the mytopics code: http://pastebin.com/PxJGi76N

    the single topic code where i put the code you provided: http://pastebin.com/X8VuwWpe

    not sure where else to put it…

    any help would be appreciated, thanks!

    #168350
    David Cavins
    Keymaster

    You should be able to wrap your bbp_has_topics output in a conditional like:

    if ( bp_group_is_visible() ) {
    //do the topics loop here
    }

    bp_group_is_visible checks to see if the group is public or private, and if it’s public, returns true. If not public, then it checks to see if the user is a member of the current group; if yes, it returns true. It’s located at /bp-groups/bp-groups-template.php -> line 377.

    function bp_group_is_visible( $group = false ) {
     378      global $groups_template;
     379  
     380      if ( bp_current_user_can( 'bp_moderate' ) )
     381          return true;
     382  
     383      if ( empty( $group ) )
     384          $group =& $groups_template->group;
     385  
     386      if ( 'public' == $group->status ) {
     387          return true;
     388      } else {
     389          if ( groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
     390              return true;
     391          }
     392      }
     393  
     394      return false;
     395  }
    @mercime
    Participant

    @jais-p removed the extra posts 😉

    Thank you for posting back with your solution. Cheers.

    jais-p
    Participant

    Sorry for the multi-posting, bug. Thanks for your help!

    #167926
    bp-help
    Participant

    @asdevargas
    I removed the github version in favor of using the version in the official WP repository which has been improved. You can get it here:
    https://wordpress.org/plugins/private-community-for-bp-lite/

    jais-p
    Participant

    Allright, I’ve solved the problem.
    I needed to activate the “always include” option for JS. Although the “include JS” & “include CSS” options were checked, apparently the third option is required in order to upload files attached to private group posts.

    Thanks for the clue!

Viewing 25 results - 1,351 through 1,375 (of 3,450 total)
Skip to toolbar