示例#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__newsletter_automated_fcomcode()
 {
     $automatic = array();
     foreach (placeholder_array() as $k => $v) {
         $tmp = do_lorem_template('NEWSLETTER_AUTOMATE_SECTION_FCOMCODE', array('I' => lorem_word(), 'TITLE' => lorem_phrase(), 'CONTENT' => lorem_sentence()));
         $automatic[] = $tmp->evaluate(placeholder_number());
     }
     $content = '';
     foreach ($automatic as $tp) {
         $content .= $tp;
     }
     return array(lorem_globalise(do_lorem_template('NEWSLETTER_AUTOMATED_FCOMCODE', array('CONTENT' => $content)), NULL, '', true));
 }
示例#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__list_catalogue_screen_products()
 {
     require_lang('catalogues');
     require_css('catalogues');
     $all_rating_criteria = array();
     $all_rating_criteria[] = array('TITLE' => lorem_word(), 'RATING' => make_string_tempcode("6"), 'TYPE' => lorem_word());
     $line = new ocp_tempcode();
     foreach (placeholder_array(1) as $v) {
         $line->attach(do_lorem_template('CATALOGUE_products_LINE', array('FIELD_0' => lorem_phrase(), 'FIELD_7_THUMB' => lorem_phrase(), 'RATING' => new ocp_tempcode(), 'FIELD_2' => placeholder_number(), 'ADD_TO_CART' => placeholder_url(), 'VIEW_URL' => placeholder_url(), 'GO_FOR_IT' => lorem_phrase())));
     }
     $entry = do_lorem_template('CATALOGUE_products_LINE_WRAP', array('CONTENT' => $line));
     return array(lorem_globalise(do_lorem_template('CATALOGUE_DEFAULT_CATEGORY_SCREEN', array('ID' => placeholder_random_id(), 'ADD_DATE_RAW' => placeholder_time(), 'TITLE' => lorem_title(), '_TITLE' => lorem_phrase(), 'TAGS' => '', 'CATALOGUE' => lorem_word_2(), 'BROWSER' => '', 'SORTING' => '', 'ADD_LINK' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'EDIT_CATALOGUE_URL' => placeholder_url(), 'ENTRIES' => $entry, 'SUBCATEGORIES' => '', 'DESCRIPTION' => lorem_sentence(), 'CART_LINK' => placeholder_url(), 'TREE' => lorem_phrase())), NULL, '', true));
 }
示例#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__pointstore_permission()
 {
     return array(lorem_globalise(do_lorem_template('POINTSTORE_PERMISSION', array('TITLE' => lorem_phrase(), 'DESCRIPTION' => lorem_sentence(), 'NEXT_URL' => placeholder_url())), NULL, '', true));
 }
