forked from leftypol/leftypol
support for slugified links; may introduce a few bugs
This commit is contained in:
parent
eb245c2970
commit
bdb6001f3f
18 changed files with 145 additions and 43 deletions
|
@ -42,7 +42,7 @@
|
|||
$board_name, $board_name, $board_name, $board_name, $board_name)) or error(db_error());
|
||||
|
||||
while ($post = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$post['link'] = $config['root'] . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], ($post['thread'] ? $post['thread'] : $post['id']));
|
||||
$post['link'] = $config['root'] . $board['dir'] . $config['dir']['res'] . link_for($post));
|
||||
$post['board_name'] = $board['name'];
|
||||
|
||||
if ($post['embed'] && preg_match('/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i', $post['embed'], $matches)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue