forked from leftypol/leftypol
Merge pull request #67 from towards-a-new-leftypol/getchan_links
Getchan links in sidebar and at the top
This commit is contained in:
commit
b7f30ed4d1
2 changed files with 430 additions and 401 deletions
|
@ -50,6 +50,7 @@ function doBoardListPart($list, $root, &$boards) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = preg_replace('/\/$/', '', $body);
|
$body = preg_replace('/\/$/', '', $body);
|
||||||
|
|
||||||
return $body;
|
return $body;
|
||||||
|
@ -68,6 +69,25 @@ function createBoardlist($mod=false) {
|
||||||
|
|
||||||
$body = doBoardListPart($config['boards'], $mod?'?/':$config['root'], $boards);
|
$body = doBoardListPart($config['boards'], $mod?'?/':$config['root'], $boards);
|
||||||
|
|
||||||
|
if (isset($config['foreign_boards'])) {
|
||||||
|
|
||||||
|
$body .= ' <span class="sub">[';
|
||||||
|
|
||||||
|
// Append links to foreign boards
|
||||||
|
$i = 0;
|
||||||
|
foreach ($config['foreign_boards'] as $fboardname => $fboardurl) {
|
||||||
|
$i++;
|
||||||
|
$body .= ' <a href="' . $fboardurl . '">' . $fboardname . '</a>';
|
||||||
|
|
||||||
|
// only put slash in between elements
|
||||||
|
if ($i != count($config['foreign_boards'])) {
|
||||||
|
$body .= ' /';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$body .= ']</span> ';
|
||||||
|
}
|
||||||
|
|
||||||
if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body))
|
if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body))
|
||||||
$body = '[' . $body . ']';
|
$body = '[' . $body . ']';
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
) ,
|
) ,
|
||||||
array('meta')
|
array('meta')
|
||||||
);
|
);
|
||||||
|
$config['foreign_boards'] = array(
|
||||||
|
'GET' => 'https://getchan.net/GET/',
|
||||||
|
'ref' => 'https://getchan.net/ref/'
|
||||||
|
);
|
||||||
// Board categories. Only used in the "Categories" theme.
|
// Board categories. Only used in the "Categories" theme.
|
||||||
$config['categories'] = array(
|
$config['categories'] = array(
|
||||||
'Leftypol' => array('leftypol',
|
'Leftypol' => array('leftypol',
|
||||||
|
@ -35,9 +39,14 @@
|
||||||
),
|
),
|
||||||
'Meta' => array('meta')
|
'Meta' => array('meta')
|
||||||
);
|
);
|
||||||
|
|
||||||
// Optional for the Categories theme. This is an array of name => (title, url) groups for categories
|
// Optional for the Categories theme. This is an array of name => (title, url) groups for categories
|
||||||
// with non-board links.
|
// with non-board links.
|
||||||
$config['custom_categories'] = array(
|
$config['custom_categories'] = array(
|
||||||
|
'Our Friends' => array(
|
||||||
|
'GET' => 'https://getchan.net/GET/',
|
||||||
|
'ref' => 'https://getchan.net/ref/'
|
||||||
|
),
|
||||||
'Links' => array(
|
'Links' => array(
|
||||||
'New Multitude' => 'https://newmultitude.org/',
|
'New Multitude' => 'https://newmultitude.org/',
|
||||||
'Booru image repository' => 'https://lefty.booru.org/',
|
'Booru image repository' => 'https://lefty.booru.org/',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue