bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Cannot login, Hide forum

(35 posts)
  • Started 1 year ago by zapata
  • Latest reply from Trent
  • This topic is not a support question

Tags:

  1. zapata
    Member

    Installed bbPress but upon using my admin login I'm not able to.

    Here are some settings that I did in config file:

    $bb->domain = 'http://passionforcinema.com';
    $bb->path = '/bbpress/'; - the folder in my root directory

    $bb->wp_table_prefix = 'wp_';
    $bb->wp_home = 'passionforcinema.com';
    $bb->wp_siteurl = 'passionforcinema.com';

    Also can I hide a forum from general readers? I would prefer simply the authors of the blog to be able to view and access the forum.

    How can I block independent registration to the forum.

    Posted 1 year ago #
  2. The quickest way to hide the forums is to simply delete the elements from the UI in the templates. Do you edit HTML or know somebody that does?

    Just use <!-- and --> to comment out the registration link, or comment out the php that renders it

    You can also use an .htaccess file to make your forums directory password protected with a master user:pass.

    If this is over your head, like i said, ask somebody. ask me! :)

    The login problem seems to be troubling a lot of people, including myself.

    Posted 1 year ago #
  3. zapata
    Member

    AphelionZ thanks. I would like the .htaccess file route where I can show the like "Authors Room" on the blog and only Authors with passwords can log in and see the forum. (I'll try working on the html (fingers crossed) and see if i succeed)

    But can't move ahead without the logging issue resolved.

    Any ideas dear Gurus?

    Posted 1 year ago #
  4. zapata
    Member

    Not only is bbPress not able to get my WP Login, but when I register as an independent user, even that username password does not allow me to get into bbPress. Could this be my url problem?
    my blog is at passionforcinema.com
    bbpress is located at root level of the folder bbpress

    Now I have two blogs on this server. The root - public_html leads to my other blog DT. At this level is a folder call passionforcinema-com within which is WP contents for my second blog (with a direct url passionforcinema.com)... I'm kind of confused so thought maybe I've messed something up because of this structure and the config.php may need different values than what I've inserted (as above)

    Posted 1 year ago #
  5. I dont know if this gonna fix ur problem.. but it seem u missing http for both "$bb->wp_home" and "$bb->wp_siteurl" Anyway, is it both ur wp db and bb db on the same db name?

    Posted 1 year ago #
  6. Try

    $bb->wp_home = 'http://passionforcinema.com';
    $bb->wp_siteurl = 'http://passionforcinema.com';

    Posted 1 year ago #
  7. zapata
    Member

    It WORKED!!!!!!!!!

    changing home and siteurl to http://passionforcinema.com worked like that!

    Question and possible problem...

    Some of my authors may use www.passionforcinema.com to log in. I tried it. In this case http://passionforcinema.com/bbpress does not recoginze them (same problem as earlier)

    Is there a solution, where bbPress recognizes my authors who have logged in on passionforcinema with or without a "www." in front.

    How can I resolve this issue (beside ofcourse asking my fellow authors to type only http://passionforcinema.com and noT www.passionforcinema.com)

    Posted 1 year ago #
  8. You should probably have the www. pages redirect to the other pages.

    Failing that, you can follow the advice I gave here: http://bbpress.org/forums/topic/113?replies=3

    You'll need to change the cookie information for both WP and bb.

    Posted 1 year ago #
  9. zapata
    Member

    Thanks!!! My host just arranged something that redirects all www. to simply http://passionforcinema.com

    That leaves two things that I need to activate the Authors forum:

    1. How do I prevent users(unregistered ones) from veiwing the forum and using it.

    2. How do I prevent users (visitors) from registering for the forum. (I want to handle registrations myself in WP Admin)

    Posted 1 year ago #
  10. http://www.javascriptkit.com/howto/htaccess3.shtml

    There's a (not) trivial tutorial on there, but you can do it! Just focus. If you don't want users to even try to access it, dont provide a link, just email your dudes with the URL.

    Posted 1 year ago #
  11. zapata
    Member

    (scratching head) can't make head or tail of this, being such a n000b... I know there is a .htaccess file. Is there some line or code I have to insert in there to prevent users from accessing my forum?

    How can I prevent readers registering? Even if I don't give a link or hide "register" link... they may find the page to register...

    Posted 1 year ago #
  12. the beauty of the .htaccess approach is that users wont be able to access *anything* inside of the forums directory without a password or intermediate to advanced haXXing skillz.

    Is there anything in your control panel that allows you to do this? Look into it.

    Posted 1 year ago #
  13. zapata
    Member

    I have the cpanel... is there anything I can do? Or should I just paste my .htaccess file here... Oh Gurus please help me :-) ... (I now could write a screenplay on my adventures in bbPress...)

    Posted 1 year ago #
  14. zapata, this plugin.

    <?php
    /*
    Plugin Name: Force Login
    Description: No one can see your forums unless they are logged in.
    Plugin URI: http://bbpress.org/forums/topic/117
    Author: Michael D Adams
    Author URI: http://blogwaffe.com/
    Version: 0.7
    */

    function force_login_init() {
    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {
    if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {
    require( BBPATH . 'my-templates/front-page.php' );
    } else {
    require( BBPATH . 'bb-templates/front-page.php' );
    }
    exit;
    }
    }

    add_action( 'init', 'force_login_init' );
    ?>

    Posted 1 year ago #
  15. zapata
    Member

    I got an error after installation as follows:

    Fatal error: Call to undefined function: bb_is_user_logged_in() in /home/direc/public_html/passionforcinema-com/wp-content/plugins/bbpress-forcelogin.php on line 12

    Posted 1 year ago #
  16. zapata,

    That is a bbPress plugin, not a WordPress plugin. It should be installed in bbPress' my-plugins/ directory. See http://bbpress.org/documentation/faq/#customization-folders (the bottom of that page).

    Posted 1 year ago #
  17. zapata
    Member

    WOW!!! It works. Now if I logout and try to log back in it simply shows me the login form!!!

    Posted 1 year ago #
  18. zapata
    Member

    just installed version 0.75 and unfortunately the hide feature for those not logged in does not seem to work... any advise here?

    Posted 1 year ago #
  19. zapata
    Member

    i think it could be because I'm on 2.04 WP and 0.75 bbpress?

    Posted 1 year ago #
  20. I don't think that should be a problem having those versions. What is not working, the plugin that mdawaffe posted above or the integration? Could you be more specific? What are you seeing? What are errors? What is desired result?

    Trent

    Posted 1 year ago #
  21. zapata
    Member

    Trent, Thanks for the quick reply. There are no errors. The objective was to hide the forums from everyone who is not logged in. For this the mdawaffe's plugin (code posted in his post above) was working on my initial install (0.74)... but I've installed the 0.75 yesterday and reinstalled the plugin, but upon logging out, I'm still able to browse the forums...

    the url: passionforcinema.com/club

    Posted 1 year ago #
  22. From Ardentfrost.

    <?php
    /*
    Plugin Name: Force Login
    Description: No one can see your forums unless they are logged in.
    Plugin URI: http://bbpress.org/forums/topic/117
    Author: Michael D Adams
    Author URI: http://blogwaffe.com/
    Version: 0.7
    */
    function force_login_init() {
    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {
    if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {
    require( BBPATH . 'my-templates/front-page.php' );
    } else {
    require( BBPATH . 'bb-templates/front-page.php' );
    }
    exit;
    }
    }
    add_action( 'bb_init', 'force_login_init' );
    ?>

    That will work.

    Trent

    Posted 1 year ago #
  23. That's for bbpress .74 and up

    Posted 1 year ago #
  24. zapata
    Member

    Trent,
    WOEEEZZZZZZZZZAAAAAAAAAAA.... sorry for the excitement... the code works!!!!!

    Gurus... one request... how can I completely "Eliminate" anonymous user registration... the goal of my forum is for a private discussion of authors who write on the main blog to communicate with each other. Hence all users of the forum will be actually authors of the blog.

    Posted 1 year ago #
  25. Since you are integrated with WP (I would assume), removing register.php from bbPress root directory would get rid of that particular issue. People can still register using Wordpress or just added as members by you in the WP admin. That would be the easiest way.

    Trent

    Posted 1 year ago #
  26. zapata
    Member

    Trent,
    Today is my bbPress Independence day. Everything seems to be working just so smoothly. Removed register.php and Voila...

    two questions:
    (1) What file do I have to look in to remove the "Register" link on top of the page

    (2)When you mention "People can still register using Wordpress" do you mean the authors or me (admin) has to do anything "beyond" what I do to register authors in the admin section of Wordpress

    Posted 1 year ago #
  27. zapata
    Member

    Also yes... I'm integrated with WP using the integration plugin I found here.

    Posted 1 year ago #
  28. No problem zapata. To get rid of the register link, you need to download login-form.php from /bb-templates/ and then edit it as follows:

    Change this part from:

    <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p>

    to get rid of the register, you could just comment out this line or change the wording:

    <! -- <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p> -->

    Once you have edited that file, upload it to a new folder (if it doesn't exist already in root) /my-templates/ as bbPress will use that file first and if it doesn't exist, go back to the one in /bb-templates/

    As for the registering with Wordpress, I was only referring to the abilitity to turn on or off registration in WP admin. If you turn it off, then you can add the members you want through the admin.

    That should get you going!

    Trent

    Posted 1 year ago #
  29. zapata
    Member

    Trent, Your advise resolved the issue. No more registration links. Thank You!!!

    Future request: is there a way to tick mark a box that says Notify me of replies... that way authors don't have to log in to the forums to check for replies and can be notified of it by email.

    Posted 1 year ago #
  30. Notification of posts that you mark as 'favorite' in your profile:

    http://la-school.com/public/notification.zip

    All notifications of all replies to all topics:

    http://la-school.com/public/notification_all.zip

    Trent

    Posted 1 year ago #

RSS feed for this topic

Reply »

You must log in to post.

Code is Poetry.