Skip to content

Commit b14ad2d

Browse files
committed
fix: IPB4 use Html as Format & add links to legacy formatting
1 parent 3f8b7fa commit b14ad2d

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

src/Source/IpBoard3.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
use Porter\Source;
1414

15+
/**
16+
* Formatting issues?
17+
* @see https://github.com/prosembler/vanilla/tree/main/plugins/IPBFormatter
18+
*/
1519
class IpBoard3 extends Source
1620
{
1721
public const SUPPORTED = [

src/Source/IpBoard4.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
use Porter\Source;
1212

13+
/**
14+
* Formatting issues?
15+
* @see https://github.com/prosembler/vanilla/tree/main/plugins/IPBFormatter
16+
*/
1317
class IpBoard4 extends Source
1418
{
1519
public const SUPPORTED = [
@@ -75,7 +79,7 @@ protected function conversations(): void
7579
$filters = [
7680
'msg_date' => 'timestampToDate',
7781
];
78-
$query = "select m.*, 'IPB' as Format from :_core_message_posts m";
82+
$query = "select m.*, 'Html' as Format from :_core_message_posts m";
7983
$this->export('ConversationMessage', $query, $map, $filters);
8084

8185
// User Conversation.
@@ -184,14 +188,10 @@ protected function discussions(): void
184188
'start_date' => 'timestampToDate',
185189
'edit_time' => 'timestampToDate',
186190
];
187-
$query = "select t.*,
188-
$descriptionSQL as post,
189-
IF(t.state = 'closed', 1, 0) as closed,
190-
'BBCode' as Format,
191-
p.edit_time
191+
$query = "select t.*, $descriptionSQL as post,
192+
IF(t.state = 'closed', 1, 0) as closed, 'Html' as Format, p.edit_time
192193
from :_forums_topics t
193-
left join :_forums_posts p
194-
on t.topic_firstpost = p.pid";
194+
left join :_forums_posts p on t.topic_firstpost = p.pid";
195195
$this->export('Discussion', $query, $map, $filters);
196196
}
197197

@@ -212,11 +212,9 @@ protected function comments(): void
212212
'post_date' => 'timestampToDate',
213213
'edit_time' => 'timestampToDate',
214214
];
215-
$query = "select p.*,
216-
'BBCode' as Format
215+
$query = "select p.*, 'Html' as Format
217216
from :_forums_posts p
218-
join :_forums_topics t
219-
on p.topic_id = t.tid
217+
join :_forums_topics t on p.topic_id = t.tid
220218
where p.pid <> t.topic_firstpost";
221219
$this->export('Comment', $query, $map, $filters);
222220
}

0 commit comments

Comments
 (0)