From 1b136555d279bf2cfb28f5661225c010426754f5 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 5 Oct 2011 15:22:53 +1100 Subject: transition to Twig --- templates/error.html | 28 +++++ templates/index.html | 102 +++++++-------- templates/login.html | 6 +- templates/main.js | 22 ++-- templates/page.html | 24 ++-- templates/posts.sql | 60 ++++----- templates/themes/4chon/home.css | 109 ++++++++++++++++ templates/themes/4chon/info.php | 15 +++ templates/themes/4chon/theme.php | 215 ++++++++++++++++++++++++++++++++ templates/themes/4chon/thumb.png | Bin 0 -> 21440 bytes templates/themes/drudgereport/info.php | 28 +++++ templates/themes/drudgereport/theme.php | 145 +++++++++++++++++++++ templates/themes/drudgereport/thumb.png | Bin 0 -> 24532 bytes templates/themes/ruiwy1.zip | Bin 0 -> 10729 bytes templates/themes/ruiwy1/info.php | 27 ++++ templates/themes/ruiwy1/theme.php | 77 ++++++++++++ templates/themes/ruiwy1/thumb.png | Bin 0 -> 9298 bytes templates/thread.html | 94 +++++++------- 18 files changed, 800 insertions(+), 152 deletions(-) create mode 100644 templates/error.html create mode 100644 templates/themes/4chon/home.css create mode 100644 templates/themes/4chon/info.php create mode 100644 templates/themes/4chon/theme.php create mode 100644 templates/themes/4chon/thumb.png create mode 100644 templates/themes/drudgereport/info.php create mode 100644 templates/themes/drudgereport/theme.php create mode 100644 templates/themes/drudgereport/thumb.png create mode 100644 templates/themes/ruiwy1.zip create mode 100644 templates/themes/ruiwy1/info.php create mode 100644 templates/themes/ruiwy1/theme.php create mode 100644 templates/themes/ruiwy1/thumb.png (limited to 'templates') diff --git a/templates/error.html b/templates/error.html new file mode 100644 index 00000000..0b5c7bb8 --- /dev/null +++ b/templates/error.html @@ -0,0 +1,28 @@ +{% if error %}

{{ error }}

{% endif %} +
+{% if redirect %}{% endif %} + + + + + + + + + + + + + +
+ Username + + +
+ Password + + +
+ +
+
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 6cf5e41f..c0196e93 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,16 +1,15 @@ - + - - {config[url_favicon]?} - {board[url]} - {board[name]} + + {% if config.url_favicon %}{% endif %} + {{ board.url }} - {{ board.name }} - {config[meta_keywords]?} - - - {config[recaptcha]?} + {% endraw %}{% endif %} - {boardlist[top]} - {pm?
{pm}

} - {config[url_banner]?} -

{board[url]} - {board[name]}

-
{board[title]?{board[title]}}

{mod?Return to dashboard}

+ {{ boardlist.top }} + {% if pm %}
{{ pm }}

{% endif %} + {% if config.url_banner %}{% endif %} +

{{ board.url }} - {{ board.name }}

+
{% if board.title %}{{ board.title }}{% endif %}

{% if mod %}Return to dashboard{% endif %}

