<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
return array(
  // Package -------------------------------------------------------------------
  'package' => array(
    'type' => 'module',
    'name' => 'forum',
    'version' => '8.0.0',
    'revision' => '$Revision: 10267 $',
    'path' => 'application/modules/Forum',
    'repository' => 'socialengine.com',
    'title' => 'Forum',
    'description' => 'Forums, the old-school framework for online communities, remain a popular form of interaction. Add forums so members can create and participate in discussions about their interests. A forum board can be hold a wealth of information for your members which increases member interactions.',
    'author' => '<a href="https://socialengine.com/" style="text-decoration:underline;" target="_blank">SocialEngine</a>',
    'thumb' => 'application/modules/Forum/externals/images/thumb.png',
    'dependencies' => array(
      array(
        'type' => 'module',
        'name' => 'core',
        'minVersion' => '8.0.0',
      ),
    ),
    'actions' => array(
      'install',
      'upgrade',
      'refresh',
      'enable',
      'disable',
    ),
    'callback' => array(
      'path' => 'application/modules/Forum/settings/install.php',
      'class' => 'Forum_Installer',
    ),
    'directories' => array(
      'application/modules/Forum',
    ),
    'files' => array(
      'application/languages/en/forum.csv',
    ),
  ),
  // Hooks ---------------------------------------------------------------------
  'hooks' => array(
    array(
      'event' => 'onStatistics',
      'resource' => 'Forum_Plugin_Core'
    ),
    array(
      'event' => 'onUserDeleteAfter',
      'resource' => 'Forum_Plugin_Core'
    ),
    array(
      'event' => 'addActivity',
      'resource' => 'Forum_Plugin_Core'
    ),
    array(
      'event' => 'getActivity',
      'resource' => 'Forum_Plugin_Core',
    ),
  ),
  // Items ---------------------------------------------------------------------
  'items' => array(
    'forum', // Hack, forum_forum should be removed
    'forum_forum',
    'forum_category',
    'forum_container',
    'forum_post',
    'forum_signature',
    'forum_topic',
    'forum_list',
    'forum_list_item'
  ),
  // Routes --------------------------------------------------------------------
  'routes' => array(
    'forum_general' => array(
      'route' => 'forums/*',
      'defaults' => array(
        'module' => 'forum',
        'controller' => 'index',
        'action' => 'index'
      )
    ),
    'forum_forum' => array(
      'route' => 'forums/:forum_id/:slug/:action/*',
      'defaults' => array(
        'module' => 'forum',
        'controller' => 'forum',
        'action' => 'view',
        'slug' => '-',
      ),
      'reqs' => array(
        'action' => '(create|edit|delete|view|topic-create)',
        'slug' => '[\w-]+',
      ),
    ),
    'forum_topic' => array(
      'route' => 'forums/topic/:topic_id/:slug/:action/*',
      'defaults' => array(
        'module' => 'forum',
        'controller' => 'topic',
        'action' => 'view',
        'slug' => '-',
      ),
      'reqs' => array(
        'action' => '(edit|delete|close|rename|move|sticky|view|watch|post-create)',
        'slug' => '[\w-]+',
      ),
    ),
    'forum_post' => array(
      'route' => 'forums/post/:post_id/:action/*',
      //'route' => 'forums/post/:post_id/:slug/:action/*',
      'defaults' => array(
        'module' => 'forum',
        'controller' => 'post',
        'action' => 'view',
        //'slug' => '-',
      ),
      'reqs' => array(
        'action' => '(edit|delete)',
        //'slug' => '[\w-]+',
      ),
    ),
    'forum_photo' => array(
      'route' => 'forum/*',
      'defaults' => array(
        'module' => 'forum',
        'controller' => 'index',
        'action' => 'upload-photo'
      )
    ),
  )
) ?>
