Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //-------------------------------------------------
- // question model
- //-------------------------------------------------
- class Digestelement extends Model {
- public $_table = 'digests_elements';
- public $_idfield = 'element_id';
- public $_orderstr='element_page_order';
- public $rec_per_page=25;
- public $fields = array (
- array('fn'=>'element_rss_name', 'ft'=>'s', 'fc'=>'Name of RSS Feed',
- 'fh'=>'enter the name you specified for RSS feed in RSS manager'),
- array('fn'=>'element_page_order','ft'=>'i', 'fc'=>'Element order',
- 'fh'=>'specify the order in which this part will be printed in post'),
- /*array('fn'=>'element_output_type','ft'=>'i',
- 'fc'=>array('Small icons','Large icons', 'Internal pagination'),
- 'fl'=> array(6,7,8), 'fs'=>'Element output type '),*/
- array('fn'=>'element_request_period','ft'=>'i', 'fc'=>'Request period in days',
- 'fh'=>'specify the period in days for which feed content would be retrieved<br/>(starting back from the day of publication)'),
- array ('fn'=>'element_template', 'ft'=>'s', 'fc'=>'PHP template for each element', 'fs'=>'textarea',
- 'fh'=>'specify the PHP template which will be used to render each feed item<br/>use the conditional tags %title%, %description%, %link%, %pubdate% to operate with <br/> use echo for output (See the example in help for more details'),
- array ('fn'=>'element_before_template', 'ft'=>'s', 'fc'=>'html template before elements', 'fs'=>'textarea',
- 'fh'=>'Input html which will be printed before output of the RSS feed content'),
- array ('fn'=>'element_after_template', 'ft'=>'s', 'fc'=>'html template after elements', 'fs'=>'textarea',
- 'fh'=>'Input html which will be printed after output of the RSS feed content'),
- array('fn'=>'digest_id','ft'=>'i', 'fc'=>'hidden'));
- public $_postvars = array ('element_rss_name'=>'', 'element_page_order'=>'',
- 'element_request_period'=>'', 'element_template'=>'',
- 'element_before_template'=>'', 'element_after_template'=>'',
- 'digest_id'=>'');
- public $_listvars = array('element_rss_name'=>'', 'element_page_order'=>'', 'element_request_period'=>'');
- public $_mandatory = array ('element_rss_name'=> array(
- 'jcheck'=>array (
- 'func' => 'function(inel) {var re = /^[\\\s]*$/; return !re.test(inel);}',
- 'message'=>'rss name cannot be empty string'
- )
- ),
- 'element_page_order'=> array (
- 'jcheck'=>array (
- 'func' => 'function(inel) {var re = /^\\\d+$/; return re.test(inel);}',
- 'message'=>'this should be a number'
- )
- ),
- 'element_request_period'=> array (
- 'jcheck'=>array (
- 'func' => 'function(inel) {var re = /^\\\d+$/; return re.test(inel);}',
- 'message'=>'this should be a number'
- )
- ),
- );
- //-----------------------------------------
- protected function setAutoVars() {
- }
- }
- //-------------------------------------------------
- // digest elements controller
- //-------------------------------------------------
- class DigestelementsController extends EasyController {
- }
- //----------------------------------------------
- // digest elements form
- //----------------------------------------------
- class DigestelementsForm extends EasyForm {
- }
- //----------------------------------------------
- // digests elements view
- //----------------------------------------------
- class DigestelementsView extends EasyView {
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement