Archive for June, 2007

Last Post Wins Complete!

Congratulations to tmhai who won the Last One to Post Wins contest thread on the MyBB Community Forums.  The winning message was posted on June 23 2:56AM PDT and the next message was posted on June 24 2:40AM PDT.

Continue reading ‘Last Post Wins Complete!’

PHPDocs and PHPXref for MyBB

If you are a developer of plugins or modifications for MyBB, or you are studying the MyBB code for fun, two resources may be of use to you.

PHPDocs

The generated PHPDocs provided by MyBB Central is a quick and easy way to find out the description of a particular function, its parameters, and the file in which the function is defined. The PHPDocs also give an overview of each class listing what variables and methods are in each.

PHPXref

The documentation generated from the PHPXref takes PHPDocs up a notch. This is provided both by MyBB Fans and by MyBBoard.de. You will be able to find the same function listing and description (by clicking Function List at the top of the index page, selecting a function, and then clicking the filename under “Definition”), the class listing and description (by clicking Class List at the top of the index page, selecting a class, then clicking the filename under “Definition”). However, PHPXref can go far beyond that.

In any function documentation, you will see a “X-Ref” link. Clicking on it will lead you to a list of locations where the function is used. Clicking on the line number on any of these “references”, you will be shown the exact line within the source code of the page where it is used. This is beneficial if you are looking for an example of how to utilize a function or class.

PHPXref also comes with a handy search function which lets you quickly find the information page for a particular class, function, variable or constant. The search can be found at the top-right of each page. The downside of this is that you must know the exact name of what you are looking for, or else the server will spit out an ugly error 404 message.

However, PHPXref also is extremely helpful if you are just browsing the MyBB code. If you notice on the left frame, there is an interactive file listing. Clicking on any file will show you an overview of the file, and anything it defines. Clicking on the “Source View” page will bring you to the actual source code of the page. Of course it is syntax-highlighted and all that, but if you hover over any function or constant, a popup will show you a description (if it is a function), where it is defined, and where it is referenced. Clicking on variables will show you a listing of where the variables are defined and referenced, as we’ve seen before.

PHPDocs and PHPXref go hand in hand if you are interested in the MyBB source code. PHPDocs provides simple documentation for functions and classes, and PHPXref provides you with further information on where things are defined and referenced.

Tasking System?

One of the developers of MyBB has recently hinted at the existence of a feature known as the tasking system. The exact post (which can be found here) says that in MyBB 1.4, sessions will be cleared out of the database on a regular bases via the tasking system. That’s all very well and good, no one wants there forum being slowed down because of an overly bloated database, but what other uses could this tasking system be put to and in the end what use is it to you, the end user? Although we do not have the exact details of this system to show you, with the help of Tikitiki answering some of my questions, we have conjectured up some possible uses and functionality of this system.

Besides the lower level stuff that MyBB itself needs to schedule to keep itself up and running in top condition there is also the possibility the user could give commands to it and have the command execute at a specified time. A little like a cron job. What capabilities would this provide? You could for example make a command that would check for all threads that haven’t had any replies for six or so weeks and then move them into an archive forum. You could then set this to run once at the end of each day or if your forum isn’t very active you could run it once a week.

Plugins might also be able to use the system. Some plugins require total words to be added up to achieve there overall function (be that generating in depth statistics or awarding poodle points). The problem with this is it can take a vast amount of time to recount every word in every post and to force MyBB to do it every time a page is requested is just unacceptable and would lead to monstrous loading times for the user. The simple solution would be to put the recounting command into the task system and let it occur once every day/week automatically.

Of course one limit of PHP is that it requires someone to visit the website and request the pages with a browser before any code will run. This is fine, as if a task is over due to run when a user visits the task will simply run before any content is fed to the user. This will appear as though the task has run on schedule and the user will be none the wiser. However some tasks like the previous example can take an age to complete. To burden this on a user is unacceptable and a better method must be used. Luckily the tasking system will be able to be tied into a cron job on your server. Upon questioning Tikitiki, he said if an external cronjob is run, it would…

