Browse Source

Import news

pull/4/head
falkTX 6 years ago
parent
commit
50de8359e7
100 changed files with 12199 additions and 0 deletions
  1. +9
    -0
      News/AUTHORS
  2. +27
    -0
      News/COPYING
  3. +97
    -0
      News/README.markdown
  4. +82
    -0
      News/admin/help.php
  5. +27
    -0
      News/admin/index.php
  6. BIN
      News/admin/themes/default/images/icons/add.png
  7. BIN
      News/admin/themes/default/images/icons/appearance.png
  8. BIN
      News/admin/themes/default/images/icons/cancel.png
  9. BIN
      News/admin/themes/default/images/icons/delete.png
  10. BIN
      News/admin/themes/default/images/icons/deny.png
  11. BIN
      News/admin/themes/default/images/icons/edit.png
  12. BIN
      News/admin/themes/default/images/icons/error.png
  13. BIN
      News/admin/themes/default/images/icons/failure.png
  14. BIN
      News/admin/themes/default/images/icons/help.png
  15. BIN
      News/admin/themes/default/images/icons/info.png
  16. BIN
      News/admin/themes/default/images/icons/magnifier.png
  17. BIN
      News/admin/themes/default/images/icons/notice.png
  18. BIN
      News/admin/themes/default/images/icons/pixel.gif
  19. BIN
      News/admin/themes/default/images/icons/save.png
  20. BIN
      News/admin/themes/default/images/icons/success.png
  21. +7
    -0
      News/admin/themes/default/info.yaml
  22. +67
    -0
      News/admin/themes/default/layout.twig
  23. +287
    -0
      News/admin/themes/default/pages/bookmarklet.twig
  24. +69
    -0
      News/admin/themes/default/pages/content_settings.twig
  25. +60
    -0
      News/admin/themes/default/pages/delete_group.twig
  26. +33
    -0
      News/admin/themes/default/pages/delete_page.twig
  27. +24
    -0
      News/admin/themes/default/pages/delete_post.twig
  28. +89
    -0
      News/admin/themes/default/pages/delete_user.twig
  29. +36
    -0
      News/admin/themes/default/pages/edit_group.twig
  30. +16
    -0
      News/admin/themes/default/pages/edit_page.twig
  31. +17
    -0
      News/admin/themes/default/pages/edit_post.twig
  32. +57
    -0
      News/admin/themes/default/pages/edit_user.twig
  33. +62
    -0
      News/admin/themes/default/pages/export.twig
  34. +49
    -0
      News/admin/themes/default/pages/feathers.twig
  35. +60
    -0
      News/admin/themes/default/pages/general_settings.twig
  36. +176
    -0
      News/admin/themes/default/pages/import.twig
  37. +47
    -0
      News/admin/themes/default/pages/manage_groups.twig
  38. +91
    -0
      News/admin/themes/default/pages/manage_pages.twig
  39. +74
    -0
      News/admin/themes/default/pages/manage_posts.twig
  40. +74
    -0
      News/admin/themes/default/pages/manage_users.twig
  41. +71
    -0
      News/admin/themes/default/pages/modules.twig
  42. +34
    -0
      News/admin/themes/default/pages/new_group.twig
  43. +58
    -0
      News/admin/themes/default/pages/new_user.twig
  44. +50
    -0
      News/admin/themes/default/pages/route_settings.twig
  45. +55
    -0
      News/admin/themes/default/pages/themes.twig
  46. +37
    -0
      News/admin/themes/default/pages/user_settings.twig
  47. +13
    -0
      News/admin/themes/default/pages/write_page.twig
  48. +14
    -0
      News/admin/themes/default/pages/write_post.twig
  49. +49
    -0
      News/admin/themes/default/partials/page_fields.twig
  50. +133
    -0
      News/admin/themes/default/partials/post_fields.twig
  51. +948
    -0
      News/admin/themes/default/style.css
  52. +167
    -0
      News/feathers/audio/audio.php
  53. +8
    -0
      News/feathers/audio/info.yaml
  54. +25
    -0
      News/feathers/audio/lib/audio-player.js
  55. BIN
      News/feathers/audio/lib/player.swf
  56. +40
    -0
      News/feathers/audio/locale/en_US.pot
  57. +132
    -0
      News/feathers/chat/chat.php
  58. +7
    -0
      News/feathers/chat/info.yaml
  59. +55
    -0
      News/feathers/chat/locale/en_US.pot
  60. +7
    -0
      News/feathers/link/info.yaml
  61. +72
    -0
      News/feathers/link/link.php
  62. +39
    -0
      News/feathers/link/locale/en_US.pot
  63. +8
    -0
      News/feathers/photo/info.yaml
  64. +47
    -0
      News/feathers/photo/locale/en_US.pot
  65. +153
    -0
      News/feathers/photo/photo.php
  66. +7
    -0
      News/feathers/quote/info.yaml
  67. +36
    -0
      News/feathers/quote/locale/en_US.pot
  68. +59
    -0
      News/feathers/quote/quote.php
  69. +7
    -0
      News/feathers/text/info.yaml
  70. +35
    -0
      News/feathers/text/locale/en_US.pot
  71. +50
    -0
      News/feathers/text/text.php
  72. +7
    -0
      News/feathers/video/info.yaml
  73. +32
    -0
      News/feathers/video/locale/en_US.pot
  74. +125
    -0
      News/feathers/video/video.php
  75. +741
    -0
      News/includes/admin.js.php
  76. +207
    -0
      News/includes/ajax.php
  77. +114
    -0
      News/includes/class/Config.php
  78. +106
    -0
      News/includes/class/Feathers.php
  79. +197
    -0
      News/includes/class/Flash.php
  80. +465
    -0
      News/includes/class/Model.php
  81. +39
    -0
      News/includes/class/Modules.php
  82. +229
    -0
      News/includes/class/Paginator.php
  83. +236
    -0
      News/includes/class/Query.php
  84. +449
    -0
      News/includes/class/QueryBuilder.php
  85. +235
    -0
      News/includes/class/Route.php
  86. +473
    -0
      News/includes/class/SQL.php
  87. +95
    -0
      News/includes/class/Session.php
  88. +332
    -0
      News/includes/class/Theme.php
  89. +176
    -0
      News/includes/class/Trigger.php
  90. +55
    -0
      News/includes/class/Twig.php
  91. +192
    -0
      News/includes/class/Twig/api.php
  92. +754
    -0
      News/includes/class/Twig/ast.php
  93. +133
    -0
      News/includes/class/Twig/compiler.php
  94. +66
    -0
      News/includes/class/Twig/exceptions.php
  95. +430
    -0
      News/includes/class/Twig/lexer.php
  96. +603
    -0
      News/includes/class/Twig/parser.php
  97. +485
    -0
      News/includes/class/Twig/runtime.php
  98. +807
    -0
      News/includes/class/Twig/spec.html
  99. +363
    -0
      News/includes/class/Twig/spec.txt
  100. BIN
      News/includes/close.png

+ 9
- 0
News/AUTHORS View File

@@ -0,0 +1,9 @@
Chyrp is written and maintained by the Chyrp Team:

Lead Developer:

- Arian Xhezairi <arian@xhezairi.com>

Project Founder:

- Alex Suraci <i.am@toogeneric.com>

+ 27
- 0
News/COPYING View File

@@ -0,0 +1,27 @@
Copyright (c) 2011 Chyrp Team (see AUTHORS) and individual contributors.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name(s) of the above
copyright holders shall not be used in advertising or otherwise
to promote the sale, use or other dealings in this Software
without prior written authorization.

+ 97
- 0
News/README.markdown View File

@@ -0,0 +1,97 @@
Chyrp is a blogging engine designed to be lightweight while retaining functionality. It is driven by PHP and MySQL (or SQLite), and has a great standard theme and robust module engine. You can personalize and modify it any way you want.

All of your content is powered by a unique Feathers system that allows Chyrp to be whatever you want it to be. You can post anything and everything, or just stick to the default Text feather and run a regular blog. Chyrp destroys the fine line between a blog and a tumblelog.

Requirements
============
Chyrp will thrive on virtually any server setup, but we guarantee Chyrp to run on no less than:

* PHP 5 >= 5.2.0
* MySQL:
- MySQL 4.1+
* SQLite:
- SQLite 3+
- PDO

These requirements are more of guidelines, as these are the earliest versions of the services that we have tested Chyrp on. If you are successfully running Chyrp on an earlier version of these services, let us know.

Installation
============
Installing Chyrp is easier than you expect. You can do it in four steps:

1. If using MySQL, create a MySQL database with a username and password.
2. Download, unzip, and upload.
3. Open your web browser and navigate to where you uploaded Chyrp.
4. Follow through the installer at [index.php]().

That's it! Chyrp will be up and running and ready for you to use.

Upgrading
=========
Keeping Chyrp up to date is important to make sure that your blog is as safe and as awesome as possible.

1. Download the latest version of Chyrp from [http://chyrp.net/](http://chyrp.net/).
2. Copy your config files<sup>1</sup> to somewhere safe.
3. Disable any Modules/Feathers that you downloaded for the release you're upgrading from.
4. Overwrite your current Chyrp installation files with the new ones.
5. Restore your config files<sup>1</sup> back to /includes/.
6. Upgrade by navigating to [upgrade.php](), and restore any backups.
7. Re-enable your Modules/Feathers.
8. Run the upgrader again. It will run the Module/Feather upgrade tasks.

<sup>1</sup> The config files vary depending on what you're upgrading from. Any of these in are considered "config files":

* `/includes/config.yaml.php`
* `/includes/database.yaml.php`
* `/includes/config.yml.php`
* `/includes/database.yml.php`
* `/includes/config.php`
* `/includes/database.php`

Extensions
==========
Chyrp isn't complete without activating a few extensions. Extensions add functionality (ex. audio clips, video, photos) to Chyrp. You can find extensions for Chyrp made by the Chyrp community at [http://chyrp.net/extend](http://chyrp.net/extend).

Installing Extensions
=====================
To install extensions, you have to determine what type of extension it is. It can be a *module*, a *feather*, a *theme*, or a *localization*. There's a different setup process for each type.

## Feathers
Feathers add new *post types* to Chyrp. Post types determine what kind of media you can display in your blog.

1. Download and unzip the feather
2. Upload the feather to the `feathers/` folder.
3. Open your web browser and navigate to your Chyrp administration panel.
4. Click on the *Extend* tab, and then the *Feathers* sub tab.
5. Drag it from the Disabled pane to the Enabled pane.

You can now use the feather by navigating to the Write tab and choosing the feather you uploaded.

## Modules
Installing modules is quick, easy, and painless with Chyrp. They add extra functionality to Chyrp.

1. Download and unzip the module.
2. Upload the module to the `modules/` folder.
3. Open your web browser and navigate to your Chyrp administration panel.
4. Click on the *Extend* tab and drag it from the Disabled pane to the Enabled pane.

The module is now installed and is ready for action. Keep in mind that some modules may conflict with each other if they do similar tasks. They are marked with red lines between them on the Modules page.

## Themes
Chyrp makes applying themes to your blog easy. With a single click you can change the look of your blog.

1. Download and unzip the theme.
2. Upload the theme to the `themes/` folder. Make sure that it is contained in it's own folder.
3. Open your web browser and navigate to your Chyrp administration panel.
4. Click on the *Extend* tab, and then the *Themes* sub tab.
5. Click on the screenshot of the theme you just uploaded to apply it to your blog.

Chyrp can even show you what the theme will look like before anyone else sees it. In the Themes sub tab, click on the Preview button below the theme screenshot to see the theme.

## Localization
Chyrp is multilingual! If your first language isn't English, you can apply a new localization to Chyrp to make it speak your language.

1. Download and unzip the localization.
1. Upload the `.mo` file to the `includes/locale/` folder. You don't need anything else for the translation to work.
1. Open your web browser and navigate to your Chyrp administration panel.
1. Click on the *Settings* tab, and change the *Language* option to the language you just uploaded.

+ 82
- 0
News/admin/help.php View File

@@ -0,0 +1,82 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="$theme.type; charset=utf-8"/>
<title>Chyrp: <?php echo $title; ?></title>
<style type="text/css">
html, body, ul, ol, li,
h1, h2, h3, h4, h5, h6,
form, fieldset, a, p {
margin: 0;
padding: 0;
border: 0;
}
html {
font-size: 62.5%;
}
body {
font: 1.25em/1.5em normal Verdana, Helvetica, Arial, sans-serif;
color: #626262;
background: #fff;
padding: 1em 0 1em;
overflow: auto;
}
code {
color: #06B;
font-family: Monaco, monospace;
}
h2 {
margin-bottom: .75em;
}
.title {
color: #aaa;
font-size: 2em;
font-weight: bold;
margin: .25em 0 .5em;
text-align: center;
}
.body {
padding: 1em;
}
.body p {
margin: 0 0 1em;
}
.body cite,
.body pre {
font-style: normal;
display: block;
padding: .25em 1em;
background: #f0f0f0;
margin: 0 -1em 1em;
}
.body ul,
.body ol {
margin: 0 0 1em 2em;
}
.body li {
margin: 0;
}
a:link, a:visited {
color: #6B0;
}
a:hover {
text-decoration: underline;
}
a.big {
font-size: 16px;
color: #6B0;
font-weight: bold;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="title"><?php echo $title; ?></div>
<div class="body">
<?php echo $body; ?>
</div>
</body>
</html>

+ 27
- 0
News/admin/index.php View File

@@ -0,0 +1,27 @@
<?php
define('ADMIN', true);

require_once "../includes/common.php";

# Prepare the controller.
$admin = AdminController::current();

# Parse the route.
$route = Route::current($admin);

# Check if the user can view the site.
if (!$visitor->group->can("view_site"))
if ($trigger->exists("can_not_view_site"))
$trigger->call("can_not_view_site");
else
show_403(__("Access Denied"), __("You are not allowed to view this site."));

# Execute the appropriate Controller responder.
$route->init();

if (!$route->success and !$admin->displayed)
$admin->display($route->action); # Attempt to display it; it'll go through Modules and Feathers.

$trigger->call("end", $route);

ob_end_flush();

BIN
News/admin/themes/default/images/icons/add.png View File

Before After
Width: 16  |  Height: 16  |  Size: 733B

BIN
News/admin/themes/default/images/icons/appearance.png View File

Before After
Width: 16  |  Height: 16  |  Size: 856B

BIN
News/admin/themes/default/images/icons/cancel.png View File

Before After
Width: 16  |  Height: 16  |  Size: 587B

BIN
News/admin/themes/default/images/icons/delete.png View File

Before After
Width: 16  |  Height: 16  |  Size: 476B

BIN
News/admin/themes/default/images/icons/deny.png View File

Before After
Width: 16  |  Height: 16  |  Size: 715B

BIN
News/admin/themes/default/images/icons/edit.png View File

Before After
Width: 16  |  Height: 16  |  Size: 450B

BIN
News/admin/themes/default/images/icons/error.png View File

Before After
Width: 16  |  Height: 16  |  Size: 666B

BIN
News/admin/themes/default/images/icons/failure.png View File

Before After
Width: 16  |  Height: 16  |  Size: 701B

BIN
News/admin/themes/default/images/icons/help.png View File

Before After
Width: 16  |  Height: 16  |  Size: 786B

BIN
News/admin/themes/default/images/icons/info.png View File

Before After
Width: 13  |  Height: 13  |  Size: 321B

BIN
News/admin/themes/default/images/icons/magnifier.png View File

Before After
Width: 16  |  Height: 16  |  Size: 615B

BIN
News/admin/themes/default/images/icons/notice.png View File

Before After
Width: 16  |  Height: 16  |  Size: 778B

BIN
News/admin/themes/default/images/icons/pixel.gif View File

Before After
Width: 1  |  Height: 1  |  Size: 43B

BIN
News/admin/themes/default/images/icons/save.png View File

Before After
Width: 16  |  Height: 16  |  Size: 755B

BIN
News/admin/themes/default/images/icons/success.png View File

Before After
Width: 16  |  Height: 16  |  Size: 781B

+ 7
- 0
News/admin/themes/default/info.yaml View File

@@ -0,0 +1,7 @@
name: Default
version: 2.1
url: http://chyrp.net/
description: The default theme provided with Chyrp, which all themes fallback onto.
author:
name: Alex Suraci
url: http://toogeneric.com/

+ 67
- 0
News/admin/themes/default/layout.twig View File

@@ -0,0 +1,67 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${ site.locale | split("_") | first }" lang="${ site.locale | split("_") | first }">
<head>
<meta http-equiv="Content-type" content="$theme.type; charset=utf-8" />
<title>$site.name: {% block title %}$title{% endblock %}</title>
<link rel="stylesheet" href="$theme_url/style.css" type="text/css" media="screen" title="no title" charset="utf-8" />
<script src="$site.chyrp_url/includes/lib/gz.php?file=jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="$site.chyrp_url/includes/lib/gz.php?file=plugins.js" type="text/javascript" charset="utf-8"></script>
<script src="$site.chyrp_url/includes/admin.js.php?action=$route.action" type="text/javascript" charset="utf-8"></script>
${ trigger.call("admin_head") }
</head>
<body>
<div id="header">
<div class="column">
<ul id="navigation">
{% block navigation %}
{% for action, nav in navigation | items %}
{% if nav.show %}
<li class="$action{% if nav.selected %} selected{% endif %}"$nav.attributes><a href="{% admin action %}">$nav.title</a></li>
{% endif %}
{% endfor %}
{% endblock %}
</ul>
<h1><a href="$site.url">$site.name</a></h1>
</div>
</div>
<div id="welcome">
<div class="column">
<a href="{% url "/?action=logout" %}" class="right">${ "Log Out &rsaquo;" | translate }</a>
${ "Hello, %s!" | translate | format(visitor.full_name | split | first | fallback(visitor.login | fallback("Guest" | translate))) }
<a href="$site.url">${ "View Site &rsaquo;" | translate }</a>
</div>
</div>
<ul class="column ${ route.action }_nav" id="sub-nav">
{% block subnav %}
{% if subnav[route.action] %}
{% for action, nav in subnav[route.action] | items %}
{% if nav.show %}
<li${ route.action | selected(nav.selected, action) }$nav.attributes><a href="{% admin action %}">$nav.title</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}
</ul>
<div class="clear"></div>
<div class="column" id="content">
{% for notice in flash.notices %}
<p class="message yay">$notice</p>
{% endfor %}
{% for warning in flash.warnings %}
<p class="message boo">$warning</p>
{% endfor %}
{% for message in flash.messages %}
<p class="message">$message</p>
{% endfor %}
{% block content %}{% endblock %}
<div class="clear"></div>
</div>
<div class="column" id="footer">
${ "Chyrp loves you." | translate }<br />
<span class="sub">
${ "v%s &dash; &copy; %d Chyrp Team" | translate | format(version, 2011) }
</span>
</div>
</body>
</html>

+ 287
- 0
News/admin/themes/default/pages/bookmarklet.twig View File

@@ -0,0 +1,287 @@
{% if not done %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="$theme.type; charset=utf-8" />
<title>${ "Chyrp!" | translate }</title>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
/* Reset */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td { margin: 0; padding: 0; }
table { border-collapse: collapse; border-spacing: 0; }
fieldset,img { border: 0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style: normal; font-weight: normal; }
li { list-style: none; }
caption,th { text-align: left; }
h1,h2,h3,h4,h5,h6 { font-size: 100%; font-weight: normal; }
abbr,acronym { border: 0; font-variant: normal; }
input, textarea, select { font-family: inherit; font-size: inherit; font-weight: inherit; }
/* End Reset */

html {
font-size: 62.5%;
}
body {
font: 1.25em/1.5em normal Verdana, Helvetica, Arial, sans-serif;
color: #626262;
background: #e8e8e8;
margin: 0;
padding: 1.25em;
overflow-y: auto;
overflow-x: hidden;
}
a:link, a:visited {
text-decoration: none;
color: #222;
border-bottom: 1px solid #ddd;
}
a:hover {
color: #555;
border-bottom-color: #aaa;
}
label {
display: block;
font-weight: bold;
}
p {
margin: 0 0 1em;
}
input.text, textarea {
font-size: 1.25em;
padding: 3px;
border: 1px solid #ddd;
background: #fff;
}
input.code, code {
font-family: "Consolas", "Monaco", monospace;
}
.navigation {
_border: 1px solid #e8e8e8;
}
.navigation li a {
float: left;
padding: .4em .75em;
background: #dfdfdf;
border-top: .2em solid #e8e8e8;
border-bottom: 0 !important;
color: #737373;
}
.navigation li.selected a {
background: #fff;
border-top-color: #c7c7c7;
}
.navigation li.right {
margin: .75em 0 0;
}
.navigation li.right a {
float: none;
background: transparent;
padding: 0;
font-size: .95em;
color: #777;
}
.navigation li.right a {
color: #444;
}
.content {
background: #fff;
padding: 1em;
position: absolute;
z-index: 100;
{% if site.enabled_feathers | length == 1 %}
position: absolute;
border: 0;
top: 1em;
left: 1em;
bottom: 1em;
right: 1em;
height: auto;
{% endif %}
}
.clear {
clear: both;
}
.wide {
width: 100%;
}
textarea.wide, input.text.wide {
width: 98%; /* Compensating for the 6px added from the padding */
_width: 100%;
}
.sub {
display: none;
}
.buttons {
text-align: center;
}
button {
background: #eee;
padding: .75em 1.5em;
color: #777;
text-shadow: #fff .1em .1em 0;
font: 1em normal "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
text-decoration: none;
border: 0;
cursor: pointer;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
}
button:hover {
background: #f5f5f5;
}
button:active {
background: #e0e0e0;
}
/*]]>*/-->
</style>
<script src="$site.chyrp_url/includes/lib/gz.php?file=jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="$site.chyrp_url/includes/lib/gz.php?file=plugins.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
function activate_nav_tab(id) {
$$("[class^='nav_']").removeClass("selected")
$$("[id$$='_form']").hide()
$$("#"+id+"_form").show()
$$(".nav_" + id).addClass("selected")

$$("#"+id+"_form input.text").expand()
}
$$(function(){
$$("form:visible input.text").expand()

$$(".navigation li").css("float", "left")
$$(".navigation").sortable({
axis: "x",
containment: ".navigation",
placeholder: "feathers_sort",
opacity: 0.8,
delay: 1,
revert: true,
update: function(){
$$.post("$site.chyrp_url/includes/ajax.php", "action=reorder_feathers&"+$$(".navigation").sortable("serialize"))
}
})
})
//--><!]]>
</script>
</head>
<body>
{% if site.enabled_feathers | length > 1 %}
<ul class="navigation">
{% for feather in feathers %}
<li id="list_feathers[$feather.safename]" class="nav_$feather.safename${ feather.safename | selected(selected_feather.safename, true) }">
<a href="javascript:activate_nav_tab('$feather.safename')">$feather.name</a>
</li>
{% endfor %}
</ul>
<div class="clear"></div>
{% endif %}
<div class="content">
{% for feather in feathers %}
<form action="$site.chyrp_url/admin/?action=add_post" id="${ feather.safename }_form"{% if feather.safename != selected_feather.safename %} style="display: none"{% endif %} method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
${ trigger.call("before_bookmarklet_fields", feather) }
{% for field in feather.fields %}
<p>
<label for="$field.attr">
$field.label
{% if field.optional %}
<span class="sub">${ "(optional)" | translate }</span>
{% endif %}
{% if field.help %}
<span class="sub">
<a href="{% admin "help&id="~field.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
</span>
{% endif %}
</label>
{% if field.type == "text" or field.type == "file" %}
<input class="$field.type{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" type="$field.type" name="$field.attr" value="{% if not field.no_value %}${ field.value | fallback(args[field.bookmarklet] | escape) }{% endif %}" id="$field.attr" />
{% elseif field.type == "text_block" %}
<textarea class="wide{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" rows="${ field.rows | fallback(10) }" name="$field.attr" id="$field.attr" cols="50">{% if not field.no_value %}${ field.value | fallback(args[field.bookmarklet] | escape) }{% endif %}</textarea>
{% elseif field.type == "select" %}
<select name="$field.attr" id="$field.attr"{% if field.classes %} class="${ field.classes | join(" ") }"{% endif %}>
{% for value, name in field.options | items %}
<option value="${ value | escape }"{% if not field.no_value %}${ value | option_selected(field.value | fallback(args[field.bookmarklet] | escape)) }{% endif %}>${ name | escape }</option>
{% endfor %}
</select>
{% endif %}
</p>
{% endfor %}
${ trigger.call("after_post_fields", feather) }
<div class="buttons">
<button type="submit">
${ "Publish" | translate }
</button>
<input type="hidden" name="feather" value="$feather.safename" id="feather" />
<input type="hidden" name="slug" value="" id="slug" />
<input type="hidden" name="bookmarklet" value="true" id="bookmarklet" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</div>
${ trigger.call("bookmarklet_fields") }
</fieldset>
</form>
{% endfor %}
</div>
</body>
</html>
{% else %} {# This one is 100% credited to Tumblr. They did it perfectly, didn't want to muck it up. #}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="$theme.type; charset=utf-8"/>
<title>${ "Chyrp!" | translate }</title>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
body {
background-color: #e1e1e1;
margin: 0px;
font: 15px normal 'Trebuchet MS',Verdana,Helvetica,sans-serif;
text-align: center;
}

div#content {
margin: 137px 30px 0px 30px;
padding: 15px;
}
/*]]>*/-->
</style>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
function countdown_func() {
countdown--

el = document.getElementById('countdown')

if (countdown == 1)
el.firstChild.nodeValue = "${ "or wait 1 seconds." | translate }"
else if (countdown > 0)
el.firstChild.nodeValue = "${ "or wait 2 seconds." | translate }"
else
self.close()

if (countdown > 0)
setTimeout('countdown_func()', 1000)
}

var countdown = 3;
//--><!]]>
</script>
</head>
<body>
<div id="content">
<div style="margin-bottom: 10px; font-size: 40px; color: #777;">${ "Done!" | translate }</div>

<a href="javascript:void(0)" onclick="javascript:self.close(); return false;" style="color: #777;">${ "Close this window" | translate }</a>

<span id="countdown" style="color:#777;">
${ "or wait 3 seconds." | translate }
</span>
</div>
<script type="text/javascript">
setTimeout('countdown_func()', 1000);
</script>
</body>
</html>
{% endif %}

+ 69
- 0
News/admin/themes/default/pages/content_settings.twig View File

@@ -0,0 +1,69 @@
{% extends "layout.twig" %}

{% block title %}${ "Content Settings" | translate }{% endblock %}

{% block content %}
<form id="content_settings" class="split" action="{% admin "content_settings" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="posts_per_page">${ "Posts Per Page" | translate }</label>
<input class="text" type="text" name="posts_per_page" value="${ site.posts_per_page | escape }" size="2" id="posts_per_page" />
</p>
<p>
<label for="feed_items">${ "Feed Posts Limit" | translate }</label>
<input class="text" type="text" name="feed_items" value="${ site.feed_items | escape }" size="2" id="feed_items" />
</p>
<p>
<label for="feed_url">${ "Feed URL" | translate }</label>
<input class="text" type="text" name="feed_url" value="${ site.feed_url | escape }" id="feed_url" />
<small>
{% if site.clean_urls %}
${ "Allows you to set an alternative URL for <code>/feed/</code>, e.g. your feed on <a href=\"http://feedburner.com/\">FeedBurner</a>." | translate }
{% else %}
${ "Allows you to set an alternative URL for <code>/?feed</code>, e.g. your feed on FeedBurner." | translate }
{% endif %}
</small>
</p>
<p>
<label for="uploads_path">${ "Uploads Path" | translate }</label>
<input class="text" type="text" name="uploads_path" value="${ site.uploads_path | escape }" id="uploads_path" />
<small>
${ "The directory, relative to your Chyrp install, to upload files to. You can use <code>/../</code> to go up one directory." | translate }
</small>
</p>
<p>
<label for="enable_trackbacking">${ "Enable Trackbacking" | translate }</label>
<input class="checkbox" type="checkbox" name="enable_trackbacking" id="enable_trackbacking"${ site.enable_trackbacking | checked } />
<small>
${ "Trackbacking allows sites to notify you when they write a new entry, usually because they link to or reference yours." | translate }
</small>
</p>
<p>
<label for="send_pingbacks">${ "Send Pingbacks" | translate }</label>
<input class="checkbox" type="checkbox" name="send_pingbacks" id="send_pingbacks"${ site.send_pingbacks | checked } />
<small>
${ "Attempts to notify sites linked to from your posts. It'll slow down things a bit when you submit them, depending on how many links you've got in it." | translate }
</small>
</p>
<p>
<label for="enable_xmlrpc">${ "Enable XML-RPC Support" | translate }</label>
<input class="checkbox" type="checkbox" name="enable_xmlrpc" id="enable_xmlrpc"${ site.enable_xmlrpc | checked } />
<small>
${ "XML-RPC support allows for remote access to your site. This allows you to use remote clients (e.g., <a href=\"http://www.red-sweater.com/marsedit/\">MarsEdit</a> or <a href=\"http://flickr.com/help/blogging/\">Flickr</a>) to create/edit content on your site." | translate }
</small>
</p>
<p>
<label for="enable_ajax">${ "Enable Inline Post Management" | translate }</label>
<input class="checkbox" type="checkbox" name="enable_ajax" id="enable_ajax"${ site.enable_ajax | checked } />
</p>

<p class="buttons">
<button type="submit" class="yay">
<img src="$theme_url/images/icons/success.png" alt="success" />${ "Update" | translate }
</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 60
- 0
News/admin/themes/default/pages/delete_group.twig View File

@@ -0,0 +1,60 @@
{% extends "layout.twig" %}

{% block title %}${ "Delete Group &#8220;%s&#8221;?" | translate | format(group.name | escape) }{% endblock %}

{% block content %}
<h1>${ "Are you sure you want to delete the &#8220;%s&#8221; group?" | translate | format(group.name | escape) }</h1>
<form class="delete{% if group.id == visitor.group.id %} confirm{% endif %}" action="{% admin "destroy_group" %}" method="post" accept-charset="utf-8">
<fieldset>
<blockquote class="noitalic">
{% if group.members %}
<h2>${ "Members:" | translate }</h2>
<ul>
{% for member in group.members %}
<li>${ member.full_name | fallback(member.login) }</li>
{% endfor %}
</ul>
<br />
{% if groups %}
<h2 class="inline">${ "Move members to:" | translate }</h2>
<select name="move_group" id="move_group" class="big2">
{% for group in groups %}
<option value="$group.id"${ group.id | option_selected(site.default_group) }>$group.name</option>
{% endfor %}
</select>
<br />
{% endif %}
<br />
{% endif %}
{% if group.id == site.default_group and groups %}
<h2 class="inline">${ "New default group:" | translate }</h2>
<select name="default_group" id="default_group" class="big2">
{% for group in groups %}
<option value="$group.id"${ group.id | option_selected(site.default_group) }>$group.name</option>
{% endfor %}
</select>
<br />
<br />
{% endif %}
{% if group.id == site.guest_group and groups %}
<h2 class="inline">${ "New &#8220;guest&#8221; group:" | translate }</h2>
<select name="guest_group" id="guest_group" class="big2">
{% for group in groups %}
<option value="$group.id"${ group.id | option_selected(site.default_group) }>$group.name</option>
{% endfor %}
</select>
<br />
<br />
{% endif %}
</blockquote>

<div class="center">
<button name="destroy" value="indubitably" class="center boo">${ "DESTROY!" | translate }</button>
<button name="destroy" value="bollocks" type="submit" class="yay">${ "Cancel" | translate }</button>
</div>

<input type="hidden" name="id" value="$group.id" id="id" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 33
- 0
News/admin/themes/default/pages/delete_page.twig View File

@@ -0,0 +1,33 @@
{% extends "layout.twig" %}

{% block title %}${ "Delete Page &#8220;%s&#8221;?" | translate | format(page.title | escape) }{% endblock %}

{% block content %}
<h1>${ "Are you sure you want to delete &#8220;%s&#8221;?" | translate | format(page.title) }</h1>
<form class="delete" action="{% admin "destroy_page" %}" method="post" accept-charset="utf-8">
<fieldset>
<blockquote>
<h2>${ "Excerpt" | translate }</h2>
${ page.body | truncate(500) }
{% if page.children %}
<br />
<h2><input type="checkbox" name="destroy_children{# OH, THE HORROR! #}" value="" id="destroy_children" /> ${ "Delete children?" | translate }</h2>
<ul class="noitalic">
{% for child in page.children %}
<li><a href="$child.url">$child.title</a></li>
{% endfor %}
</ul>
{% endif %}
</blockquote>
<br />

<div class="center">
<button name="destroy" value="indubitably" class="center boo">${ "DESTROY!" | translate }</button>
<button name="destroy" value="bollocks" type="submit" class="yay">${ "Cancel" | translate }</button>
</div>

<input type="hidden" name="id" value="$page.id" id="id" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 24
- 0
News/admin/themes/default/pages/delete_post.twig View File

@@ -0,0 +1,24 @@
{% extends "layout.twig" %}

{% block title %}${ "Delete &#8220;%s&#8221;?" | translate | format(post.title | escape) }{% endblock %}

{% block content %}
<h1>${ "Are you sure you want to delete &#8220;%s&#8221;?" | translate | format(post.title) }</h1>
<form class="delete" action="{% admin "destroy_post" %}" method="post" accept-charset="utf-8">
<fieldset>
<blockquote>
<h2>${ "Excerpt" | translate }</h2>
$post.excerpt
</blockquote>
<br />

<div class="center">
<button name="destroy" value="indubitably" class="center boo">${ "DESTROY!" | translate }</button>
<button name="destroy" value="bollocks" type="submit" class="yay">${ "Cancel" | translate }</button>
</div>

<input type="hidden" name="id" value="$post.id" id="id" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 89
- 0
News/admin/themes/default/pages/delete_user.twig View File

@@ -0,0 +1,89 @@
{% extends "layout.twig" %}

{% block title %}${ "Delete User &#8220;%s&#8221;?" | translate | format(user.login | escape) }{% endblock %}

{% block content %}
<h1>${ "Are you sure you want to delete user &#8220;%s&#8221;?" | translate | format(user.login | escape) }</h1>
<form class="delete" action="{% admin "destroy_user" %}" method="post" accept-charset="utf-8">
<fieldset>
<blockquote class="noitalic">
<h2>${ "Information" | translate }</h2>
<ul>
{% if user.full_name %}
<li><strong>${ "Full Name:" | translate }</strong> $user.full_name</li>
{% endif %}
<li><strong>${ "E-Mail:" | translate }</strong> $user.email</li>
{% if user.website %}
<li><strong>${ "Website:" | translate }</strong> <a href="$user.website">$user.website</a></li>
{% endif %}
<li><strong>${ "Group:" | translate }</strong> $user.group.name</li>
</ul>
<br />
{% if user.posts %}
<h2>${ "Posts:" | translate }</h2>
<ul>
{% for post in user.posts %}
<li><a href="$post.url">$post.title</a></li>
{% endfor %}
</ul>
<br />
{% if users %}
<h2 class="inline">
<input type="radio" name="posts" value="move" id="posts_move" />
${ "Attribute posts to:" | translate }
</h2>
<select name="move_posts" id="move_posts" class="big2">
{% for user in users %}
<option value="$user.id">$user.full_name ($user.login)</option>
{% endfor %}
</select>
<br />
{% endif %}
<h2 class="inline">
<input type="radio" name="posts" value="delete" id="posts_delete" checked="checked" />
${ "Delete posts." | translate }
</h2>
<br />
<br />
{% endif %}
{% if user.pages %}
<h2>${ "Pages:" | translate }</h2>
<ul>
{% for page in user.pages %}
<li><a href="$page.url">$page.title</a></li>
{% endfor %}
</ul>
<br />
{% if users %}
<h2 class="inline">
<input type="radio" name="pages" value="move" id="pages_move" />
${ "Attribute pages to:" | translate }
</h2>
<select name="move_pages" id="move_pages" class="big2">
{% for user in users %}
<option value="$user.id">$user.full_name ($user.login)</option>
{% endfor %}
</select>
<br />
{% endif %}
<h2 class="inline">
<input type="radio" name="pages" value="delete" id="pages_delete" checked="checked" />
${ "Delete pages." | translate }
</h2>
<br />
<br />
{% endif %}
${ trigger.call("delete_user_form") }
</blockquote>
<br />

<div class="center">
<button name="destroy" value="indubitably" class="center boo">${ "DESTROY!" | translate }</button>
<button name="destroy" value="bollocks" type="submit" class="yay">${ "Cancel" | translate }</button>
</div>

<input type="hidden" name="id" value="$user.id" id="id" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 36
- 0
News/admin/themes/default/pages/edit_group.twig View File

@@ -0,0 +1,36 @@
{% extends "layout.twig" %}

{% block title %}${ "Edit Group &#8220;%s&#8221;" | translate | format(group.name | escape) }{% endblock %}

{% block content %}
${ group.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" />'~ ("Delete" | translate), null, null, "button boo right") }
<h1>${ "Editing Group &#8220;%s&#8221;" | translate | format(group.name | escape) }</h1>
<form id="group_edit" class="split{% if group.id == visitor.group.id %} confirm{% endif %}" action="{% admin "update_group" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="name">${ "Name" | translate }</label>
<input class="text" type="text" name="name" value="${ group.name | escape }" id="name" />
</p>

<h2>${ "Permissions" | translate }</h2>
<p id="toggler">

</p>
<hr class="js_enabled" />
{% for permission in permissions %}
<p>
<label for="permission_$permission.id">${ permission.name | translate }</label>
<input class="checkbox" type="checkbox" name="permissions[$permission.id]" id="permission_$permission.id"{% if group.can(permission.id) %} checked="checked"{% endif %} />
</p>
{% endfor %}
<br />

<p>
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Update" | translate }</button>
</p>

<input type="hidden" name="id" value="$group.id" id="id" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 16
- 0
News/admin/themes/default/pages/edit_page.twig View File

@@ -0,0 +1,16 @@
{% extends "layout.twig" %}

{% block title %}${ "Edit &#8220;%s&#8221;" | translate | format(page.title | escape) }{% endblock %}

{% block content %}
${ page.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" />'~ ("Delete" | translate), null, null, "button boo right") }
<h1>${ "Editing &#8220;%s&#8221;" | translate | format(page.title) }</h1>
<form id="edit_form" action="{% admin "update_page" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
{% include "partials/page_fields.twig" %}

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
<input type="hidden" name="id" value="$page.id" id="id" />
</fieldset>
</form>
{% endblock %}

+ 17
- 0
News/admin/themes/default/pages/edit_post.twig View File

@@ -0,0 +1,17 @@
{% extends "layout.twig" %}

{% block title %}${ "Edit &#8220;%s&#8221;" | translate | format(post.title | escape) }{% endblock %}

{% block content %}
${ post.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" />'~ ("Delete" | translate), null, null, "button boo right") }
<h1>${ "Editing &#8220;%s&#8221;" | translate | format(post.title | escape) }</h1>
<form id="edit_form" class="${ post.feather | escape(true) }" action="{% admin "update_post" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
{% include "partials/post_fields.twig" %}

<input type="hidden" name="id" value="$post.id" id="id" />
<input type="hidden" name="feather" value="${ post.feather | escape(true) }" id="feather" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 57
- 0
News/admin/themes/default/pages/edit_user.twig View File

@@ -0,0 +1,57 @@
{% extends "layout.twig" %}

{% block title %}${ "Edit User &#8220;%s&#8221;" | translate | format(user.login | escape) }{% endblock %}

{% block content %}
${ user.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" />'~ ("Delete" | translate), null, null, "button boo right") }
<h1>${ "Editing User &#8220;%s&#8221;" | translate | format(user.login | escape) }</h1>
<form id="user_edit" class="split" action="{% admin "update_user" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<h2>${ "Information" | translate }</h2>
<p>
<label for="full_name">${ "Full Name" | translate }</label>
<input class="text" type="text" name="full_name" value="${ user.full_name | escape }" id="full_name" />
</p>
<p>
<label for="email">${ "E-Mail" | translate }</label>
<input class="text" type="text" name="email" value="${ user.email | escape }" id="email" />
</p>
<p>
<label for="website">${ "Website" | translate }</label>
<input class="text" type="text" name="website" value="${ user.website | escape }" id="website" />
</p>

<h2>${ "Settings" | translate }</h2>
<p>
<label for="login">${ "Login" | translate }</label>
<input class="text" type="text" name="login" value="${ user.login | escape }" id="full_name" />
</p>
<p>
<label for="group">${ "Group" | translate }</label>
<select name="group" id="group">
{% for group in groups %}
<option value="$group.id"${ group.id | option_selected(user.group_id) }>$group.name</option>
{% endfor %}
</select>
</p>
<p>
<label for="new_password1">${ "New Password?" | translate }</label>
<input class="text" type="password" name="new_password1" value="" id="new_password1" />
</p>
<p>
<label for="new_password2">${ "Confirm" | translate }</label>
<input class="text" type="password" name="new_password2" value="" id="new_password2" />
</p>
${ trigger.call("edit_user_fields", user) }

<br />

<p>
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Update" | translate }</button>
</p>

<input type="hidden" name="id" value="$user.id" id="id" />
<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 62
- 0
News/admin/themes/default/pages/export.twig View File

@@ -0,0 +1,62 @@
{% extends "layout.twig" %}

{% block title %}${ "Export" | translate }{% endblock %}

{% block content %}
<h2>${ "What would you like to export?" | translate }</h2>
<form id="export_form" class="split" action="{% admin "export" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="posts">${ "Posts" | translate }</label>
<input class="checkbox" type="checkbox" name="posts" value="" id="posts" checked="checked" />
<small>
${ "filter:" | translate }
<input class="text" type="text" name="filter_posts" value="" id="filter_posts" />
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
${ "(optional)" | translate }
</small>
</p>
<p>
<label for="pages">${ "Pages" | translate }</label>
<input class="checkbox" type="checkbox" name="pages" value="" id="pages" checked="checked" />
<small>
${ "filter:" | translate }
<input class="text" type="text" name="filter_pages" value="" id="filter_pages" />
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
${ "(optional)" | translate }
</small>
</p>
<p>
<label for="groups">${ "Groups" | translate }</label>
<input class="checkbox" type="checkbox" name="groups" value="" id="groups" checked="checked" />
<small>
${ "filter:" | translate }
<input class="text" type="text" name="filter_groups" value="" id="filter_groups" />
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
${ "(optional)" | translate }
</small>
</p>
<p>
<label for="users">${ "Users" | translate }</label>
<input class="checkbox" type="checkbox" name="users" value="" id="users" checked="checked" />
<span class="sub">
${ "(warning: this also exports the hashed passwords, keep it safe)" | translate }
</span>
<small>
${ "filter:" | translate }
<input class="text" type="text" name="filter_users" value="" id="filter_users" />
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
${ "(optional)" | translate }
</small>
</p>

${ trigger.call("export_choose") }

<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Export" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 49
- 0
News/admin/themes/default/pages/feathers.twig View File

@@ -0,0 +1,49 @@
{% extends "layout.twig" %}

{% block title %}${ "Feathers" | translate }{% endblock %}

{% block content %}
<div class="enable feather left">
<h2>${ "Enabled" | translate }</h2>
<ul class="extend">
{% for safename, feather in enabled_feathers | items %}
<li class="$safename">
<a class="$safename info_link" href="javascript:void(0)"><img src="$theme_url/images/icons/info.png" class="info right" /></a>
{% if feather.help %}
<a href="{% admin "help&id="~feather.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
{% endif %}
${ "<a href=\"%s\">%s</a> v%s <span class=\"sub\">by %s</span>" | translate | format(feather.url, feather.name | translate(safename), feather.version, feather.author.link) }
<div class="expand">
<div class="description">
$feather.description {# translation is done in the controller #}
</div>
<noscript><a class="enable_button" href="{% admin "disable&feather="~safename %}">${ "Disable" | translate }</a></noscript>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="disable feather right">
<h2>${ "Disabled" | translate }</h2>
<ul class="extend">
{% for safename, feather in disabled_feathers | items %}
<li class="$safename">
<a class="$safename info_link" href="javascript:void(0)"><img src="$theme_url/images/icons/info.png" class="info right" /></a>
{% if feather.help %}
<a href="{% admin "help&id="~feather.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
{% endif %}
${ "<a href=\"%s\">%s</a> v%s <span class=\"sub\">by %s</span>" | translate | format(feather.url, feather.name | translate(safename), feather.version, feather.author.link) }
<div class="expand">
<div class="description">
$feather.description {# translation is done in the controller #}
</div>
<noscript><a class="disable_button" href="{% admin "enable&feather="~safename %}">${ "Enable" | translate }</a></noscript>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="clear tip_here"></div>
<br />
<a class="button right" href="http://chyrp.net/extend/type/feather">${ "Get More Feathers &rsaquo;" | translate }</a>
{% endblock %}

+ 60
- 0
News/admin/themes/default/pages/general_settings.twig View File

@@ -0,0 +1,60 @@
{% extends "layout.twig" %}

{% block title %}${ "Site Configuration" | translate }{% endblock %}

{% block content %}
<form id="general_settings" class="split" action="{% admin "general_settings" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="name">${ "Site Name" | translate }</label>
<input class="text" type="text" name="name" value="${ site.name | escape }" id="name" />
</p>
<p>
<label for="description">${ "Description" | translate }</label>
<textarea name="description" rows="2" cols="40">${ site.description | escape(false, false) }</textarea>
</p>
<p>
<label for="chyrp_url">${ "Chyrp URL" | translate }</label>
<input class="text" type="text" name="chyrp_url" value="${ site.chyrp_url | escape }" id="chyrp_url" />
</p>
<p>
<label for="url">
${ "Alternate URL" | translate }
<span class="sub">${ "(optional)" | translate }</span>
</label>
<input class="text" type="text" name="url" value="{% if site.url != site.chyrp_url %}${ site.url | escape }{% endif %}" id="url" />
<a href="{% admin "help&id=alternate_urls" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
<small>
${ "Enter an alternate address here if you want your homepage URL to be different from the URL where Chyrp is normally available." | translate }
</small>
</p>
<p>
<label for="email">${ "Contact E-Mail Address" | translate }</label>
<input class="text" type="text" name="email" value="${ site.email | escape }" id="email" />
</p>
<p>
<label for="timezone">${ "What time is it?" | translate }</label>
<select name="timezone" id="timezone">
{% for zone in timezones %}
<option value="$zone.name"${ zone.name | option_selected(site.timezone) }>${ zone.now | strftime("%m/%d/%y %H:%M" | translate) } &mdash; ${ zone.name | replace("_", " ") | replace("St ", "St. ") }</option>
{% endfor %}
</select>
</p>
<p>
<label for="locale">${ "Language" | translate }</label>
<select name="locale" id="locale">
{% for locale in locales %}
<option value="$locale.code"${ locale.code | option_selected(site.locale) }>$locale.name</option>
{% endfor %}
<option value="en_US"${ "en_US" | option_selected(site.locale) }>English (US)</option>
</select>
</p>

<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Update" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 176
- 0
News/admin/themes/default/pages/import.twig View File

@@ -0,0 +1,176 @@
{% extends "layout.twig" %}

{% block title %}${ "Import" | translate }{% endblock %}

{% block content %}
<h2>Chyrp</h2>
<form id="import_chyrp_form" class="split" action="{% admin "import_chyrp" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="posts_file">${ "Posts .atom File" | translate }</label>
<input type="file" name="posts_file" value="" id="posts_file" />
</p>
<p>
<label for="pages_file">${ "Pages .atom File" | translate }</label>
<input type="file" name="pages_file" value="" id="pages_file" />
</p>
<p>
<label for="groups_file">${ "Groups .yaml File" | translate }</label>
<input type="file" name="groups_file" value="" id="groups_file" />
</p>
<p>
<label for="users_file">${ "Users .yaml File" | translate }</label>
<input type="file" name="users_file" value="" id="users_file" />
</p>
<p>
<label for="media_url">
${ "What URL is used for embedded media?" | translate }
<span class="sub">${ "(optional)" | translate }</span>
</label>
<input class="text" type="text" name="media_url" value="" id="media_url" />
<small>
${ "Usually something like <code>http://example.com/uploads/</code>." | translate }
</small>
</p>

${ trigger.call("import_choose") }

<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Import" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
<br />
<hr />
<br />
<h2>WordPress</h2>
<form id="import_wordpress_form" class="split" action="{% admin "import_wordpress" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="xml_file">${ "eXtended .XML File" | translate }</label>
<input type="file" name="xml_file" value="" id="xml_file" />
</p>
<p>
<label for="media_url">
${ "What URL is used for embedded media?" | translate }
<span class="sub">${ "(optional)" | translate }</span>
</label>
<input class="text" type="text" name="media_url" value="" id="media_url" />
<small>
${ "Usually something like <code>http://example.com/wp-content/uploads/</code>." | translate }
</small>
</p>

<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Import" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
<br />
<hr />
<br />
<h2>Tumblr</h2>
<form id="import_tumblr_form" class="split" action="{% admin "import_tumblr" %}" method="post" accept-charset="utf-8">
<fieldset>
<p>
<label for="tumblr_url">${ "Your Tumblr URL" | translate }</label>
<input class="text" type="text" name="tumblr_url" value="" id="tumblr_url" />
<small>${ "Note: Audio tumbles cannot be imported." | translate }</small>
</p>

<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Import" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
<br />
<hr />
<br />
<h2>TextPattern</h2>
<form id="import_textpattern_form" class="split" action="{% admin "import_textpattern" %}" method="post" accept-charset="utf-8">
<fieldset>
<p>
<label for="host">${ "Host" | translate }</label>
<input class="text" type="text" name="host" value="localhost" id="host" />
</p>
<p>
<label for="username">${ "Username" | translate }</label>
<input class="text" type="text" name="username" value="" id="username" />
</p>
<p>
<label for="password">${ "Password" | translate }</label>
<input class="text" type="password" name="password" value="" id="password" />
</p>
<p>
<label for="database">${ "Database" | translate }</label>
<input class="text" type="text" name="database" value="" id="database" />
</p>
<p>
<label for="prefix">${ "Table Prefix" | translate }</label>
<input class="text" type="text" name="prefix" value="" id="prefix" />
<span class="sub">${ "(if any)" | translate }</span>
</p>
<p>
<label for="media_url">
${ "What URL is used for embedded media?" | translate }
<span class="sub">${ "(optional)" | translate }</span>
</label>
<input class="text" type="text" name="media_url" value="" id="media_url" />
<small>
${ "Usually something like <code>http://example.com/images/</code>." | translate }
</small>
</p>
<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Import" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
<br />
<hr />
<br />
<h2>MovableType</h2>
<form id="import_movabletype_form" class="split" action="{% admin "import_movabletype" %}" method="post" accept-charset="utf-8">
<fieldset>
<p>
<label for="host">${ "Host" | translate }</label>
<input class="text" type="text" name="host" value="localhost" id="host" />
</p>
<p>
<label for="username">${ "Username" | translate }</label>
<input class="text" type="text" name="username" value="" id="username" />
</p>
<p>
<label for="password">${ "Password" | translate }</label>
<input class="text" type="password" name="password" value="" id="password" />
</p>
<p>
<label for="database">${ "Database" | translate }</label>
<input class="text" type="text" name="database" value="" id="database" />
</p>
<p>
<label for="media_url">
${ "What URL is used for embedded media?" | translate }
<span class="sub">${ "(optional)" | translate }</span>
</label>
<input class="text" type="text" name="media_url" value="" id="media_url" />
<small>
${ "Usually something like <code>http://example.com/images/</code>." | translate }
</small>
</p>
<p class="buttons">
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Import" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
${ trigger.call("import_choose") }
{% endblock %}

+ 47
- 0
News/admin/themes/default/pages/manage_groups.twig View File

@@ -0,0 +1,47 @@
{% extends "layout.twig" %}

{% block title %}${ "Manage Groups" | translate }{% endblock %}

{% block content %}
<h2>${ "Need more detail?" | translate }</h2>
<form class="detail" action="index.php" method="get" accept-charset="utf-8">
<fieldset>
<input type="hidden" name="action" value="manage_groups" />
{% if visitor.group.can("add_group") %}
<a href="{% admin "new_group" %}" class="button yay right">
<img src="$theme_url/images/icons/add.png" alt="add" /> ${ "New Group" | translate }
</a>
{% endif %}
<div class="pad">
<h3>${ "Search all groups for user&hellip;" | translate }</h3>
<input class="text" type="text" name="search" value="${ GET.search | escape }" id="search" /> <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
</div>
</fieldset>
</form>
<br />
<h2>${ "Groups" | translate }</h2>
{% for group in groups.paginated %}
<div class="box">
<h1>
<span class="right">
${ group.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }
${ group.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }
</span>
{% if group.id == site.guest_group %}
${ "&#8220;%s&#8221; is the group for guests." | translate | format(group.name) }
{% elseif group.id == site.default_group %}
${ "&#8220;%s&#8221; is the default group and has %d <a href=\"%s\">member</a>." | translate_plural("&#8220;%s&#8221; is the default group and has %d <a href=\"%s\">members</a>.", group.size) | format(group.name, group.size, route.url("/admin/?action=manage_users&query=group%3A"~group.name)) }
{% else %}
${ "&#8220;%s&#8221; has %d <a href=\"%s\">member</a>." | translate_plural("&#8220;%s&#8221; has %d <a href=\"%s\">members</a>.", group.size) | format(group.name, group.size, route.url("/admin/?action=manage_users&query=group%3A"~group.name)) }
{% endif %}
</h1>
</div>
{% endfor %}
{% if groups.paginated and groups.pages > 1 %}
<div class="pagination">
$groups.next_link
$groups.prev_link
<span class="pages">${ "Page %d of %d" | translate | format(groups.page, groups.pages) }</span>
</div>
{% endif %}
{% endblock %}

+ 91
- 0
News/admin/themes/default/pages/manage_pages.twig View File

@@ -0,0 +1,91 @@
{% extends "layout.twig" %}

{% block title %}${ "Manage Pages" | translate }{% endblock %}

{% block content %}
<h2>${ "Need more detail?" | translate }</h2>
<form class="detail" action="index.php" method="get" accept-charset="utf-8">
<fieldset>
<input type="hidden" name="action" value="manage_pages" />
<div class="pad">
<h3>
${ "Search&hellip;" | translate }
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
</h3>
<input class="text" type="text" name="query" value="${ GET.query | escape }" id="query" /> <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
</div>
</fieldset>
</form>
<br />
<h2>{% if GET.query %}${ "Search Results" | translate }{% else %}${ "Last 25 Pages" | translate }{% endif %}</h2>
<table border="0" cellspacing="0" cellpadding="0" class="wide">
<thead>
<tr class="head">
<th>${ "Title" | translate }</th>
<th>${ "Created" | translate }</th>
<th>${ "Last Updated" | translate }</th>
<th>${ "Author" | translate }</th>
${ trigger.call("manage_pages_column_header") }
<th colspan="2">${ "Controls" | translate }</th>
</tr>
</thead>
<tbody>
{% for page in pages.paginated %}
<tr id="page_$page.id" class="page{% if loop.last %} last{% endif %}">
<td class="main"><a href="$page.url">${ page.title | truncate }</a></td>
<td>${ page.created_at | strftime }</td>
<td>{% if page.updated %}${ page.updated_at | strftime }{% else %}<span class="sub">${ "never" | translate }</span>{% endif %}</td>
<td>$page.user.login</td>
${ trigger.call("manage_pages_column", page) }
{% if page.editable and page.deletable %}
<td class="controls">${ page.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }</td>
<td class="controls">${ page.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }</td>
{% else %}
${ page.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate), '<td class="controls" colspan="2">', '</td>') }
${ page.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate), '<td class="controls" colspan="2">', '</td>') }
{% endif %}
</tr>
{% else %}
<tr class="last">
<td colspan="6" class="center"><span class="sub">${ "(none)" | translate }</span></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if pages.paginated and pages.pages > 1 %}
<br />
<div class="pagination">
$pages.next_link
$pages.prev_link
<span class="pages">${ "Page %d of %d" | translate | format(pages.page, pages.pages) }</span>
</div>
{% endif %}
{% if pages.total %}
<br />
<h2>${ "Reorder Pages" | translate }</h2>
<form id="reorder_pages" action="{% admin "reorder_pages" %}" method="post">
<ul class="sort_pages">
{% for item in theme.pages_list %}
<li class="page-item" id="page_list_$item.page.id">
<noscript><input type="text" size="2" name="list_order[$item.page.id]" value="$item.page.list_order" class="center" /></noscript>
<div>$item.page.title</div>

{% if item.has_children %}<ul>{% endif %}
{% if not item.has_children %}</li>{% endif %}

{% for ul, li in item.end_tags %}
$ul
$li
{% endfor %}
{% endfor %}
</ul>
<noscript>
<div class="buttons">
<button type="submit" class="yay">
<img src="$theme_url/images/icons/success.png" alt="success" />${ "Reorder" | translate }
</button>
</div>
</noscript>
</form>
{% endif %}
{% endblock %}

+ 74
- 0
News/admin/themes/default/pages/manage_posts.twig View File

@@ -0,0 +1,74 @@
{% extends "layout.twig" %}

{% block title %}${ "Manage Posts" | translate }{% endblock %}

{% block content %}
<h2>${ "Need more detail?" | translate }</h2>
<form class="detail" action="index.php" method="get" accept-charset="utf-8">
<fieldset>
<input type="hidden" name="action" value="manage_posts" />
<div class="left pad margin-right">
<h3>
${ "Search&hellip;" | translate }
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
</h3>
<input class="text" type="text" name="query" value="${ GET.query | escape }" id="query" /> <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
</div>
<div class="left pad">
<h3>${ "Browse by month:" | translate }</h3>
<select name="month">
<option value="">----------</option>
{% for archive in theme.archives_list %}
<option value="${ archive.when | strftime("%Y-%m") }"${ GET.month | option_selected(archive.when | strftime("%Y-%m")) }>${ archive.when | strftime("%B %Y") } ($archive.count)</option>
{% endfor %}
</select>
<button type="submit" class="inline">${ "Show &rarr;" | translate }</button>
</div>
<div class="clear"></div>
</fieldset>
</form>
<br />
<h2>{% if GET.query %}${ "Search Results" | translate }{% else %}${ "Last 25 Posts" | translate }{% endif %}</h2>
<table border="0" cellspacing="0" cellpadding="0" class="wide">
<thead>
<tr class="head">
<th>${ "Title" | translate }</th>
<th>${ "Posted" | translate }</th>
<th>${ "Status" | translate }</th>
<th>${ "Author" | translate }</th>
${ trigger.call("manage_posts_column_header") }
<th colspan="2">${ "Controls" | translate }</th>
</tr>
</thead>
<tbody>
{% for post in posts.paginated %}
<tr id="post_$post.id" class="post $post.status_class{% if loop.last %} last{% endif %}">
<td class="main"><a href="$post.url">${ post.title | truncate }</a></td>
<td>${ post.created_at | strftime }</td>
<td>$post.status_name</td>
<td>$post.user.login</td>
${ trigger.call("manage_posts_column", post) }
{% if post.editable and post.deletable %}
<td class="controls">${ post.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }</td>
<td class="controls">${ post.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }</td>
{% elseif post.editable or post.deletable %}
${ post.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate), '<td class="controls" colspan="2">', '</td>') }
${ post.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate), '<td class="controls" colspan="2">', '</td>') }
{% endif %}
</tr>
{% else %}
<tr class="last">
<td colspan="6" class="center"><span class="sub">${ "(none)" | translate }</span></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if posts.paginated and posts.pages > 1 %}
<br />
<div class="pagination">
$posts.next_link
$posts.prev_link
<span class="pages">${ "Page %d of %d" | translate | format(posts.page, posts.pages) }</span>
</div>
{% endif %}
{% endblock %}