-
- {hidden_inputs} - - {mod?} + + {{ hidden_inputs }} + + {% if mod %}{% endif %} @@ -72,25 +71,25 @@ - {config[recaptcha]? + {% if config.recaptcha %} - } + {% endif %} - {config[enable_embedding]? + {% if config.enable_embedding %} - } - {mod? + {% endif %} + {% if mod %} - } + {% endif %}
@@ -61,7 +60,7 @@ - {config[spoiler_images]? Spoiler Image} + {% if config.spoiler_images %} Spoiler Image{% endif %}
Verification - +
File - +
Embed @@ -99,8 +98,8 @@
Flags @@ -108,42 +107,42 @@
-
+
-
- +
+
-
- +
+
Password - + (For file deletion.)
- - - {config[blotter]?
{config[blotter]}
} -
-
- - {mod?} - {body} + {% endraw %} + + {% if config.blotter %}
{{ config.blotter }}
{% endif %} +
+ + + {% if mod %}{% endif %} + {{ body }}
- Delete Post [ + Delete Post [ ] @@ -154,11 +153,12 @@
-
{btn[prev]} {pages: - [{pages[num]}]{!%last? } - } {btn[next]}
- {boardlist[bottom]} -

Powered by Tinyboard v0.9.3 | Tinyboard Copyright © 2010-2011 Tinyboard Development Group

-

All trademarks, copyrights, comments and images on this page are owned by and/or are the responsibility of their respective parties.

+
{{ btn.prev }} {% for page in pages %} + [{{ page.num }}]{% if loop.last %} {% endif %} + {% endfor %} {{ btn.next }}
+ {{ boardlist.bottom }} +

Powered by Tinyboard v0.9.4 | Tinyboard Copyright © 2010-2011 Tinyboard Development Group

+

All trademarks, copyrights, comments, and images on this page are owned by or are the responsibility of their respective parties.

+ - + \ No newline at end of file diff --git a/templates/login.html b/templates/login.html index 4cc7909d..deed696b 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,13 +1,13 @@ -{error?

{error}

} +{% if error %}

{{ error }}

{% endif %}
-{redirect?} +{% if redirect %}{% endif %} diff --git a/templates/main.js b/templates/main.js index 6b4a8055..1ebe32da 100644 --- a/templates/main.js +++ b/templates/main.js @@ -1,4 +1,4 @@ -function get_cookie(cookie_name) +{% raw %}function get_cookie(cookie_name) { var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)'); if(results) @@ -34,7 +34,7 @@ function focusId(id) function generatePassword() { pass = ''; - chars = '{config[genpassword_chars]}'; + chars = '{% endraw %}{{ config.genpassword_chars }}{% raw %}'; for(i=0;i<8;i++) { rnd = Math.floor(Math.random() * chars.length); pass += chars.substring(rnd,rnd + 1); @@ -71,10 +71,10 @@ function citeReply(id) { } } -var selectedstyle = '{config[default_stylesheet][0]}'; +var selectedstyle = '{% endraw %}{{ config.default_stylesheet.0 }}{% raw %}'; var styles = [ - {stylesheets:['{stylesheets[name]}', '{stylesheets[uri]}']{!%last?, - }} + {% endraw %}{% for stylesheet in stylesheets %}{% raw %}['{% endraw %}{{ stylesheet.name }}{% raw %}', '{% endraw %}{{ stylesheet.uri }}{% raw %}']{% endraw %}{% if not loop.last %}{% raw %}, + {% endraw %}{% endif %}{% endfor %}{% raw %} ]; var saved = {}; @@ -109,15 +109,15 @@ function rememberStuff() { if(sessionStorage.body) { saved = JSON.parse(sessionStorage.body); - if(get_cookie('{config[cookies][js]}')) { + if(get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}')) { // Remove successful posts - successful = JSON.parse(get_cookie('{config[cookies][js]}')); + successful = JSON.parse(get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}')); for (var url in successful) { saved[url] = null; } sessionStorage.body = JSON.stringify(saved); - document.cookie = '{config[cookies][js]}={};expires=0;path=/;'; + document.cookie = '{% endraw %}{{ config.cookies.js }}{% raw %}={};expires=0;path=/;'; } if(saved[document.location]) { document.forms.post.body.value = saved[document.location]; @@ -186,7 +186,7 @@ function init() if(window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1)) highlightReply(window.location.hash.substring(1)); - {config[inline_expanding]?init_expanding();} + {% endraw %}{% if config.inline_expanding %}{% raw %}init_expanding();{% endraw %}{% endif %}{% raw %} } var RecaptchaOptions = { @@ -194,6 +194,6 @@ var RecaptchaOptions = { }; window.onload = init; -{config[google_analytics]? +{% endraw %}{% if config.google_analytics %}{% raw %} -var _gaq = _gaq || [];_gaq.push(['_setAccount', '{config[google_analytics]}']);{config[google_analytics_domain]?_gaq.push(['_setDomainName', '{config[google_analytics_domain]}'])}{!config[google_analytics_domain]?_gaq.push(['_setDomainName', 'none'])};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();} +var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endraw %}{{ config.google_analytics }}{% raw %}']);{% endraw %}{% if config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', '{% endraw %}{{ config.google_analytics_domain }}{% raw %}']){% endraw %}{% endif %}{% if not config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', 'none']){% endraw %}{% endif %}{% raw %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endraw %}{% endif %} diff --git a/templates/page.html b/templates/page.html index 24a2d0ce..f246757b 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,20 +1,20 @@ - + - - {config[url_favicon]?} - {title} + + {% if config.url_favicon %}{% endif %} + {{ title }} - - + + - {pm?
{pm}

} -

