1.8.x Tính Năng: Teamspeak 3 Group Sync

Preview

Tác giả: Terran_Ulm

Phiên bản: 1.2.0

Gửi lúc: 07/06/2016

Cập nhật lúc: 02/08/2016

Third Party Integration
Mô tả
A plugin to sync forum groups to TS3 groups.


Requires the Teamspeak 3 PHP Framework installed in the MyBB Root folder!


The project is hosted at GitHub: https://github.com/TerranUlm/MyBB-Plugin...c/releases

Use GitHub for support requests, please.

Quick guide:

TS3 setup:

You need to create a serverquery account - dont use the superadmin account for that! I'll recommend YaTQA (http://yat.qa/) as a TS3 admin tool.
The account needs only an limited set of permissions (I've put them in a Query Group):
  • b_serverinstance_virtualserver_list
  • b_serverquery_login
  • b_serverinstance_textmessage_send
  • b_virtualserver_select
  • b_virtualserver_info_view
  • b_virtualserver_client_dblist
  • b_virtualserver_modify_channel_temp_delete_delay_default
  • i_channel_create_modify_with_temp_delete_delay 86400
  • b_channel_modify_temp_delete_delay
  • b_virtualserver_servergroup_client_list
  • b_virtualserver_channelgroup_client_list
  • i_group_needed_modify_power 99
  • i_group_member_add_power 99
  • i_group_needed_member_add_power 99
  • i_group_member_remove_power 99
  • i_group_needed_member_remove_power 99
  • b_group_is_permanent
  • i_group_auto_update_type 50
  • b_client_permissionoverview_own
  • i_client_needed_kick_from_server_power 100
  • i_client_needed_kick_from_channel_power 100
  • i_client_needed_ban_power 100
  • i_client_needed_move_power 100
  • i_client_needed_complain_power 100
  • b_client_create_modify_serverquery_login
  • i_client_permission_modify_power 99
Adjust the numbers to your servers needs!

MyBB Settings:

The plugin adds a new tab in the ACP for each group where you can configure the correspondig Teamspeak 3 permissions:
  • Server Group ID (Database ID of the Server Group)

  • Teamspeak3 Channel Data:
    • Teamspeak 3 Channel ID (Database ID of the Channel)
    • Sort Order (highest number wins as a user can be member of one channel group per channel only)
    • Teamspeak 3 Channel Group ID (Database ID of the Channel Group)
The plugin also adds a section to the MyBB Settings:
  • Teamspeak 3 Group Sync
    • Teamspeak 3 Server address (Set the Teamspeak 3 Server IP or hostname)
    • Teamspeak 3 Server Query Port (Set the Teamspeak 3 Server Query Port)
    • Teamspeak 3 Server Query User (Set the Teamspeak 3 Server Query User)
    • Teamspeak 3 Server Query User Password (Set the Teamspeak 3 Server Query User Password)
    • Teamspeak 3 Virutal Server Port (Set the Teamspeak 3 Virtual Server Port)
    • Teamspeak 3 Server Guest Channel Group ID (This will be the default group for channels controlled by this plugin)

The plugin adds three new custom profile fields. The users have to put their TS3 unique IDs in those fields. Usually they only need one but some users might have multiple computers and don't know how to transfer the ID and just create a new one.

Now for the fun part: 

Setting up how a forum group is synced to TS3:

E.g. you want to sync the forums administrators groups to the TS3 serveradmin group, so everyone that is a administrator in your forum also becomes a serveradmin at your TS3 server.
  • Edit the Administrator group
  • go to the new "Teamspeak 3" tab
  • go to TS3 and lookup the group ID of your serveradmin group, e.g. 35
  • put "35" in the "Teamspeak 3 Server Group ID" field
  • you could stop here and save now, which would trigger the sync task
  • or you could also setup a channel group, e.g. you have a "Admin only" channel in TS3 and want limit access to that channel by other means than the server group, e.q. for moderators as well which aren't serveradmins in TS3
  • go to TS3 and figure the required values for the "Teamspeak3 Channel Data" section and put them in there
  • save
  • wait a bit (you might want to turn on the "see serverquery users" settings in your TS3 client profile for that server)
  • done
The plugin kinda slows down the group editing as it always syncs on save. 
If users add their ID to the custom profile fields the sync isn't triggered instantly, instead it is started about every 30 minutes. You can change that interval in the tast manager section of the forum.

The plugin also writes a logfile to the cache folder of the forum, so if things aint working properly, check there first.
Một plugin để đồng bộ hóa các nhóm diễn đàn với các nhóm TS3.


Yêu cầu Khung PHP Teamspeak 3 được cài đặt trong thư mục MyBB Root!


Dự án được lưu trữ tại GitHub: https://github.com/TerranUlm/MyBB-Plugin...c/releases

Vui lòng sử dụng GitHub cho các yêu cầu hỗ trợ.

Hướng dẫn nhanh:

Thiết lập TS3:

Bạn cần tạo một tài khoản serverquery - đừng sử dụng tài khoản superadmin cho việc đó! Tôi sẽ giới thiệu YaTQA (http://yat.qa/) làm công cụ quản trị TS3.
Tài khoản chỉ cần một bộ quyền hạn chế (tôi đã đặt chúng vào Nhóm truy vấn):
  • b_serverinstance_virtualserver_list
  • b_serverquery_login
  • b_serverinstance_textmessage_send
  • b_virtualserver_select
  • b_virtualserver_info_view
  • b_virtualserver_client_dblist
  • b_virtualserver_modify_channel_temp_delete_delay_default
  • i_channel_create_modify_with_temp_delete_delay 86400
  • b_channel_modify_temp_delete_delay
  • b_virtualserver_servergroup_client_list
  • b_virtualserver_channelgroup_client_list
  • i_group_needed_modify_power 99
  • i_group_member_add_power 99
  • i_group_needed_member_add_power 99
  • i_group_member_remove_power 99
  • i_group_needed_member_remove_power 99
  • b_group_is_permanent
  • i_group_auto_update_type 50
  • b_client_permissionoverview_own
  • i_client_needed_kick_from_server_power 100
  • i_client_needed_kick_from_channel_power 100
  • i_client_needed_ban_power 100
  • i_client_needed_move_power 100
  • i_client_needed_complain_power 100
  • b_client_create_modify_serverquery_login
  • i_client_permission_modify_power 99
Điều chỉnh các con số theo nhu cầu của máy chủ của bạn!

Cài đặt MyBB:

Plugin thêm một tab mới trong ACP cho mỗi nhóm, nơi bạn có thể định cấu hình các quyền tương ứng của Teamspeak 3:
  • ID nhóm máy chủ (ID cơ sở dữ liệu của nhóm máy chủ)

  • Dữ liệu kênh Teamspeak3:
    • ID kênh Teamspeak 3 (ID cơ sở dữ liệu của kênh)
    • Thứ tự sắp xếp (số chiến thắng cao nhất khi người dùng chỉ có thể là thành viên của một nhóm kênh cho mỗi kênh)
    • ID nhóm kênh Teamspeak 3 (ID cơ sở dữ liệu của nhóm kênh)
Plugin cũng thêm một phần vào Cài đặt MyBB:
  • Đồng bộ hóa nhóm Teamspeak 3
    • Địa chỉ máy chủ Teamspeak 3 (Đặt IP hoặc tên máy chủ của Teamspeak 3)
    • Đặt cổng truy vấn máy chủ Teamspeak 3
    • Người dùng truy vấn máy chủ Teamspeak 3 (Đặt người dùng truy vấn máy chủ Teamspeak 3)
    • Mật khẩu người dùng truy vấn máy chủ Teamspeak 3 (Đặt mật khẩu người dùng truy vấn máy chủ Teamspeak 3)
    • Đặt cổng máy chủ ảo Teamspeak 3
    • ID nhóm kênh khách máy chủ Teamspeak 3 (Đây sẽ là nhóm mặc định cho các kênh được điều khiển bởi plugin này)

Plugin thêm ba trường hồ sơ tùy chỉnh mới. Người dùng phải đặt ID duy nhất TS3 của họ vào các trường đó. Thông thường họ chỉ cần một nhưng một số người dùng có thể có nhiều máy tính và không biết cách chuyển ID và chỉ tạo một máy mới.

Bây giờ cho phần thú vị: 

Thiết lập cách đồng bộ hóa nhóm diễn đàn với TS3:

Ví dụ: bạn muốn đồng bộ hóa các nhóm quản trị viên diễn đàn với nhóm quản trị máy chủ TS3, vì vậy tất cả những người là quản trị viên trong diễn đàn của bạn cũng trở thành quản trị viên máy chủ tại máy chủ TS3 của bạn.
  • Chỉnh sửa nhóm Quản trị viên
  • chuyển đến tab "Teamspeak 3" mới
  • truy cập TS3 và tra cứu ID nhóm của nhóm quản trị máy chủ của bạn, ví dụ: 35
  • đặt "35" vào trường "ID nhóm máy chủ Teamspeak 3"
  • Bạn có thể dừng lại ở đây và lưu ngay, điều này sẽ kích hoạt tác vụ đồng bộ hóa
  • hoặc bạn cũng có thể thiết lập một nhóm kênh, ví dụ: bạn có kênh "Chỉ dành cho quản trị viên" trong TS3 và muốn giới hạn quyền truy cập vào kênh đó bằng các phương tiện khác ngoài nhóm máy chủ, ví dụ như đối với người kiểm duyệt cũng như không phải là quản trị viên máy chủ trong TS3
  • Truy cập TS3 và tính các giá trị cần thiết cho phần "Dữ liệu kênh Teamspeak3" và đặt chúng vào đó
  • cứu
  • đợi một chút (bạn có thể muốn bật cài đặt "xem người dùng serverquery" trong hồ sơ máy khách TS3 của bạn cho máy chủ đó)
  • Thực hiện
Plugin hơi làm chậm quá trình chỉnh sửa nhóm vì nó luôn đồng bộ hóa khi lưu. 
Nếu người dùng thêm ID của họ vào các trường hồ sơ tùy chỉnh, quá trình đồng bộ hóa sẽ không được kích hoạt ngay lập tức, thay vào đó nó sẽ được bắt đầu khoảng 30 phút một lần. Bạn có thể thay đổi khoảng thời gian đó trong phần trình quản lý tast của diễn đàn.

Plugin cũng ghi một tệp nhật ký vào thư mục bộ nhớ cache của diễn đàn, vì vậy nếu mọi thứ không hoạt động bình thường, hãy kiểm tra ở đó trước.