commit 8f6118732893097bc89b3e84be18e84023fa0c2b Author: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Thu Jun 20 22:10:42 2024 +0800 Initiate repository diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a04e2e0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +.dockerignore +Dockerfile +.git +.gitignore +LICENSE.md +README.md +README_de_DE.md +README_it_IT.md +README_ko_KR.md +README_nl_NL.md +README_zh_CN.md +SECURITY.md \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..2867664 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,14 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +custom: ["https://paypal.me/djpimley"] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba60566 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.sublime-project +*.sublime-workspace +*.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d18deed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM php:8.2-apache + +WORKDIR /var/www/html +COPY . . + +RUN chown -R www-data ./* + +RUN apt-get update +RUN apt-get install -y libonig-dev libpq-dev +RUN docker-php-ext-install pdo_mysql pdo_pgsql + +EXPOSE 80 +VOLUME /var/www/html +CMD [ "apache2-foreground" ] diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4e801f4 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,28 @@ +## BSD 3-Clause License + +Copyright 2008-2024 Alex Suraci, Arian Xhezairi, Daniel Pimley, and others. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a8cb1bd --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +[English](README.md), [Deutsch](README_de_DE.md), [Italiano](README_it_IT.md), [한국인](README_ko_KR.md), [Nederlands](README_nl_NL.md), [简体中文](README_zh_CN.md). + +## What can Chyrp Lite do for me? + +Chyrp Lite makes it possible to host a blog on your own web server with minimal fuss. You can have +a traditional blog, a tumbleblog, or you can add oodles of customisation and build a general-purpose +web publishing platform with blogging features on the side. You get five beautiful blog themes and +a friendly administration console, all fully navigable on a broad range of devices, thanks to the +power of responsive HTML5. Semantic markup and comprehensive ARIA labelling ensure your blog will be +accessible to visitors who use assistive technologies. + +With a flexible system of Feathers and Pages, you can make your website whatever you want it to be. +Feathers enable different types of blog content – you can restrict yourself to absolute textual purity, +or you can create a multimedia rainbow. Pages let you publish articles separate from your blog content +– be it a simple colophon or a hierarchy of multiple pages, optionally including a homepage that your +visitors will see when they first arrive at your website. + +## What are the key features? + +#### Core: +* Easy to install, simple to maintain, extensible by design. +* Built with responsive and accessible W3C-validated HTML5. +* Universal support for plain text, Markdown, or raw markup. +* Personalise your blog using powerful extensions. +* Theme development is easy with the Twig template engine. +* Manage users and visitors with a comprehensive rights model. + +#### Feathers: +* Text: write textual blog entries. +* Photo: upload an image. +* Quote: make a quotation. +* Link: link to another website. +* Video: upload a video file. +* Audio: upload an audio file. +* Uploader: upload multiple files. + +#### Modules: +* Cacher: cache your blog pages for reduced server load. +* Categorize: give each of your blog entries a category. +* Tags: apply multiple searchable tags to your blog entries. +* Mentionable: register webmentions from blogs that link to yours. +* Comments: a comprehensive comments system for your blog. +* Likes: allow your visitors to show their appreciation. +* Read More: excerpt long blog entries on the blog index. +* Rights: set attribution and copyright/left for your entries. +* Cascade: ajax-powered infinite scrolling for your blog. +* Lightbox: on-page image viewer with image protection. +* Sitemap: index your blog for search engines. +* MAPTCHA: use simple mathematics problems to prevent spam. +* Highlighter: syntax highlighting for your code snippets. +* Easy Embed: the easiest way to embed videos in your blog. +* Post Views: maintain a view count for your blog entries. +* MathJax: a JavaScript display engine for mathematics. + +## Requirements + +* [PHP 8.0+](https://www.php.net/supported-versions.php) with default extensions (Session, JSON, Ctype, Filter, libxml, SimpleXML) +* [Multibyte String](https://www.php.net/manual/en/book.mbstring.php) +* [PDO](https://www.php.net/manual/en/book.pdo.php) +* [cURL](https://www.php.net/manual/en/book.curl.php) +* MySQL 5.7+ +* SQLite 3+ +* PostgreSQL 10+ + +## Installation + +You can install Chyrp Lite in three steps: + +1. If using MySQL, create a MySQL database with a username and password. +2. Download the [latest release](https://github.com/xenocrat/chyrp-lite/releases), unzip, and upload to your web server. +3. Run the installation process by visiting [install.php](install.php) in your web browser. + +## Upgrading + +You can upgrade Chyrp Lite in six steps: + +1. __Backup your database before proceeding!__ +2. Download the latest version of Chyrp Lite. +3. Move your _uploads_ folder and _includes/config.json.php_ somewhere safe. +4. Overwrite your current version with the new one. +5. Restore your _uploads_ folder and _includes/config.json.php_. +6. Run the upgrade process by visiting [upgrade.php](upgrade.php) in your web browser. + +## Documentation + +The Chyrp Lite [wiki](https://chyrplite.net/wiki/) has comprehensive documentation +for users and developers. + +## Authors + +Chyrp Lite was created by the following people: + +* Lite Developer: Daniel Pimley +* Chyrp Developer: Arian Xhezairi +* Project Founder: Alex Suraci +* Module authors and other contributors. + +## Licenses + +Chyrp Lite is Copyright 2008-2024 Alex Suraci, Arian Xhezairi, Daniel Pimley, and other contributors, +distributed under the [BSD license](https://raw.githubusercontent.com/xenocrat/chyrp-lite/master/LICENSE.md). +Please see the [licenses](licenses) directory for the full license text of all software packages distributed with Chyrp Lite. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e386a41 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +# Security Policy + +## Supported Versions + +The latest version will be supported with security updates. + +## Reporting a Vulnerability + +You can [report a security vulnerability privately on Github](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability). diff --git a/admin/help/canonical_url.twig b/admin/help/canonical_url.twig new file mode 100644 index 0000000..fb4c084 --- /dev/null +++ b/admin/help/canonical_url.twig @@ -0,0 +1,21 @@ +{% extends "layouts" ~ DIR ~ "help.twig" %} + +{% block title %}{{ "Canonical URL" | translate }}{% endblock %} + +{% block content %} +

{{ "Canonical URL" | translate }}

+

+{{ "If you enter a canonical URL, your site URLs will point someplace other than your install directory. You can use this feature to have Chyrp Lite installed in its own dedicated directory on your web server and still have your site accessible at your choice of destination directory. There are two requirements for this to work:" | translate }} +

+
    +
  1. +{{ "Create an index.php file in your destination directory with the following in it:" | translate }} +
    <?php
    +    require "filesystem/path/to/chyrp/index.php";
    +
    +
  2. +
  3. +{{ "Modify your URL rewrite directives to reflect the new destination directory." | translate }} +
  4. +
+{% endblock %} diff --git a/admin/help/filtering_results.twig b/admin/help/filtering_results.twig new file mode 100644 index 0000000..81a2518 --- /dev/null +++ b/admin/help/filtering_results.twig @@ -0,0 +1,17 @@ +{% extends "layouts" ~ DIR ~ "help.twig" %} + +{% block title %}{{ "Filtering Results" | translate }}{% endblock %} + +{% block content %} +

{{ "Filtering Results" | translate }}

+

+{{ "Use this search field to filter for specific items by entering plain text or keywords." | translate }} +

+

{{ "Keywords" | translate }}

+

+{{ "Use the syntax keyword:value; to quickly match specific results where keyword is equal to value. The keyword can be the name of a database column, the name of an author or a group, or a date/time. For example: author:Foo;year:2016; would filter the posts table to display only posts created by Foo in 2016." | translate }} +

+

+{{ "Use the syntax ASC:column; or DESC:column; to sort the results in ascending or descending order. For example: DESC:user_id;ASC:id; would sort a table of posts in descending order of user ID and then ascending order of post ID." | translate }} +

+{% endblock %} diff --git a/admin/help/markdown.twig b/admin/help/markdown.twig new file mode 100644 index 0000000..351742b --- /dev/null +++ b/admin/help/markdown.twig @@ -0,0 +1,101 @@ +{% extends "layouts" ~ DIR ~ "help.twig" %} + +{% block title %}{{ "Markdown" | translate }}{% endblock %} + +{% block content %} +

{{ "Markdown" | translate }}

+

+{{ "Markdown is a syntax for writing structured documents in plain text. Here are the basics to get you started:" | translate }} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ "Markdown" | translate }}{{ "Result" | translate }}
{{ "## Heading" | translate }}

{{ "Heading" | translate }}

{{ "### Heading" | translate }}

{{ "Heading" | translate }}

{{ "**Strong**" | translate }}{{ "Strong" | translate }}
{{ "*Emphasis*" | translate }}{{ "Emphasis" | translate }}
{{ "*_Citation_*" | translate }}{{ "Citation" | translate }}
{{ "~~Strikethrough~~" | translate }}{{ "Strikethrough" | translate }}
{{ "`Code`" | translate }}{{ "Code" | translate }}
{{ "==Highlight==" | translate }}{{ "Highlight" | translate }}
{{ "++Superscript++" | translate }}{{ "Superscript" | translate }}
{{ "--Subscript--" | translate }}{{ "Subscript" | translate }}
{{ "Blank line" | translate }}{{ "New paragraph" | translate }}
{{ "[title](URL)" | translate }}{{ "Hyperlink" | translate }}
{{ "![description](URL)" | translate }}{{ "Image" | translate }}
{{ "- List of items" | translate }}
  • {{ "List of items" | translate }}
{{ "1. List of items" | translate }}
  1. {{ "List of items" | translate }}
{{ "> Blockquote" | translate }}
{{ "Blockquote" | translate }}
{{ "< Aside" | translate }}
{{ ": Figure" | translate }}
{{ ":: Caption" | translate }}
{{ "Figure" | translate }}
{{ "Caption" | translate }}
{{ "````
Code block
````" | translate }}
{{ "Code block" | translate }}
{{ "A footnote label. [^label]" | translate }}

{{ "[^label]: The footnote." | translate }}
{{ "A footnote label." | translate }} 1
+{% endblock %} diff --git a/admin/help/slugs.twig b/admin/help/slugs.twig new file mode 100644 index 0000000..51d88ba --- /dev/null +++ b/admin/help/slugs.twig @@ -0,0 +1,10 @@ +{% extends "layouts" ~ DIR ~ "help.twig" %} + +{% block title %}{{ "Slugs" | translate }}{% endblock %} + +{% block content %} +

{{ "Slugs" | translate }}

+

+{{ "The slug is the URL-friendly identifying name for this post or page. You can enter the slug yourself or have it auto-generated when the post or page is created. A slug may contain only the letters a-z, the numbers 0-9, and hyphen-minus (“-”)." | translate }} +

+{% endblock %} diff --git a/admin/help/unicode_emoticons.twig b/admin/help/unicode_emoticons.twig new file mode 100644 index 0000000..95ef8ce --- /dev/null +++ b/admin/help/unicode_emoticons.twig @@ -0,0 +1,114 @@ +{% extends "layouts" ~ DIR ~ "help.twig" %} + +{% block title %}{{ "Unicode Emoticons" | translate }}{% endblock %} + +{% block content %} +

{{ "Unicode Emoticons" | translate }}

+

+{{ "You can have some emoticons converted to equivalent Unicode emoji when your content is displayed. Your original content is not modified, so you can turn this feature on and off at any time. The following conversions will occur:" | translate }} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ "Emoticon" | translate }}{{ "Emoji" | translate }}
o:-){{ "o:-)" | emote }}
>:-){{ ">:-)" | emote }}
:-){{ ":-)" | emote }}
^_^{{ "^_^" | emote }}
:-D{{ ":-D" | emote }}
;-){{ ";-)" | emote }}
<3{{ "<3" | emote }}
B-){{ "B-)" | emote }}
:->{{ ":->" | emote }}
:-||{{ ":-||" | emote }}
:-|{{ ":-|" | emote }}
-_-{{ "-_-" | emote }}
:-/{{ ":-/" | emote }}
:-s{{ ":-s" | emote }}
:-*{{ ":-*" | emote }}
:-P{{ ":-P" | emote }}
:-({{ ":-(" | emote }}
;_;{{ ";_;" | emote }}
:-(({{ ":-((" | emote }}
:-o{{ ":-o" | emote }}
O_O{{ "O_O" | emote }}
:-${{ ":-$" | emote }}
x_x{{ "x_x" | emote }}
:-x{{ ":-x" | emote }}
+{% endblock %} diff --git a/admin/images/icons/add.svg b/admin/images/icons/add.svg new file mode 100644 index 0000000..7fb6abb --- /dev/null +++ b/admin/images/icons/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/archive.svg b/admin/images/icons/archive.svg new file mode 100644 index 0000000..e344df5 --- /dev/null +++ b/admin/images/icons/archive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/audio.svg b/admin/images/icons/audio.svg new file mode 100644 index 0000000..088bc8a --- /dev/null +++ b/admin/images/icons/audio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/bold.svg b/admin/images/icons/bold.svg new file mode 100644 index 0000000..df7a397 --- /dev/null +++ b/admin/images/icons/bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/checkbox.svg b/admin/images/icons/checkbox.svg new file mode 100644 index 0000000..bb623b6 --- /dev/null +++ b/admin/images/icons/checkbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/close.svg b/admin/images/icons/close.svg new file mode 100644 index 0000000..2812f38 --- /dev/null +++ b/admin/images/icons/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/code.svg b/admin/images/icons/code.svg new file mode 100644 index 0000000..0e44d7b --- /dev/null +++ b/admin/images/icons/code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/delete.svg b/admin/images/icons/delete.svg new file mode 100644 index 0000000..9c01c56 --- /dev/null +++ b/admin/images/icons/delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/directory.svg b/admin/images/icons/directory.svg new file mode 100644 index 0000000..2f11332 --- /dev/null +++ b/admin/images/icons/directory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/download.svg b/admin/images/icons/download.svg new file mode 100644 index 0000000..f570652 --- /dev/null +++ b/admin/images/icons/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/edit.svg b/admin/images/icons/edit.svg new file mode 100644 index 0000000..ad53190 --- /dev/null +++ b/admin/images/icons/edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/failure.svg b/admin/images/icons/failure.svg new file mode 100644 index 0000000..b2d5f33 --- /dev/null +++ b/admin/images/icons/failure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/file.svg b/admin/images/icons/file.svg new file mode 100644 index 0000000..591ce10 --- /dev/null +++ b/admin/images/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/heading.svg b/admin/images/icons/heading.svg new file mode 100644 index 0000000..01c8694 --- /dev/null +++ b/admin/images/icons/heading.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/help.svg b/admin/images/icons/help.svg new file mode 100644 index 0000000..0d38526 --- /dev/null +++ b/admin/images/icons/help.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/highlight.svg b/admin/images/icons/highlight.svg new file mode 100644 index 0000000..4f932c0 --- /dev/null +++ b/admin/images/icons/highlight.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/image.svg b/admin/images/icons/image.svg new file mode 100644 index 0000000..95292a8 --- /dev/null +++ b/admin/images/icons/image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/info.svg b/admin/images/icons/info.svg new file mode 100644 index 0000000..8762668 --- /dev/null +++ b/admin/images/icons/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/italic.svg b/admin/images/icons/italic.svg new file mode 100644 index 0000000..f02dd05 --- /dev/null +++ b/admin/images/icons/italic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/link.svg b/admin/images/icons/link.svg new file mode 100644 index 0000000..d2a53c7 --- /dev/null +++ b/admin/images/icons/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/markdown.svg b/admin/images/icons/markdown.svg new file mode 100644 index 0000000..fc3e20b --- /dev/null +++ b/admin/images/icons/markdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/radio.svg b/admin/images/icons/radio.svg new file mode 100644 index 0000000..4aae1c2 --- /dev/null +++ b/admin/images/icons/radio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/remove.svg b/admin/images/icons/remove.svg new file mode 100644 index 0000000..d9f0262 --- /dev/null +++ b/admin/images/icons/remove.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/search.svg b/admin/images/icons/search.svg new file mode 100644 index 0000000..4c9b73b --- /dev/null +++ b/admin/images/icons/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/select.svg b/admin/images/icons/select.svg new file mode 100644 index 0000000..3d99d8f --- /dev/null +++ b/admin/images/icons/select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/storage.svg b/admin/images/icons/storage.svg new file mode 100644 index 0000000..c6c8be4 --- /dev/null +++ b/admin/images/icons/storage.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/strikethrough.svg b/admin/images/icons/strikethrough.svg new file mode 100644 index 0000000..76e2c45 --- /dev/null +++ b/admin/images/icons/strikethrough.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/success.svg b/admin/images/icons/success.svg new file mode 100644 index 0000000..faa1a05 --- /dev/null +++ b/admin/images/icons/success.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/upload.svg b/admin/images/icons/upload.svg new file mode 100644 index 0000000..ebeac91 --- /dev/null +++ b/admin/images/icons/upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/video.svg b/admin/images/icons/video.svg new file mode 100644 index 0000000..3e5a199 --- /dev/null +++ b/admin/images/icons/video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/images/icons/view.svg b/admin/images/icons/view.svg new file mode 100644 index 0000000..fb1e145 --- /dev/null +++ b/admin/images/icons/view.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..258e5ca --- /dev/null +++ b/admin/index.php @@ -0,0 +1,20 @@ +init(); + + $trigger->call("end"); + ob_end_flush(); diff --git a/admin/javascripts/admin.js.php b/admin/javascripts/admin.js.php new file mode 100644 index 0000000..1c3b05c --- /dev/null +++ b/admin/javascripts/admin.js.php @@ -0,0 +1,1263 @@ + +'use strict'; + +$(function() { + toggle_all(); + validate_slug(); + validate_email(); + validate_url(); + validate_passwords(); + confirm_submit(); + solo_submit(); + test_uploads(); + Help.init(); + Write.init(); + Settings.init(); +}); +// Adds a master toggle to forms that have multiple checkboxes. +function toggle_all() { + $("form[data-toggler]").each( + function() { + var all_on = true; + var target = $(this); + var parent = $("#" + $(this).attr("data-toggler")); + var slaves = target.find(":checkbox"); + var master = Date.now().toString(16); + + slaves.each( + function() { + return all_on = $(this).prop("checked"); + } + ); + + slaves.click( + function(e) { + slaves.each( + function() { + return all_on = $(this).prop("checked"); + } + ); + + $("#" + master).prop("checked", all_on); + } + ); + + parent.append( + [$("