示例#4
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__table_category_screen()
 {
     $subcategory = new ocp_tempcode();
     foreach (placeholder_array(3) as $k => $v) {
         $subcategory->attach(do_lorem_template('CATALOGUE_DEFAULT_SUBCATEGORY', array('ID' => placeholder_id(), 'CATALOGUE' => lorem_word_2(), 'URL' => placeholder_url(), 'NUM_CHILDREN' => '3', 'NUM_ENTRIES' => '2', 'NUM_CHILDREN_RECURSIVE' => '3', 'NUM_ENTRIES_DIRECT' => '2', 'NAME' => lorem_word())));
     }
     $subcategories = do_lorem_template('CATALOGUE_DEFAULT_SUBCATEGORY_WRAP', array('CATALOGUE' => lorem_word(), 'CONTENT' => $subcategory));
     $tags = do_lorem_template('TAGS', array('TAGS' => placeholder_array(), 'TYPE' => NULL, 'LINK_FULLSCOPE' => placeholder_url(), 'TAG' => lorem_word()));
     $entries = new ocp_tempcode();
     $head = do_lorem_template('CATALOGUE_DEFAULT_TAB_FIELD_HEAD', array('SORT_ASC_SELECTED' => TRUE, 'SORT_DESC_SELECTED' => FALSE, 'SORT_URL_ASC' => placeholder_url(), 'SORT_URL_DESC' => placeholder_url(), 'CATALOGUE' => lorem_word(), 'FIELDID' => placeholder_id(), '_FIELDID' => placeholder_id(), 'FIELD' => lorem_word(), 'FIELDTYPE' => 'text'));
     $fields = new ocp_tempcode();
     $fields->attach(do_lorem_template('CATALOGUE_DEFAULT_TAB_FIELD', array('FIELDID' => placeholder_id(), 'ENTRYID' => placeholder_id(), 'VALUE' => lorem_phrase())));
     $entries->attach(do_lorem_template('CATALOGUE_DEFAULT_TAB_ENTRY', array('FIELDS_TABLE' => $fields, 'EDIT_URL' => placeholder_url(), 'VIEW_URL' => placeholder_url())));
     $content = do_lorem_template('CATALOGUE_DEFAULT_TAB_WRAP', array('CATALOGUE' => lorem_word(), 'HEAD' => $head, 'CONTENT' => $entries, 'FIELD_COUNT' => "1"));
     return array(lorem_globalise(do_lorem_template('CATALOGUE_DEFAULT_CATEGORY_SCREEN', array('ID' => placeholder_id(), 'ADD_DATE_RAW' => placeholder_time(), 'TITLE' => lorem_title(), '_TITLE' => lorem_phrase(), 'TAGS' => $tags, 'CATALOGUE' => lorem_word_2(), 'BROWSER' => '', 'SORTING' => '', 'ADD_LINK' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'EDIT_CATALOGUE_URL' => placeholder_url(), 'ENTRIES' => $content, 'SUBCATEGORIES' => $subcategories, 'DESCRIPTION' => lorem_sentence(), 'CART_LINK' => placeholder_url(), 'TREE' => lorem_phrase())), NULL, '', true));
 }
示例#5
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__ocf_view_group_screen()
 {
     $_primary_members = placeholder_array();
     $primary_members = new ocp_tempcode();
     $_secondary_members = new ocp_tempcode();
     $secondary_members = new ocp_tempcode();
     $prospective_members = new ocp_tempcode();
     $_prospective_members = new ocp_tempcode();
     foreach ($_primary_members as $i => $primary_member) {
         $temp = do_lorem_template('OCF_VIEW_GROUP_MEMBER', array('NAME' => $primary_member, 'URL' => placeholder_url()));
         //results_entry starts
         $cells = do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $temp), NULL, false);
         $entries = do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false);
         //results_entry ends
         $primary_members->attach($entries);
     }
     $fields_title = do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => lorem_word()));
     //results_table
     $primary_members = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $primary_members, 'MESSAGE' => '', 'SORT' => '', 'BROWSER' => '', 'WIDTHS' => array(placeholder_number())), NULL, false);
     $temp = new ocp_tempcode();
     foreach (placeholder_array() as $i => $v) {
         $temp = do_lorem_template('OCF_VIEW_GROUP_MEMBER_SECONDARY', array('URL' => placeholder_url(), 'REMOVE_URL' => placeholder_url(), 'NAME' => $v));
         $cells = do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $temp), NULL, false);
         /*	$cells->attach(do_lorem_template('RESULTS_TABLE_FIELD',array('VALUE'=>strval($i)),NULL,false));
         			$cells->attach(do_lorem_template('RESULTS_TABLE_FIELD',array('VALUE'=>strval($i)),NULL,false));*/
         $entries = do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false);
         $_secondary_members->attach($entries);
     }
     $fields_title = do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => lorem_word()));
     /*$fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE',array('VALUE'=>lorem_word_2())));
     		$fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE',array('VALUE'=>lorem_word_2())));*/
     //results_table
     $secondary_members = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $_secondary_members, 'MESSAGE' => '', 'SORT' => '', 'BROWSER' => '', 'WIDTHS' => array(placeholder_number())), NULL, false);
     foreach (placeholder_array() as $i => $v) {
         $temp = do_lorem_template('OCF_VIEW_GROUP_MEMBER_PROSPECTIVE', array('ACCEPT_URL' => placeholder_url(), 'DECLINE_URL' => placeholder_url(), 'NAME' => lorem_word(), 'URL' => placeholder_url()));
         $cells = do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $temp), NULL, false);
         //$cells->attach(do_lorem_template('RESULTS_TABLE_FIELD',array('VALUE'=>strval($i)),NULL,false));
         $entries = do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false);
         $_prospective_members->attach($entries);
     }
     $fields_title = do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => lorem_word()));
     //$fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE',array('VALUE'=>lorem_word_2())));
     //results_table
     $prospective_members = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $_prospective_members, 'MESSAGE' => '', 'SORT' => '', 'BROWSER' => '', 'WIDTHS' => array(placeholder_number())), NULL, false);
     return array(lorem_globalise(do_lorem_template('OCF_VIEW_GROUP_SCREEN', array('GROUP_NAME' => lorem_phrase(), 'ID' => placeholder_id(), 'FORUM' => '', 'CLUB' => false, 'EDIT_URL' => placeholder_url(), 'TITLE' => lorem_title(), 'LEADER' => lorem_phrase(), 'NAME' => lorem_word(), 'PROMOTION_INFO' => new ocp_tempcode(), 'ADD_URL' => placeholder_url(), 'APPLY_URL' => placeholder_url(), 'APPLY_TEXT' => lorem_sentence(), 'PRIMARY_MEMBERS' => $primary_members, 'SECONDARY_MEMBERS' => $secondary_members, 'PROSPECTIVE_MEMBERS' => $prospective_members)), NULL, '', true));
 }
