Quick Start - ΩJr. Publizjr Creates Web Pages

This information lives on a webpage hosted at the following web address: 'https://omegajunior.globat.com/code/publizjr/'.

Get up to speed on the workings and expectations of this PHP-based webpage generator. This article is aimed at content authors.

Publizjr creates Web Pages

It doesn’t create a website. It takes content written by an author and assembles it into a webpage. The web server then sends this page to the visitor. A website is created by adding pages. An error on one page does not affect any of the other pages.

The ΩJr.Net uses Publizjr templates in several folders throughout the site, some with their own coding and some with their own styling. This granularity allows site owners to create different looks and feels per part of the site.


Pages are Folders

Each page lives in a folder on a file system. This folder exists on a web server, as a sub folder of the web root. The web root is where the site’s home page is located. A Publizjr Generator template can live in the web root, as well as inside child folders. Each template only takes content from child folders.

For instance, if your file system looks like this:

/ 
- about-me/
- index/
- kitchens/
- bathrooms/
- offices/
- publizjr.php

then the Publizjr template can generate 1 page for each of the folders. Note “can”. Not “must”.

Because of the folder structure, the webmaster can grant access privileges to specific authors, using preferred access management tools.

Note: Publizjr reserved 2 folders for special purposes, so you must not choose their names for your pages: “index” (contains the home page), and “translations” (contains pieces to non-editorial text). Read the installation documentation.


Showing the Home Page

Once properly installed and configured, showing a Publizjr home page is as easy as calling up the folder in which it lives. This could be the web site’s root folder.

For example, on the ΩJr.Net, this very section about Publizjr contains a Publizjr template. Calling up its section home page is done by entering its web address into the web browser’s address box:
https://www.omegajunior.net/code/publizjr/


Showing Any Other Page

To tell a template that it should generate and show a page from a child folder, call the template by its web address, and add a query parameter “id”, passing the name of the folder. Like so:
https://www.omegajunior.net/code/publizjr/?id=quickstart
If no folder exists with that id, the template will show a 404-Not-Found message.


Default Page Structure

By default, a Publizjr Generator template assumes a page contains the following pieces of UTF-8 text:

* body
* description
* intro
* links
* title

All of these except the body text are optional by default, meaning an author may omit all but body, and the page will still work (albeit with some default texts).

Notice the “by default” bit: any PHP-capable programmer can change the template, if so desired, provided they have been granted access.

These pieces of text are stored as text files in the page folder. The author can then use their favourite FTP client to update a web page. (Note: Those text files bear the same name as the listing shows. They have no extensions.

The template will take each text’s content, parse it, and place it into a web page.

* The title is placed into the page’s title and h1 tag,
* the description is placed in the page’s description meta tag,
* the intro is bolded and placed beneath the h1,
* the body is put underneath,
* and lastly the links are included.

The template will then add whatever is necessary or desired to create web page mark-up.


Parsing Content

As stated above, the Publizjr Generator takes and parses each text. It does so according to the purpose it assigns to each text.

From the title and description texts, only text and numbers remain. Everything else, including new lines, is stripped. For the descriptions, quotes are stripped too. The intro text keeps text and numbers, and new lines as well. The body text expands on that by allowing BBCode mark-up.

And finally, the links text contains hyperlinks using the e-mail address format:
"title" <address>
where each hyperlink is placed on a new line, and hyperlinks must not contain a new line or a double quote mark. Here is a valid example:
"Publizjr Documentation" <https://www.omegajunior.net/code/publizjr/>
"Using BBCodes" <?id=using.bbcodes>
"zjrJS API Documentation" <../zjrjs/>


For each text, word casing and diacritics are preserved.

Note: validity of the content is the responsibility of the author. The template will remove what it must, and allow everything else.


Unavailable Functionality

The following is a list of things common to other webpage publication systems, which we scratched from Publizjr. Where possible, the reason for its omission is listed.

Interested?

Let's meet for coffee or over lunch. Talk to me using this form.