Admin: Mirror Patterns

Mirror Patterns

EDIT
DELETE

 

Mirror Pattern Name  (display)
EDIT
DELETE

 

Mirror Pattern Name  (display)
EDIT
DELETE

 

Mirror Pattern Name  (display)
EDIT
DELETE

 

Mirror Pattern Name  (display)

Edit Mirror Pattern

SELECT
 
Mirror Pattern Name  (text)

 

mirror-0 (radio)

enable (checkbox)

mirror associated server or virtual server

branch

(radio)

Filex

Filex (select)
Set for ALL
°
mirror-1
Repository ID or Virtual ID  (select)

WP media

Filex (select)
mirror-2
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
mirror-3
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
mirror-4
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-5
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-6
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-7
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-8
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-9
Repository ID or Virtual ID  (select)
WP media
Filex (select)

Virtual Pattern

(select)

 This Virtual Pattern will resolve any Virtual ID references in the above associations.  The default is NetCurrent, which is the current configuration of the Virtuals on the MutiSite Network Admin page; normally this will be left at that setting.  Note that like other Virtual Patterns, NetCurrent is dynamic; any changes made to any Virtual Pattern by the MultiSite Network Administrator will be immediately reflected in the behavior of My Mirrors.
SAVE

Notes:

Admin: Mirrors

Mirror Patterns

SELECT
 
Mirror Patterns  (select)

Mirror Associations

mirror-0 (radio)

enable (checkbox)

mirror associated server or virtual server

branch

(radio)

Filex

Filex (select)
Set for ALL
°
mirror-1
Repository ID or Virtual ID  (select)

WP media

Filex (select)
mirror-2
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
mirror-3
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
mirror-4
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-5
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-6
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-7
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-8
Repository ID or Virtual ID  (select)
WP media
Filex (select)
°
 
mirror-9
Repository ID or Virtual ID  (select)
WP media
Filex (select)
SAVE

Notes:

Versions and Features

Upgrade to new introductions are free in in the first 90 days to registered users only.

My Mirrors Features

My Mirrors Standard

My Mirrors Plus

 

My Mirrors Premium

My Mirrors Ultra

Embed Shortcodes
Link Shortcodes
Mirror Shortcodes
Mutable Shortcodes
Auto Shortcodes
Composite Shortcodes
Template Shortcodes
Template Shortcode Editor

TinyMCE Insert Shortcode Button ? ?
Invisible WP Branches


Simple WP Branches



Alternate Branches



Concatenated Branches
Alternate Filenames (aliases) ?

Filename Alias Lists ?
Embed Framework
Embed Template
WordPress Templates
Central Control: Blog
Central Control: Multisite

Central Control: Selectable

Central Control: User­Option


Central Control: Remote

Central Control: Synchronized

Basic Schema

Shortcodes

In the blog itself, in the text shortcodes are inserted.  These shortcodes may be –

  • Define Shortcode – creates a new Alias, the alternative filename of a resource.
  • Embed Shortcode – embeds the image or video in the blog, or else shows an error message if unavailable.
  • Link Shortcode – shows a link to the image or video.  If the resource is unavailable, the link will respond in the usual way for a broken link.
  • ProForma Shortcode – is a Link Shortcode with preformatted text, requiring only the Resource ID and Mirror ID as parameters.
  • Mutable Shortcode – acts like an Embed Shortcode if its Mirror ID resolves to the same Server Site as [mirror-0]; acts like a Link Shortcode otherwise.
  • Auto Shortcode – is simultaneously a ProForma Shortcode and a Mutable Shortcode.
  • Composite Shortcodes – contain two or more shortcodes, sharing parameters, so that with one shortcode an author can embed an image or video with all of its mirrors in  a consistent pattern using a single shortcode.
  • Template Shortcodes – a Template Shortcode is a Composite Shortcode which has been partially instantiated by a Mirror Pattern.  It can be fully instantiated in a page or post with a Resource ID.

 

Filex

A Filex associates a Filex Name [filex-name] with a Regular Expression [filex­exp]  (PHP 7.0 PCRE REGEX).  A Filex is  used to dynamically extract a part of a fully qualified resource URL for use as a Resource Name, Resource ID, or Branch.