+ 74
- 0
News/admin/themes/default/pages/manage_users.twig View File

@@ -0,0 +1,74 @@
{% extends "layout.twig" %}

{% block title %}${ "Manage Users" | translate }{% endblock %}

{% block content %}
<h2>${ "Need more detail?" | translate }</h2>
<form class="detail" action="index.php" method="get" accept-charset="utf-8">
<fieldset>
<input type="hidden" name="action" value="manage_users" />
{% if visitor.group.can("add_user") %}
<a href="{% admin "new_user" %}" class="button yay right">
<img src="$theme_url/images/icons/add.png" alt="add" /> ${ "New User" | translate }
</a>
{% endif %}
<div class="pad">
<h3>
${ "Search&hellip;" | translate }
<a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
</h3>
<input class="text" type="text" name="query" value="${ GET.query | escape }" id="query" /> <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
</div>
</fieldset>
</form>
<br />
<h2>${ "Users" | translate }</h2>
<table border="0" cellspacing="0" cellpadding="0" class="wide">
<thead>
<tr class="head">
<th>${ "Name" | translate }</th>
<th>${ "Group" | translate }</th>
<th>${ "Joined" | translate }</th>
<th>${ "Website" | translate }</th>
${ trigger.call("manage_users_column_header") }
<th colspan="2">${ "Controls" | translate }</th>
</tr>
</thead>
<tbody>
{% for user in users.paginated %}
<tr id="user_$user.id" class="user{% if loop.last %} last{% endif %}">
<td class="main">
{% if user.full_name != "" %}
<a href="mailto:$user.email">$user.full_name</a> <span class="sub">($user.login)</span>
{% else %}
<a href="mailto:$user.email">$user.login</a>
{% endif %}
</td>
<td>${ user.group.name | escape }</td>
<td>${ user.joined_at | strftime }</td>
<td>{% if user.website != "" %}<a href="$user.website">$user.website</a>{% endif %}</td>
${ trigger.call("manage_users_column", user) }
{% if user.editable and user.deletable %}
<td class="controls">${ user.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }</td>
<td class="controls">${ user.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }</td>
{% else %}
${ user.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate), '<td class="controls" colspan="2">', '</td>') }
${ user.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate), '<td class="controls" colspan="2">', '</td>') }
{% endif %}
</tr>
{% else %}
<tr class="last">
<td colspan="5" class="center"><span class="sub">${ "(none)" | translate }</span></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if users.paginated and users.pages > 1 %}
<br />
<div class="pagination">
$users.next_link
$users.prev_link
<span class="pages">${ "Page %d of %d" | translate | format(users.page, users.pages) }</span>
</div>
{% endif %}
{% endblock %}

