Repository navigation
CMS 0.7.9
CMS 0.7.9
A second language; a site's own contact form drawn and run by the CMS in its own markup, with each email's record, numbers that carry on, and spam rules of its own; files stored and renamed under their own names, and a picture a site already has, in the library where it is; embeds from four more providers; text kept exactly as written; and a site's own setup: a mail log, a safer config.php with a command to change it, one reading of app_env, paging and old class names of its own choosing.
A second language
- Settings → General → Second language gives each page and entry a version at the same address under the language's prefix (
/fr/about,/fr/news/…, the front page at/fr). Translate, on a page's or an entry's screen, makes it: a Private copy linked to the original, with its words, picture, date, fields and categories, to write in the language and publish. The page and entry lists say each translation's language and filter by it. - A page in the second language is drawn in it: its
<html lang>, its menus (each menu location has a twin, Primary Navigation (French), with a menu of its own), the site's title, tagline and footer text as Settings → General gives them in it, and the theme's own words: a list's links, search, the not-found page, the password gate, the menu's button, the cookie banner, opening hours, and the months and days in its dates. French ships with English; Settings → Words changes any word in either language and names each translated type in the second. - Archives, category pages, search, feeds, calendars and sitemaps each hold one language. A page and its translation name each other for search engines (hreflang, in the head and in the sitemap), and the header links to the page in the other language, written in that language's own name, or to that language's front page.
- The shop, forms and the admin stay in the site's own language, and a type that sells (a product, or events that sell tickets) has no translation.
- A translation renamed leaves its redirect; an export and an import carry translations and link each to its original; a static copy carries each language; a site beside its own router hands the CMS the second language's addresses of its types and categories.
- A site whose own language is French now says the theme's words, and its dates' months and days, in French.
A site's own contact form, drawn and run by the CMS
- A form's Settings → On the page sets how it is drawn: its element's id and classes, its button's classes, each field's name as its id, its messages above or below it, and its words while sending, when answers need fixing and when it cannot be sent. Its status region speaks (
role="status",aria-live="polite"). - "Check each answer on the page, in its field's own words" checks each field as it is left and as the form is sent, with the field's own messages: each shows under its field, the first wrong field takes the focus, and nothing is sent.
- Each field can name what a browser may fill it with, a textarea how many lines it shows, a select the words of its empty choice, and an answer over its Maximum characters can be refused in words of its own.
- A required field's
*is no longer read aloud; its box says it is required and names its message, a span under it hidden until the answer is wrong. Every group of a form's controls (radios, boxes, a scale, a grid, a name's or an address's boxes, a signature) is named by its label. - A refusal by script names each field with its message, and the page puts each under its field. Without JavaScript, a refused form comes back to its page with everything typed and each message in place, carried for ten minutes by a cookie of its own and taken once.
- A field shown only for a choice (Please specify, for Other) is hidden on the first draw whether or not the page runs a script.
- A page left open longer than its form's token lasts still sends: the token is renewed while the page is open.
- What became of each email a submission sends is kept with it and shown on its page: sent, with the id the mail service gave it (Brevo's
messageId), or not sent and why. A history import can bring each lead's own record. php admin/bin/form-numbers.php next 1001makes the next new submission #1001, refused at or below a number in use.- A form sets the fewest seconds its page must be open before it sends (3 when blank). "Answer spam as though it was sent" answers a post turned away for its speed or its content exactly as a sent one, with no email and no conversion, and keeps it with its reason. A site adds rules of its own in
form-spam.php. - A form keeps a file only once its post is accepted, and deleting a submission, spam or a whole form deletes the private files its submissions held.
- A form's empty
value=""andplaceholder=""attributes are no longer drawn.
Writing and media
- A site whose theme loads an icon font keeps the icons written into an entry's text (
'icon_classes'inconfig.php). - Every name HTML5 gives a character is read as that character (
⅛is ⅛). - A page or an entry saved without a change is stored exactly as it was: no moved "last updated", no revision.
- A file is stored under its own name: "Garden Path.JPG" is kept as
garden-path.webp, with-2where the name is taken, and no unique prefix. - A library file can be renamed in the library's panel: the file and its widths move, every address the site keeps for it follows (bodies, fields, settings, forms, menus, earlier revisions, redirects), and the old address sends a visitor on.
php admin/bin/media-site-files.php addputs a picture the site already has under its web root into the library where it is, with its narrower copies as its widths;Media::image()gives a template any picture's address and widths as paths.- Settings → SEO's default sharing image and organisation logo are pictures from the library, chosen with its picker, so neither breaks when a file is renamed or carries a development address into a launch. An address stored there before stays until it is emptied.
- Embeds from four more providers, each pasted as the provider's code gives it: a Google map, a Calendly booking page, a Brevo sign-up form and a Kit sign-up form.
- The front page's own words run their shortcodes, as a page's do.
- An import can keep what a move needs: each row's status, an entry's date and a page's or entry's password, and each featured image found in the library by its contents or a name only one picture has.
A site's own setup
'mail_transport' => 'log'inconfig.phpkeeps every message inadmin/logs/mail.loginstead of sending it, for a staging copy.- A site's own files in
admin/config/are read inside an output buffer, andupdate.phpandmigrate.phprefuse one that does not compile, naming it. php admin/bin/config.php set <key> <value>changes one setting inconfig.phpand keeps the rest of the file, its comments included.app_envis read one way everywhere: left out it is production; every copy but a development one hides its errors, only production sends Google's tags, and the admin names any other copy in its top bar. Aconfig.phpwithoutapp_envnow sends Google's tags.- A module switched off with a word (
false,no,off,0) is off, and System health names a switch that is neither. - A site that draws its own head gets an entry's head and text from
SEO\Head::forEntry()andPost::renderedContent(), and a whole-page theme can draw a password-protected entry's gate with a template of its own. 'paging_parameter' => 'p'numbers archives, term pages, the front page and a static copy the site's own way.'old_class_names' => falsestops the CMS writing its old class names beside the new, in its pages, stylesheets and scripts alike, andupdate.php checknames a site's own files that still use one./accountis one of the site's own addresses: a page, a type or a redirect there is refused.
Migrations 121 to 125: each email's record, a site's own files in the library, a form's return without JavaScript, each page's and entry's language, and Settings → SEO's two pictures by their library id.