[Userscript] Forumotion backup templates

  Bài viết hay nhất1
First topic message reminder :

Forumotion backup templates



Userscript này sẽ giúp bạn lưu trữ tất các template (đã chỉnh sửa) của diễn đàn một cách dễ dàng.
Tất cả template được chọn sẽ được lưu trữ trong một tập tin nén để phục hồi khi cần thiết.


Screenshot


[You must be registered and logged in to see this image.]

Xem thêm ảnh chụp màn hình khác tại đây.


Cập nhật


2.0.1

- Hỗ trợ template phiên bản Mobile.
- Chức năng thông báo trên Desktop.
- Cảnh báo nếu thoát khi tiến trình đang chạy.
- Kiểm tra tính hợp lệ của tệp zip tải lên.
- Thêm chế độ One-Click.

0.6.1

- Sửa lỗi trên Firefox.

0.6.0

- Chức năng Nhập và Xuất templates.


Hướng dẫn


Cài trình quản lý

Sử dụng trình duyệt Chrome, Firefox hoặc Opera phiên bản mới nhất.

Cài đặt tiện ích hỗ trợ userscript trước khi sử dụng:

  • Chrome: Tampermonkey
  • Firefox: Greasemonkey
  • Opera: Violent monkey

Cài script backup

Cài đặt userscript Forumotion backup templates.
Nhấn vào liên kết sau: [You must be registered and logged in to see this link.]
Sau khi hiện ra bảng xác nhận thì nhấn Install (Cài đặt).

Chú ý: Đã có phiên bản Add-on / extension riêng cho từng trình duyệt. [You must be registered and logged in to see this link.].

Sử dụng

Truy cập ACP >> Display >> Skins >> Themes management để sử dụng.
Rê chuột vào dấu ? để xem hướng dẫn.


Mã nguồn

Code:
// ==UserScript==
// @name         Forumotion backup templates
// @namespace    http://devs.forumvi.com/
// @version      2.0.1
// @description  Export & Import forumotion Templates
// @copyright    2014+, Zzbaivong
// @icon         http://i19.servimg.com/u/f19/18/83/32/63/icon-610.png
// @match        http://*/admin/index.forum?mode=export*
// @match        http://*/admin/index.forum?*&mode=export*
// @resource     jszip https://openuserjs.org/src/libs/baivong/jszip.js
// @resource     jsziputils https://openuserjs.org/src/libs/baivong/jszip-utils.js
// @resource     filesaver https://openuserjs.org/src/libs/baivong/FileSaver.js
// @resource     zzFmBackup https://openuserjs.org/src/libs/baivong/zzFmBackup.js
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @run-at       document-end
// @grant        GM_addStyle
// @grant        GM_getResourceText
// ==/UserScript==

/**
 * jsZip (v2.5.0) By Stuart Knightley <http://stuartk.com/jszip>
 * jszip-utils (v0.0.2) By Stuart Knightley, David Duponchel <http://stuk.github.io/jszip-utils>
 * FileSaver (2015-05-07) By Eli Grey <http://eligrey.com>
 * zzFmBackup (v2.0.1) By Zzbaivong <http://devs.forumvi.com>
 */

function addscript(source) {
    $("<script>", {
        type: "text/javascript",
        text: source
    }).appendTo("head");
}

GM_addStyle("#zzBackup fieldset{counter-reset:section;border:1px solid #07f}#zzBackup legend{color:#e000a2}#zzBackup ol{margin:5px 0 15px;list-style:none outside none}#zzBackup li:before{counter-increment:section;content:counter(section) '.';width:30px;display:inline-block;text-align:right;margin-right:5px}.backupOption{font-size:18px;color:#00a8a1}#importNoti strong{color:#DA4FB8}#zzBackup dt label{display:block;margin-top:10px;color:#777}#zzBackup dt label:hover{color:#111}#zzBackup label input:checked ~ span{color:#0094CA}.buttonOne{display:none;margin-top:10px;padding:7px 20px;background:#f90e5e;color:#FFF;font-weight:700;border:3px solid #DDD}.buttonOne:hover{border-color:#444;cursor:pointer}.buttonOne:active{background:#444}#zzBackup :disabled,#zzBackup :disabled ~ span{color:#999;cursor:not-allowed}");
addscript(GM_getResourceText("jszip"));
addscript(GM_getResourceText("jsziputils"));
addscript(GM_getResourceText("filesaver"));
addscript(GM_getResourceText("zzFmBackup"));

Chi tiết mã nguồn xem trên Github: [You must be registered and logged in to see this link.]


Tác giả


[You must be registered and logged in to see this link.]: zzFmBackup (v2.0.1)

Cảm ơn

[You must be registered and logged in to see this link.] đã dịch code này sang ngôn ngữ English.
Stuart Knightley: jsZip (v2.5.0)
Stuart Knightley, David Duponchel: jszip-utils (v0.0.2)
Eli Grey: FileSaver (2015-05-07)
  Bài viết hay nhất26
[You must be registered and logged in to see this link.]
kuzu_mtp wrote:Không dùng đc cho cốc cốc à :(
Cốc cốc chạy nhân Chromium giống Chrome nên cài tương tự chrome mà?
  Bài viết hay nhất27
[You must be registered and logged in to see this link.]
boom wrote:[You must be registered and logged in to see this link.]
kuzu_mtp wrote:Không dùng đc cho cốc cốc à :(
Cốc cốc chạy nhân Chromium giống Chrome nên cài tương tự chrome mà?
Không đc bạn êi :|
  Bài viết hay nhất28
Bạn cài extension Tampermonkey chưa đấy?
Nếu đã cài rồi thì kiểm tra Tampermonkey đã được bật hay chưa?
Nếu Tampermonkey đã được bật thì kiểm tra userscript Forumotion backup templates đã được cài hay chưa?
Nếu Forumotion backup templates đã được cài thì mở Tampermonkey lên xem mục Dashboard, đã kích hoạt Forumotion backup templates chưa?

Hoặc bạn cũng có thể dùng extension mình viết cho Chrome, tải ở đây: [You must be registered and logged in to see this link.]
Sau đó, bạn mở tab [You must be registered and logged in to see this link.] và kéo thả file cxr vừa tải vào để cài đặt.
  Bài viết hay nhất29
this version how can I translate it into my language?thanks
  Bài viết hay nhất30
[You must be registered and logged in to see this link.]
pedros wrote:this version how can I translate it into my language?thanks
[You must be registered and logged in to see this link.]
  Bài viết hay nhất31
I solved this by changing

[You must be registered and logged in to see this link.]

thanks
  Bài viết hay nhất32
Ko dùng đc !!!
  Bài viết hay nhất33
Làm đúng hướng dẫn chưa? Xem [You must be registered and logged in to see this link.] hoặc dùng phiên bản [You must be registered and logged in to see this link.].
Nếu không được thì chụp cái ảnh cài đặt và danh sách Templates gửi vào đây.
  Bài viết hay nhất34
[You must be registered and logged in to see this image.]
  Bài viết hay nhất35
Không có template cần lưu trữ -_-
Còn muốn gì nữa, đã thông báo rõ ràng thế còn gì.
  Bài viết hay nhất36
[You must be registered and logged in to see this link.]
Zzbaivong wrote:Không có template cần lưu trữ -_-
Còn muốn gì nữa, đã thông báo rõ ràng thế còn gì.
Có mà
  Bài viết hay nhất37
Chụp ảnh xem.
  Bài viết hay nhất38
You cannot reply to topics in this forum