mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Move hardcoded 'news' frontpage to its own e_frontpage addon
This commit is contained in:
@@ -36,12 +36,16 @@ require_once ('auth.php');
|
|||||||
|
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
$frontPref = e107::pref('core'); // Get prefs
|
$frontPref = e107::pref('core'); // Get prefs
|
||||||
|
|
||||||
// Get list of possible options for front page
|
// Get list of possible options for front page
|
||||||
$front_page['news'] = array('page' => 'news.php', 'title' => ADLAN_0); // TODO Move to e107_plugins/news
|
|
||||||
|
|
||||||
$front_page['wmessage'] = array('page' => 'index.php', 'title' => ADLAN_28, 'diz'=>'index.php');
|
// Welcome message is 'hardcoded' intentionally
|
||||||
|
$front_page['wmessage'] = array(
|
||||||
|
'page' => 'index.php',
|
||||||
|
'title' => ADLAN_28,
|
||||||
|
'diz' =>'index.php'
|
||||||
|
);
|
||||||
|
|
||||||
if($sql->db_Select('page', 'page_id, page_title', "menu_name=''")) // TODO Move to e107_plugins/page
|
if($sql->db_Select('page', 'page_id, page_title', "menu_name=''")) // TODO Move to e107_plugins/page
|
||||||
{
|
{
|
||||||
|
30
e107_plugins/news/e_frontpage.php
Normal file
30
e107_plugins/news/e_frontpage.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?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; }
|
||||||
|
|
||||||
|
// $front_page['news'] = array('page' => 'news.php', 'title' => ADLAN_0);
|
||||||
|
|
||||||
|
//v2.x spec.
|
||||||
|
class news_frontpage // include plugin-folder in the name.
|
||||||
|
{
|
||||||
|
// simple
|
||||||
|
function config()
|
||||||
|
{
|
||||||
|
|
||||||
|
$frontPage = array(
|
||||||
|
'page' => 'news.php',
|
||||||
|
'title' => ADLAN_0
|
||||||
|
);
|
||||||
|
|
||||||
|
return $frontPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user