Exemplo n.º 1
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__attachment_flv()
 {
     return array(lorem_globalise(do_lorem_template('ATTACHMENT_FLV', array('SCRIPT' => placeholder_javascript(), 'ID' => placeholder_id(), 'A_WIDTH' => placeholder_number(), 'A_HEIGHT' => placeholder_number(), 'A_DESCRIPTION' => lorem_paragraph_html(), 'SUP_PARAMS' => placeholder_blank(), 'FORUM_DB_BIN' => placeholder_blank(), 'MIME_TYPE' => lorem_word(), 'A_ORIGINAL_FILENAME' => lorem_phrase(), 'A_URL' => placeholder_url())), NULL, '', true));
 }
Exemplo n.º 2
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__form_screen()
 {
     require_lang('comcode');
     require_lang('dates');
     $input = new ocp_tempcode();
     $fields = new ocp_tempcode();
     foreach (placeholder_array(1) as $key => $val) {
         $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE', array('CHECKED' => true, 'NAME' => 'path', 'VALUE' => $val, 'URL' => placeholder_image_url(), 'PRETTY' => strval($key)));
         $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => 'path' . "_" . $val, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     }
     $content = new ocp_tempcode();
     $i = 0;
     foreach (placeholder_array() as $k => $v) {
         $cells = new ocp_tempcode();
         foreach (placeholder_array() as $k => $v) {
             $temp = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2', array('CHECKED' => 'true', 'PRETTY' => lorem_phrase(), 'NAME' => placeholder_random_id(), 'CODE' => $v, 'URL' => placeholder_image_url()));
             $temp->attach(do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3_NA', array('NAME' => placeholder_random_id())));
         }
         $_category = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2_WRAP', array('ROWS' => $cells));
         $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2_CAT_WRAP', array('DISPLAY' => 'block', 'CATEGORY' => $_category, 'CATEGORY_NAME' => lorem_word()));
         $content->attach($input);
     }
     //$fields->attach(do_lorem_template('FORM_SCREEN_FIELD',array('REQUIRED'=>true,'SKIP_LABEL'=>false,'BORING_NAME'=>placeholder_random(),'NAME'=>lorem_word(),'DESCRIPTION'=>lorem_sentence_html(),'DESCRIPTION_SIDE'=>'','INPUT'=>$content,'COMCODE'=>'')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST', array('REQUIRED' => true, 'NAME' => $name, 'CODE' => '', 'TABINDEX' => placeholder_number(), 'CONTENT' => $content));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => true, 'BORING_NAME' => '', 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $entries = array();
     $first = true;
     foreach (placeholder_array() as $k => $v) {
         $entries[] = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3', array('PRETTY' => lorem_word(), 'CHECKED' => $first, 'NAME' => placeholder_random_id(), 'CODE' => lorem_word(), 'URL' => placeholder_image_url()));
         $first = false;
     }
     $content = new ocp_tempcode();
     foreach ($entries as $i => $tempcode) {
         $content->attach($tempcode);
     }
     $content = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3_WRAP', array('ROWS' => $content));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => true, 'BORING_NAME' => placeholder_random_id(), 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $content, 'COMCODE' => '')));
     //$fields->attach($content);
     $fields->attach(do_lorem_template('POSTING_FIELD', array('REQUIRED' => true, 'DESCRIPTION' => lorem_phrase(), 'HIDDEN_FIELDS' => '', 'PRETTY_NAME' => lorem_word(), 'NAME' => placeholder_random_id(), 'TABINDEX_PF' => placeholder_random(), 'COMCODE_EDITOR' => placeholder_blank(), 'COMCODE_EDITOR_SMALL' => placeholder_blank(), 'CLASS' => lorem_word(), 'COMCODE_URL' => placeholder_url(), 'EMOTICON_CHOOSER' => placeholder_emoticon_chooser(), 'COMCODE_HELP' => placeholder_blank(), 'POST' => placeholder_blank(), 'DEFAULT_PARSED' => placeholder_blank(), 'ATTACHMENTS' => placeholder_blank())));
     return array(lorem_globalise(do_lorem_template('FORM_SCREEN', array('GET' => NULL, 'HIDDEN' => '', 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'FIELDS' => $fields, 'SUBMIT_NAME' => lorem_word(), 'TEXT' => lorem_sentence_html())), NULL, '', true));
 }
Exemplo n.º 3
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__attachment_download()
 {
     return array(lorem_globalise(do_lorem_template('ATTACHMENT_DOWNLOAD', array('SCRIPT' => placeholder_url(), 'A_DESCRIPTION' => lorem_word(), 'A_ORIGINAL_FILENAME' => lorem_word_2(), 'ID' => placeholder_id(), 'CLEAN_SIZE' => placeholder_random(), 'SUP_PARAMS' => placeholder_blank(), 'FORUM_DB_BIN' => placeholder_blank())), NULL, '', true));
 }