document.writeln('');
Xiuno BBS 模板也是按照插件的制作流程來做的。
1. 首先我們要找到插入點:view/htm/header.inc.htm 文件中的 header_link_after.htm
2. 新建 plugin/xn_theme_paopao,這是我自己取的名字,你可以用你名字 youname_theme_xxx 這樣的方式命名你的插件。注意,如果是風格插件,必須要用 xx_theme_xxx 這種格式,這樣的主題風格插件會具有排他性,安裝的同時自動卸載其他主題風格插件。
3. header_link_after.htm 這個插入點要注意,我們的 CSS 代碼寫到這里:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <style>body { background: #196e95 !important; background-image: url(plugin/xn_style_paopao/body_bg.jpg?v=2) !important; background-repeat: no-repeat !important;}#header { background: rgba(0,0,0,0.5) !important; }#footer { background: rgba(0,0,0,0.5) !important; }.card > .card-header { background-image: linear-gradient(0deg, #c4d9e3, #fcfdfd); }.card { background: #f4fbfe !important; }.thread:hover { background-color: rgba(255,255,255,0.6) !important; }.text-grey { color: #90a9b6 !important;}.thread, .post { border-bottom: 1px solid #c3d8e2;}.input-group .form-control, .input-group .custom-select, .input-group .custom-file { background: rgba(255,255,255,0.7);}.card-header-tabs > .nav-item > .nav-link.active { background-image: linear-gradient(0deg, #dfedf4, #f2f2f2); border-color: #c9dce5; border-bottom-color: #dfebf1;}.nav_tag_list a { color: #c5dbe4; }.nav_tag_list a.active { color: #6fd2ff; }.btn-secondary { background-color:#405763; border-color:#3b515d; }.btn-secondary:hover { background-color: #374b55; border-color: #344751; }.blockquote { background: #e0eaef;}</style> |
4. 相關文件介紹:
body_bg.jpg:是 CSS 用到的背景圖片,我會用附件傳上來。
icon.png:是插件的 ICON 文件,寬高 64x64 像素
conf.json:是插件的配置文件,內容:
conf.json:是插件的配置文件,內容:
1 2 3 4 5 6 7 8 9 10 | { "name": "官方皮膚:藍色背景泡泡", "brief": "藍色背景泡泡,更換了一張背景圖,導航改了個半透明背景。", "version": "1.1", "bbs_version": "4.0", "installed": 1, "enable": 1, "hooks_rank": [], "dependencies": []} |
試試看,是不是很簡單?
如果要獲取該插件也很簡單,后臺安裝 xn_theme_paopao,裝完以后 plugin/xn_theme_paopao 目錄就是該插件了。