1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-14 09:32:17 +02:00

featurebox front-end - more from the same commit

This commit is contained in:
secretr 2009-12-09 18:36:33 +00:00
parent c344133a74
commit 9f6c8ad8f1
5 changed files with 179 additions and 9 deletions

View File

@ -9,8 +9,8 @@
* Featurebox Category model
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/includes/category.php,v $
* $Revision: 1.2 $
* $Date: 2009-12-08 17:21:31 $
* $Revision: 1.3 $
* $Date: 2009-12-09 18:36:32 $
* $Author: secretr $
*
*/
@ -73,26 +73,26 @@ class plugin_featurebox_category extends e_model
{
return $src;
}
return '<img src="'.$src.'" alt="'.$tp->toAttribute($this->get('fb_category_title')).'" class="icon" />';
return '<img src="'.$src.'" alt="'.$tp->toAttribute($this->get('fb_category_title')).'" class="icon featurebox" />';
}
public function sc_featurebox_category_layout()
public function sc_featurebox_category_template()
{
return $this->get('fb_category_layout');
return $this->get('');
}
/**
* Load category data by layout
* TODO - system cache
*
* @param string $layout
* @param string $template
* @param boolean $force
* @return plugin_featurebox_category
*/
public function loadByLayout($layout, $force = false)
public function loadByTemplate($template, $force = false)
{
if($force || null === $this->_loaded_data)
{
if(e107::getDb()->db_Select('featurebox_category', '*', 'fb_category_class IN ('.USERCLASS_LIST.') AND fb_category_layout=\''.e107::getParser()->toDB($layout).'\''))
if(e107::getDb()->db_Select('featurebox_category', '*', 'fb_category_class IN ('.USERCLASS_LIST.') AND fb_category_template=\''.e107::getParser()->toDB($template).'\''))
{
$this->setData(e107::getDb()->db_Fetch());
$this->_loaded_data = true;

View File

@ -0,0 +1,18 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/languages/English_front_featurebox.php,v $
* $Revision: 1.1 $
* $Date: 2009-12-09 18:36:32 $
* $Author: secretr $
*/
define("FBLAN_01", "Feature Box");
?>

View File

@ -0,0 +1,76 @@
<?php
// avoid PHP warnings
$FEATUREBOX_CATEGORY_TEMPLATE = array();
/*
* Default Template
* Example call: {FEATUREBOX} or {FEATUREBOX|default}
*/
$FEATUREBOX_CATEGORY_TEMPLATE['default']['list_start'] = '
<div class="box featurebox">
<h2 class="title">{FEATUREBOX_CATEGORY_ICON}{FEATUREBOX_CATEGORY_TITLE}</h2>
<div class="body">
';
$FEATUREBOX_CATEGORY_TEMPLATE['default']['list_end'] = '
</div>
</div>
';
// no column support
$FEATUREBOX_CATEGORY_TEMPLATE['default']['col_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['default']['col_end'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['default']['item_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['default']['item_end'] = '';
// empty item - used with col templates, no shortcodes just basic markup
$FEATUREBOX_CATEGORY_TEMPLATE['default']['item_empty'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['default']['item_separator'] = '<div class="clear"><!-- --></div>';
/*
* Dynamic Template
* Example call: {FEATUREBOX|dynamic}
*/
$FEATUREBOX_CATEGORY_TEMPLATE['dynamic']['list_start'] = '
<div class="box featurebox">
<h2>{FEATUREBOX_CATEGORY_ICON}{FEATUREBOX_CATEGORY_TITLE}</h2>
<div class="body">
';
$FEATUREBOX_CATEGORY_TEMPLATE['dynamic']['list_end'] = '
</div>
</div>
';
// no column support
$FEATUREBOX_CATEGORY_TEMPLATE['default']['col_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['default']['col_end'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['dynamic']['item_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['dynamic']['item_end'] = '';
// empty item - used with col templates, no shortcodes just basic markup
$FEATUREBOX_CATEGORY_TEMPLATE['default']['item_empty'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['dynamic']['item_separator'] = '<div class="clear"><!-- --></div>';
/**
* Template information.
* Allowed keys:
* - title: Dropdown title (language constants are accepted e.g. 'MY_LAN')
* - [optional] description: Template description (language constants are accepted e.g. 'MY_LAN') - UNDER CONSTRUCTION
* - [optional] image: Template image preview (path constants are accepted e.g. '{e_PLUGIN}myplug/images/mytemplate_preview.png') - UNDER CONSTRUCTION
*
* @var array
*/
$FEATUREBOX_CATEGORY_TEMPLATE['__INFO__'] = array(
'default' => array('title' => 'Default - show by category limit'),
'dynamic' => array('title' => 'Dynamic (AJAX) loading'),
);
?>

View File

@ -25,7 +25,7 @@ $FEATUREBOX_TEMPLATE['image_right'] = '
';
$FEATUREBOX_TEMPLATE['__INFO__'] = array(
'deafult' => array('title' => 'Default - no image'),
'default' => array('title' => 'Default - no image'),
'image_right' => array('title' => 'Image to right'),
'image_left' => array('title' => 'Image to left'),
);

View File

@ -0,0 +1,76 @@
<?php
// avoid PHP warnings
$FEATUREBOX_CATEGORY_TEMPLATE = array();
/*
* Default Template
* Example call: {FEATUREBOX} or {FEATUREBOX|default}
*/
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['list_start'] = '
<div class="block">
<h1 class="caption">{FEATUREBOX_CATEGORY_ICON} {FEATUREBOX_CATEGORY_TITLE}</h1>
<div class="block-text">
';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['list_end'] = '
</div>
</div>
';
// no column support
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['col_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['col_end'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['item_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['item_end'] = '';
// empty item - used with col templates, no shortcodes just basic markup
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['item_empty'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_default']['item_separator'] = '<div class="clear"><!-- --></div>';
/*
* Dynamic Template
* Example call: {FEATUREBOX|dynamic}
*/
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['list_start'] = '
<div class="block">
<h1 class="caption">{FEATUREBOX_CATEGORY_ICON} {FEATUREBOX_CATEGORY_TITLE}</h1>
<div class="block-text">
';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['list_end'] = '
</div>
</div>
';
// no column support
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['col_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['col_end'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['item_start'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['item_end'] = '';
// empty item - used with col templates, no shortcodes just basic markup
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['item_empty'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['blank_dynamic']['item_separator'] = '<div class="clear"><!-- --></div>';
/**
* Template information.
* Allowed keys:
* - title: Dropdown title (language constants are accepted e.g. 'MY_LAN')
* - [optional] description: Template description (language constants are accepted e.g. 'MY_LAN') - UNDER CONSTRUCTION
* - [optional] image: Template image preview (path constants are accepted e.g. '{e_PLUGIN}myplug/images/mytemplate_preview.png') - UNDER CONSTRUCTION
*
* @var array
*/
$FEATUREBOX_CATEGORY_TEMPLATE['__INFO__'] = array(
'blank_default' => array('title' => 'Blank Theme Default - show by category limit'),
'blank_dynamic' => array('title' => 'Blank Theme Dynamic (AJAX) loading'),
);
?>