21.09.2014, 01:55
Eine neue Erweiterung wurde veröffentlicht: TeamSpeak Link
Zitat:=============================== UPDATE NOTICE ===============================
If you're updating from 1.0.* PRESS UNINSTALL AND INSTALL AGAIN in the plugins control panel.
This will add the needed table to the MyBB Database.
The update to 1.1.0 is kind big one.
It changes a lot of how the plugin works.
From now on, the plugin also retrieves the user's unique id's and database id's from the TeamSpeak Server and will use those to update the user's groups.
UPDATING to 1.2.1:
Another big update. This version is 100% compatible with 1.8.0.6.
Also I edited the plugin to be working with 3 different statuses -> Member - Donating Member - VIP Member.
To update to this version:
- Download the zip and unzip it.
- I made some changes to the config.php in /inc/plugins/tslink folder so edit the config.sample.php with the values from your current config.php and rename it config.php.
- Deactivate/uninstall the plugin in the Admin Control Panel
- Upload the folders images and inc to the root of your forum and overwrite all files.
- Install/activate the plugin in the Admin Control Panel
=============================== UPDATE NOTICE ===============================
TSLink
======
Servergroup control on TeamSpeak from MyBB forum
1. What is LinkTS
2. Still to do
3. Already working
4. Installation of the plugin
5. Plugin enhancements to work with TSLink
6. Example of calling the functions of this plugin from somewhere else on your site.
7. Development of this plugin
8. UPDATING
1. What is LinkTS
====================================================================
This plugin is created to add users on a teamspeak server to a group as soon as they register on the forum.
At our community someone becomes a member as soon as he registers on the forum and a VIP member when he donates to the community.
We are running WooCommerce to let members donate to the community.
As soon as we set the order to completed, the function UpdateMyBBDB_To1() and tslink_doupdategroups() are called from this plugin.
This sets the 0 (which is set to every user on installing the plugin in MyBB) to 1 and updates the usergroups on the Teamspeak server.
the function tslink_doupdategroups(), UpdateMyBBDB_To1 and UpdateMyBBDB_To0() are using the member's ip to determine the
right user in the databases.
In simple:
The plugin adds a row to the mybb_users db with a value of 0.
The 0 will represent member
When changed to 1, it will be a VIP member.
2. Still to do
====================================================================
- settings are now done in the config.php file in the /inc/plugins/tslink folder.
Might make it so that more settings can be done from the AdminCP.
- Make it possible to view a member's status in the memberlist and/or show it on the post_author block.
3. Already working
====================================================================
- automatically adding users to a usergroup on teamspeak on registration completion. (after activation)
- UserCP option for the user to update his groups on the teamspeak server
- ModCP option to change a user's status
- AdminCP options to change a user's status + settings to enable or disable certain parts of the plugin.
4. Installation of the plugin
====================================================================
- Make a Teamspeak query user with enough i_group_member_add_power and i_group_member_remove_power to add and removes users from the desired groups.
- Edit the config.sample.php file in /inc/plugins/tslink and rename it to config.php.
- Upload everything to your forum's folder.
- Install & activate the plugin in the AdminCP.
** If you use the facebook plugin to let users login to your forum with their Facebook account, read point 5! **
Test & Have Fun!
5. Plugin enhancements to work with TSLink
====================================================================
- Facebook login
If you use the Facebook login plugin please change the following line in /inc/plugins/MyFacebookConnect
class_facebook.php:
Find:
$plugins->run_hooks("member_do_register_end");
change to:
$plugins->run_hooks("fb_register_end");
6. Example of calling the functions of this plugin from somewhere else on your site.
====================================================================
- Woocommerce in Wordpress
Add this to the function.php of your theme:
Code:// hook into woocommerce when a order gets the status completed
add_action( 'woocommerce_order_status_completed', 'Make_VIP_Member' );
/*
* Do something after WooCommerce sets an order on completed
*/
function Make_VIP_Member($order_id) {
// order object (optional but handy)
$order = new WC_Order( $order_id );
define("IN_LINKTS", 1);
require_once('/home/bugadmin/domains/bug-community.com/public_html/forum/inc/plugins/tslink/tslinkfunctions.php');
$givenip = get_post_meta( $order->id, '_customer_ip_address', true );
UpdateMyBBDB_To1($givenip);
tslink_doupdategroups($givenip);
}
7. Development of this plugin
====================================================================
see: https://github.com/f0nt4/TSLink
8. UPDATING
====================================================================
Download the zip and unpack.
Upload and overwrite all files.
If you're updating from 1.0.* to 1.1.*, make sure to press uninstall and install again.
This will create an extra needed table which is needed for 1.1 and higher to work.
====================================================================