Skip to content

Commit aae4112

Browse files
committed
Add new migration to update replaced emoji
1 parent 0e7a63a commit aae4112

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
*
4+
* Advanced BBCode Box
5+
*
6+
* @copyright (c) 2026 Matt Friedman
7+
* @license GNU General Public License, version 2 (GPL-2.0)
8+
*
9+
*/
10+
11+
namespace vse\abbc3\migrations;
12+
13+
class v3310_m20_update_bbcodes extends bbcodes_migration_base
14+
{
15+
/**
16+
* {@inheritdoc}
17+
*/
18+
public static function depends_on()
19+
{
20+
return ['\vse\abbc3\migrations\v339_m19_update_bbcodes'];
21+
}
22+
23+
/**
24+
* {@inheritdoc}
25+
*/
26+
public function update_data()
27+
{
28+
return [
29+
['custom', [[$this, 'install_abbc3_bbcodes']]],
30+
];
31+
}
32+
33+
/**
34+
* {@inheritdoc}
35+
*/
36+
protected static $bbcode_data = [
37+
// I replaced the emoji in the previous migration already, so this update is just to ensure
38+
// removal of that emoji from boards that installed the previous migration before I replaced it
39+
'offtopic' => [
40+
'bbcode_helpline' => 'ABBC3_OFFTOPIC_HELPLINE',
41+
'bbcode_match' => '[offtopic]{TEXT}[/offtopic]',
42+
'bbcode_tpl' => '<div class="abbc3-off-topic" style="display:flex;align-items:stretch;max-width:100%;margin:1em 0;border-radius:8px;overflow:hidden;color:#333;border:1px solid #ddd;"><div style="background-color:#6c757d;color:#fff;font-weight:bold;font-size:1.8em;display:flex;align-items:center;justify-content:center;padding:10px;width:60px;">&#8505;</div><div style="flex:1;display:flex;flex-direction:column;"><div style="background-color:#f1f3f5;font-weight:bold;padding:8px 12px;border-bottom:1px solid #ddd;">{L_ABBC3_OFFTOPIC}</div><div style="background-color:#fff;padding:12px 12px 14px 12px;line-height:1.5;">{TEXT}</div></div></div>',
43+
],
44+
];
45+
}

0 commit comments

Comments
 (0)