summaryrefslogtreecommitdiff
path: root/templates/themes/ukko3/info.php
blob: 375995f47595fbe227ee84159b6b18e257aaa211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
	$theme = array();
	
	// Theme name
	$theme['name'] = 'Overboard (Ukko3)';
	// Description (you can use Tinyboard markup here)
	$theme['description'] = 'Board with threads and messages from all boards';
	$theme['version'] = 'v0.2';
	
	// Theme configuration	
	$theme['config'] = array();
	
	$theme['config'][] = array(
		'title' => 'Board name',
		'name' => 'title',
		'type' => 'text',
		'default' => 'Ukko'
	);
	$theme['config'][] = array(
		'title' => 'Board URI',
		'name' => 'uri',
		'type' => 'text',
		'default' => '*',
		'comment' => '(ukko for example)'
	);	
	$theme['config'][] = array(
		'title' => 'Subtitle',
		'name' => 'subtitle',
		'type' => 'text',
		'comment' => '(%s = thread limit. for example "%s freshly bumped threads")'
	);		
	$theme['config'][] = array(
		'title' => 'included boards',
		'name' => 'include',
		'type' => 'text',
		'comment' => '(space seperated)'
	);
	$theme['config'][] = array(
		'title' => 'Number of threads',
		'name' => 'thread_limit',
		'type' => 'text',
		'default' => '15',
	);	
	// Unique function name for building everything
	$theme['build_function'] = 'ukko3_build';
	$theme['install_callback'] = 'ukko3_install';

	if(!function_exists('ukko3_install')) {
		function ukko3_install($settings) {
			if (!file_exists($settings['uri']))
				@mkdir($settings['uri'], 0777) or error("Couldn't create " . $settings['uri'] . ". Check permissions.", true);
	                file_write($settings['uri'] . '/ukko.js', Element('themes/ukko/ukko.js', array()));
		}
	}