Image, video and other media resources can be associated with a page by dragging and dropping them in the edit textarea or by clicking on the link click to select link in the gray box below the textarea. This would add wiki code such as
((resource:myphoto.jpg|Resource Description))
to the page. Only saving the page will save this code and upload the resource to the server. In the above myphoto.jpg is the resource that will be inserted and Resource Description is the alternative text to use in case the viewing browser cannot display jpg files. To add a resource from a different wiki page belonging to the same group to the current wiki page one can use a syntax like:
((resource:Documentation:ConfigureScreenForm1.png|The work directory form))
Here Documentation would be the page and ConfigureScreenForm1.png the resource. You can also insert resources from a data-string using resource-data rather than resource. For example:
((resource-data:image/jpeg;base64,/9j/4AAQSkZJRg...rest of image data...|Seekquarry Logo))
could be used to inline an image like:
be aware though that the default maximum wiki page size is 512Kb (this can be set in src/configs/Config.php).
Sometimes it is useful to edit the basic resource link above to make a link which is a thumbnail of the resource which points to a separate page containing that resource. This can be done using the syntax:
((resource-thumb:myphoto.jpg|Resource Description))
Similarly, by default for resources like PDFs, epub's, etc., the resource tag inlines the whole resource into the page, if instead one wants a clickable link to a page where the resource is displayed one can use the syntax:
((resource-link:my_document.pdf|Resource Description))
Comma separated value files (.csv or CSV files) are inlined into a page as a table. Which rows and columns of the CSV to present in this table can be controlled by the resource line. The general format for including a CSV resource is:
((resource:resource_name.csv#config#top_left_cell#bottom_right_cell|Resource Description))
For example,
((resource:resource_name.csv##B2#C3|Resource Description))
might output
I.e., just the portion of the CSV given by the rectangle between the cells B2 and C3. Using a config directive we can omit the spreadsheet row and column headings as follows:
((resource:resource_name.csv#noheadings#B2#C3|Resource Description))
which might output
CSV spreadsheet files can also be used to output a variety of charts. The general format for the command to insert a chart resource is:
((resource-chart_type:resource_name.csv#chart_type#x_start#x_end#y_start#y_end|Resource Description))
Here chart_type can be one of bargraph, linegraph, or pointgraph. For example, one might have a line like:
((resource-bargraph:resource_name.csv##B1#B4#C1#C4|Quadratic Function))
which could produce a chart like
In the above example, the values for the `x` coordinates would come from the cells B1, B2, B3, B4 from resource_name.csv and the values for the `y` coordinates would come from cells C1, C2, C3, C4 from resource_name.csv . Alternatively, rather than use a CSV to get out data we can just list the points we want to plot with a command like:
((resource-bargraph:##(1,1)#(2,4)#(3,9)#(4,16)|Quadratic Function))
QR code resources can be displayed on wiki pages. Yioop draws these itself, so nothing needs to be installed or configured for them to work. Such a resource has the format:
((resource-qr:url-to-qr-encode|A description of the qr code))
For example, if Yioop has been appropriately configured below one should see a QR code for https://www.seekquarry.com/
A list of media that have already been associated with a page appears under the Page Resource heading below the textarea. This table allows the user to rename and delete resources as well as insert the same resource at multiple locations within the same document.
The resources section of the edit page can be thought of as similar to a folder in Windows or MacOS. One can have subfolders of the resource folder.
The Places dropdown at the top of the Page Resource section name has the name of the current subfolder of the resource folder one is in, and allows you to navigate up folders to the root resource folder.
The View selection gadget allows you to control whether you want to view the resource items in the current folder as a list, as a grid, or in a detail mode. If you are in detail mode then the currently selected appears in a "details" top panel; whereas, all other items in the folder appear beneath it in a horizontal list. the details item consists of an icon, size, modified date, etc details. One can also configure to have a short text description display under the item. To do this enter edit mode, click on an item and type the description.
The Sort dropdown (up-down arrows) allows you to control the order in which media lists items are presented.
The Filter textfield lets you enter a search string. Clicking Go then shows only those resources which contain that search string in their title.
The Clipboard icon is used to toggle showing the user's clipboard. The clipboard can be used to move items around the folder structure. In edit mode, when a resource item is clicked on, it becomes a text field with three options: Rename, Copy Clipboard, and Cut Clipboard. The latter two can be used to either copy the item to the clipboard folder or to move it there. Once in the clipboard, the user can move to a different folder and paste the item as desired. Alternatively, the user can delete the clipboard's contents.
The Actions dropdown (labelled ...) can be used to create new folders, new text files, and new csv text files within the current page resource folder. These are initially named beginning with untitled followed by some number, and if applicable a file extension. In the dropdown there is also an option to upload a file to the current resource folder.
The Name, Size, Modified header links above the resources list control the sort order for the resource list. If a page is a media list page, then even in read mode, the sort order selected is remembered when drawing the media list.
Resources entries for the resources list consist first of an icon. In edit mode, when clicked on, they become a textfield with a name for the resource, followed by buttons for actions that can be done to that resource (Rename, Add to Page, Clip Cut, Clip Copy). If a resource is editable the icon will look like a plus sign together with a pencil. Clicking on the icon will then let you edit the resource.
For normal text files clicking edit will bring up a textarea with the context of the text to edit. For CSV (comma separated value) files this will present the file as an editable spreadsheet. Yioop spreadsheets can have equation much like Excel spreadsheets. Clicking on a cell lets one edit its contents. For example, if in the cell A3 one entered the equation:
= A1+A2
then clicking out of the cell would cause it to refresh with the value of the sum of the contents of cells A1 and A2. In addition, to the standard arithmetic operators ['*', '/', '+', '-', '%'], the spreadsheet expressions can use float or integer literals, and can make use of the following table of built-in functions:
| Function Name | Description |
|---|---|
| avg(x1,...,xn), avg(x1:xn) | computes average of values of cells listed as arguments |
| ceil(x) | rounds the value of x up to nearest integer |
| cell(i,j) | returns the contents of the cell with column name of letter j, and row name i. For example, cell(2,'B') would return the contents of cell B2. |
| col(value, search_row, start_col, end_col) | searches the row search_row between the columns start_col, end_col for value. Returns the column name where this value was found or -1 if not found. For example, col(3, 2, "B", "D") might return C if the cell C2 had value 3. |
| exp(x) | computes `e^x` |
| floor(x) | rounds the value of x down to the nearest integer |
| log(x) | computes `log x` |
| min(x1,...,xn), min(x1:xn) | computes minimum value of cells listed as arguments |
| max(x1,...,xn), max(x1:xn) | computes maximum value of cells listed as arguments |
| pow(x,y) | computes `x^y` |
| row(value, search_col, start_row, end_row) | searches the column search_col between the rows start_row, end_row for value. Returns the row name where this value was found or -1 if not found. For example, row(3, "C", "1", "5") might return 2 if the cell C2 had value 3. |
| sqrt(x) | computes `sqrt(x)` |
| sum(x1,...,xn), sum(x1:xn) | computes sum of values of cells listed as arguments |
| username() | returns username of the person using this CSV file |
How HTML, PDF, EPub resources included on a page render depends on how the Yioop wiki software has been configured. If no special configuration has been done, then HTML and PDF documents will bbe rendered in an <iframe> tag within the current wiki page. In the EPub, case a link to download the resource will be given. If the wiki software detects the presence of the file APP_DIR/scripts/epubjs-reader (epubjs-reader), the wiki system will render the resource in a Javascript viewer and will do things like remember reading position.
Not all browsers support the same video and audio formats for playback. For this reason it sometimes is useful to have multiple video resources for the same video. For example, you might have a .ogv and .vp8 version of the same video recording. In read (non-edit) mode, the Yioop wiki system displays only one link for video or audio files that have the same name except for extension. It then includes the grouped file as separated <source> tags within either the <video> or <audio> html tag used to render the item in the browser. In this way, you can make your media take best advantages to whatever capabilities your client's browser has. If you don't feel like recoding your media in such a fancy way, a safe rule of thumb is that .mp3 audio will playback in all modern browser, and that .mp4 video will playback in all modern browser.
For video it is sometimes useful to add a subtitle or caption track. Yioop wiki supports WebVTT format subtitles and captions. To see how Yioop wiki makes use of these files, suppose you included a resource foo.mp4 in your wiki pages, and you also had a file named foo-captions-en-US.vtt then when the HTML page is generated from your wiki page, a <track> tag for the caption file would be added to the <video> tag. A user seeing this page would then see in the video player a closed caption symbol and be able to turn on/off (defaults off) the English captions. If you wanted named the file foo-subtitles-en-US.vtt instead, then Yioop wiki would include it as a subtitles track (defaults on). You can add captions/subtitle files for as many languages as desired.
When viewing the page resources for a page in edit mode, one can see one file/resource and no grouping of resources by name is done. In this way you can keep track of exactly what resources are available for a page.
A category is a name you file a page under. Filing a page under one or more categories lets readers find everything a group has written on a subject, and lets a front page collect those pages into a list.
Put a category tag anywhere in a page:
{{category|national}}
The tag shows nothing to a reader. It only says what the page is about. A page may carry as many as you like, one per category:
{{category|national}}
{{category|sports}}
On a news article you do not type these by hand. The article's editing screen has a Page Categories control: pick a name from the list and press the plus button, and the tag is written into the page for you. The tags are kept out of the writing area so they do not sit among your sentences.
Every category has a page of its own, at the group's page list with the category's name after it:
http://www.example.com/group/5/pages/national
That page lists the articles filed under national, newest first, each with its picture, its title and its abstract. It carries the same search box and order chooser the whole page list carries, so a category holding many articles can be searched.
Whether a stranger may read it is a group setting. Under a group's settings, Public Page List offers three choices:
To put a category's articles on a page, use a category list:
{{category-list|national|classes=my-class}}
The settings after the name are written name=value, separated by bars, and may be given in any order:
A category may name the group it belongs to, written the way a page in another group is written, with an at sign between:
{{category-list|newsroom@national|num=5}}
This lists what the group called newsroom files under national, from a page in any group. A name with no group before it means a category of the group the page is in.
Wherever a front page asks you to fill in a category, the same form works: type newsroom@national instead of national.
A place on a front page may be set to hold the list of a group's categories. Each name is a link to that category's page. In a page's own words this is written:
{{category-names|my-class}}
In edit mode for a wiki page, next to the page name, is a ⚙ link which can be used to toggle settings controls. Clicking this link expands a form which can be used to control global settings for a wiki page. This form contains a drop down for the page type, another drop down for the type of border for the page in non-logged in mode, a dropdown that let's you select from the available CSS themes for wiki pages on the site (new themes can be created by Admin users with access to the Appearance Activity), a checkbox for whether a table of contents should be auto-generated from level 2 and level three headings and then text fields or areas for the page title, author, meta robots, and meta page description. This is followed by a text area where you can set other meta properties of a page such as open graph properties using the format: name_of_property|content_of_property. This maps to a meta tag in the head of the HTML generated for your wiki
<meta name="name_of_property" content="content_of_property" />
Beneath the meta properties textarea, there is a dropdown
one can specify another wiki page to be used as a header for this
page and also specify another wiki page to be used as a footer for this page.
The contents of the page title is displayed in the browser title when the wiki page is accessed with the Activity Panel collapsed or when not logged in. Similarly, in the collapsed or not logged in mode, if one looks as the HTML page source for the page, in the head of document, <meta> tags for author, robots, and description are set according to these fields. These fields can be useful for search engine optimization. The robots meta tag can be used to control how search engine robots index the page. Wikipedia has more information on Meta Elements.
The Standard page type treats the page as a usual wiki page.
Page Alias type redirects the current page to another page name. This can be used to handle things like different names for the same topic or to do localization of pages. For example, if you switch the locale from English to French and you were on the wiki page dental_floss when you switch to French the article dental_floss might redirect to the page dentrifice.
Media List type means that the page, when read, should display just the resources in the page as a list of thumbnails and links. These links for the resources go to a separate pages used to display these resources. This kind of page is useful for a gallery of images or a collection of audio or video files. For videos, thumbnails will appear as animated gifs, provided the FFMPEG constant has been defined in the system's src/configs/LocalConfig.php and it is set to the path of an executable of ffmpeg.
Presentation type is for a wiki page whose purpose is a slide presentation. In this mode, .... on a line by itself is used to separate one slide. If presentation type is a selected a new slide icon appears in the wiki edit bar allowing one to easily add new slides. When the Activity panel is not collapsed and you are reading a presentation, it just displays as a single page with all slides visible. Collapsing the Activity panel presents the slides as a typical slide presentation using the Javascript program: Frise
The Share Wall page type allows you to make a page with a public textarea where people can copy and paste text snippets for others to see. Above this text area is a formatted version of the text with line numbers.
The URL Shortener page type allows you to do a page alias to an external website rather than to a Yioop wiki page. The edit mode for this page lets you see a graphs of how frequently people are following your link.
Page types of the form template: . some_names these are template pages. Templates consists of simple web form used to create a wiki page of a given type. For example, a genealogy template might have fields to fill in information about a new person one wished to add to a collection of genealogy wiki pages. We describe how new templates (rather than pages built using an existing template) can be created in the next section.
Template pages are wiki pages used to create other wiki pages. Any wiki page whose name begins with template: is a template page. All standard wiki page Syntax can be used on a template page. In addition, the following two notations have meaning:
{{text|name_of_text_field|placeholder_text_for_textfield}}
and
{{area|name_of_textarea|placeholder_text_for_textarea}}
which we describe below. To use a template wiki page, a user can create a new wiki page with the name they desire. The user then selects settings for the pages, and chooses the template from the list of page types and clicks save. This will show the template page parsed to look like a web page. The {{text| notations will show as textfields, and the {{area| notations will be replaced with textareas. The user can then fill in these fields with the desired values for their new page, and click save. If this wiki page is now viewed in read rather than edit mode, one will see the template page, but where rather than see text fields and text areas, they will see the filled in values instead.
Template Page forms are designed to facilitate the creation of new wiki pages, not collect information from people in a group or the web. To do the latter one can use Wiki form syntaxes. These can be used on any wiki page. Below is a list of syntaxes and the form fields they correspond to (for single expression syntaxes):
{{textfield|label for text field | name of textfield}}
{{textfield|label for text field | name of textfield | maximum number of characters}}
{{textarea|label for text area | name of text area}}
{{checkbox|label for check box | name of checkbox with box to the right of label}}
{{lcheckbox|label for check box | name of checkbox with box to the left of label}}
{{radio|label for radio button | name of radio button with button to the right of label}}
{{lradio|label for radio button | name of radio button with button to the left of label}}
{{submit|value/text appearing on button|name of submit button}}
{{keyword-captcha|label for keyword captcha| keyword that must be used for form to be submitted}}
{{require-signin|text to be displayed for whole wiki page if user is not signed in}}
If the require-signin element is on a page and the user is signed-in, then this element shows
the wiki page excluding this element.
{{username|name of hidden form field to store user's username in}}
{{date|name of form field to store date form sent to end user to fill out}}
{{timestamp|name of form field to store Unix timestamp of when form sent to end user to fill out}}
{{presubmit|text you would like only to appear on the page before the form has been submitted}}
{{onsubmit|text you would like only to appear on the page after the form has been submitted}}
In addition to these single expression form field syntaxes, Yioop has a couple of compound syntaxes which are used for dropdowns:
{{dropdown|name of dropdown}}
{{option|text_of_option_1|form_value_of_option_1}}
{{option|text_of_option_2|form_value_of_option_2}}
...
{{end-dropdown}}
or alternatively,
{{data-block|id_of_data_block}}
{{option|text_of_option_1|form_value_of_option_1}}
{{option|text_of_option_2|form_value_of_option_2}}
...
{{end-data-block}}
{{dropdown|name of dropdown|id_of_data_block}}
{{end-dropdown}}
{{alias-def|name|what it abbreviates}} (can shorten to {{a-def|...}} )
{{alias|name}} this inserts a previously defined alias of
the given name (can shorten to {{a|...}} )
{{request-check|field_name|is_contained_list|if_in_value|if_not_in_value}}
checks if POSTED variable field_name is in the comma
separated values is_contained_list. If so replace, the
whole command with if_in_value; otherwise replace it with
if_not_in_value. (Can shorten to {{r-ck|...}})
{{session-check|field_name|is_contained_list|if_in_value|if_not_in_value}}
checks if the session variable $_SESSION[field_name] or
$_SESSION['WIKI_FORM'][field_name]is in the comma
separated values is_contained_list. If so replace, the
whole command with if_in_value; otherwise replace it with
if_not_in_value (can shorten to {{s-ck|...}})
{{session-set|field_name|value}}
this sets the $_SESSION['WIKI_FORM'][field_name] to value.
{{session-unset|field_name}}
this unsets the value of $_SESSION['WIKI_FORM'][field_name].
Here the same data block id could be used for several dropdown allowing one to avoid have to repeat the options.
Here are some important facts about forms:
A secret ballot is a special kind of form that can be used to collect data from users in an encrypted form. The syntax to declare a secret ballot is:
{{secret-ballot|username_of_witness_1|...|username_of_witness_n}}
for example,
{{secret-ballot|alice|bob|sally}}
says the secret ballot is initiated and concluded by alice, bob, and sally. Any secret ballot form needs to have the {{require-signin|...}} tag or it will not display. When an wiki page editor views a wiki page with with a secret ballot form, it will initially display a form requesting the passwords for each of the witnesses. If LDAP authentication is being used it might request both post login usernames and passwords.
If the witnesses fill these in a shared random polynomial is generated and evaluated at a random value to generate a seed used to create public and private encryption keys. The public key and details of the current state of the form are saved along with the random values associated with each witness. The private key is discarded -- it can be reconstructed from the random values and the witness passwords at the conclusion of the poll. If a user then views this form it displays normally, but if it is filled out and submitted, the results are encrypted with the public key before storing. We call each user submission a "vote". Editors when seeing the form also see a link that takes them to a page where the secret-ballot can be concluded. This page when displayed allows the witnesses to enter their passwords. It then decrypts the votes and creates a page showing tallies of the vote values followed by the raw votes where vote receipts rather than usernames are associated with each vote.