forked from leftypol/leftypol
Add staff application theme, calendar theme and ukko4 theme
This commit is contained in:
parent
f0d73f9952
commit
22bbc4147e
19 changed files with 899 additions and 0 deletions
36
templates/themes/staffapplication/info.php
Normal file
36
templates/themes/staffapplication/info.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
$theme = Array();
|
||||
|
||||
// Theme name
|
||||
$theme['name'] = 'StaffApplication';
|
||||
// Description (you can use Tinyboard markup here)
|
||||
$theme['description'] = 'Staff Application theme.';
|
||||
$theme['version'] = 'v0.0.1';
|
||||
|
||||
// Theme configuration
|
||||
$theme['config'] = Array();
|
||||
|
||||
$theme['config'][] = Array(
|
||||
'title' => 'Site title',
|
||||
'name' => 'title',
|
||||
'type' => 'text'
|
||||
);
|
||||
|
||||
$theme['config'][] = Array(
|
||||
'title' => 'Slogan',
|
||||
'name' => 'subtitle',
|
||||
'type' => 'text',
|
||||
'comment' => '(optional)'
|
||||
);
|
||||
|
||||
$theme['config'][] = Array(
|
||||
'title' => 'File',
|
||||
'name' => 'file',
|
||||
'type' => 'text',
|
||||
'default' => $config['file_index'],
|
||||
'comment' => '(eg. "index.html")'
|
||||
);
|
||||
|
||||
// Unique function name for building everything
|
||||
$theme['build_function'] = 'staffapplication_build';
|
||||
|
80
templates/themes/staffapplication/staffapplication.html
Normal file
80
templates/themes/staffapplication/staffapplication.html
Normal file
|
@ -0,0 +1,80 @@
|
|||
{% filter remove_whitespace %}
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" media="screen" href="/stylesheets/style.css">
|
||||
<meta charset="utf-8">
|
||||
{% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}">{% endif %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
|
||||
<script type='text/javascript'>
|
||||
var active_page = "news";
|
||||
</script>
|
||||
<title>{{ settings.title }}</title>
|
||||
{% include 'header.html' %}
|
||||
</head>
|
||||
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
|
||||
<div class="bar top">
|
||||
{{ boardlist.top }}
|
||||
</div>
|
||||
<header>
|
||||
<h1 class="glitch" data-text="{{ settings.title }}"> {{ settings.title }}</h1>
|
||||
<div class="subtitle">{{ settings.subtitle }}</div>
|
||||
</header>
|
||||
<center>
|
||||
<img src="static/lain_is_cute_datass_small_teal.png" alt="mascot"/>
|
||||
</center>
|
||||
<div class="ban">
|
||||
<p>
|
||||
Please use to the form below to apply to be staff.</br>
|
||||
If you don't want to use this form you can also email admin@lainchan.org or ask in #questions on the Lainchan IRC channel.
|
||||
In the rest of your application section, please specify the following information: </br>
|
||||
Do you have to specify all the requested information below ? </br>
|
||||
No of course not, but the more you specify the more likely your application will be approved, because applications
|
||||
that demostrate that you can put effort in things, tell us that you can be bothered putting effort into things.</br>
|
||||
What position you wanted to apply for ? E.g. Chan staff ? IRC staff ? Sysadmin ? Developer ? All of the above ?
|
||||
None of the above ? Special snowflake role invented just for you ?</br>
|
||||
Your reasons for applying ? </br>
|
||||
Your existing qualifications for the position </br>
|
||||
A summary of your strengths, weaknesses and interesting points / quirks </br>
|
||||
If chan staff , then please specify which boards you are interested in and your experience with their subject matter.
|
||||
</br>
|
||||
Things to not include on your application. </br>
|
||||
1. NSFW pictures </br>
|
||||
2. Anything that is against the rules on the Rules page.</br>
|
||||
3. Short stories about ducks and ribbons and that guy Jimmy and other off topic things.</br>
|
||||
4. Your entire life story. </br>
|
||||
5. Your passport number or SSN and / or other identifying information. </br>
|
||||
6. Your rant about XYZ and how much all ABC need to suffer DEF because of it. </br>
|
||||
</p>
|
||||
<form action="staffapplication.php" method="post">
|
||||
<p><label for="name">Name: </label><input type="text" name="name" size="50"></p>
|
||||
<p><label for="contactmethod">Preferred Contact Method: </label><select name="contactmethod">
|
||||
<option value="email" selected>Email</option>
|
||||
<option value="irc">IRC</option>
|
||||
<option value="chan">Lainchan</option>
|
||||
</select></p>
|
||||
<p><label for="email">Email: </label><input type="email" name="email" size="50"></p>
|
||||
<p>
|
||||
<label for="application">The rest of your application.</label><textarea name="application" rows="30" cols="50"></textarea>
|
||||
</p>
|
||||
<p><label for="anitspam">Antispam: (What is Cyberpunk , answer in all CAPS, single word, no spaces) </label><input type="text" name="antispam" size="50"></p>
|
||||
<input type="submit" value="Send">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
<footer>
|
||||
<p class="unimportant" style="margin-top:20px;text-align:center;">- <a href="http://tinyboard.org/">Tinyboard</a> +
|
||||
<a href='https://int.vichan.net/devel/'>vichan</a> +
|
||||
<a href='https://github.com/lainchan/lainchan'>lainchan</a> {{ config.version }} -
|
||||
<br><a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2014 Tinyboard Development Group
|
||||
<br><a href="https://engine.vichan.net/">vichan</a> Copyright © 2012-2016 vichan-devel
|
||||
<br><a href="https://github.com/lainchan/lainchan">lainchan</a> Copyright © 2014-2017 lainchan Administration</p>
|
||||
</footer>
|
||||
<div class="pages"></div>
|
||||
<script type="text/javascript">{% raw %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
</body>
|
||||
</html>
|
||||
{% endfilter %}
|
54
templates/themes/staffapplication/staffapplicationpost.php
Normal file
54
templates/themes/staffapplication/staffapplicationpost.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
$name = $contactmethod = $email = $application = $antispam = $displaymessage = "";
|
||||
require '/var/www/html/inc/functions.php';
|
||||
if (isset ($_POST["antispam"])){
|
||||
if ($_POST["antispam"] == "DUCK"){
|
||||
$namecheck = ! empty($_POST["name"]);
|
||||
$contactmethodcheck = $_POST["contactmethod"] == "email";
|
||||
$emailcheck = ! empty($_POST["email"]);
|
||||
$emailischecked = $contactmethodcheck ? $emailcheck : true;
|
||||
|
||||
if ($emailischecked && $namecheck){
|
||||
$name = $_POST["name"];
|
||||
$contactmethod = $_POST["contactmethod"];
|
||||
$email = $_POST["email"];
|
||||
$application = $_POST["application"];
|
||||
$antispam = $_POST["antispam"];
|
||||
$to = "admin@lainchan.org";
|
||||
$subject = "Lainchan.org Staff Application for " . $name;
|
||||
|
||||
$message = "Name: " . $name . "\r\n";
|
||||
$message .= "Contact method: " . $contactmethod . "\r\n";
|
||||
$message .= $application;
|
||||
$message = wordwrap($message, 70, "\r\n");
|
||||
|
||||
$source = $emailcheck ? $email : $to;
|
||||
$headers = 'From: ' . $source . "\r\n" .
|
||||
'Reply-To: ' . $source . "\r\n" .
|
||||
'X-Mailer: PHP/' . phpversion();
|
||||
$sent = mail($to, $subject, $message, $headers);
|
||||
$sentmessage = $sent ? "was submitted successfully.</p>\r\n" : "was unable to be submitted.</p>\r\n";
|
||||
$displaymessage = "<p style=\"text-align:center;\"> Your staff application " . $sentmessage;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$displaymessage = "<p style=\"text-align:center;\">ANTISPAM VALUE INCORRECT</p>\r\n";
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
$displaymessage = "<p style=\"text-align:center;\">ANTISPAM NOT SET</p>\r\n";
|
||||
}
|
||||
$displaymessage .= '<span style="text-align:center; display: block;" >[ <a href="https://lainchan.org/"> Return Home </a> ]</span>';
|
||||
|
||||
echo Element('page.html', array(
|
||||
'index' => $config['root'],
|
||||
'title' => _('Staff Application'),
|
||||
'config' => $config,
|
||||
'boardlist' => createBoardlist(isset($mod) ? $mod : false),
|
||||
'body' => $displaymessage,
|
||||
)
|
||||
);
|
||||
?>
|
40
templates/themes/staffapplication/theme.php
Normal file
40
templates/themes/staffapplication/theme.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
require 'info.php';
|
||||
|
||||
function staffapplication_build($action, $settings, $board) {
|
||||
// Possible values for $action:
|
||||
// - all (rebuild everything, initialization)
|
||||
// - news (news has been updated)
|
||||
// - boards (board list changed)
|
||||
|
||||
StaffApplication::build($action, $settings);
|
||||
}
|
||||
|
||||
// Wrap functions in a class so they don't interfere with normal Tinyboard operations
|
||||
class StaffApplication {
|
||||
public static function build($action, $settings) {
|
||||
global $config;
|
||||
|
||||
if ($action == 'all' || $action == 'news')
|
||||
file_write($config['dir']['home'] . $settings['file'], StaffApplication::htmlpage($settings));
|
||||
file_write($config['dir']['home'] . "staffapplication.php", StaffApplication::phppage($settings));
|
||||
}
|
||||
|
||||
// Build staff application page
|
||||
public static function htmlpage($settings) {
|
||||
global $config;
|
||||
|
||||
return Element('themes/staffapplication/staffapplication.html', Array(
|
||||
'settings' => $settings,
|
||||
'config' => $config,
|
||||
'boardlist' => createBoardlist()
|
||||
));
|
||||
}
|
||||
public static function phppage($settings) {
|
||||
global $config;
|
||||
$page = file_get_contents('templates/themes/staffapplication/staffapplicationpost.php');
|
||||
return $page;
|
||||
}
|
||||
};
|
||||
|
||||
?>
|
BIN
templates/themes/staffapplication/thumb.png
Normal file
BIN
templates/themes/staffapplication/thumb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
Loading…
Add table
Add a link
Reference in a new issue