<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# ----------------------------------------------------------------------------
# This software is Copyright (C) 2007, All Rights Reserved
# ----------------------------------------------------------------------------
# This program is protected by local and international copyright laws. Any
# use of this program is subject to the the terms of the license agreement
# included as part of this distribution archive. Any other uses are strictly
# prohibited without the written permission of the Vendor and all
# other rights are reserved.
# -----------------------------------------------------------------------------
# Warning : Modifying this program violates your license agreement!
# -----------------------------------------------------------------------------

package IT::ArtMan::Init;

  # load modules
  use strict;

#  use IT::Globals;

# ----------------------------------------------------------------------------
# Function    : appInit
# Description :
# Usage       : &amp;IT::ArtMan::Init::appInit();
# ----------------------------------------------------------------------------

sub appInit {

  &amp;_addProgramSpecificAdminFields();
  &amp;_addProgramSpecificFieldTypes()

}

# ------------------------------------------------------------------------------
# Function    : _addProgramSpecificAdminFields
# Description : Add fields to admin/settings menu.
# Usage       : &amp;_addProgramSpecificAdminFields()
# ------------------------------------------------------------------------------

sub _addProgramSpecificAdminFields {

  # EXAMPLE
# &amp;IT::App::Menu::Admin::addField($name, $label, $validationRules);
# &amp;IT::App::Menu::Admin::updateField($name);
# &amp;IT::App::Menu::Admin::removeField($name);

  ### Note: labels are used for error messages ONLY and not required if there's no validation rules

  ### General
  &amp;IT::App::Menu::Admin::addField('maxCategoryDepth',             'Max Category Depth',        'positiveInt minNumber(1)');

  ### Server
  &amp;IT::App::Menu::Admin::addField('searchUrl',                    'Search Url',                'notBlank');
  &amp;IT::App::Menu::Admin::addField('publishFileExtension',         'Publish File Extension',    'notBlank');

  ### Hidden/Misc

}

# ------------------------------------------------------------------------------
# Function    : _addProgramSpecificFieldTypes
# Description : Add fields types to database/field editor
# Usage       : &amp;_addProgramSpecificFieldTypes()
# ------------------------------------------------------------------------------

sub _addProgramSpecificFieldTypes {

  # EXAMPLE
  #&amp;IT::App::Menu::addCustomFieldType({
  #  'name'                          =&gt; 'accountManagerCategoryRights',
  #  'label'                         =&gt; 'Account Manager &gt; Category Rights',
  #  'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::Accounts::CategoryRights::createFieldHtml(@_); },
  #  'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::Accounts::CategoryRights::getRecordFieldFromFormInput(@_); },
  #  'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::Accounts::CategoryRights::getPlaceholderFromRecordField(@_); },
  #  'inputErrorChecking'            =&gt; sub { &amp;IT::ArtMan::CustomFields::Accounts::CategoryRights::inputErrorChecking(@_); },
  #});

  &amp;IT::App::Menu::addCustomFieldType({
    'name'                          =&gt; 'articleEditorPrimaryCategory',
    'label'                         =&gt; 'Article Editor : Primary Category',
    'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::PrimaryCategory::createFieldHtml(@_); },
    'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::PrimaryCategory::getRecordFieldFromFormInput(@_); },
    'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::PrimaryCategory::getPlaceholderFromRecordField(@_); },
    'errorCheckingForUserInput'     =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::PrimaryCategory::errorCheckingForUserInput(@_); },
    'errorCheckingForFieldEditor'   =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::PrimaryCategory::errorCheckingForFieldEditor(@_); },
  });

  &amp;IT::App::Menu::addCustomFieldType({
    'name'                          =&gt; 'articleEditorSecondaryCategory',
    'label'                         =&gt; 'Article Editor : Secondary Category',
    'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::SecondaryCategory::createFieldHtml(@_); },
    'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::SecondaryCategory::getRecordFieldFromFormInput(@_); },
    'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::SecondaryCategory::getPlaceholderFromRecordField(@_); },
    'errorCheckingForUserInput'     =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::SecondaryCategory::errorCheckingForUserInput(@_); },
    'errorCheckingForFieldEditor'   =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::SecondaryCategory::errorCheckingForFieldEditor(@_); },
  });

  &amp;IT::App::Menu::addCustomFieldType({
    'name'                          =&gt; 'articleEditorArticleStatus',
    'label'                         =&gt; 'Article Editor : Article Status',
    'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::ArticleStatus::createFieldHtml(@_); },
    'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::ArticleStatus::getRecordFieldFromFormInput(@_); },
    'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::ArticleStatus::getPlaceholderFromRecordField(@_); },
    'errorCheckingForUserInput'     =&gt; sub { &amp;IT::ArtMan::CustomFields::ArticleEditor::ArticleStatus::errorCheckingForUserInput(@_); },
    'validDatabaseFieldTypes'       =&gt; ['string'],
  });

  &amp;IT::App::Menu::addCustomFieldType({
    'name'                          =&gt; 'categoryManagerParentCategoryPulldown',
    'label'                         =&gt; 'Category Manager : Parent Category',
    'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::CategoryManager::ParentCategory::createFieldHtml(@_); },
    'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::CategoryManager::ParentCategory::getRecordFieldFromFormInput(@_); },
    'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::CategoryManager::ParentCategory::getPlaceholderFromRecordField(@_); },
    'errorCheckingForUserInput'     =&gt; sub { &amp;IT::ArtMan::CustomFields::CategoryManager::ParentCategory::errorCheckingForUserInput(@_); },
    'validDatabaseFieldTypes'       =&gt; ['int'],
  });

  &amp;IT::App::Menu::addCustomFieldType({
    'name'                          =&gt; 'accountManagerCategoryRights',
    'label'                         =&gt; 'Account Manager : Category Rights',
    'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::AccountManager::CategoryRights::createFieldHtml(@_); },
    'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::AccountManager::CategoryRights::getRecordFieldFromFormInput(@_); },
    'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::AccountManager::CategoryRights::getPlaceholderFromRecordField(@_); },
    'errorCheckingForUserInput'     =&gt; sub { &amp;IT::ArtMan::CustomFields::AccountManager::CategoryRights::errorCheckingForUserInput(@_); },
    'validDatabaseFieldTypes'       =&gt; ['string', 'memo'],
  });

  &amp;IT::App::Menu::addCustomFieldType({
    'name'                          =&gt; 'pubilshRulesCategoryFilter',
    'label'                         =&gt; 'Admin : Publishing : Category Filter',
    'createFieldHtml'               =&gt; sub { &amp;IT::ArtMan::CustomFields::Admin::PublishRules::SelectedCategories::createFieldHtml(@_); },
    'getRecordFieldFromFormInput'   =&gt; sub { &amp;IT::ArtMan::CustomFields::Admin::PublishRules::SelectedCategories::getRecordFieldFromFormInput(@_); },
    'getPlaceholderFromRecordField' =&gt; sub { &amp;IT::ArtMan::CustomFields::Admin::PublishRules::SelectedCategories::getPlaceholderFromRecordField(@_); },
    'errorCheckingForUserInput'     =&gt; sub { &amp;IT::ArtMan::CustomFields::Admin::PublishRules::SelectedCategories::errorCheckingForUserInput(@_); },
    'validDatabaseFieldTypes'       =&gt; ['string','memo'],
  });

}

# ----------------------------------------------------------------------------
# end of file
1;

</pre></body></html>