Morning all!
Don't bite my head off, but this needs to be done. I am new to punBB and finding my way around it really well, except for, that is, integration information.
Other than some basic info available here and there on the forum, (most of which relating to 1.2 so does not necessarilly work with 1.3) and otherwise the wiki still seems very underdeveloped.
The guys at punBB are doing an incredible job, but I thought a thread with sample code would be very helpfull to me, but also then to others.
So, these are the things I would like to be able to do:
1. Basics: I understand that for anything to work the following needs to be included at the top of every page you are looking to integrate with the forum:
<?PHP
define('FORUM_ROOT', './forum/');
require FORUM_ROOT.'include/common.php';
?>
where "forum" is replaced with the folder where the forum files are kept in your web root.
2. Have a log in box on all pages of the site (including non-forum pages) and be able to display the login box if not logged in, or a "Welcome ???!" if you are logged in.
I managed to display the welcome message by doing this:
Hello <?php echo forum_htmlencode($pun_user['username']); ?>!
But am not sure of how to check if the person is logged in or not. Any help?
Not sure also how to replicate the login fields from the forum login to put in the login box on every page. Any help?
3. Registration page. The forum has it's own page, but how easy is it to replicate that form on a page of our own if we want to ask users additional questions. Any help here appreciated.
Any other integration hints, tips etc.. for punBB 1.3 would be great.
Good luck all and look forward to hearing from you with your advice, etc..
Many thanks,
Duncan