論壇程式phpbb

開放原始碼的軟體,免費,分享,自由
Post Reply
ejsoon
Site Admin
Posts: 3514
Joined: 2016 Jan 10, 22:15

論壇程式phpbb

Post by ejsoon » 2017 Jan 05, 09:30

當然也見過其他好的論壇程式,但我就認定這個了。

ejsoon
Site Admin
Posts: 3514
Joined: 2016 Jan 10, 22:15

hack: 論壇程式phpbb

Post by ejsoon » 2017 Jan 05, 09:36

  • Extension:
    https://www.phpbb.com/customise/db/extension/pages
    https://www.phpbb.com/customise/db/exte ... uto_groups
  • BBCode:
    [ c]{TEXT}[/c]

    Code: Select all

    <code style="font-family: Monaco, 'Andale Mono', 'Courier New', Courier, monospace; font-size: 0.9em; font-style: normal; line-height: 1.3em; background: #FFF; border: 1px solid #325e7b; padding: 0 3px; color: #2E8B57; display: inline;box-shadow:3px 3px 5px #888888;border-radius: 3px;">{TEXT}</code>
    [ decodeuri]{TEXT}[/decodeuri]
    <span class="span_decodeURI">{TEXT}</span>

    [ table]{TEXT}[/table]
    <table cellpadding="10" style="margin: 1em; table-layout:fixed;">{TEXT}</table>

    [ td]{TEXT}[/td]
    <td align="center" style="padding: .3em; border: 1px #ccc solid; background-color: #FFFFcc;">{TEXT}</td>

    [ th]{TEXT}[/th]
    <th style="color:white; padding: .3em; border: 1px ##575757; solid; background: #4F4F4F;">{TEXT}</th>

    [ tr]{TEXT}[/tr]
    <tr>{TEXT}</tr>

    [ cj]{TEXT}[/cj]
    <span class="ichirou_font">{TEXT}</span>

    [ ij]{TEXT}[/ij]
    <span class="font_ij">{TEXT}</span>

    [ emj]{TEXT}[/emj]
    <span class="emoji">{TEXT}</span>

    [ fonturl={URL}]{TEXT}[/fonturl]
    <span style="font-family:ejsoon_font;">{TEXT}</span> <style> @font-face { font-family: ejsoon_font; src: url('{URL}'); }</style>
  • fonts:
    /phpbb/ext/fonts/CJKai.woff
    /phpbb/ext/fonts/ij.woff
    /phpbb/ext/fonts/Humeur.ttf
  • /phpbb/styles/prosilver/theme/*.css:
    common.css
    body {
    /*...*/
    font-size: 17px;
    /*...*/
    }

    content.css
    .content .font_ij {
    font-family: ij;
    }

    .content .ichirou_font {
    font-family: ichirou;
    }

    .content .emoji {
    font-family: emoji;
    }

    @font-face {
    font-family: ij; src: url('/phpbb/ext/fonts/ij.woff');
    }

    @font-face {
    font-family: ichirou; src: url('/phpbb/ext/fonts/CJKai.woff');
    }

    @font-face {
    font-family: emoji; src: url('/phpbb/ext/fonts/Humeur.ttf');
    }

ejsoon
Site Admin
Posts: 3514
Joined: 2016 Jan 10, 22:15

Re: 論壇程式phpbb

Post by ejsoon » 2017 Jan 31, 21:47

/phpbb/styles/prosilver/template/forum_fn.js

Code: Select all

/* global phpbb */

/**
* phpBB3 forum functions
*/

/* decoding the [char/] */
var span_char = document.getElementsByClassName("span_char");
var char_num = span_char.length;
var cnvt = ct = "";
for (var cnum = 0; cnum < char_num; cnum++) {
	cnvt = span_char[cnum].innerHTML;
	ct = '&' + cnvt + ';';
	span_char[cnum].innerHTML = ct;
}

/* decoding the [/decodeURI] */
var span_decodeURI = document.getElementsByClassName("span_decodeURI");
var max_num = span_decodeURI.length;
var enc = "";
var dec = "";
for (var num = 0; num < max_num; num++) {
	enc = span_decodeURI[num].innerHTML;
	dec = decodeURI(enc);
	span_decodeURI[num].innerHTML = dec;
}

/* font ij */
var span_ij = document.getElementsByClassName("font_ij");
var max_ij = span_ij.length;
var oij = "";
var cij = "";
var i_arr = [
	'日-', '橫日',
	'月-', '斜月', '斜月-', '小爪', '覆匡', '覆匡-', '蒙蔽',
	'對點', '八分', '四中',
	'寸架', '五中',
	'側水', '底水', '橫水', '又形',
	'底火', '苗火', '絲垂', '小形', '小形-',
	'士形',

	'竹-', '斜撇', '連脈',
	'點形', '高屋', '私右',
	'深屋',
	'叉形', '尹有', '倚箸',
	'豎形', '縱撇', '側衣', '執事',
	'橫提', '崖屋', '頁首', '工形',
	'豎鉤', '橫鉤', '橫折', '橫折-', '乙形', '乙形-', '飛虱', '夕架', '象頭', '象頭-',

	'人-', '側人', '矢尖', '丘人', '入形', '長捺', '象尾', '象尾-',
	'側心', '小心', '匕形', '匕形-', '七形', '七形-', '弋身', '弋身-', '包囊', '遂心',
	'側手', '奉下', '奉下-', '降下',
	'口-',

	'外匡', '己上', '刀身', '彎鉤', '長上',
	'草頭', '並十', '羊頭', '並立', '共上', '聯下', '兼上',
	'仰匡', '仰鉤', '初生', '初生-',
	'曲折', '豎折', '豎折-', '豎提', '斜鉤', '衣襬',
	'外圍', '母體',
	'貞占', '齊首', '重點', '行止',

	'重卜', '幾身', '姊右', '淵右', '漢右', '匃廓', '瓦罩',
	];
var j_arr = [
	'⺜', '┌',
	'┍', '┎', '┏', '⺤', '冂', 'ㄇ', '冖',
	'丷', '八', '┐',
	'┑', '┒',
	'氵', '氺', '┓', '又',
	'灬', '┕', '┖', '小', '└',
	'士',

	'⺮', '㇒', '⺁',
	'丶', '广', '厶',
	'宀',
	'乂', '┗', '疒',
	'丨', '丿', '衤', '肀',
	'㇀', '厂', '丆', '工',
	'亅', '乛', '㇕', '┘', '乙', '㇍', '⺄', '┙', '⺈', '┚',

	'┛', '亻', '├', '┝', '入', '㇏', '┞', '┟',
	'忄', '⺗', '匕', '┣', '七', '┠', '┡', '┢', '勹', '┤',
	'扌', '┥', '┦', '┧',
	'〇',

	'匚', '┨', '㇆', '㇁', '┩',
	'艹', '卄', '⻀', '┫', '龷', '丱', '䒑',
	'凵', '乚', '屮', '⼬',
	'ㄑ', '㇗', 'ㄥ', '㇙', '㇂', '┬',
	'囗', '┭',
	'⺊', '亠', '⺀', '辶',

	'┪', '┮', '┯', '┰', '┱', '┲', '┳',
	];
for (var inum = 0; inum < max_ij; inum++) {
	oij = span_ij[inum].innerHTML;
	cij = i_arr.indexOf(oij) > -1 ? j_arr[i_arr.indexOf(oij)] : oij;
	span_ij[inum].innerHTML = cij;
}


Post Reply