mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
featurebox bugfixes
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* Form Handler
|
* Form Handler
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
||||||
* $Revision: 1.97 $
|
* $Revision: 1.98 $
|
||||||
* $Date: 2009-12-12 16:40:40 $
|
* $Date: 2009-12-13 10:28:15 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1359,10 +1359,10 @@ class e_form
|
|||||||
$info = array();
|
$info = array();
|
||||||
if($layouts[1])
|
if($layouts[1])
|
||||||
{
|
{
|
||||||
foreach ($layouts[1] as $key => $info_array)
|
foreach ($layouts[1] as $k => $info_array)
|
||||||
{
|
{
|
||||||
if(isset($info_array['description']))
|
if(isset($info_array['description']))
|
||||||
$info[$key] = defset($info_array['description'], $info_array['description']);
|
$info[$k] = defset($info_array['description'], $info_array['description']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
* Featurebox administration
|
* Featurebox administration
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/admin_config.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/admin_config.php,v $
|
||||||
* $Revision: 1.14 $
|
* $Revision: 1.15 $
|
||||||
* $Date: 2009-12-12 16:40:41 $
|
* $Date: 2009-12-13 10:28:15 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -143,7 +143,7 @@ class fb_category_ui extends e_admin_ui
|
|||||||
{
|
{
|
||||||
if($this->getModel()->getSqlErrorNumber() == 1062)
|
if($this->getModel()->getSqlErrorNumber() == 1062)
|
||||||
{
|
{
|
||||||
$templates = $this->getFieldAttr('fb_category_template', 'writeParms', array());
|
$templates = e107::getLayouts('featurebox', 'featurebox_category', 'front', '', true, false);
|
||||||
$msg = e107::getMessage();
|
$msg = e107::getMessage();
|
||||||
$msg->error('Layout <strong>'.vartrue($templates[$new_data['fb_category_template']], 'n/a').'</strong> is in use by another category. Layout should be unique per category. ');
|
$msg->error('Layout <strong>'.vartrue($templates[$new_data['fb_category_template']], 'n/a').'</strong> is in use by another category. Layout should be unique per category. ');
|
||||||
$msg->error($mod == 'create' ? LAN_CREATED_FAILED : LAN_UPDATED_FAILED);
|
$msg->error($mod == 'create' ? LAN_CREATED_FAILED : LAN_UPDATED_FAILED);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) e107 Inc 2009 - e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
* Copyright (c) e107 Inc 2009 - e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||||
* $Id: e_shortcode.php,v 1.11 2009-12-12 16:35:45 secretr Exp $
|
* $Id: e_shortcode.php,v 1.12 2009-12-13 10:28:15 secretr Exp $
|
||||||
*
|
*
|
||||||
* Featurebox shortcode batch class - shortcodes available site-wide. ie. equivalent to multiple .sc files.
|
* Featurebox shortcode batch class - shortcodes available site-wide. ie. equivalent to multiple .sc files.
|
||||||
*/
|
*/
|
||||||
@@ -104,14 +104,14 @@ class featurebox_shortcodes // must match the plugin's folder name. ie. [PLUGIN_
|
|||||||
$tmpl = $this->getFboxTemplate($ctemplate);
|
$tmpl = $this->getFboxTemplate($ctemplate);
|
||||||
if($category->get('fb_category_random'))
|
if($category->get('fb_category_random'))
|
||||||
{
|
{
|
||||||
$parm['loop'] = 0;
|
unset($parm['loop']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$base = vartrue($parm['base'], 'nav').'_';
|
$base = vartrue($parm['base'], 'nav').'_';
|
||||||
$tree_ids = array_keys($tree->getTree()); //all available item ids
|
$tree_ids = array_keys($tree->getTree()); //all available item ids
|
||||||
|
|
||||||
$ret = $category->toHTML(varset($tmpl[$base.'start']), true);
|
$ret = $category->toHTML(varset($tmpl[$base.'start']), true);
|
||||||
$cols = $category->getParam('cols');
|
$cols = $category->getParam('cols', 1);
|
||||||
|
|
||||||
if(isset($parm['loop']) && $tree->getTotal() > 0 && vartrue($tmpl[$base.'item']))
|
if(isset($parm['loop']) && $tree->getTotal() > 0 && vartrue($tmpl[$base.'item']))
|
||||||
{
|
{
|
||||||
@@ -124,6 +124,10 @@ class featurebox_shortcodes // must match the plugin's folder name. ie. [PLUGIN_
|
|||||||
elseif(isset($parm['uselimit']))
|
elseif(isset($parm['uselimit']))
|
||||||
{
|
{
|
||||||
$total = $category->sc_featurebox_category_limit() ? intval($category->sc_featurebox_category_limit()) : $tree->getTotal();
|
$total = $category->sc_featurebox_category_limit() ? intval($category->sc_featurebox_category_limit()) : $tree->getTotal();
|
||||||
|
if($total > $tree->getTotal())
|
||||||
|
{
|
||||||
|
$total = $tree->getTotal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// default - number based on all / limit (usefull for ajax navigation)
|
// default - number based on all / limit (usefull for ajax navigation)
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user