So it's been a while since my last modification for BabbleBoard, mainly because I got bored of writing the same code over and over. However developing this mod is something new and interesting because its programmed in OOP (most won't know what that is).
So what does it do I hear you say? Its hard to explain because its not finished yet, and I want to keep as much as possible secret, but a good example is IPBSDK. Have a look at some of the functions on the left, especially the member functions, this exactly what this mod will do.
To use it'll be as simple as uploading two files to your forums and including it in your sites index.php page.
It can then be used to create member only pages, admin only pages, showing latest posts & topics, etc on your site.
Heres an example to check if a user is online:
RAW CODE
if ($bbsdk->user_is_loggedin()){
echo "i am logged in :)";
}
else {
echo 'Im not logged in :(';
}
Another example, this time check if the forums are offline:
RAW CODE
if ($bbsdk->board_offline()){
echo "board is offline...";
}
else {
echo "board is online...";
}
In the first release there'll only be the most important functions probably, but as it grows so will the feature list.
So far there features ive thought of are:
RAW CODE
logged in, online, get posts, get topics, board offline, group info, is admin, is mod
If anyone thinks of any good features to be included then post them here.
Also ideas, opinions and comments would be welcome as always.
I'll look to keep you all informed over the next few days
Last edited by: Jonny
- Thursday, Oct 25, 2007 17:08.
Posts: 167
Joined: 22 June 2007
Location: Potters Bar
Wednesday, Oct 17, 2007 23:02
Does this include something simple such as putting the little nav bar (logged in, yes, no, my controls, new messages etc) on a mainsite rather than just on the forums?
It was something that I was going to look at tomorrow for my own use, but if it's something which your thing will deal with, i'll leave it and wait to see what you've come up with.
Posts: 59
Joined: 22 June 2007
Location: Rochdale, England
Wednesday, Oct 17, 2007 23:17
Rob
Does this include something simple such as putting the little nav bar (logged in, yes, no, my controls, new messages etc) on a mainsite rather than just on the forums?
It was something that I was going to look at tomorrow for my own use, but if it's something which your thing will deal with, i'll leave it and wait to see what you've come up with.
If you want you can easily recreate the nav bar by using the functions username, logged_in, new_pms, etc.
So a simple nav bar could be:
RAW CODE
require_once ('../bbsdk_class.php');
$bbsdk = new bbSDK();
echo '<div class="nav-bar">';
if ($bbsdk->user_is_loggedin())
{
echo 'Logged in as: .'$bbsdk->username();
echo ' | <a href="....?page=mycontrols">My Controls</a>';
if ($bbsdk->get_new_pms()!='0')
{
echo ' | '.$bbsdk->get_new_pms().' New Messages';
}
}
else
{
echo 'Welcome <i>Guest</li> | <a href="...?page=login">Login</a> | <a href="...?page=register">Register</a>';
}
Posts: 167
Joined: 22 June 2007
Location: Potters Bar
Wednesday, Oct 17, 2007 23:31
Ah brilliant so something as simple as checking to see if a user is logged in, asking them to log in or register, then grabbing there ID once they have and assigning something to that ID (e.g. an upload for the mainsite) could be done quite simply, rather than having to weedle out the necessary bits and bobs from the code that's already there
Posts: 59
Joined: 22 June 2007
Location: Rochdale, England
Thursday, Oct 18, 2007 11:37
Yep thats the general idea. Rather than someone who has limited knowledge of php having to write out large mysql queries to get info, its now as simple as calling a function
Posts: 59
Joined: 22 June 2007
Location: Rochdale, England
Thursday, Oct 18, 2007 16:30
I've already made a function that can show all topics or from certain forums., but you might as well post yours to see if there's anything I can add to mine
I'll dig it out, the only real difference i could see in it is the use of my limit_string function which limits the amount of chars and if its over a certain amount adds "... Read Full" to it
Posts: 59
Joined: 22 June 2007
Location: Rochdale, England
Sunday, Oct 21, 2007 22:17
So here we go then, a bit later than Thursday/Friday I admit but I tried to include a few examples and what not with it.
This version is basically just for testing and for feedback etc. However it does have enough functions for it to be usable on your site.
Things like loggedin, user info, new pms, list pms, newest member, member info, etc have all been included.
So go and give it a test and report back any bugs and stuff here.
There are a few functions not complete yet, such as new_pms, so they don't need to be mentioned.
To install, just download the .zip file, and read the install.html file located in the documentation folder.
Last edited by: Jonny
- Sunday, Oct 21, 2007 22:18.
Posts: 59
Joined: 22 June 2007
Location: Rochdale, England
Thursday, Oct 25, 2007 17:06
And here comes v0.2
This version features 10 new functions mostly based around the user. It also includes changes to some functions such as renaming and altering of some functions.
All changes have been recorded in the included changelog.txt.
So this version is again mostly for testing and feedback purposes. It now also as a much easier to follow install guide, and also the example area is layed out neater.
With more functions means more examples, so make sure you take a look at them if your interested in using this.
So anyway, download and test, and report back any bugs etc please
Last edited by: Jonny
- Thursday, Oct 25, 2007 17:06.
Posts: 9
Joined: 28 October 2007
Location: Rotterdam
Monday, Oct 29, 2007 13:21
Jonny
And here comes v0.2
This version features 10 new functions mostly based around the user. It also includes changes to some functions such as renaming and altering of some functions.
All changes have been recorded in the included changelog.txt.
So this version is again mostly for testing and feedback purposes. It now also as a much easier to follow install guide, and also the example area is layed out neater.
With more functions means more examples, so make sure you take a look at them if your interested in using this.
So anyway, download and test, and report back any bugs etc please
Following error in Apache log:
PHP Notice: Undefined property: bbSDK::$numrows in C:\webs\sites\footballmanagerportal\forum\bbsdk\bbsdk_class.php on line 600
Change line 5 of examples.php to:
$page = isset($_GET['page']) ? $_GET['page'] : null;
Change line 67 of bbsdk_class.php to: ????
if (!defined("BB_RUN")) define("BB_RUN", 1);
Other issues then arise, but not had the time to look into.
EDIT: each of those smilies should just be " ) (without spaces) it's to do the bug where "+) becomes