mica123 (@mica123)

Forum Replies Created

Viewing 19 replies - 51 through 69 (of 69 total)

  • mica123
    Participant

    @mica123

    @robkk
    Thank you so much. I finally got the wp-login forms working. I even managed to style them by enqueuing the login style sheet. Here I have a question – I used the following:

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login', get_template_directory_uri() . '/style-login.css' );
        wp_enqueue_script( 'custom-login', get_template_directory_uri() . '/style-login.js' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

    This is fine, but the style sheet is loaded in my theme directory (responsive). I tried to load it into my child theme (responsive-child-theme) but it doesn’t work. Is the maian theme directory the correct location? What happens if the theme is updated?

    All this is new to me as I never set up a forum before, just websites. I am concerned about security. I am going to install Akismet. Should I also do something about honeypot registration? If so, what would you recommend? Would you also recommend reCaptcha? If so, what would be the best way to implement it?
    Many thanks.


    mica123
    Participant

    @mica123

    Yes, I am using the bbpress forms. Where would I find the default WordPress forms? Also, by other frontend forms – I am not sure what you mean? It is just difficult for me to understand that by not using the bbpress forms, redirects will show error messages without any code?


    mica123
    Participant

    @mica123

    @robkk I have now tried your code and it works beautifully. The links show up in the sub-header-menu. The login and logout redirect works too. As I am trying this out on my local computer I don’t know if the reset and lost password redirect would work as well?

    There is another problem: if I click on login or reset or lost password button without giving a user name and password, it goes to the standard WordPress login page which is not good at all. Can this be remedied? We are almost there.
    Many, many thanks.


    mica123
    Participant

    @mica123

    That’s great – thanks very much. I am learning a lot with your help. Very much appreciated.


    mica123
    Participant

    @mica123

    Yes, thanks very much.


    mica123
    Participant

    @mica123

    @robkk, further to my previous reply: perhaps I could hide the link on the main menu with CSS if we can’t get it to work.
    I was also wondering if the code could include a line to redirect the user to the forum page after login? Could the code also include links for Register and Lost Password?


    mica123
    Participant

    @mica123

    @robkk yes I tried it like this – nothing shows up.
    My free theme is Responsive (not Responsive II) from Cyberchimps.
    I would really appreciate it if we could get to the bottom of it.
    All this works only if I use the code as it is without the menu location but the links go to both menus.
    Thanks.


    mica123
    Participant

    @mica123

    When I use this code without the
    if(is_bbpress() && $args->theme_location == 'sub-header-menu')

    it works but I get the links on both menus. Below is the code I tried to use for the second menu only – the second menu is called Logins – I tried to use both sub-header-menu or logins.
    I tried your suggestion with both as well.

    add_filter( 'wp_nav_menu_items', 'my_nav_menu_login_link' );
    function my_nav_menu_login_link($menu) {
        //uncomment the next line if you only want login on bbpress pages
    
       if(is_bbpress() && $args->theme_location == 'sub-header-menu')
        if (is_user_logged_in()) {
            //set the $url on the next line to the page you want users to go back to when they logout
            $url = '$url = 'http://www.mysite.com/forums';
            $url2=wp_logout_url($url) ;
            $loginlink = '<li><a title="Logout" href="'.$url2.'">Logout</a></li>';
            }
        else {
            $current_user = wp_get_current_user();
            $user=$current_user->user_login ;
            //set $page on the next line = the permalink for your login page
            $page=''login' ;
            $loginlink = '<li><a href="/'.$page.'/">Login</a></li>';
                    }
         //uncomment out the next lines if you only want login on bbpress pages
       }
        else {
       $loginlink="" ;
          }
            $menu = $menu . $loginlink;
            return $menu;
            }

    mica123
    Participant

    @mica123

    Many thanks for your infinite patience. I am afraid it didn’t work.
    I have to give up and get a plugin. Many thanks again.


    mica123
    Participant

    @mica123

    @sumanthbhe
    copy this code into your functions.php file – preferably in your child theme.


    mica123
    Participant

    @mica123

    Hello

    After experimenting with all your suggestions I think I would like to use the code from
    https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ #11.This redirects both logged in and not logged in users to specific pages which is what I want.
    This works partially – I am trying to attach it to my second menu – not the primary menu but whathever I try it doesn’t work. If I leave the code as it is, it displays the links on both menus. I tried to use
    if ($args->theme_location == 'sub-header-menu')
    in various places such as:
    if(is_bbpress() && $args->theme_location == 'sub-header-menu')

    I would need this for both logged in and not logged in users.
    Thank you very much for your patience. I hope you can help.


    mica123
    Participant

    @mica123

    Thanks very much – this will help me to make some progress indeed.


    mica123
    Participant

    @mica123

    Thank you so much both of you – that’s very helpful indeed. I will now have to try and position it on one line. I hope I’ll manage it although it is not easy at all – @dannyfoo you seem to have managed it. Is there any way to add Register and Lost password to the code? Many thanks – I was getting really desperate.


    mica123
    Participant

    @mica123

    @sbskamey I think you managed wonderfully well to get the look you wanted.
    I would like to try something similar. It seems you managed to get the blue header with the Forums title in the end. Could you possibly let me know how you did it? Many thanks.


    mica123
    Participant

    @mica123

    @dannyfoo I came across your screenshot above. I would be very interested to know how you managed to load the login form at the top of the page? I am not looking for the login to be on the same line as the search box. I would just like to know how to position the Login, Register and Lost password buttons at the top of the forum index page (and possible all the bbpress pages).
    Many thanks.

    In reply to: Moderator role

    mica123
    Participant

    @mica123

    Thank you. I found this not on the All users page but on clicking the Edit button for a user I was able to get to another page and there I could change the role for the Forum.
    Do moderators have access to the backend? If they do, how can I disable it? They should do all the editing or deleting posts from the front end only. I sincerely hope this is possible.

    There is a confusion in the General settings for automatic registration of new users – should this be for Contributor or Subscriber?
    Also, how do I know if all users w3ho register on the front end are participants? They should not have access to the backend.


    mica123
    Participant

    @mica123

    Thank you very much for this. It seems I haven’t explained this very well.
    I would like to have these links on the frontend of the Forum Index page for participants who should not have access to the backend at all.
    I had a look at the plugin but my pages are full width as I don’t want to use the sidebar.
    Is there another way of doing this?
    Many thanks.


    mica123
    Participant

    @mica123

    Actually, I can see that this bbPress support forum created a submenu showing the login, register and lost passwords links at the top of the index page. So I take it that this was done with the help of CSS.

    In reply to: Profanity filter

    mica123
    Participant

    @mica123

    Thanks very much. I had a look at the wp-content-filter but this is compatible
    to WordPress 4.0.8 and it was last updated more than a year ago. Are you using this
    plugin yourself?

    I read the topic you pointed me to. It is not clear to me if bbPress has its
    own profanity filter?

    Thanks.

Viewing 19 replies - 51 through 69 (of 69 total)