call on task.php?tid=x and it will detect it and run it

The cron job will call up task.php and pass via an argument which task to run. Then the PHP takes over and as if a user had triggered it the task executes and the next time a user visits they see the changes.

For all the security freaks out there, Tikitiki also mentioned…

users can’t call on it via a browser and expect it to run without it being within the time frame

You cant expect tasks to run if you call the php page yourself in a browser. It has to be the correct time at which the task is expected to run. If the page is called then simply nothing will happen, cutting down on potential security risks. You make be thinking that any disgruntled users still have a slight window of opportunity as to get the task to do something its not supposed to. If the user can find out the task number and find out when a task is supposed to run then you could potentially have a broken forum on your hands! Not so, Tiki said it better than I can phrase it so once again…

(users) can’t bypass faking it as a cron job because it’ll only work if called via CLI on a cron job.

In conclusion the tasking system looks like it will prove to be an exciting addition to MyBB for both forum admins and plugin developers. Personally I can’t wait to get a hold of source code and see the true extent of what it is capable of. For further information on this feature and other exciting MyBB 1.4 news check back at MyBB Fans for updates. That’s just about everything I have to say about this at the moment except I’ll just mention that this blog post has a lot more fact to it than my last one :P

See you for now, MiNT

Updates for the Theming Contest, Release Date Contest and MyBB Directory

We have seen many great threads in the Theming contest forum, and since many people may be having exams in June, the MyBB Fans team has decided that the deadline of the MyBB 1.2 Theming Contest be extended to July 31 2007. For those of you unfamiliar with the contest, we have 5 prizes up to $100 to give to the best five themes created in the theming contest. It is not too late to enter! See the contest section for more information about the contest.

Our “Guess When MyBB 1.4 Will Be Released” is still ongoing. We currently have just under 50 guesses submitted to the contest, so odds of winning are still pretty high compared to other lotteries and stuff out there :) In addition we are adding two additional guesses for each user, so every user will have a total of five uneditable guesses in the contest. See the contest section for more information about this contest.

Now an update about the MyBB Directory we have on our website: We are currently beta-testing a plugin script to grab statistics off of your forums. This should allow forums which are using a non-English language pack by default, or have modified their English language pack or templates to have their statistics on the directory. To get the plugin, please see this post.

You will be seeing some more interesting content on MyBB Fans in the coming weeks, including our launch a new feature on our site and it starts with the letter “p” (can you guess what it is?). We are also arranging for previews of MyBB 1.4 with the MyBB team, so get yourself ready for that!

We wish you a great day and good luck on the contests,

World Exclusive - MyBB 1.4 - Leaked ACP screenshot!

I could hardly believe it when one of the MyBB staff members approached me with a one off opportunity to have a look at the previously unseen by mortal eyes MyBB 1.4 Admin CP. The staff member (who would like to remain anonymous) said they could contain themselves no longer and had to show someone. I feel it is my prerogative as a loyal community member to share this with the rest of you. Before I give you the link I would like to discuss what can be seen in the screen shot.

First of all, as previously announced, the Admin CP has been completely redesigned. The new simple UI allows the user to see all of the options at a glance without cutting down on the elegance and intuition you would want from any interface. Any operation can be executed through a singe click of the button. The UI appears to be ergonomic, meaning you will find the most commonly used options where your cursor naturally glides. Once again increasing the speed and accuracy that you can administer your board.

There have already been announced to be two themes and I’m not sure what the other will look like. This theme is a light gray colour. Surprisingly this otherwise bland colour has been used in such a way as to not distract you at the task at hand (which would usually be administering your forum). These changes come at a price, it is such a dramatic change from the old user interface that you will need to spend a little time getting used to it, however in the long run you will come to appreciate its elegance and simplicity and eventually come around to respecting its almost magical allure.

No features in the above paragraphs have been confirmed.

Now without further ado…
The New MyBB 1.4 Admin CP