{title}

-
{subtitle?{subtitle}}

{mod?Return to dashboard}

- {body} -
-

Powered by Tinyboard v0.9.3 | Tinyboard Copyright © 2010-2011 Tinyboard Development Group

+ {% if pm %}
{{ pm }}

{% endif %} +

{{ title }}

+
{% if subtitle %}{{subtitle}}{% endif %}

{% if mod %}Return to dashboard{% endif %}

+ {{ body }} +
+

Powered by Tinyboard v0.9.4 | Tinyboard Copyright © 2010-2011 Tinyboard Development Group

diff --git a/templates/posts.sql b/templates/posts.sql index 6e691044..c8a4bdc6 100644 --- a/templates/posts.sql +++ b/templates/posts.sql @@ -1,30 +1,30 @@ -CREATE TABLE IF NOT EXISTS `posts_{board}` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `thread` int(11) DEFAULT NULL, - `subject` varchar(100) NOT NULL, - `email` varchar(30) NOT NULL, - `name` varchar(35) NOT NULL, - `trip` varchar(15) DEFAULT NULL, - `capcode` varchar(50) DEFAULT NULL, - `body` text NOT NULL, - `time` int(11) NOT NULL, - `bump` int(11) DEFAULT NULL, - `thumb` varchar(50) DEFAULT NULL, - `thumbwidth` int(11) DEFAULT NULL, - `thumbheight` int(11) DEFAULT NULL, - `file` varchar(50) DEFAULT NULL, - `filewidth` int(11) DEFAULT NULL, - `fileheight` int(11) DEFAULT NULL, - `filesize` int(11) DEFAULT NULL, - `filename` text DEFAULT NULL, - `filehash` text DEFAULT NULL, - `password` varchar(20) DEFAULT NULL, - `ip` varchar(45) NOT NULL, - `sticky` int(1) NOT NULL, - `locked` int(1) NOT NULL, - `embed` text, - UNIQUE KEY `id` (`id`), - KEY `thread` (`thread`), - KEY `time` (`time`), - FULLTEXT KEY `body` (`body`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; +CREATE TABLE IF NOT EXISTS `posts_{{ board }}` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `thread` int(11) DEFAULT NULL, + `subject` varchar(100) NOT NULL, + `email` varchar(30) NOT NULL, + `name` varchar(35) NOT NULL, + `trip` varchar(15) DEFAULT NULL, + `capcode` varchar(50) DEFAULT NULL, + `body` text NOT NULL, + `time` int(11) NOT NULL, + `bump` int(11) DEFAULT NULL, + `thumb` varchar(50) DEFAULT NULL, + `thumbwidth` int(11) DEFAULT NULL, + `thumbheight` int(11) DEFAULT NULL, + `file` varchar(50) DEFAULT NULL, + `filewidth` int(11) DEFAULT NULL, + `fileheight` int(11) DEFAULT NULL, + `filesize` int(11) DEFAULT NULL, + `filename` text DEFAULT NULL, + `filehash` text DEFAULT NULL, + `password` varchar(20) DEFAULT NULL, + `ip` varchar(45) NOT NULL, + `sticky` int(1) NOT NULL, + `locked` int(1) NOT NULL, + `embed` text, + UNIQUE KEY `id` (`id`), + KEY `thread` (`thread`), + KEY `time` (`time`), + FULLTEXT KEY `body` (`body`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; \ No newline at end of file diff --git a/templates/themes/4chon/home.css b/templates/themes/4chon/home.css new file mode 100644 index 00000000..067bd73d --- /dev/null +++ b/templates/themes/4chon/home.css @@ -0,0 +1,109 @@ +div.ban { + max-width: 1200px; + min-width: 348px; + width: 85%; +} +div.ban .wrap { + margin: 10px; + overflow: auto; +} +div.board { + width: 100%; + overflow: auto; + margin: 10px 0; +} +div.board p { + text-align: justify; +} +div.board a.button { + text-align: center; + font-weight: bold; + font-size: 15pt; + height: 60px; + width: 75px; + display: inline-block; + background: #98E; + line-height: 60px; + + margin: 5px 25px; + + box-shadow:0 2px 5px 0px #D0D0D0; + -webkit-box-shadow:0 2px 5px 0px #D0D0D0; + + border-radius:15px; + -webkit-border-radius:15px; + float: left; +} +div.board a.button:hover { + box-shadow:0 2px 5px 0px #222; + -webkit-box-shadow:0 2px 5px 0px #222; +} +img:hover { + box-shadow:0 2px 5px 0px #555; + -webkit-box-shadow:0 2px 5px 0px #555; +} +div.container { + margin: auto; + max-width: 1000px; +} +div.split { + margin-top: 40px; + overflow: auto; + border: 1px solid #ccc; + border-style: solid none none none; +} +div.panel { + margin: 0; + + float: left; + width: 40%; +} +div.panel h3 { + margin: 10px 0; +} +div.panel.left { + min-width: 150px; + max-width: 400px; + padding: 10px 0; +} +div.panel.left ul { + padding: 5px; + margin: 0; + word-wrap: break-word; +} +div.panel.right { + border: 1px solid #ccc; + border-style: none none none solid; + min-width: 175px; + max-width: 50%; + width: 100%; + padding: 10px 0; +} +div.panel.right ul, div.panel.right p, div.panel.right h3 { + padding: 5px 10px; +} +div.panel.right ul { + padding: 0 25px; +} +div.panel.right ul li { + margin: 10px 0; +} +div.panel.left ul li { + list-style: none; +} +div.panel.left .images { + float: left; + max-width: 80px; + margin: 10px 20px 0px 0px; +} +div.panel.left .images a, div.panel.left .images img { + padding: 0; + margin: 2px 3px; + display: inline; +} +div.panel.left .images img { + float: none; +} +div.panel.right ul ul li { + margin: 2px 0; +} \ No newline at end of file diff --git a/templates/themes/4chon/info.php b/templates/themes/4chon/info.php new file mode 100644 index 00000000..2bc8e978 --- /dev/null +++ b/templates/themes/4chon/info.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/templates/themes/4chon/theme.php b/templates/themes/4chon/theme.php new file mode 100644 index 00000000..df72b8ee --- /dev/null +++ b/templates/themes/4chon/theme.php @@ -0,0 +1,215 @@ + 80, + 'thumbheight' => 80 + ); + + function chon_build($action, $settings) { + $settings = Array( + 'title' => '4chon', + 'subtitle' => '', + 'boards' => Array( + 'new' => 'A place for the debate of political intrigue and current events. This board has a wide and varied user base with many unique, and sometimes controversial, views expressed.', + 'r9k' => 'A unique board for open discussion based on an original content script. If a post has been made before, the reposter is muted. The length of the mute increases at the rate of 2^n seconds with each additional mute a user receives. Loosely based upon robot9000 of #xkcd-signal.', + 'v' => 'A board in which to discuss many of our favourite hobbies: video games. New and old, PC and console, the discussion is always fresh and on-topic.', + 'meta' => 'A board for the discussion and improvement of the community, 4chon or otherwise. Questions, comments, and modposts are frequently found here.' + ), + 'thumbwidth' => 80, + 'thumbheight' => 80 + ); + + // Possible values for $action: + // - all (rebuild everything, initialization) + // - news (news has been updated) + // - boards (board list changed) + + Chon::build($action, $settings); + } + + // Wrap functions in a class so they don't interfere with normal Tinyboard operations + class Chon { + public static function build($action, $settings) { + global $config; + + //if($action == 'all' || $action == 'news') + file_write($config['dir']['home'] . $config['file_index'], Chon::homepage($settings)); + } + + // Build news page + public static function homepage($settings) { + global $config, $board; + + // HTML5 + $body = '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . ''; + + $body .= '

' . $settings['title'] . '

' + . '
' . ($settings['subtitle'] ? utf8tohtml($settings['subtitle']) : '') . '
'; + + $body .= '
'; + + $body .= '

4chon

'; + + $body .= ''; + + $body .= '

Welcome to 4chon.net!

'; + $body .= '

The largest and most popular community based on Tinyboard; we\'re picking up where 4chan is dying! In mid-January, /r9k/ and /new/ were simultaneously deleted from 4chan. Less than an hour later, 4chon was created to give these boards a new life, and we have been growing ever since. With over one million posts in just a few months, we\'re the largest chon in existence.

'; + + $body .= '

Our Boards

'; + $__boards = listBoards(); + foreach($settings['boards'] as $board => $description) { + foreach($__boards as $_board) { + if($_board['uri'] == $board) { + $board = $_board; + break; + } + } + $body .= '
'; + $body .= '/' . $board['uri'] . '/'; + $body .= '

' . $description . '

'; + $body .= '
'; + } + + $body .= '
'; + + $body .= '
'; + + + $query = ''; + foreach($settings['boards'] as $board => $description) { + $query .= sprintf("SELECT *, '%s' AS `board` FROM `posts_%s` WHERE `file` IS NOT NULL AND `file` != 'deleted' UNION ALL ", $board, $board); + } + $query = preg_replace('/UNION ALL $/', 'ORDER BY `time` DESC LIMIT 10', $query); + $query = query($query) or error(db_error()); + + $body .= '
'; + while($post = $query->fetch()) { + openBoard($post['board']); + $x_ratio = $settings['thumbwidth'] / $post['thumbwidth']; + $y_ratio = $settings['thumbheight'] / $post['thumbheight']; + + if(($post['thumbwidth'] <= $settings['thumbwidth']) && ($post['thumbheight'] <= $settings['thumbheight'])) { + $tn_width = $post['thumbwidth']; + $tn_height = $post['thumbheight']; + } elseif (($x_ratio * $post['thumbheight']) < $settings['thumbheight']) { + $tn_height = ceil($x_ratio * $post['thumbheight']); + $tn_width = $settings['thumbwidth']; + } else { + $tn_width = ceil($y_ratio * $post['thumbwidth']); + $tn_height = $settings['thumbheight']; + } + + $post['thumbwidth'] = $tn_width; + $post['thumbheight'] = $tn_height; + + $body .= ''; + } + $body .= '
'; + + + + // Latest posts + $body .= '
    '; + $query = ''; + foreach($settings['boards'] as $board => $description) { + $query .= sprintf("SELECT *, '%s' AS `board` FROM `posts_%s` UNION ALL ", $board, $board); + } + $query = preg_replace('/UNION ALL $/', 'ORDER BY `time` DESC LIMIT 35', $query); + $query = query($query) or error(db_error()); + + while($post = $query->fetch()) { + openBoard($post['board']); + + $body .= '
  • ' . $board['name'] . ': ' . (empty($post['body']) ? '…' : pm_snippet($post['body'], 25)) . '
  • '; + } + $body .= '
'; + + $body .= '
'; + + $body .= '
'; + $body .= '

4chon Community

'; + $body .= '

Aside from our boards, we also have an active community in the following places:

'; + + $body .= '
    '; + $body .= '
  • /tv/ - We automatically maintain a list of livestreams that were posted on the boards, where users of 4chon can watch television shows, movies, and circlejerks.
  • '; + $body .= '
  • Minecraft - Our unofficial Minecraft server. Come build with bros and visit our giant penis sculpture! eironeia.datnode.net:24598
  • '; + $body .= '
'; + + $body .= '

4chon

'; + $body .= '

Please read the general and board-specifc rules as well as the 4chon FAQ before posting.

'; + + $body .= '

4chon keeps a statistics page which gives detailed information about all of our boards, such as posts per minute, user locations, referring sites and more!. There\'s also a map of our posters around the globe!

'; + $body .= '

If, for any reason, you need to contact the 4chon staff, they can be reached in IRC - irc.datnode.net #4chon / [WebIRC].

'; + + $body .= '

The admin may be contacted at admin@4chon.net or >>>/meta/.

'; + + $body .= '

For status updates and explanations of downtime, please see our status page or follow us on our rarely-used @4chonable Twitter account

'; + + $body .= '
'; + + $body .= '
'; + + $body .= '
'; + + $body .= '

In memory of Scott “Wingo” Canner (1989-2011).

'; + + $body .= ''; + + // Finish page + $body .= '

Powered by Tinyboard | You must be at least 18 years of age to continue browsing.' . + + '' . + + ''; + + return $body; + } + }; + +?> diff --git a/templates/themes/4chon/thumb.png b/templates/themes/4chon/thumb.png new file mode 100644 index 00000000..cd116066 Binary files /dev/null and b/templates/themes/4chon/thumb.png differ diff --git a/templates/themes/drudgereport/info.php b/templates/themes/drudgereport/info.php new file mode 100644 index 00000000..b9128108 --- /dev/null +++ b/templates/themes/drudgereport/info.php @@ -0,0 +1,28 @@ + 'Title', + 'name' => 'title', + 'type' => 'text' + ); + + $theme['config'][] = Array( + 'title' => 'Excluded boards', + 'name' => 'exclude', + 'type' => 'text', + 'comment' => '(space seperated)' + ); + + // Unique function name for building everything + $theme['build_function'] = 'drudge_build'; +?> diff --git a/templates/themes/drudgereport/theme.php b/templates/themes/drudgereport/theme.php new file mode 100644 index 00000000..e38b7a0d --- /dev/null +++ b/templates/themes/drudgereport/theme.php @@ -0,0 +1,145 @@ +build($action, $settings); + } + + // Wrap functions in a class so they don't interfere with normal Tinyboard operations + class Drudge { + public function build($action, $settings) { + global $config, $_theme, $threads; + + // Don't worry about this for now: + //if($action == 'all') { + // copy($config['dir']['themes'] . '/' . $_theme . '/master.css', $config['dir']['home'] . 'drudge_master.css'); + // copy($config['dir']['themes'] . '/' . $_theme . '/reset.css', $config['dir']['home'] . 'drudge_reset.css'); + //} + + $this->excluded = explode(' ', $settings['exclude']); + + if($action == 'all' || $action == 'post') + file_write($config['dir']['home'] . 'landing/index.html', $this->homepage($settings)); + } + + private function spot($num) { + global $config; + + $prime = $num < 7; + + if(!isset($this->threads[$num])) + return ''; + + $post = &$this->threads[$num]; + + return ($prime ? + '' + : '') + . '

' . $post['subject'] . '...


'; + } + + // Build news page + public function homepage($settings) { + global $config, $board; + + openBoard('a'); + + // HTML5 + $body = '' + . '' + //. '' + . '' + . '' + . '' . $settings['title'] . '' + . '' + + // heading + . '
' + + /* + Sub-headlines related to the main headline appear here. + They are pulled from the subject lines of the replies to the top thread. + + Drudge follows all stories with "...", other than the main headline + We will use the ellipse to link to the forum thread, while the headline links directly to the story + */ + + . '' + + . '
' + . '' + . '
'; + + $this->threads = Array(); // 0 = main heading, 1-6 = prime spots, 7-18 = normal + + $query = query("SELECT *, `id` AS `thread_id`, (SELECT COUNT(*) FROM `posts_a` WHERE `thread` = `thread_id`) AS `replies` FROM `posts_a` WHERE `thread` IS NULL AND `email` != '' AND `subject` != '' ORDER BY `sticky` DESC, `replies` DESC, `bump` DESC LIMIT 19") or error(db_error()); + while($post = $query->fetch()) { + $this->threads[] = $post; + } + + // first prime gets headline + $body .= '

' . strtoupper($this->threads[0]['subject']) . '

'; + + $body .= '
' + . '
' + ; + + $body .= '
'; + + // begin three column layout here + $body .= '
'; + + + // Headline: P Left column: xxPxPx Center: PxxxPx Right: xPxxPx + + // first column + $body .= '
' . + $this->spot(7) . + $this->spot(8) . + $this->spot(1) . + $this->spot(9) . + $this->spot(2) . + $this->spot(10) . + '
'; + + // second column + $body .= '
' . + $this->spot(3) . + $this->spot(11) . + $this->spot(12) . + $this->spot(13) . + $this->spot(4) . + $this->spot(14) . + '
'; + + // third column + $body .= '
' . + $this->spot(15) . + $this->spot(5) . + $this->spot(16) . + $this->spot(17) . + $this->spot(6) . + $this->spot(18) . + '
'; + + + // end container + $body .= '
'; + + // Finish page + $body .= '

Powered by Tinyboard'; + + return $body; + } + }; + +?> diff --git a/templates/themes/drudgereport/thumb.png b/templates/themes/drudgereport/thumb.png new file mode 100644 index 00000000..fff5b824 Binary files /dev/null and b/templates/themes/drudgereport/thumb.png differ diff --git a/templates/themes/ruiwy1.zip b/templates/themes/ruiwy1.zip new file mode 100644 index 00000000..97f13b52 Binary files /dev/null and b/templates/themes/ruiwy1.zip differ diff --git a/templates/themes/ruiwy1/info.php b/templates/themes/ruiwy1/info.php new file mode 100644 index 00000000..70af795d --- /dev/null +++ b/templates/themes/ruiwy1/info.php @@ -0,0 +1,27 @@ + 'Title', + 'name' => 'title', + 'type' => 'text' + ); + + $theme['config'][] = Array( + 'title' => 'Slogan', + 'name' => 'subtitle', + 'type' => 'text' + ); + + // Unique function name for building everything + $theme['build_function'] = 'rui_build'; +?> diff --git a/templates/themes/ruiwy1/theme.php b/templates/themes/ruiwy1/theme.php new file mode 100644 index 00000000..45f8b4af --- /dev/null +++ b/templates/themes/ruiwy1/theme.php @@ -0,0 +1,77 @@ +' + . '' + . '' + . '' . $settings['title'] . '' + . ''; + + $boardlist = createBoardlist(); + $body .= '

' . $boardlist['top'] . '
'; + + $body .= '

' . $settings['title'] . '

' + . '
' . ($settings['subtitle'] ? utf8tohtml($settings['subtitle']) : '') . '
'; + + $body .= '
'; + + $query = query("SELECT * FROM `news` ORDER BY `name` = 'static' DESC, `time` DESC") or error(db_error()); + if($query->rowCount() == 0) { + $body .= '

(No news to show.)

'; + } else { + // List news + while($news = $query->fetch()) { + $body .= '

' . + ($news['subject'] ? + $news['subject'] + : + 'no subject' + ) . + + ($news['name'] != 'static' ? + ' - ' . + date($config['post_date'], $news['time']) . + '' + : '') . + '

' . $news['body'] . '

'; + + if($news['name'] == 'static') { + // static notice + $body .= '
'; + } + } + } + + $body .= '
'; + + // Finish page + $body .= '

Powered by Tinyboard'; + + return $body; + } + }; + +?> diff --git a/templates/themes/ruiwy1/thumb.png b/templates/themes/ruiwy1/thumb.png new file mode 100644 index 00000000..05dcd96c Binary files /dev/null and b/templates/themes/ruiwy1/thumb.png differ diff --git a/templates/thread.html b/templates/thread.html index c8612eec..faeb5207 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -1,15 +1,15 @@ - + - - {config[url_favicon]?} - {board[url]} - {board[name]} + + {% if config.url_favicon %}{% endif %} + {{ board.url }} - {{ board.name }} - - - {config[recaptcha]?} + {% endraw %}{% endif %} - {boardlist[top]} - {pm?

{pm}

} - {config[url_banner]?} -

{board[url]} - {board[name]}

-
{board[title]?{board[title]}}

{mod?Return to dashboard}

+ {{ boardlist.top }} + {% if pm %}
{{ pm }}

{% endif %} + {% if config.url_banner %}{% endif %} +

{{ board.url }} - {{ board.name }}

+
{% if board.title %}{{ board.title }}{% endif %}

{% if mod %}Return to dashboard{% endif %}

- - {hidden_inputs} - - - {mod?} + + + {{ hidden_inputs }} + + + {% if mod %}{% endif %}
Username - +
@@ -71,25 +72,25 @@ - {config[recaptcha]? + {% if config.recaptcha %} - } + {% endif %} - {config[enable_embedding]? + {% if config.enable_embedding %} - } - {mod? + {% endif %} + {% if mod %} - } + {% endif %}
@@ -60,7 +61,7 @@ - {config[spoiler_images]? Spoiler Image} + {% if config.spoiler_images %} Spoiler Image{% endif %}
Verification - +
File - +
Embed @@ -98,43 +99,43 @@
Flags
-
- +
+
Password - + (For file deletion.)
- + {% endraw %} - {config[blotter]?
{config[blotter]}
} -
-
- - {mod?} - {body} + {% if config.blotter %}
{{ config.blotter }}
{% endif %} +
+ + + {% if mod %}{% endif %} + {{ body }}
- Delete Post [ + Delete Post [ ] @@ -145,9 +146,12 @@
- [Return] - {boardlist[bottom]} -

Powered by Tinyboard v0.9.3 | Tinyboard Copyright © 2010-2011 Tinyboard Development Group

-

All trademarks, copyrights, comments and images on this page are owned by and/or are the responsibility of their respective parties.

+
{{ btn.prev }} {% for page in pages %} + [{{ page.num }}]{% if loop.last %} {% endif %} + {% endfor %} {{ btn.next }}
+ {{ boardlist.bottom }} +

Powered by Tinyboard v0.9.4 | Tinyboard Copyright © 2010-2011 Tinyboard Development Group

+

All trademarks, copyrights, comments, and images on this page are owned by or are the responsibility of their respective parties.

+ - + \ No newline at end of file -- cgit v1.3