- Compatible XF Versions
- 1.3, 1.4
- Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
- Visible Branding
This add-on allows your forum to automatically respond to trigger codes posted by your users in threads using PHP callbacks. This add-on comes with several example triggers, and I will release other triggers in "packs" that you can download. Developers can make your own triggers by defining them in the admin control panel and providing an appropriate PHP callback script.
For an example, if the user enters:
I'm going to see what the moon phase is.
The postbot will respond with something like: (see example)
The moon phase is currently first quarter. In 8 days it will be full moon.
The postbot will only respond to brand new, unedited posts, and the postbot generates a real post separate from the original user's post. This means that users can't tamper with the results unless they have moderator permissions. This is useful when the result the postbot gives needs to be certifiably original, such as dice results in a game.
Triggers start with a ! by default and can have any alphanumeric name. They are only recognized at the start of a line anywhere within the post. As soon as a user submits a post, the forum will check to see if there is a trigger in it and respond as expected. It happens instantly, so that the automated response appears right after the user's new post.
Note that triggers may only be used by users/groups with permission to use triggers in nodes that permit triggers. By default, this will be nobody anywhere. You must at least add trigger permission to the Registered group for anybody to be able to use triggers.
This add-on adds the following to your XenForo installation...
- A new [Applications -> Postbot] menu in the admin control panel. Here you can configure each of the triggers available or add new ones. You can import and export triggers using XML.
- A new admin permission for managing the postbot triggers.
- A new user/node permission for allowing the user of triggers.
- A new option [Messages -> Postbot Username] to specify the username that the postbot will post as.
- A new option [Messages -> Trigger Prefix Format] which lets you pick the default ! for starting the triggers or lets you select from some other options including / and some standard commenting techniques.
- A new option [Performance -> Defer Postbot Responses] which delays the postbot's responses until XenForo is idle. This is for very large boards to prevent slowdown but means that the postbot's responses don't appear immediately.
- The username associated with your postbot will have all of its posts "minimized" when viewing threads, to take up less space. The avatar area will be shrunk and can be exposed by hovering over it.
- !help displays help information about another trigger (example)
- !debug allows developers to see data related to the trigger
- !moon shows the current moon phase
- !8ball generates a Magic 8-Ball response
- !shuffle shuffles a list and displays some or all of them (example)
If you need a trigger that you cannot develop on your own, you can contact me about developing it for a negotiable fee. However, the postbot system itself is free to use. You are also welcome to develop trigger packs and distribute them. If you do so, please let me know I can include them in the list of available trigger packs above.
For support or suggestions, please post in the discussion thread.