示例#6
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__administrative__theme_edit_css_screen()
 {
     require_javascript('javascript_theme_colours');
     require_javascript('javascript_ajax');
     $colour_chooser = do_lorem_template('THEME_COLOUR_CHOOSER', array('COLOR' => '#ffffff', 'NAME' => lorem_word(), 'CONTEXT' => lorem_sentence()));
     return array(lorem_globalise(do_lorem_template('THEME_EDIT_CSS_SCREEN', array('PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'REVISION_HISTORY' => lorem_phrase(), 'SWITCH_ICON' => placeholder_img_code(''), 'SWITCH_STRING' => lorem_phrase(), 'SWITCH_URL' => placeholder_url(), 'TITLE' => lorem_title(), 'THEME' => lorem_phrase(), 'CSS' => lorem_phrase(), 'URL' => placeholder_url(), 'FILE' => lorem_phrase(), 'ENTRIES' => $colour_chooser, 'OLD_CONTENTS' => lorem_word())), NULL, '', true));
 }
示例#7
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__news_piece_summary()
 {
     return array(lorem_globalise(do_lorem_template('NEWS_PIECE_SUMMARY', array('BLOG' => lorem_phrase(), 'AUTHOR_URL' => placeholder_url(), 'TAGS' => '', 'CATEGORY' => lorem_phrase(), 'IMG' => placeholder_image_url(), 'AUTHOR' => lorem_phrase(), '_AUTHOR' => lorem_phrase(), 'SUBMITTER' => lorem_phrase(), 'AVATAR' => lorem_phrase(), 'NEWS_TITLE' => lorem_phrase(), 'DATE' => lorem_phrase(), 'NEWS' => lorem_phrase(), 'COMMENTS' => lorem_phrase(), 'VIEW' => lorem_phrase(), 'ID' => placeholder_id(), 'FULL_URL' => placeholder_url(), 'COMMENT_COUNT' => lorem_phrase(), 'READ_MORE' => lorem_sentence(), 'TRUNCATE' => false, 'FIRSTTIME' => lorem_word(), 'LASTTIME' => lorem_word_2(), 'CLOSED' => lorem_word(), 'FIRSTUSERNAME' => lorem_word(), 'LASTUSERNAME' => lorem_word(), 'FIRSTMEMBERID' => lorem_word(), 'LASTMEMBERID' => lorem_word(), 'DATE_RAW' => lorem_word())), NULL, '', true));
 }
示例#8
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__block_side_weather()
 {
     return array(lorem_globalise(do_lorem_template('BLOCK_SIDE_WEATHER', array('TITLE' => lorem_phrase(), 'LOC_CODE' => placeholder_id(), 'IMAGE' => placeholder_image_url(), 'COND' => lorem_sentence(), 'FORECAST' => lorem_sentence())), NULL, '', true));
 }
示例#9
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__download_all_screen()
 {
     $downloads = new ocp_tempcode();
     $download_items = array(array('id' => placeholder_id(), 'file_size' => placeholder_number(), 'description' => lorem_phrase(), 'add_date' => placeholder_time(), 'category_id' => placeholder_id(), 'default_pic' => '', 'download_views' => placeholder_number(), 'submitter' => placeholder_id(), 'num_downloads' => placeholder_number(), 'edit_date' => placeholder_time(), 'name' => lorem_phrase()));
     $subcats = array();
     foreach (placeholder_array() as $cat) {
         foreach ($download_items as $download) {
             $map = array('AUTHOR' => lorem_phrase(), 'ID' => placeholder_id(), 'VIEWS' => placeholder_number(), 'SUBMITTER' => placeholder_id(), 'DESCRIPTION' => lorem_sentence(), 'FILE_SIZE' => placeholder_number(), 'DOWNLOADS' => placeholder_number(), 'DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_date(), 'EDIT_DATE_RAW' => '', 'SIZE' => placeholder_number(), 'URL' => placeholder_url(), 'NAME' => lorem_phrase(), 'TREE' => placeholder_link(), 'IMGCODE' => '');
             $tpl = do_lorem_template('DOWNLOAD_BOX', $map);
             $downloads->attach($tpl);
             $downloads->attach(do_lorem_template('BLOCK_SEPARATOR'));
         }
         $data = array();
         $data['DOWNLOADS'] = $downloads;
         $subcats[] = $data;
     }
     return array(lorem_globalise(do_lorem_template('DOWNLOAD_ALL_SCREEN', array('TITLE' => lorem_title(), 'LETTER' => lorem_word(), 'SUBMIT_URL' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'SUB_CATEGORIES' => $subcats)), NULL, '', true));
 }
示例#10
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__administrative__backup_launch_screen()
 {
     return array(lorem_globalise(do_lorem_template('BACKUP_LAUNCH_SCREEN', array('TITLE' => lorem_title(), 'TEXT' => lorem_sentence(), 'RESULTS' => lorem_phrase(), 'FORM' => placeholder_form_with_field('submit_button'))), NULL, '', true));
 }
示例#11
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__administrative__installer_step_10()
 {
     require_css('install');
     require_lang('installer');
     require_lang('version');
     return array(lorem_globalise(do_lorem_template('INSTALLER_STEP_10', array('PREVIOUS_STEP' => lorem_phrase(), 'FINAL' => lorem_phrase(), 'LOG' => lorem_sentence())), NULL, '', true));
 }
示例#12
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__ocf_edit_signature_tab()
 {
     require_javascript('javascript_swfupload');
     require_javascript('javascript_validation');
     require_javascript('javascript_posting');
     require_lang('comcode');
     require_lang('ocf');
     require_css('ocf');
     $buttons = new ocp_tempcode();
     $_buttons = array('img', 'thumb', 'url', 'page', 'code', 'quote', 'hide', 'box', 'block', 'list', 'html');
     foreach ($_buttons as $button) {
         $buttons->attach(do_lorem_template('COMCODE_EDITOR_BUTTON', array('DIVIDER' => true, 'FIELD_NAME' => lorem_word(), 'TITLE' => lorem_phrase(), 'B' => $button)));
     }
     $micro_buttons = new ocp_tempcode();
     $_micro_buttons = array(array('t' => 'b'), array('t' => 'i'));
     foreach ($_micro_buttons as $button) {
         $micro_buttons->attach(do_lorem_template('COMCODE_EDITOR_MICRO_BUTTON', array('FIELD_NAME' => lorem_word(), 'TITLE' => lorem_phrase(), 'B' => $button['t'])));
     }
     $comcode_editor = do_lorem_template('COMCODE_EDITOR', array('POSTING_FIELD' => lorem_word(), 'BUTTONS' => $buttons, 'MICRO_BUTTONS' => $micro_buttons));
     $posting_form = do_lorem_template('POSTING_FORM', array('TABINDEX_PF' => placeholder_number(), 'JAVASCRIPT' => '', 'PREVIEW' => true, 'COMCODE_EDITOR' => $comcode_editor, 'COMCODE_EDITOR_SMALL' => $comcode_editor, 'CLASS' => lorem_word(), 'COMCODE_URL' => placeholder_url(), 'EXTRA' => '', 'POST_COMMENT' => lorem_phrase(), 'EMOTICON_CHOOSER' => '', 'SUBMIT_NAME' => lorem_word(), 'HIDDEN_FIELDS' => new ocp_tempcode(), 'COMCODE_HELP' => placeholder_url(), 'URL' => placeholder_url(), 'POST' => lorem_sentence(), 'DEFAULT_PARSED' => lorem_sentence(), 'CONTINUE_URL' => placeholder_url(), 'ATTACHMENTS' => lorem_phrase(), 'SPECIALISATION' => new ocp_tempcode(), 'SPECIALISATION2' => new ocp_tempcode()));
     return array(lorem_globalise(do_lorem_template('OCF_EDIT_SIGNATURE_TAB', array('SIZE' => placeholder_filesize(), 'SIGNATURE' => lorem_phrase())), NULL, '', true));
 }
示例#13
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__comcode_teletype()
 {
     return array(lorem_globalise(do_lorem_template('COMCODE_TELETYPE', array('CONTENT' => lorem_sentence())), NULL, '', true));
 }
 /**
  * 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.
  *
  * @param  string			View type.
  * @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__standardbox($type)
 {
     $links = array();
     $meta = array();
     foreach (placeholder_array() as $k => $v) {
         $links[] = placeholder_link();
     }
     foreach (placeholder_array() as $k => $v) {
         $meta[] = array('KEY' => strval($k), 'VALUE' => $v);
     }
     return array(lorem_globalise(do_lorem_template('STANDARDBOX_' . $type, array('CONTENT' => lorem_sentence(), 'LINKS' => $links, 'META' => $meta, 'OPTIONS' => placeholder_array(), 'WIDTH' => 'auto', 'HEIGHT' => 'auto', 'TITLE' => lorem_phrase(), 'TOPLINK' => placeholder_link(), 'EXPAND' => true)), NULL, '', true));
 }
 /**
  * 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__full_message_screen()
 {
     return array(lorem_globalise(do_lorem_template('FULL_MESSAGE_SCREEN', array('TITLE' => lorem_title(), 'TEXT' => lorem_sentence())), NULL, '', true));
 }
示例#16
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__administrative__query_screen()
 {
     $queries = new ocp_tempcode();
     foreach (placeholder_array() as $value) {
         $queries->attach(do_lorem_template('QUERY_LOG', array('TIME' => placeholder_number(), 'TEXT' => lorem_sentence())));
     }
     return array(lorem_globalise(do_lorem_template('QUERY_SCREEN', array('TITLE' => lorem_title(), 'TOTAL' => lorem_phrase(), 'TOTAL_TIME' => placeholder_number(), 'QUERIES' => $queries)), NULL, '', true));
 }
示例#17
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__news_full_screen()
 {
     require_lang('news');
     $tags = array();
     foreach (placeholder_array() as $k => $v) {
         $tags[] = array('TAG' => lorem_word(), 'LINK_LIMITEDSCOPE' => placeholder_url(), 'LINK_FULLSCOPE' => placeholder_url());
     }
     $comment_details = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'USE_CAPTCHA' => false, 'EMAIL_OPTIONAL' => lorem_word(), 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'GET_EMAIL' => true, 'GET_TITLE' => true, 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'COMMENT_URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true, 'FIRST_POST_URL' => '', 'FIRST_POST' => ''));
     return array(lorem_globalise(do_lorem_template('NEWS_FULL_SCREEN', array('ID' => placeholder_id(), 'CATEGORY_ID' => placeholder_id(), 'BLOG' => TRUE, '_TITLE' => lorem_phrase(), 'TAGS' => do_lorem_template('TAGS', array('TAGS' => $tags, 'TYPE' => '')), 'CATEGORIES' => placeholder_array(), 'NEWSLETTER_URL' => addon_installed('newsletter') ? placeholder_url() : '', 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => '', 'SUBMITTER' => placeholder_id(), 'CATEGORY' => lorem_word(), 'IMG' => placeholder_image(), 'TITLE' => lorem_title(), 'VIEWS' => "3", 'COMMENT_DETAILS' => $comment_details, 'RATING_DETAILS' => lorem_sentence(), 'TRACKBACK_DETAILS' => lorem_sentence(), 'DATE' => placeholder_time(), 'AUTHOR' => lorem_word(), 'AUTHOR_URL' => placeholder_url(), 'NEWS_FULL' => lorem_paragraph(), 'NEWS_FULL_PLAIN' => lorem_sentence(), 'EDIT_URL' => placeholder_url(), 'ARCHIVE_URL' => placeholder_url(), 'SUBMIT_URL' => placeholder_url(), 'WARNING_DETAILS' => '')), NULL, '', true));
 }
 /**
  * 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__administrative__translate_screen()
 {
     require_lang('lang');
     $lines = '';
     foreach (placeholder_array() as $value) {
         $temp = do_lorem_template('TRANSLATE_LINE', array('TRANSLATE_AUTO' => $value, 'DESCRIPTION' => lorem_sentence(), 'NAME' => placeholder_random(), 'OLD' => str_replace('\\n', chr(10), $value), 'CURRENT' => $value, 'ACTIONS' => new ocp_tempcode()));
         $lines .= $temp->evaluate();
     }
     return array(lorem_globalise(do_lorem_template('TRANSLATE_SCREEN', array('PAGE' => lorem_phrase(), 'INTERTRANS' => lorem_phrase(), 'LANG' => fallback_lang(), 'LINES' => $lines, 'TITLE' => lorem_title(), 'URL' => placeholder_url())), NULL, '', true));
 }
示例#19
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__administrative__stats_screen_iscreen()
 {
     $graph_regionality = do_lorem_template('STATS_GRAPH', array('GRAPH' => placeholder_url(), 'TITLE' => lorem_phrase(), 'TEXT' => lorem_sentence(), 'KEYWORDS_SHARE' => lorem_word(), 'DESCRIPTION_KEYWORDS_SHARE' => lorem_word()));
     $graph_keywords = $graph_regionality;
     //results_entry starts
     $cells = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => $v)));
     }
     $fields_title = $cells;
     $fields = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $cells = new ocp_tempcode();
         foreach (placeholder_array() as $k => $v) {
             $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => lorem_word()), NULL, false, 'RESULTS_TABLE_FIELD'));
         }
         $fields->attach(do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false, 'RESULTS_TABLE_ENTRY'));
     }
     //results_entry ends
     $selectors = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $selectors->attach(do_lorem_template('RESULTS_BROWSER_SORTER', array('SELECTED' => '', 'NAME' => lorem_word(), 'VALUE' => lorem_word())));
     }
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $list_regionality = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $fields, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => lorem_word(), 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     $selectors = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $selectors->attach(do_lorem_template('RESULTS_BROWSER_SORTER', array('SELECTED' => '', 'NAME' => lorem_word(), 'VALUE' => lorem_word())));
     }
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $list_views = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $fields, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => lorem_word(), 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     $selectors = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $selectors->attach(do_lorem_template('RESULTS_BROWSER_SORTER', array('SELECTED' => '', 'NAME' => lorem_word(), 'VALUE' => lorem_word())));
     }
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $list_keywords = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $fields, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => lorem_word(), 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     //results_table ends
     return array(lorem_globalise(do_lorem_template('STATS_SCREEN_ISCREEN', array('TITLE' => lorem_title(), 'GRAPH_REGIONALITY' => $graph_regionality, 'STATS_REGIONALITY' => $list_regionality, 'STATS_VIEWS' => $list_views, 'GRAPH_KEYWORDS' => $graph_keywords, 'STATS_KEYWORDS' => $list_keywords, 'GRAPH_VIEWS_HOURLY' => lorem_phrase(), 'STATS_VIEWS_HOURLY' => lorem_phrase(), 'GRAPH_VIEWS_DAILY' => lorem_phrase(), 'STATS_VIEWS_DAILY' => lorem_phrase(), 'GRAPH_VIEWS_WEEKLY' => lorem_phrase(), 'STATS_VIEWS_WEEKLY' => lorem_phrase(), 'GRAPH_VIEWS_MONTHLY' => lorem_phrase(), 'STATS_VIEWS_MONTHLY' => lorem_phrase(), 'GRAPH_IP' => placeholder_ip(), 'STATS_IP' => placeholder_ip(), 'GRAPH_BROWSER' => lorem_phrase(), 'STATS_BROWSER' => lorem_phrase(), 'GRAPH_REFERRER' => lorem_phrase(), 'STATS_REFERRER' => lorem_phrase(), 'GRAPH_OS' => lorem_phrase(), 'STATS_OS' => lorem_phrase())), NULL, '', true));
 }
示例#20
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_2()
 {
     require_lang('comcode');
     require_lang('dates');
     $fields = new ocp_tempcode();
     $list = new ocp_tempcode();
     $entries = new ocp_tempcode();
     foreach (placeholder_array() as $val) {
         $entries->attach(do_lorem_template('FORM_SCREEN_INPUT_LIST_ENTRY', array('SELECTED' => '', 'DISABLED' => '', 'CLASS' => '', 'NAME' => placeholder_random_id(), 'TEXT' => lorem_phrase())));
     }
     $fields->attach(do_lorem_template('FORM_SCREEN_INPUT_HUGE_LIST', array('TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'PRETTY_NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence(), 'NAME' => placeholder_random_id(), 'CONTENT' => $entries, 'INLINE_LIST' => false)));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_INTEGER', array('TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'NAME' => $name, 'DEFAULT' => ''));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $input = new ocp_tempcode();
     foreach (placeholder_array(1) as $k => $v) {
         $input->attach(do_lorem_template('FORM_SCREEN_INPUT_LINE_MULTI', array('CLASS' => '', 'MAXLENGTH' => '10', 'PRETTY_NAME' => $v, 'TABINDEX' => placeholder_random_id(), 'NAME_STUB' => placeholder_random_id(), 'I' => strval($k), 'REQUIRED' => '_required', 'DEFAULT' => '')));
     }
     foreach (placeholder_array(2) as $k => $v) {
         $input->attach(do_lorem_template('FORM_SCREEN_INPUT_TEXT_MULTI', array('PRETTY_NAME' => lorem_word(), 'TABINDEX' => placeholder_number(), 'NAME_STUB' => placeholder_random_id(), 'I' => strval($k), 'REQUIRED' => '_required', 'DEFAULT' => '')));
     }
     $name = placeholder_random_id();
     $hidden = do_lorem_template('FORM_SCREEN_INPUT_HIDDEN_2', array('NAME' => $name, 'VALUE' => lorem_phrase()));
     $name = placeholder_random_id();
     foreach (placeholder_array() as $key => $value) {
         $list->attach(do_lorem_template('FORM_SCREEN_INPUT_LIST_ENTRY', array('SELECTED' => '', 'DISABLED' => '', 'CLASS' => '', 'NAME' => $value, 'TEXT' => lorem_phrase())));
     }
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_LIST', array('TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'NAME' => $name, 'CONTENT' => $list, 'INLINE_LIST' => false));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_MULTI_LIST', array('TABINDEX' => placeholder_number(), 'SIZE' => '5', 'NAME' => $name, 'CONTENT' => $list));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_PASSWORD', array('TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'NAME' => $name, 'VALUE' => ''));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $radios = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY', array('DESCRIPTION' => lorem_phrase(), 'CHECKED' => 'true', 'TABINDEX' => placeholder_number(), 'NAME' => $name, 'VALUE' => lorem_word(), 'TEXT' => lorem_phrase()));
     $radios->attach(do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY', array('DESCRIPTION' => lorem_phrase(), 'CHECKED' => 'true', 'TABINDEX' => placeholder_number(), 'NAME' => $name, 'VALUE' => lorem_word_2(), 'TEXT' => lorem_phrase())));
     $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST', array('REQUIRED' => true, 'NAME' => $name, 'CONTENT' => $radios));
     $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' => '')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_TREE_LIST', array('NICE_LABEL' => '', 'USE_SERVER_ID' => placeholder_id(), 'TABINDEX' => placeholder_number(), 'NAME' => $name, 'REQUIRED' => '', 'DEFAULT' => '', 'HOOK' => '', 'ROOT_ID' => '', 'OPTIONS' => serialize('')));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_UPLOAD', array('FILTER' => '', 'EXISTING_URL' => placeholder_url(), 'IS_IMAGE' => '', 'SWFUPLOAD' => false, 'EDIT' => '', 'TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'NAME' => $name));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_UPLOAD_MULTI', array('TABINDEX' => placeholder_number(), 'FILTER' => '', 'SWFUPLOAD' => false, 'REQUIRED' => '', 'NAME' => $name, 'I' => $name, 'NAME_STUB' => lorem_word()));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => true, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_USERNAME', array('TABINDEX' => placeholder_number(), 'NEEDS_MATCH' => true, 'REQUIRED' => '', 'NAME' => $name, 'DEFAULT' => ''));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $name = placeholder_random_id();
     $input = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $input->attach(do_lorem_template('FORM_SCREEN_INPUT_USERNAME_MULTI', array('PRETTY_NAME' => lorem_word(), 'TABINDEX' => placeholder_number(), 'NEEDS_MATCH' => true, 'NAME_STUB' => $name, 'I' => strval($k), 'REQUIRED' => '', 'DEFAULT' => '')));
     }
     $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' => $input, 'COMCODE' => '')));
     $input = new ocp_tempcode();
     $options = array(array('option1', 'opt1', true, ''), array('option2', 'opt2', true, ''), array('option3', 'opt3', true, ''));
     if (count($options[0]) != 3) {
         $options = array(array($options, NULL, new ocp_tempcode()));
     }
     foreach ($options as $_option) {
         $out = array();
         foreach ($_option[0] as $option) {
             $out[] = array('DISABLED' => false, 'CHECKED' => lorem_word(), 'TABINDEX' => placeholder_number(), 'NAME' => placeholder_random_id(), 'PRETTY_NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence());
         }
         $input->attach(do_lorem_template('FORM_SCREEN_INPUT_VARIOUS_TICKS', array('SECTION_TITLE' => $_option[2], 'EXPANDED' => $_option[1], 'SIMPLE_STYLE' => false, 'BRETHREN_COUNT' => "3", 'OUT' => $out)));
     }
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => true, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $hidden->attach(do_lorem_template('FORM_SCREEN_INPUT_HIDDEN', array('NAME' => lorem_word(), 'VALUE' => lorem_word())));
     return array(lorem_globalise(do_lorem_template('FORM_SCREEN', array('GET' => NULL, 'SKIP_VALIDATION' => true, 'HIDDEN' => $hidden, 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'FIELDS' => $fields, 'SUBMIT_NAME' => lorem_word(), 'TEXT' => lorem_sentence_html())), NULL, '', true));
 }
示例#21
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__administrative__occle_edit()
 {
     return array(lorem_globalise(do_lorem_template('OCCLE_EDIT', array('UNIQ_ID' => placeholder_random(), 'FILE' => lorem_phrase(), 'SUBMIT_URL' => placeholder_url(), 'FILE_CONTENTS' => lorem_sentence())), NULL, '', true));
 }