Completed
Push — develop-3.2.x ( 477e50...b33cd9 )
by Matt
9s
created

v320_m7_update_bbcodes::depends_on()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
*
4
* Advanced BBCode Box
5
*
6
* @copyright (c) 2015 Matt Friedman
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace vse\abbc3\migrations;
12
13
class v320_m7_update_bbcodes extends \vse\abbc3\core\bbcodes_migration_base
0 ignored issues
show
Bug introduced by
There is one abstract method bbcode_data in this class; you could implement it, or declare this class as abstract.
Loading history...
14
{
15
	/**
16
	 * {@inheritdoc}
17
	 */
18
	static public function depends_on()
19
	{
20
		return array('\vse\abbc3\migrations\v310_m5_update_bbcodes');
21
	}
22
23
	/**
24
	 * {@inheritdoc}
25
	 */
26
	public function update_data()
27
	{
28
		return array(
29
			array('custom', array(array($this, 'install_abbc3_bbcodes'))),
30
		);
31
	}
32
33
	/**
34
	 * {@inheritdoc}
35
	 */
36
	protected function bbcode_data()
37
	{
38
		return array(
39
			'spoil' => array(
40
				'bbcode_helpline'	=> 'ABBC3_SPOILER_HELPLINE',
41
				'bbcode_match'		=> '[spoil]{TEXT}[/spoil]',
42
				'bbcode_tpl'		=> '<div class="spoilwrapper" style="margin:1em 0;font-weight:normal;padding:4px 10px;background-color:#fff;border:1px solid #dbdbdb;border-radius:4px;color:#333333;"><div class="spoiltitle" style="margin:0;padding:0;width:100%;"><span class="spoilbtn" style="margin:2px 5px;text-transform:uppercase;font-family:\'Helvetica Neue\', Helvetica, Arial, sans-serif;font-size:11px;font-weight:bold;display:block;cursor:pointer;color:#333;" data-show="{L_ABBC3_SPOILER_SHOW}" data-hide="{L_ABBC3_SPOILER_HIDE}">{L_ABBC3_SPOILER_SHOW}</span></div><div class="spoilcontent" style="color:#333333;display:none;padding:5px;border-top:1px solid #ccc;">{TEXT}</div></div>',
43
			),
44
			'offtopic' => array(
45
				'bbcode_helpline'	=> 'ABBC3_OFFTOPIC_HELPLINE',
46
				'bbcode_match'		=> '[offtopic]{TEXT}[/offtopic]',
47
				'bbcode_tpl'		=> '<div class="offtopic" style="position:relative;margin:1em 0;padding:39px 19px 14px;background:#fff;border:1px solid #ddd;border-radius:4px;"><div class="offtopic_title" style="position:absolute;top:-1px;left:-1px;font-family:\'Helvetica Neue\', Helvetica, Arial, sans-serif;font-weight:bold;font-size:12px;color:#9da0a4;background:#f5f5f5;padding:5px 12px;border:1px solid #ddd;border-radius:4px 0 4px 0;">{L_ABBC3_OFFTOPIC}</div><div class="offtopic_text" style="padding:5px 10px;color:#333333;">{TEXT}</div></div>',
48
			),
49
			'mod=' => array(
50
				'bbcode_helpline'	=> 'ABBC3_MOD_HELPLINE',
51
				'bbcode_match'		=> '[mod={TEXT1}]{TEXT2}[/mod]',
52
				'bbcode_tpl'		=> '<table class="ModTable" style="background-color:#FFFFFF;border:1px solid #000000;border-collapse:separate;border-spacing:5px;margin:1em 0;padding:0;width:100%;color:#333333;overflow:hidden;"><tr><td class="exclamation" rowspan="2" style="background-color:#ff6060;font-weight:bold;font-family:\'Times New Roman\',Verdana,sans-serif;font-size:4em;color:#ffffff;vertical-align:middle;text-align:center;width:1%;">&nbsp;!&nbsp;</td><td class="rowuser" style="border-bottom:1px solid #000000;font-weight:bold;">{L_MESSAGE} {L_FROM}{L_COLON} {TEXT1}</td></tr><tr><td class="rowtext">{TEXT2}</td></tr></table>',
53
			),
54
			'nfo' => array(
55
				'bbcode_helpline'	=> 'ABBC3_NFO_HELPLINE',
56
				'bbcode_match'		=> '[nfo]{TEXT}[/nfo]',
57
				'bbcode_tpl'		=> '<pre class="nfo" style="color:#000000;font-weight:normal;line-height:normal;font-size:10pt;font-family:Terminal, monospace;background-color:#ffffff;white-space:pre;margin:1em 0;padding:5px;">{TEXT}</pre>',
58
			),
59
		);
60
	}
61
}
62