Beispiel #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__administrative__menu_editor_screen()
 {
     $branch = do_lorem_template('MENU_EDITOR_BRANCH', array('CLICKABLE_SECTIONS' => 'true', 'I' => placeholder_id(), 'CHILD_BRANCH_TEMPLATE' => '', 'CHILD_BRANCHES' => ''));
     $child_branch_template = do_lorem_template('MENU_EDITOR_BRANCH_WRAP', array('DISPLAY' => 'display: block', 'CLICKABLE_SECTIONS' => true, 'ORDER' => 'replace_me_with_order', 'PARENT' => 'replace_me_with_parent', 'BRANCH_TYPE' => '0', 'NEW_WINDOW' => '0', 'CHECK_PERMS' => '0', 'CAPTION_LONG' => '', 'CAPTION' => '', 'URL' => '', 'PAGE_ONLY' => '', 'THEME_IMG_CODE' => '', 'I' => placeholder_id(), 'BRANCH' => $branch));
     $root_branch = do_lorem_template('MENU_EDITOR_BRANCH', array('CLICKABLE_SECTIONS' => 'true', 'CHILD_BRANCH_TEMPLATE' => $child_branch_template, 'CHILD_BRANCHES' => '', 'I' => ''));
     return array(lorem_globalise(do_lorem_template('MENU_EDITOR_SCREEN', array('ALL_MENUS' => placeholder_array(), 'MENU_NAME' => lorem_word(), 'DELETE_URL' => placeholder_url(), 'PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'FIELDS_TEMPLATE' => placeholder_fields(), 'HIGHEST_ORDER' => lorem_phrase(), 'URL' => placeholder_url(), 'CHILD_BRANCH_TEMPLATE' => $child_branch_template, 'ROOT_BRANCH' => $root_branch, 'TITLE' => lorem_title())), 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__posting_form()
 {
     require_lang('comcode');
     require_lang('dates');
     $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 = do_lorem_template('COMCODE_EDITOR', array('POSTING_FIELD' => lorem_word(), 'BUTTONS' => $buttons, 'MICRO_BUTTONS' => $micro_buttons));
     return array(lorem_globalise(do_lorem_template('POSTING_FORM', array('TABINDEX_PF' => placeholder_number(), 'JAVASCRIPT' => '', 'PREVIEW' => lorem_phrase(), 'COMCODE_EDITOR' => $comcode, 'COMCODE_EDITOR_SMALL' => lorem_phrase(), 'CLASS' => lorem_phrase(), 'COMCODE_URL' => placeholder_url(), 'EXTRA' => lorem_phrase(), 'POST_COMMENT' => lorem_phrase(), 'EMOTICON_CHOOSER' => lorem_phrase(), 'SUBMIT_NAME' => lorem_word(), 'HIDDEN_FIELDS' => '', 'COMCODE_HELP' => lorem_phrase(), 'URL' => placeholder_url(), 'POST' => lorem_phrase(), 'DEFAULT_PARSED' => lorem_phrase(), 'CONTINUE_URL' => placeholder_url(), 'ATTACHMENTS' => lorem_phrase(), 'SPECIALISATION' => placeholder_fields(), 'SPECIALISATION2' => placeholder_fields())), NULL, '', true));
 }
Beispiel #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__cedi_post_screen()
 {
     require_javascript('javascript_validation');
     require_lang('comcode');
     $posting_form = do_lorem_template('POSTING_FORM', array('TABINDEX_PF' => placeholder_number(), 'JAVASCRIPT' => '', 'PREVIEW' => lorem_phrase(), 'COMCODE_EDITOR' => lorem_phrase(), 'COMCODE_EDITOR_SMALL' => lorem_phrase(), 'CLASS' => lorem_phrase(), 'COMCODE_URL' => placeholder_url(), 'EXTRA' => '', 'POST_COMMENT' => lorem_phrase(), 'EMOTICON_CHOOSER' => lorem_phrase(), 'SUBMIT_NAME' => lorem_word(), 'HIDDEN_FIELDS' => '', 'COMCODE_HELP' => lorem_phrase(), 'URL' => placeholder_url(), 'POST' => lorem_phrase(), 'DEFAULT_PARSED' => lorem_phrase(), 'CONTINUE_URL' => placeholder_url(), 'ATTACHMENTS' => lorem_phrase(), 'SPECIALISATION' => placeholder_fields(), 'SPECIALISATION2' => ''));
     return array(lorem_globalise(do_lorem_template('CEDI_POST_SCREEN', array('PING_URL' => '', 'WARNING_DETAILS' => '', 'TEXT' => lorem_phrase(), 'TITLE' => lorem_title(), 'POSTING_FORM' => $posting_form)), NULL, '', true));
 }
Beispiel #4
0
/**
 * Get form with a field
 *
 * @param  ID_TEXT		The field name wanted.
 * @return tempcode		Place holder text.
 */
function placeholder_form_with_field($field_name)
{
    $text = '<p>(A form would go here.)</p>';
    require_code('form_templates');
    $hidden = form_input_hidden($field_name, '0');
    //	$field->attach(form_input_line_auto_load('test','test.','test','',false,'news'));
    $form = do_lorem_template('FORM', array('TABINDEX' => placeholder_number(), 'HIDDEN' => $hidden, 'TEXT' => $text, 'FIELDS' => placeholder_fields(), 'URL' => placeholder_url(), 'SUBMIT_NAME' => 'proceed'));
    return $form;
}
Beispiel #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__ecommerce_item_details()
 {
     return array(lorem_globalise(do_lorem_template('ECOMMERCE_ITEM_DETAILS', array('FIELDS' => placeholder_fields())), NULL, '', true));
 }
Beispiel #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__field_map_catalogue_embed_screen()
 {
     $entries = new ocp_tempcode();
     $entries->attach(do_lorem_template('CATALOGUE_DEFAULT_ENTRY_EMBED', array('FIELDS' => placeholder_fields(), 'VIEW_URL' => placeholder_url(), 'FIELD_0' => lorem_word())));
     return array(lorem_globalise(do_lorem_template('CATALOGUE_DEFAULT_CATEGORY_EMBED', array('ENTRIES' => $entries, 'ROOT' => placeholder_id())), NULL, '', true));
 }
Beispiel #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__ocf_posting_screen_posts()
 {
     require_css('ocf');
     require_lang('ocf');
     $posts = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $post = do_lorem_template('OCF_ISOLATED_POST', array('ID' => placeholder_id(), 'POST' => placeholder_fields(), 'MAIN_TITLE' => lorem_word(), 'TITLE' => lorem_phrase(), 'URL' => placeholder_url(), 'DATE' => placeholder_time(), 'POSTER' => lorem_phrase(), 'TREE' => lorem_phrase()));
         $posts->attach(do_lorem_template('OCF_POSTING_SCREEN_POST', array('TITLE' => lorem_phrase(), 'ID' => placeholder_id(), 'POSTER' => lorem_phrase(), 'POST' => $post)));
     }
     return array(lorem_globalise(do_lorem_template('OCF_POSTING_SCREEN_POSTS', array('POSTS' => $posts)), NULL, '', true));
 }
Beispiel #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__purchase_wizard_stage_details()
 {
     return array(lorem_globalise(do_lorem_template('PURCHASE_WIZARD_STAGE_DETAILS', array('TEXT' => lorem_sentence_html(), 'FIELDS' => placeholder_fields())), NULL, '', true));
 }
Beispiel #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__support_ticket_screen()
 {
     require_javascript('javascript_ajax');
     require_lang('ocf');
     $other_tickets = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $other_tickets->attach(do_lorem_template('SUPPORT_TICKET_LINK', array('NUM_POSTS' => placeholder_number(), 'CLOSED' => lorem_phrase(), 'URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'DATE' => placeholder_date(), 'DATE_RAW' => placeholder_date_raw(), 'PROFILE_LINK' => placeholder_url(), 'LAST_POSTER' => lorem_phrase(), 'UNCLOSED' => lorem_word())));
     }
     $comments = new ocp_tempcode();
     $comment_form = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST_URL' => placeholder_url(), 'FIRST_POST' => lorem_paragraph_html(), 'USE_CAPTCHA' => false, 'ATTACHMENTS' => lorem_phrase(), 'ATTACH_SIZE_FIELD' => lorem_phrase(), 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'GET_EMAIL' => lorem_word(), 'EMAIL_OPTIONAL' => lorem_word(), 'GET_TITLE' => true, 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'COMMENT_URL' => '', 'SUBMIT_NAME' => lorem_phrase(), 'TITLE' => lorem_phrase(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true));
     return array(lorem_globalise(do_lorem_template('SUPPORT_TICKET_SCREEN', array('TOGGLE_TICKET_CLOSED_URL' => placeholder_url(), 'CLOSED' => lorem_phrase(), 'OTHER_TICKETS' => $other_tickets, 'USERNAME' => lorem_word(), 'PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'NEW' => lorem_phrase(), 'TICKET_PAGE_TEXT' => lorem_sentence_html(), 'TYPES' => placeholder_array(), 'STAFF_ONLY' => placeholder_fields(), 'POSTER' => lorem_phrase(), 'TITLE' => lorem_title(), 'COMMENTS' => $comments, 'COMMENT_FORM' => $comment_form, 'STAFF_DETAILS' => placeholder_url(), 'URL' => placeholder_url(), 'ADD_TICKET_URL' => placeholder_url())), NULL, '', true));
 }
Beispiel #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__quiz_screen()
 {
     //This is for getting the do_ajax_request() javascript function.
     require_javascript('javascript_ajax');
     $warning_details = do_lorem_template('WARNING_TABLE', array('WARNING' => lorem_phrase()));
     return array(lorem_globalise(do_lorem_template('QUIZ_SCREEN', array('TAGS' => lorem_word_html(), 'ID' => placeholder_id(), 'WARNING_DETAILS' => $warning_details, 'URL' => placeholder_url(), 'TITLE' => lorem_title(), 'START_TEXT' => lorem_sentence_html(), 'FIELDS' => placeholder_fields(), 'TIMEOUT' => '5', 'EDIT_URL' => placeholder_url())), NULL, '', true));
 }
Beispiel #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__ocf_cpf_permissions_tab()
 {
     return array(lorem_globalise(do_lorem_template('OCF_CPF_PERMISSIONS_TAB', array('FIELDS' => placeholder_fields())), NULL, '', true));
 }
Beispiel #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__administrative__tester_add_section_screen()
 {
     $tests = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $tests->attach(do_lorem_template('TESTER_TEST_GROUP', array('ID' => 'edit_' . strval($k), 'FIELDS' => placeholder_fields())));
     }
     $add_template = do_lorem_template('TESTER_TEST_GROUP_NEW', array('ID' => lorem_word(), 'FIELDS' => placeholder_fields()));
     return array(lorem_globalise(do_lorem_template('TESTER_ADD_SECTION_SCREEN', array('TITLE' => lorem_title(), 'SUBMIT_NAME' => lorem_phrase(), 'TESTS' => $tests, 'URL' => placeholder_url(), 'FIELDS' => placeholder_fields(), 'ADD_TEMPLATE' => $add_template)), NULL, '', true));
 }
Beispiel #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__attachments()
 {
     require_javascript('javascript_validation');
     require_javascript('javascript_swfupload');
     require_javascript('javascript_posting');
     require_javascript('javascript_editing');
     $content = do_lorem_template('ATTACHMENT', array('I' => placeholder_number(), 'POSTING_FIELD_NAME' => ''));
     $attachments = do_lorem_template('ATTACHMENTS', array('ATTACHMENT_TEMPLATE' => $content, 'IMAGE_TYPES' => placeholder_types(), 'ATTACHMENTS' => $content, 'POSTING_FIELD_NAME' => '', 'MAX_ATTACHMENTS' => placeholder_number(), 'NUM_ATTACHMENTS' => placeholder_number()));
     return array(lorem_globalise(do_lorem_template('POSTING_FORM', array('TABINDEX_PF' => placeholder_number(), 'JAVASCRIPT' => '', 'PREVIEW' => lorem_phrase(), 'COMCODE_EDITOR' => lorem_phrase(), 'COMCODE_EDITOR_SMALL' => lorem_phrase(), 'CLASS' => lorem_phrase(), 'COMCODE_URL' => placeholder_url(), 'EXTRA' => lorem_phrase(), 'POST_COMMENT' => lorem_phrase(), 'EMOTICON_CHOOSER' => lorem_phrase(), 'SUBMIT_NAME' => lorem_word(), 'HIDDEN_FIELDS' => '', 'COMCODE_HELP' => lorem_phrase(), 'URL' => placeholder_url(), 'POST' => lorem_phrase(), 'DEFAULT_PARSED' => lorem_phrase(), 'CONTINUE_URL' => placeholder_url(), 'ATTACHMENTS' => $attachments, 'SPECIALISATION' => placeholder_fields(), 'SPECIALISATION2' => placeholder_fields())), NULL, '', true));
 }