AnodyneXtras

We're So Sorry...

Because of the nature of downloading and uploading content with AnodyneXtras, it is not available on mobile devices. If you want to browse, search, and upload, please use a laptop or desktop computer.

You can also check out some of our other sites and services using the links below.


Convert Personal Logs to OOC Discussions MOD

by Jordan

Before I start discussing the mod, I'd like to preface this with the philosophy that led to this decision. My greatest criticism of Nova is that there's really no place for an OOC community to develop within the software, leading to many Nova sites developing a hodge-podge network of IMs, chatrooms and (sometimes and for extra brownie points) forums or mailing lists. It gets difficult to juggle all this, and participation is sporadic.

So, to that end (and inspired by the USS Daedalus site at daetrek.com), here is a mod for converting the Personal Logs section into an OOC discussion area. My suggestion for those also needing a place for personal logs is to create a Personal Logs mission or simply encourage users to write them as a Mission Post.

Optional prerequisite: Email All Comments mod: http://xtras.anodyne-productions.com/item/phweeb/email-all-comments

This mod will:
-Edit the Personal Logs section and associated language to OOC Discussions
-Require a login to access the OOC Discussions area.

It may require re-applying edits to files after a Nova update.

First: Go to Message & Titles in your Nova control panel and add a new message with the message key set to 'ooc_header' (without the quotes). Define the rest as you would like.

Second: (OPTIONAL) Go to Menu Items and modify the Personal Logs and Write Personal Log entries to "OOC Discussions" and require login for the Personal Logs entry.

Then:

If installing on a clean version of Nova, simply upload the application directory to your Nova root folder (it should have an application and nova directories inside) and overrite any files it asks.

If installing on a modified version of Nova, do the following:

Upload application/views/_base_override/main/pages/sim_listlogs.php to that location in your Nova install.

---------LANGUAGE----------------- Edit application/language/app_lang.php:

Add to the end:

$lang['global_personallog']     = 'OOC discussion';
$lang['global_personallogs']     = 'OOC discussions';
$lang['flash_personallogs_no_author'] = 'You must specify your main character as the author of your OOC Discussion. Please try again.';
$lang['confirm_post_personallog'] = 'Are you sure you want to post this OOC discussion?';
$lang['confirm_delete_personallog'] = 'Are you sure you want to delete this OOC discussion? This action is permanent and cannot be undone!';
$lang['email_subject_log_comment_added']     = 'New Comment Added to OOC discussion';
$lang['email_subject_personal_log']         = 'OOC Discussion';
$lang['email_subject_log_pending']             = 'Pending OOC discussion';
$lang['email_content_log_comment_added'] = "A new comment has been added to your OOC discussion %s. The content of the comment is below.

%s";
$lang['email_content_personal_log'] = "The following is an OOC discussion from %s.

%s";

------CONTROLLER-----------------

Edit application/controller/sim.php

Find:

/**
* Put your own methods below this...
*/

Add after:

public function listlogs($offset = 0)
{
    // load the resources
    $this->load->library('pagination');
    $this->load->model('personallogs_model', 'logs');

    // define the data variable
    $data = false;

    // sanity check
    $offset = (is_numeric($offset)) ? $offset : 0;

    // set the pagination config
    $config['base_url'] = site_url('sim/listlogs');
    $config['total_rows'] = $this->logs->count_all_logs();
    $config['per_page'] = $this->options['list_logs_num'];
    $config['full_tag_open'] = '';
    $config['full_tag_close'] = '';

    // initialize the pagination library
    $this->pagination->initialize($config);

    // create the page links
    $data['pagination'] = $this->pagination->create_links('logs');

    // run the method
    $logs = $this->logs->get_log_list($config['per_page'], $offset);

    if ($logs->num_rows() > 0)
    {
        $datestring = $this->options['date_format'];

        foreach ($logs->result() as $log)
        {
            $date = gmt_to_local($log->log_date, $this->timezone, $this->dst);

            $data['logs'][$log->log_id]['id'] = $log->log_id;
            $data['logs'][$log->log_id]['title'] = $log->log_title;
            $data['logs'][$log->log_id]['author'] = $this->char->get_character_name($log->log_author_character, true, false, true);
            $data['logs'][$log->log_id]['date'] = mdate($datestring, $date);
        }
    }

    $data['header'] = ucwords(lang('global_personallogs'));

    if ($config['total_rows'] < $this->options['list_logs_num'])
    {
        $data['display'] = sprintf(
            lang('text_display_x_of_y'),
            $config['total_rows'],
            $config['total_rows'],
            lang('global_personallogs')
        );
    }
    else
    {
        $data['display'] = sprintf(
            lang('text_display_x_of_y'),
            $this->options['list_logs_num'],
            $config['total_rows'],
            lang('global_personallogs')
        );
    }

    $data['label'] = array(
        'author' => ucfirst(lang('labels_author')),
        'nologs' => sprintf(lang('error_not_found'), lang('global_personallogs')),
        'nologin' => lang('error_login_1'),
        'on' => lang('labels_on'),
        'title' => ucfirst(lang('labels_title')),
    );

    $data['msg_ooc_header'] = $this->msgs->get_message('ooc_header');

    $this->_regions['content'] = Location::view('sim_listlogs', $this->skin, 'main', $data);
    $this->_regions['javascript'] = Location::js('sim_listlogs_js', $this->skin, 'main');
    $this->_regions['title'].= $data['header'];

    Template::assign($this->_regions);

    Template::render();
}

Edit and upload these files to their respective positions, then the mod should be installed.

1.0 - 11/27/15
-First version

In order to download Xtras, you must have an AnodyneID. You can log in or register your AnodyneID.

Details

Author
Jordan
Downloads
25
Rating
5.0
Added
27 November 2015
Last Updated
09 December 2015