When specifying the relationships between the WordPress usage of a file (for example, a link or embed) and the mirror servers, rather than naming each individual file, a Filex is named which will convert each actual file request Nominal URL into a Resource Name, Resource ID or Branch for use in supplying the resource.

Nominal URL

A Nominal URL is the fully qualified URL of a local or external resource which is specified in the shortcode etc. instantiation.  While it is preferable that the Nominal URL point to an actual resource, this is not absolutely necessary.

Mirror IDs

The Mirror ID is always of the form [mirror-#] , where “#” is a digit 0 - 9.

[mirror-0] is a special case; whereas normally no two Mirror IDs resolve to the same Server Site, [mirror-0] always resolves to one of the other Server Sites.  Thus [mirror-0] is used to indicate the mirror which is favored, typically, the mirror that is shown as an embed rather than as a link.

Mirrors 1 - 9 are either considered to be of equal priority, or they are considered to be ranked with [mirror-1] being the highest priority, and [mirror-9] being the least favored mirror.

Virtual IDs

A Virtual ID (if Virtual IDs are employed) defaults to the form [virtual-&] , where “&” is an uppercase letter A - J, skipping the letter “I“.   Virtual IDs may be redefined to use any system of alphanumeric names as appropriate to the installation.

In a default installation, both [mirror-0] and [mirror-1] point to [virtual-A].  Likewise, [mirror-2] defaults to [virtual-B], etc.

Repository IDs

A Repository ID defaults to the form [1st-choice], [2nd-choice], [3rd-choice], etc.. Repository IDs should be redefined by the administrator to use a system of alphanumeric names appropriate to the installation.

The special Repository ID  [0-media] is defined to be the WordPress Media folder structure for this blog.

In a default single blog installation, both [mirror-0] and [mirror-1] point to [1st-choice].  Likewise,[mirror-2] defaults to [2nd-choice], etc.

In a default multisite installation, [virtual-A] points to [1st-choice].  Likewise, and [virtual-B] defaults to [2nd-choice], etc.

In the Central Control structure, the Repository IDs are associated in a database table with the actual Server Site URLs.

Mirror Patterns

A Mirror Pattern is a table of correspondences linking Mirror_IDs with Repository IDs and/or Virtual IDs. Mirror Patterns may be defined in the Blog Admin, The Network Admin, or the Central Control.  A Mirror Pattern defines a particular construct of mirrors which will be used in many pages or posts, with many different resources mirrored in the same set of servers.  Mirror Patterns are used (along with Resource IDs) to instantiate Composite Shortcodes in pages and blogs.

Embed Frameworks, Templates, and Code

  • Embed Framework – implements the full functionality of a Composite Shortcode into a form which can be embedded manually in a Page Template or Post Template within a WordPress Theme or, preferably, WordPress Child Theme.
  • Embed Template – similar to a Template Shortcode, an Embed Template is an Embed Framework form which has been partially instantiated by a Mirror Pattern.  It’s output can be embedded manually in a Page Template or Post Template within a WordPress Theme or, preferably, WordPress Child Theme. A Page or Post created from such a template is fully instantiated in the page or post with a Resource ID.
    • Note: No facility is provided in the Admin Page interface to specify the Resource ID for the creation of singleton fully instantiated Embed Code.
  • Embed Code – is the output form of an Embed Framework or Embed Template, which can be embedded manually in a Page Template or Post Template within a WordPress Theme or, preferably, WordPress Child Theme.

WordPress Templates

The higher level versions of My Mirrors facilitate the creation of WordPress Page Templates and WordPress Post Templates using the Admin Page interface.  Pages and Posts created using these templates are composed of an Edit Area and a Preformatted Area; the order of these is specified in the Admin Page interface.  The Preformatted Area is composed entirely of Embed Code, (optional) template specified boilerplate text and titles, and (optionally) Custom Fields.

Not all themes are compatible with My Mirrors WordPress Template creation; compatibility is dependent on the themes conformance to the standard WordPress themes, most notably, the reference theme Twenty-Fifteen.  My Mirrors WordPress Templates can only be created in a previously created Child Theme which has not customized the files page.php, post.php, content-page.php and content-post.php; these will be copied by My Mirrors from the Parent Theme to the Child Theme and modified, thus modifying the Child Theme.

 

 

 

Why Multiple Redirection?

Multiple redirection is utilized to separate the various levels of abstraction in the schema of associating resources with blog embeds and links.

At the lowest level, an author writing a blog entry with an embedded video will simply add the shortcodes for [mirror-1], [mirror-2], etc., without needing to know anything about how the mirrors are configured.  Typically this will be done with Composite Shortcodes.

At the next level, the blog administrator (or the network administrator acting for the blog administrator) will set the  [mirror-1], [mirror-2], etc. to point to the appropriate resources by Repository ID, whether knowing or not knowing the current actual servers.

If/when a change in servers or other configuration change is made, no posts or pages need be changed; the shortcodes and IDs make the change automatically and transparently.

For example, a multisite operator may designate four mirror servers, giving them Virtual IDs of [video-server], [fast-server], [bulk-server], and [local-server].  The owner of a blog on the multisite may chose to mirror only on [video-server], and [bulk-server], independent of their actual location.  Meanwhile, the multisite operator can change the hosting of [bulk-server] (cloning the file structure, of course) transparently to the individual blog owners.

Terminology

Note: – The string [inside-the-brackets] is the meta-key in the WordPress database etc..

 

  • Server Site – [server-site] – The actual location of the files being embedded and/or linked.   The Server Site might or might not be a Posts Blog or a Posts Multisite.
  • Repository Site – [repo-site] – The virtual location of the files being embedded and/or linked.   The Repository Site is linked to a Server Site by a changeable link in the Central Control.
  • Mirror Site – [mirror-site] – The Repository Site (and hence the Server Site) as seen from the Posts Blog .   The Mirror Site is linked to a Repository Site (or a Virtual Site) by a changeable link at the Posts Blog settings.
  • Virtual Site – [virtual-site] – The Repository Site (and hence the Server Site) as seen from a Posts Multisite.   When this is enabled, a Mirror Site is linked to a Virtual Site (rather than a Repository Site) by a changeable link at the Posts Blog; the Virtual Site further redirects to the Repository Site by a changeable link in the multisite Network Admin settings.
  • Resource Name – [resource-name] – The name by which the resource is provided by the Server Site. Usually this is a filename with extension.
  • Resource ID – [resource-id] – The name by which the resource is known at a Posts Blog. Frequently this is a filename without extension.
  • Filex – [filex-name], [filex-exp] – A named Regular Expression (PHP 7.0 PCRE REGEX) used to dynamically extract a part of a fully qualified resource URL for use as a Resource Name, Resource ID, or Branch.
  • Nominal URL – The fully qualified URL of a local or external resource which is specified in the shortcode etc. instantiation. 
  • Primary Branch – [primary-br] – A partial  URL, an internal string of a URL, used with the Server Site URL and the Resource Name to make  a full Resource URL.  If the use of Primary Branch is enabled at both the Server Site and the Mirror Site (as seen from the Posts Blog ), the Primary Branch will be identical in both places.
  • Secondary Branch – [secondary-br] – A partial  URL, an internal string of a URL, used with the Server Site URL and the Resource Name to make  a full Resource URL.  If the use of Secondary Branch is enabled at both the Server Site and the Mirror Site (as seen from the Posts Blog ), the Secondary Branch will be identical in both places.
  • Tertiary Branch – [tertiary-br] – A partial  URL, an internal string of a URL, used with the Server Site URL and the Resource Name to make  a full Resource URL.  If the use of Tertiary Branch is enabled at both the Server Site and the Mirror Site (as seen from the Posts Blog ), the Tertiary Branch will be identical in both places.
  • Resource URL – [resource-url] – The full URL of a resource at a Server Site.  If all options are enabled, it is composed of <server-site> /  <primary-br> / <secondary-br> / <tertiary-br> / <resource-name>
  • Central Control  – The structure by which control of all mirrors effected. In a simple single Posts Blog system (non-multisite), this is simply in the local Options table of the WordPress database.  In a multisite system, this will be in the Site Options table of the multisite WordPress database. In a multiple multisite (or multiple single site) configuration, these local tables are updated from a central resource by chron jobs.
  •  
Black Bayou Software of Louisiana