added the skeleton of what will be the board functionality
This commit is contained in:
parent
e65f980c73
commit
6d0db89540
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
$path = $_SERVER['DOCUMENT_ROOT'];
|
||||
require_once($path . '/core/board.php');
|
||||
|
||||
$settings = array(
|
||||
'title' => 'random',
|
||||
'code' => 'b',
|
||||
'splash' => array(
|
||||
'wacky',
|
||||
'totally tubular'
|
||||
)
|
||||
);
|
||||
|
||||
display_board($settings);
|
||||
|
||||
?>
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
// this function is the main control over displaying boards.
|
||||
function display_board(array $settings) {
|
||||
|
||||
// default settings
|
||||
$defaults = array(
|
||||
'title' => 'default',
|
||||
'code' => 'd',
|
||||
'splash' => array(
|
||||
'splash 1',
|
||||
'splash 2',
|
||||
'splash 3'
|
||||
)
|
||||
);
|
||||
|
||||
$settings = array_merge($defaults, $settings);
|
||||
|
||||
// load in the required files
|
||||
$path = $_SERVER['DOCUMENT_ROOT'];
|
||||
require_once($path . '/core/header.php');
|
||||
require_once($path . '/core/footer.php');
|
||||
require_once($path . '/core/database.php');
|
||||
|
||||
display_header('~chan - /' . $settings['code'] . '/');
|
||||
?>
|
||||
<div style="
|
||||
margin: auto;
|
||||
width: 40%;
|
||||
padding-top: 100px;
|
||||
">
|
||||
<h1><?php echo '/' . $settings['code'] . '/ - ' . $settings['title'];?></h1>
|
||||
<p><?php echo $settings['splash'][array_rand($settings['splash'])]; ?></p>
|
||||
<?php
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
# - # - # - # - # - # - # - #
|
||||
# #
|
||||
# ~chan #
|
||||
# - #
|
||||
# by stilbruch #
|
||||
# ~chan config #
|
||||
# #
|
||||
# - # - # - # - # - # - # - #
|
||||
|
||||
|
||||
# ~ database ~
|
||||
define('DB_NAME', 'tildechan');
|
||||
define('DB_USER', 'root' );
|
||||
define('DB_PASSWORD', '' );
|
||||
define('DB_HOST', 'localhost' );
|
||||
|
||||
# ~ users ~
|
||||
|
||||
|
|
Loading…
Reference in New Issue