Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)

  • billysgtr
    Participant

    @billysgtr

    Thank you for the reply @vapvarun,

    I did that. I am just wondering if I can display the value of the user_url in the profile page.

    Thanks


    billysgtr
    Participant

    @billysgtr

    Just for the record if anyone will have a problem like that. Ajax request were blocked by a hook in my own functions.php so members were not loaded in the dropdown menu


    billysgtr
    Participant

    @billysgtr

    @prashantvatsh you are absolutely right. Thanks for your reply!


    billysgtr
    Participant

    @billysgtr

    Hi @ds123,

    You can use the above hooks in order to do that. You can work it on your own needs

    Cheers!


    billysgtr
    Participant

    @billysgtr

    Awesome, thanks @Jonas!


    billysgtr
    Participant

    @billysgtr

    Hi Slava, thanks for the suggestions. Unfortunately, it didn’t work. I did that using if current_user_can(‘subscriber’) inside the buddypress/members/index.html


    billysgtr
    Participant

    @billysgtr

    You can do the same thing for any page you want 🙂


    billysgtr
    Participant

    @billysgtr

    Hey,
    you can add this in functions.php

    $not_logged_in_user = '';
    function prevent_subscriber_from_members() {
        global $not_logged_in_user;
        if (
            // Look for  /members/ page
            stripos($_SERVER['REQUEST_URI'],'/members/') !== false
            ) {         
            // If subscriber, redirect on home page
            if (!is_user_logged_in() ) {              
                if ($not_logged_in_user == '') { $not_logged_in_user = get_option('home'); }            
                // Send a temporary redirect
                wp_redirect($not_logged_in_user,302);            
            }           
        }       
    }
    add_action('init','prevent_subscriber_from_members',0);

    It checks if the user is logged in. If not, redirects him to home page


    billysgtr
    Participant

    @billysgtr

    Venutius I just saw you answers, I am grateful to you for your help!
    I will make the testing and I will let you know with the results,

    Thanks again 🙂


    billysgtr
    Participant

    @billysgtr

    Venutius that would be awesome,

    The ideal scenario is the following:
    I want to prevent subscribers from sending messages to each other, but to be able to send a message to all other roles (eg admin/author/group leader etc).

    Thanks again, your help is valuable!


    billysgtr
    Participant

    @billysgtr

    Venutius Thanks for the reply,

    I know about this plugin, but as you said it depends on friendship. I use php but I am not so familiar in order to do that. I would really apreciate if anyone could help on that!

    Thanks again


    billysgtr
    Participant

    @billysgtr

    I am just informing that problem solved from theme developers. You can close the topic.
    Thanks


    billysgtr
    Participant

    @billysgtr

    An update to save time for other users.

    I made the buddypress 2.5.0 update and everything is ok now!

    Thanks!


    billysgtr
    Participant

    @billysgtr

    No , I don’t use any extra plugins for that.
    Actually it is very strange because when I am running on localhost(XAMPP), everything works fine.
    I am facing this problem only on live server.
    I am now realizing that the real problem is that I can’t send messages when I am on live server. So, that’s why I got the fatal error.


    billysgtr
    Participant

    @billysgtr

    Thank you so much for the reply.

    I tried to fix that temporarily. I am not getting a fatal error but I still can’t sent any messages. I am getting the “Message was not sent. Please try again.”

Viewing 15 replies - 1 through 15 (of 15 total)
Skip to toolbar