mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Added BBCode Acronym tag (#1419)
* Added BBCode Acronym tag * Update CHANGELOG.md * Update BBCode.php
This commit is contained in:
parent
d82c974a90
commit
77fa47b5ce
5 changed files with 15 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
- Release 2.4.2 🐯 ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added demo mode 📺 [\#1399](https://github.com/torrentpier/torrentpier/pull/1399) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added BBCode Acronym tag [\#1419](https://github.com/torrentpier/torrentpier/pull/1419) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added showing poll status in topic_watch.php [\#1413](https://github.com/torrentpier/torrentpier/pull/1413) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added ability to view post_text of topic [\#1401](https://github.com/torrentpier/torrentpier/pull/1401) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added support for rutracker font BBCode tag [\#1397](https://github.com/torrentpier/torrentpier/pull/1397) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
|
|
@ -1547,6 +1547,8 @@ $lang['CODE_TITLE'] = 'Code display: [code]code[/code] (Ctrl+K)';
|
|||
$lang['LIST'] = 'List';
|
||||
$lang['LIST_TITLE'] = 'List: [list]text[/list] (Ctrl+l)';
|
||||
$lang['LIST_ITEM'] = 'Ordered list: [list=]text[/list] (Ctrl+O)';
|
||||
$lang['ACR'] = 'Acronym';
|
||||
$lang['ACR_TITLE'] = 'Acronym: [acronym=Full text]Short text[/acronym]';
|
||||
$lang['QUOTE_SEL'] = 'Quote selected';
|
||||
$lang['JAVASCRIPT_ON'] = 'Heads necessary to send messages to enable JavaScript';
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ class BBCode
|
|||
$this->preg = [
|
||||
'#\[quote="(.+?)"\]#isu' => $tpl['quote_username_open'],
|
||||
'#\[spoiler="(.+?)"\]#isu' => $tpl['spoiler_title_open'],
|
||||
'#\[acronym="([\w\- \']+)"\](.*?)\[/acronym\]#isu' => '<span class="post-acronym" title="$1">$2</span>',
|
||||
'#\[acronym=([\w\- \']+)\](.*?)\[/acronym\]#isu' => '<span class="post-acronym" title="$1">$2</span>',
|
||||
'#\[list=(a|A|i|I|1)\]#isu' => '<ul type="$1">',
|
||||
'#\[\*=(\d+)\]#isu' => '<li value="$1">',
|
||||
'#\[pre\](.*?)\[/pre\]#isu' => '<pre class="post-pre">$1</pre>',
|
||||
|
|
|
@ -384,6 +384,14 @@ a.gen, a.med, a.genmed, a.small, a.gensmall {
|
|||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.post-acronym {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dashed green;
|
||||
cursor: help;
|
||||
color: darkgreen;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* ---------------------------------- *
|
||||
Code blocks
|
||||
* ---------------------------------- */
|
||||
|
|
|
@ -94,6 +94,7 @@ ajax.callback.posts = function(data) {
|
|||
<input type="button" value="{L_URL}" name="codeUrl" title="{L_URL_TITLE}" style="text-decoration: underline;" />
|
||||
<input type="button" value="{L_CODE}" name="codeCode" title="{L_CODE_TITLE}" />
|
||||
<input type="button" value="{L_LIST}" name="codeList" title="{L_LIST_TITLE}" />
|
||||
<input type="button" value="{L_ACR}" name="codeAcronym" title="{L_ACR_TITLE}" />
|
||||
<input type="button" value="1." name="codeOpt" title="{L_LIST_ITEM}" />
|
||||
<input type="button" value="{L_QUOTE_SEL}" name="quoteselected" title="{L_QUOTE_SELECTED}" onclick="bbcode.onclickQuoteSel();" />
|
||||
</div>
|
||||
|
@ -194,6 +195,7 @@ function checkForm(form) {
|
|||
|
||||
bbcode.addTag("codeCode", "code", null, "K", ctrl);
|
||||
bbcode.addTag("codeList", "list", null, "L", ctrl);
|
||||
bbcode.addTag("codeAcronym", "acronym", null, "", ctrl);
|
||||
bbcode.addTag("codeOpt", "*", "", "0", ctrl);
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue