purus (@purus)

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • In reply to: Announcement Board

    I posted too soon, my apologies. This looks to be exactly what I am looking for. I just hope I can figure out what “put in a plugin” means…

    Fantastic! That worked perfectly. Thanks so much guys.

    OK, I take that back. Requiring bb-load.php definitely fixed all the errors, but the functions still aren’t working. They don’t throw an error, but they don’t return anything either and so are pretty much worthless.

    Is it perhaps because the files I am trying to use them in are in the parent directory above the bbPress installation?

    There must be some way to get access to the bbPress login info directly through PHP…

    Thank you rmccue! bb-load.php was the only file required to make those functions work. I guess that was the source of the chain of includes. Thanks a bunch :)

    By the way, assuming I can get these functions to run, what would be the function for getting the current users’s id?

    I got lost somewhere in bb_get_current_user() and bb_get_user() without really being able to figure out what returns what. If I can get them running though, then I can test them, so I should be able to figure it out…

    It sounds like just including the bbPress function files and using those functions would be the easiest. I couldn’t figure out which files needed to be included for the login functions to work though.

    I tried doing if (bb_is_user_logged_in()), which required /bb-includes/pluggable.php and /bb-includes/functions.php, but after I included both those files I was left with the following error:

    Fatal error: Call to a member function get_row() on a non-object in /bb-includes/functions.php on line 1228

    Am I missing some other file, or is it just not possible to use this function outside of the actual bbPress build?

    Oh, and by the way, is there a way to return the current user’s username and ID if one is logged in?

    Just to clarify, my site is at mysite.com. I’ve got bbPress installed at mysite.com/forums. I’d like to be able to enforce login using the bbPress user system at mysite.com/blah.php, but blah.php isn’t part of the bbPress install so the bbPress functions aren’t available to it. How do I go about enforcing login on a non-bbPress page?

    Hmm… I’m just trying to verify login on a page on the same site that is not part of the bbPress install. I’d like to be able to use the bbPress user system for the entire site if that is possible.

    If sessions are the way to go, perhaps I could just include a couple of the function files. Which ones would be necessary to include to enable the is_user_logged_in() function?

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