mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Featurebox plugin - Code cleanup
This commit is contained in:
parent
7987a15ec7
commit
096f4d08db
@ -2,14 +2,12 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (c) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (c) 2008-2014 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Featurebox administration
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
require_once("../../class2.php");
|
||||
if (!getperms("P") || !plugInstalled('featurebox'))
|
||||
@ -238,7 +236,7 @@ class fb_main_ui extends e_admin_ui
|
||||
if(e107::getDb()->db_Select('featurebox_category'))
|
||||
{
|
||||
//$categories[0] = LAN_SELECT;
|
||||
while ($row = e107::getDb()->db_Fetch())
|
||||
while ($row = e107::getDb()->fetch())
|
||||
{
|
||||
$id = $row['fb_category_id'];
|
||||
$tmpl = $row['fb_category_template'];
|
||||
|
@ -19,9 +19,9 @@ $eplug_rss_feed[] = $feed;
|
||||
//##### create rss data, return as array $eplug_rss_data -----------------------------------
|
||||
$rss = array();
|
||||
$sqlrss = new db;
|
||||
if($items = $sqlrss -> db_Select('featurebox', "*", "fb_class = 0 DESC LIMIT 0,".$this->limit )){
|
||||
if($items = $sqlrss->select('featurebox', "*", "fb_class = 0 DESC LIMIT 0,".$this->limit )){
|
||||
$i=0;
|
||||
while($rowrss = $sqlrss -> db_Fetch()){
|
||||
while($rowrss = $sqlrss->fetch()){
|
||||
$rss[$i]['author'] = '';
|
||||
$rss[$i]['author_email'] = '';
|
||||
$rss[$i]['link'] = '';
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id$
|
||||
*
|
||||
* Featurebox shortcode batch class - shortcodes available site-wide. ie. equivalent to multiple .sc files.
|
||||
*/
|
||||
|
@ -2,21 +2,23 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2014 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; }
|
||||
if (!plugInstalled('featurebox'))
|
||||
if (!e107::isInstalled('featurebox'))
|
||||
{
|
||||
return '';
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($sql -> db_Select("featurebox", "*", "fb_mode=1 AND fb_class IN (".USERCLASS_LIST.") ORDER BY fb_class ASC"))
|
||||
|
||||
if($sql->select("featurebox", "*", "fb_mode=1 AND fb_class IN (".USERCLASS_LIST.") ORDER BY fb_class ASC"))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
if($row['fb_class'] > 0 && $row['fb_class'] < 251)
|
||||
{
|
||||
@ -33,9 +35,9 @@ if($sql -> db_Select("featurebox", "*", "fb_mode=1 AND fb_class IN (".USERCLASS_
|
||||
extract($xentry);
|
||||
}
|
||||
}
|
||||
else if($sql -> db_Select("featurebox", "*", "fb_mode!=1 AND fb_class IN (".USERCLASS_LIST.")"))
|
||||
else if($sql->select("featurebox", "*", "fb_mode!=1 AND fb_class IN (".USERCLASS_LIST.")"))
|
||||
{
|
||||
$nfArray = $sql -> db_getList();
|
||||
$nfArray = $sql->db_getList();
|
||||
$entry = $nfArray[array_rand($nfArray)];
|
||||
extract($entry);
|
||||
}
|
||||
@ -45,11 +47,11 @@ else
|
||||
}
|
||||
|
||||
$fbcc = $fb_title;
|
||||
$fb_title = $tp -> toHTML($fb_title, TRUE,'title');
|
||||
$fb_text = $tp -> toHTML($fb_text, TRUE,'body');
|
||||
$fb_title = $tp->toHTML($fb_title, TRUE,'title');
|
||||
$fb_text = $tp->toHTML($fb_text, TRUE,'body');
|
||||
if(!$fb_rendertype)
|
||||
{
|
||||
$ns -> tablerender($fb_title, $fb_text, 'featurebox');
|
||||
$ns->tablerender($fb_title, $fb_text, 'featurebox');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2013 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: e_shortcode.php 12438 2011-12-05 15:12:56Z secretr $
|
||||
* Copyright (c) 2014 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Gallery Template
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// e107::Lan('featurebox', 'front');
|
||||
|
Loading…
x
Reference in New Issue
Block a user