1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-24 08:22:07 +02:00
Files
php-e107/e107_plugins/forum/e_menu.php
Achim Ennenbach bd02bd26f7 Fixes #3132 Fixes issue with new forum posts menu not displaying
title and post excerpt properly
Added menu config default values, in case some are not properly defined
Added default values to the new forum posts config menu
2018-06-26 21:20:33 +02:00

56 lines
1.8 KiB
PHP

<?php
/*
* e107 website system
*
* Copyright (C) 2008-2015 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*/
if (!defined('e107_INIT')) { exit; }
//v2.x Standard for extending menu configuration within Menu Manager. (replacement for v1.x config.php)
class forum_menu
{
function __construct()
{
e107::lan('forum','menu',true); // English_menu.php or {LANGUAGE}_menu.php
}
/**
* Configuration Fields.
* @return array
*/
public function config($menu='')
{
$layouts = e107::getLayouts('forum','newforumposts_menu');
$fields = array();
$fields['caption'] = array('title'=> LAN_FORUM_MENU_004, 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'));
$fields['display'] = array('title'=> LAN_FORUM_MENU_005, 'type'=>'text', 'writeParms'=>array('size'=>'mini','pattern'=>'[0-9]*','default' => 10));
$fields['maxage'] = array('title'=> LAN_FORUM_MENU_012, 'type'=>'text', 'help'=>LAN_FORUM_MENU_013, 'writeParms'=>array('size'=>'mini','pattern'=>'[0-9]*','default' => 0));
$fields['characters'] = array('title'=> LAN_FORUM_MENU_006, 'type'=>'text', 'writeParms'=>array('size'=>'mini','pattern'=>'[0-9]*','default' => 120));
$fields['postfix'] = array('title'=> LAN_FORUM_MENU_007, 'type'=>'text', 'writeParms'=>array('size'=>'mini','default' => '...'));
$fields['scroll'] = array('title'=> LAN_FORUM_MENU_014, 'type'=>'text', 'writeParms'=>array('size'=>'mini','pattern'=>'[0-9]*'), 'help'=>LAN_FORUM_MENU_015);
$fields['layout'] = array('title'=> LAN_TEMPLATE, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$layouts[0]));
return $fields;
}
}
// optional - for when using custom methods above.
/*
class forum_menu_form extends e_form
{
}
*/
?>