Light
Back
  1. Chronological Mission Posts (eBook-ready)

Tags

Extension
Nova 2

Chronological Mission Posts (eBook-ready)

Version

Reviews

0.0 out of 5 stars

NOTE: Because of formatting issues on the Xtras site, this README may be better viewed at: https://github.com/jonmatterson/nova-ext-chronological_mission_posts

This extension provides a standardized mechanism for tracking the day and time of a post within a mission and a way of reading the entire mission in an eBook-style format ordered in chronological order based on the mission day and time of posts.

Requirements

This extension requires:

This extension recommends:

Without parser events, the post notification emails will not include the new timeline field.

Installation

Copy the entire directory into applications/extensions/chronological_mission_posts.

Run the following command in your MySQL database:

ALTER TABLE nova_posts ADD COLUMN post_chronological_mission_post_day INTEGER NOT NULL DEFAULT 1;
ALTER TABLE nova_posts ADD COLUMN post_chronological_mission_post_time VARCHAR(4) NOT NULL DEFAULT '0000';
CREATE INDEX post_chronological_mission_post ON nova_posts (post_chronological_mission_post_day, post_chronological_mission_post_time);

Add the following to application/config/extensions.php:

$config['extensions']['enabled'][] = 'jquery';
$config['extensions']['enabled'][] = 'timepicker';
$config['extensions']['enabled'][] = 'chronological_mission_posts';

If you are already including jquery and/or timepicker in your extension config, you do not need to include them twice. Instead, simply ensure they are loaded before the chronological_mission_posts extension.

Usage

This extension does the following:

  • Replaces Timeline field in mission post creation with Mission Day and Time fields, where mission day should be an integer representing how many days into the mission is, and the time should be a value of the format 0000 through 2359. It uses the Timepicker extension to help post writers specify the mission time.
  • Replaces the Timeline display in mission post viewing with a standard display of the mission day and time.
  • Provides an eBook-style view for reading mission posts in chronological order. This can be accessed from a Read Story button when looking at the mission.

Configuration

This extension supports several configuration options. To configure this extension, open application/config/extensions.php and add the following to the bottom of the file:

$config['extensions']['chronological_mission_posts'] = [];

Below that line, you can then specify additional options as described in the rest of this section.

If you would like to change the order of your old posts (from before this mod was installed), while the default is by post time, you could for example order them by their timeline field if you formerly used Jonathan's Sort by Timeline mod:

$config['extensions']['chronological_mission_posts']['post_order_column_fallback'] = 'post_timeline';

If you would like to configure the timepicker, add the following:

$config['extensions']['chronological_mission_posts']['timepicker_options'] = [
   // your options...
];

The timepicker options can be found at the timepicker plugin website here: https://timepicker.co/options/

For example, if you want to change the timepicker interval to be every 10 minutes instead of ever 30:

$config['extensions']['chronological_mission_posts']['timepicker_options'] = [
   'interval' => 30
];

One may also set different values for any of the strings and text used in the extension using any of the lines here (the default values are shown for reference):

$config['extensions']['chronological_mission_posts']['label_edit_day'] = 'Mission Day';
$config['extensions']['chronological_mission_posts']['label_edit_time'] = 'Time';
$config['extensions']['chronological_mission_posts']['label_view_prefix'] = 'Mission Day';
$config['extensions']['chronological_mission_posts']['label_view_concat'] = 'at';
$config['extensions']['chronological_mission_posts']['label_view_suffix'] = '';
$config['extensions']['chronological_mission_posts']['label_story_character_list'] = 'Featuring:';
$config['extensions']['chronological_mission_posts']['label_story_location'] = 'Location:';
$config['extensions']['chronological_mission_posts']['label_story_timeline'] = 'On:';
$config['extensions']['chronological_mission_posts']['label_story_back_to_mission'] = 'View Mission Details »';
$config['extensions']['chronological_mission_posts']['label_mission_read_story_link'] = 'Read Story »';
$config['extensions']['chronological_mission_posts']['label_mission_read_story_button'] = 'Read Story';

One can also disable either the Read Story button or link on the mission list page by setting either of those labels to false:

$config['extensions']['chronological_mission_posts']['label_mission_read_story_button'] = false;
$config['extensions']['chronological_mission_posts']['label_mission_read_story_link'] = false;

Finally, to change the style of the Read Story button, one may define styles through their skin for this CSS class:

.chronological_mission_posts--sim_missions--read-story {
    /* your link styles... */
}

.chronological_mission_posts--sim_missions--read-story button {
    /* your button styles... */
}

For example, you could make a dark grey button with the style:

.chronological_mission_posts--sim_missions--read-story button {
    border-color: #999;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
    background: #333;
    background: -moz-linear-gradient(top, #333 0%, #777 50%, #555 51%, #555 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#333), color-stop(50%,#777), color-stop(51%,#778b70), color-stop(100%,#778b70));
    background: -webkit-linear-gradient(top, #333 0%,#777 50%,#555 51%,#555 100%);
    background: -o-linear-gradient(top, #333 0%,#777 50%,#555 51%,#555 100%);
    background: -ms-linear-gradient(top, #333 0%,#777 50%,#555 51%,#555 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#333', endColorstr='#555',GradientType=0 );
    background: linear-gradient(top, #333 0%,#777 50%,#555 51%,#555 100%);
}
JonM

Compatibility

Nova 2.7
This add-on may work with Nova 2.7, but members of the community haven’t confirmed
Nova 2.6
This add-on may work with Nova 2.6, but members of the community haven’t confirmed

Version Info

1.2

Last updated

Release notes

1.2.0

  • Add support for post order fallback config
  • Add timeline data to email

1.1.0

  • Add configuration options for timepicker
  • Add configuration options for text
  • Add documentation for new configuration options
  • Fix bug with sim/listposts

Links

No reviews