Advertisement
terorama

WP / inc / app / digestelement.inc.php

May 29th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.70 KB | None | 0 0
  1. <?php
  2.  
  3. //-------------------------------------------------
  4. //            question model
  5. //-------------------------------------------------
  6. class Digestelement extends Model {
  7.  
  8.    public $_table = 'digests_elements';
  9.    public $_idfield = 'element_id';
  10.    public $_orderstr='element_page_order';
  11.    
  12.    public $rec_per_page=25;
  13.    
  14.    public $fields = array (
  15.       array('fn'=>'element_rss_name', 'ft'=>'s', 'fc'=>'Name of RSS Feed',
  16.       'fh'=>'enter the name you specified for RSS feed in RSS manager'),
  17.      
  18.       array('fn'=>'element_page_order','ft'=>'i', 'fc'=>'Element order',
  19.       'fh'=>'specify the order in which this part will be printed in post'),
  20.      
  21.       /*array('fn'=>'element_output_type','ft'=>'i',
  22.            'fc'=>array('Small icons','Large icons', 'Internal pagination'),
  23.            'fl'=> array(6,7,8), 'fs'=>'Element output type '),*/
  24.            
  25.       array('fn'=>'element_request_period','ft'=>'i', 'fc'=>'Request period in days',
  26.       'fh'=>'specify the period in days for which feed content would be retrieved<br/>(starting back from the day of publication)'),  
  27.      
  28.       array ('fn'=>'element_template', 'ft'=>'s', 'fc'=>'PHP template for each element', 'fs'=>'textarea',
  29.       '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'),
  30.      
  31.       array ('fn'=>'element_before_template', 'ft'=>'s', 'fc'=>'html template before elements', 'fs'=>'textarea',
  32.       'fh'=>'Input html which will be printed before output of the RSS feed content'),
  33.      
  34.       array ('fn'=>'element_after_template', 'ft'=>'s', 'fc'=>'html template after elements', 'fs'=>'textarea',
  35.       'fh'=>'Input html which will be printed after output of the RSS feed content'),
  36.      
  37.       array('fn'=>'digest_id','ft'=>'i', 'fc'=>'hidden'));
  38.          
  39.    public $_postvars = array ('element_rss_name'=>'', 'element_page_order'=>'',
  40.                               'element_request_period'=>'', 'element_template'=>'',
  41.                               'element_before_template'=>'', 'element_after_template'=>'',
  42.                               'digest_id'=>'');
  43.                              
  44.    public $_listvars = array('element_rss_name'=>'', 'element_page_order'=>'', 'element_request_period'=>'');  
  45.  
  46.    public $_mandatory = array ('element_rss_name'=> array(
  47.            
  48.                                  'jcheck'=>array (
  49.                                      'func' => 'function(inel) {var re = /^[\\\s]*$/; return !re.test(inel);}',
  50.                                      'message'=>'rss name cannot be empty string'
  51.                                   )        
  52.                             ), 
  53.                          'element_page_order'=> array (
  54.                                   'jcheck'=>array (
  55.                                      'func' => 'function(inel) {var re = /^\\\d+$/; return re.test(inel);}',
  56.                                      'message'=>'this should be a number'
  57.                                   )
  58.                             ),
  59.                         'element_request_period'=> array (
  60.                                   'jcheck'=>array (
  61.                                      'func' => 'function(inel) {var re = /^\\\d+$/; return re.test(inel);}',
  62.                                      'message'=>'this should be a number'
  63.                                   )
  64.                             ),
  65.                                
  66.                     );  
  67.    
  68.    //-----------------------------------------
  69.    protected function setAutoVars() {
  70.    
  71.    }
  72. }
  73. //-------------------------------------------------
  74. //            digest elements controller
  75. //-------------------------------------------------
  76. class DigestelementsController extends EasyController {
  77.  
  78. }
  79. //----------------------------------------------
  80. //            digest elements form
  81. //----------------------------------------------
  82. class DigestelementsForm extends EasyForm {
  83.    
  84. }
  85. //----------------------------------------------
  86. //           digests elements view  
  87. //----------------------------------------------
  88.  
  89. class DigestelementsView extends EasyView {
  90.  
  91. }
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement