MyBB Development Blog

Welcome to the MyBB Development Blog. Here you'll find updates relating to the development of future versions of MyBB as well as technical discussions, tips, tricks and modifications to help you get the most out of MyBB.

Preparing your Plugins for 1.4

By Ryan Gordon | Published July 11th, 2008 | Updates | Rating: 1 Star2 Stars3 Stars4 Stars5 Stars Loading ... Loading ...

Hello,

With the MyBB 1.4 release pending ever closer, we are stepping up to get your plugins ready for 1.4. There are two main things you should do:

  • Update your plugins to work with MyBB 1.4 ahead of time.
    MyBB 1.4 Beta has been available to download to those who request it. Requesting it is easy. Just click here, find “MyBB 1.4 Beta Testers” and click “Join Group”. For the reason, we suggest you put “Upgrade Plugins to 1.4″, which will let us know you want to upgrade your plugins to 1.4. Theme authors may also do the same thing. It’s very important to us to make sure we give the time and resources necessary, in order to make your transition to 1.4 as smooth as possible.
  • Can’t upgrade your plugins in time for 1.4’s release? Here’s what we recommend:
    GUID’s (Globally Unique Identifiers) are used in MyBB 1.4’s plugin system to allow users to check their plugins for updates. If you were to add your plugin’s assigned guid to your plugin, prior to the release of 1.4, the users who update to it and who download it from there on out, will be able to use the version checking functionality. There is no harm in adding a guid to any 1.2 designed plugin. Versions below MyBB 1.4 will just ignore it. We also recommend adding ‘compatibility clauses’. More information on adding GUID’s and compatibility clauses to your plugin can be found below.

What is a GUID?
Your GUID is a unique identifier that has been generated for your plugin. By including this GUID in your plugin file (see below), users of MyBB 1.4 will be able to check for new versions of your plugin on the MyBB Mods server, with a click from their Admin CP. To allow users to take full advantage of this functionality, please follow the instructions below to add your GUID to your plugin file.

What is a ‘compatibility clause’?
Your ‘compatibility’ clause is a way to tell MyBB which versions of MyBB your plugin will work on. This adds the ability to stop users from installing or running plugins that won’t work with their version of MyBB. To allow users to take full advantage of this functionality, please follow the instructions below to add your ‘compatibility clause’ to your plugin file.

Implementing your GUID & Compatibility Clause
To implement your GUID & ‘compatibility clause’ into your plugin, you need simply add it to the info function of your plugin before uploading it below.

PHP Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
function plugin_info()
{
    return array(
        'name'        => 'test',
        'description' => 'test',
        'website'     => 'http://mods.mybboard.net/',
        'version'     => '1234',
        'author'      => '',
        'authorsite'  => 'http://your-site.com/',
        'guid'        => '1234567890abcdefghijklmopqrstuvwxyz',
        'compatibility' => '14*',
    );
}
?>

More information on changes in 1.4 that will require changes in your plugins can be found here: http://blog.mybboard.net/2008/07/11/plugin-upgrade-guide-for-plugin-authors/

Comments

  1. 1.

    Psychic Advice (July 13th, 2008, 6:34 am)

    Thanks for the great info. I hope you’ll follow this with some more great content.

  2. 2.

    Import from China (July 20th, 2008, 1:05 pm)

    I came across this blog the other day and you got some great info here - thanks.

  3. 3.

    LowBattery (August 21st, 2008, 7:50 am)

    Thanks desc about guid

  4. 4.

    Hexadecimal (March 9th, 2009, 1:41 am)

    Thank you for information

  5. 5.

    ghazal (May 7th, 2009, 1:44 pm)

    I can’t fully understood the GUID function,

  6. 6.

    Staff Response: MattRogowski (May 8th, 2009, 2:25 am)

    @ghazal, the GUID is given to you when you submit your plugin to the Mods site. You need to add it to your plugin information array, as shown in the example above, and then you’ll be able to check the version of the plugin is up-to-date in the plugins version checker in the ACP.

Post a Comment

Note: * indicates required fields.