+ 71
- 0
News/admin/themes/default/pages/modules.twig View File

@@ -0,0 +1,71 @@
{% extends "layout.twig" %}

{% block title %}${ "Modules" | translate }{% endblock %}

{% block content %}
<div class="enable module left">
<h2>${ "Enabled" | translate }</h2>
<ul class="extend">
{% for safename, module in enabled_modules | items %}
<li class="${ module.classes | join(" ") }" id="module_$safename">
<a class="$safename info_link" href="javascript:void(0)"><img src="$theme_url/images/icons/info.png" class="info right" /></a>
{% if module.help %}
<a href="{% admin "help&id="~module.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
{% endif %}
${ "<a href=\"%s\">%s</a> v%s <span class=\"sub\">by %s</span>" | translate | format(module.url, module.name | translate(safename), module.version, module.author.link) }
<div class="expand">
<div class="description{% if module.dependencies_needed %} expanded{% endif %}">
$module.description {# translation is done in the controller #}

<p class="dependencies_message"{% if not module.dependencies_needed %} style="display: none"{% endif %}>
${ "This Module requires the following Modules to be enabled:" | translate }
</p>
<ul class="dependencies_list"{% if not module.dependencies_needed %} style="display: none"{% endif %}>
{% for dependency in module.dependencies_needed %}
<li class="$dependency">$dependency</li>
{% endfor %}
</ul>
</div>
{% if not module.dependencies_needed %}
<noscript><a class="enable_button" href="{% admin "disable&module="~safename %}">${ "Disable" | translate }</a></noscript>
{% endif %}
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="disable module right">
<h2>${ "Disabled" | translate }</h2>
<ul class="extend">
{% for safename, module in disabled_modules | items %}
<li class="${ module.classes | join(" ") }" id="module_$safename">
<a class="$safename info_link" href="javascript:void(0)"><img src="$theme_url/images/icons/info.png" class="info right" /></a>
{% if module.help %}
<a href="{% admin "help&id="~module.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
{% endif %}
${ "<a href=\"%s\">%s</a> v%s <span class=\"sub\">by %s</span>" | translate | format(module.url, module.name | translate(safename), module.version, module.author.link) }
<div class="expand">
<div class="description{% if module.dependencies_needed %} expanded{% endif %}">
$module.description {# translation is done in the controller #}

<p class="dependencies_message"{% if not module.dependencies_needed %} style="display: none"{% endif %}>
${ "This Module requires the following Modules to be enabled:" | translate }
</p>
<ul class="dependencies_list"{% if not module.dependencies_needed %} style="display: none"{% endif %}>
{% for dependency in module.dependencies_needed %}
<li class="$dependency">$dependency</li>
{% endfor %}
</ul>
</div>
{% if not module.dependencies_needed %}
<noscript><a class="disable_button" href="{% admin "enable&module="~safename %}">${ "Enable" | translate }</a></noscript>
{% endif %}
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="clear"></div>
<br />
<a class="button right" href="http://chyrp.net/extend/type/module">${ "Get More Modules &rsaquo;" | translate }</a>
{% endblock %}

+ 34
- 0
News/admin/themes/default/pages/new_group.twig View File

@@ -0,0 +1,34 @@
{% extends "layout.twig" %}

{% block title %}${ "New Group" | translate }{% endblock %}

{% block content %}
<h1>${ "New Group" | translare }</h1>
<form id="new_group" class="split" action="{% admin "add_group" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="name">${ "Name" | translate }</label>
<input class="text" type="text" name="name" value="" id="name" />
</p>

<h2>${ "Permissions" | translate }</h2>
<p id="toggler">

</p>
<hr class="js_enabled" />
{% for permission in permissions %}
<p>
<label for="permission_$permission.id">${ permission.name | translate }</label>
<input class="checkbox" type="checkbox" name="permissions[$permission.id]" id="permission_$permission.id" />
</p>
{% endfor %}
<br />

<p>
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Add Group" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 58
- 0
News/admin/themes/default/pages/new_user.twig View File

@@ -0,0 +1,58 @@
{% extends "layout.twig" %}

{% block title %}${ "Add User" | translate }{% endblock %}

{% block content %}
<h1>${ "New User" | translare }</h1>
<form id="new_user" class="split" action="{% admin "add_user" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<h2>${ "Settings" | translate }</h2>
<p>
<label for="login">${ "Login" | translate }</label>
<input class="text" type="text" name="login" value="" id="full_name" />
</p>
<p>
<label for="group">${ "Group" | translate }</label>
<select name="group" id="group">
<option value="$default_group.id">$default_group.name</option>
{% for group in groups %}
<option value="$group.id">$group.name</option>
{% endfor %}
</select>
</p>
<p>
<label for="password1">${ "Password" | translate }</label>
<input class="text" type="password" name="password1" value="" id="password1" />
</p>
<p>
<label for="password2">${ "Confirm" | translate }</label>
<input class="text" type="password" name="password2" value="" id="password2" />
</p>

<h2>${ "Information" | translate }</h2>
<p>
<label for="full_name">${ "Full Name" | translate }</label>
<input class="text" type="text" name="full_name" value="" id="full_name" />
</p>
<p>
<label for="email">${ "E-Mail" | translate }</label>
<input class="text" type="text" name="email" value="" id="email" />
</p>
<p>
<label for="website">${ "Website" | translate }</label>
<input class="text" type="text" name="website" value="" id="website" />
</p>


${ trigger.call("new_user_fields") }

<br />

<p>
<button type="submit" class="yay"><img src="$theme_url/images/icons/success.png" alt="success" />${ "Add User" | translate }</button>
</p>

<input type="hidden" name="hash" value="$site.secure_hashkey" id="hash" />
</fieldset>
</form>
{% endblock %}

+ 50
- 0
News/admin/themes/default/pages/route_settings.twig View File

@@ -0,0 +1,50 @@
{% extends "layout.twig" %}

{% block title %}${ "Route Settings" | translate }{% endblock %}

{% block content %}
<form id="route_settings" class="split" action="{% admin "route_settings" %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<fieldset>
<p>
<label for="clean_urls">${ "Clean URLs?" | translate }</label>
<input type="checkbox" name="clean_urls" id="clean_urls"${ site.clean_urls | checked } />
<span class="sub">${ "(recommended)" | translate }</span>
<small>
${ "Gives your site prettier urls." | translate }<br />
${ "Requires .htaccess support (pretty common). If you're unsure, it's safe to test and find out. Just come back and disable it if it breaks your site." | translate }
</small>
</p>
<p>
<label for="post_url">
${ "Post View URL" | translate }
<span class="sub">${ "(requires clean URLs)" | translate }</span>
</label>
<input class="text code" type="text" name="post_url" value="${ site.post_url | escape }" size="30" id="post_url" />
</p>
<div class="small">
<strong>${ "Syntax:" | translate }</strong>
<ul>
<li><code>(year)</code>: ${ "Year submitted" | translate } <span class="sub">${ "(ex. 2007)" | translate }</span></li>
<li><code>(month)</code>: ${ "Month submitted" | translate } <span class="sub">${ "(ex. 12)" | translate }</span></li>
<li><code>(day)</code>: ${ "Day submitted" | translate } <span class="sub">${ "(ex. 25)" | translate }</span></li>
<li><code>(hour)</code>: ${ "Hour submitted" | translate } <span class="sub">${ "(ex. 03)" | translate }</span></li>
<li><code>(minute)</code>: ${ "Minute submitted" | translate } <span class="sub">${ "(ex. 59)" | translate }</span></li>
<li><code>(second)</code>: ${ "Second submitted" | translate } <span class="sub">${ "(ex. 30)" | translate }</span></li>
<li><code>(id)</code>: ${ "Post ID" | translate }</li>
<li><code>(author)</code>: ${ "Post author (username)" | translate } <span class="sub">${ "(ex. Alex)" | translate }</span></li>
<li><code>(clean)</code>: ${ "The non-unique sanitized