Example #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__forum_attachment_link()
 {
     $content = do_lorem_template('FORUM_ATTACHMENT_IMAGE_THUMB', array('FULL' => placeholder_url(), 'URL' => placeholder_image_url()));
     $content->attach(do_lorem_template('FORUM_ATTACHMENT_LINK', array('FULL' => placeholder_url(), 'FILENAME' => lorem_word(), 'CLEAN_SIZE' => placeholder_filesize(), 'NUM_DOWNLOADS' => placeholder_number())));
     return array(lorem_globalise($content, 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__show_revision_history()
 {
     $revision_history = do_lorem_template('REVISION_HISTORY_LINE', array('RENDERED_DIFF' => lorem_phrase(), 'EDITOR' => lorem_phrase(), 'DATE' => placeholder_time(), 'DATE_RAW' => placeholder_date_raw(), 'RESTORE_URL' => placeholder_url(), 'URL' => placeholder_url(), 'SIZE' => placeholder_filesize()));
     return array(lorem_globalise(do_lorem_template('REVISION_HISTORY_WRAP', array('CONTENT' => $revision_history)), NULL, '', true));
 }
Example #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__download_screen()
 {
     require_lang('galleries');
     $images_details = new ocp_tempcode();
     foreach (placeholder_array() as $row) {
         $image = do_lorem_template('DOWNLOAD_SCREEN_IMAGE', array('ID' => placeholder_id(), 'VIEW_URL' => placeholder_url(), 'EDIT_URL' => placeholder_url(), 'THUMB' => placeholder_image(), 'COMMENT' => lorem_phrase()));
         $cell = do_lorem_template('DOWNLOAD_GALLERY_IMAGE_CELL', array('CONTENT' => $image));
         $images_details->attach(do_lorem_template('DOWNLOAD_GALLERY_ROW', array('CELLS' => $cell)));
     }
     return array(lorem_globalise(do_lorem_template('DOWNLOAD_SCREEN', array('ORIGINAL_FILENAME' => lorem_phrase(), 'TAGS' => lorem_word_html(), 'LICENCE' => lorem_phrase(), 'LICENCE_TITLE' => lorem_phrase(), 'LICENCE_HYPERLINK' => placeholder_link(), 'SUBMITTER' => placeholder_id(), 'EDIT_DATE' => placeholder_time(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'VIEWS' => lorem_phrase(), 'DATE' => placeholder_time(), 'DATE_RAW' => placeholder_date_raw(), 'NUM_DOWNLOADS' => placeholder_number(), 'TITLE' => lorem_title(), 'NAME' => lorem_phrase(), 'OUTMODE_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'EDIT_URL' => placeholder_url(), 'ADD_IMG_URL' => placeholder_url(), 'DESCRIPTION' => lorem_paragraph_html(), 'ADDITIONAL_DETAILS' => lorem_sentence_html(), 'IMAGES_DETAILS' => $images_details, 'ID' => placeholder_id(), 'FILE_SIZE' => placeholder_filesize(), 'AUTHOR_URL' => placeholder_url(), 'AUTHOR' => lorem_phrase(), 'TRACKBACK_DETAILS' => lorem_sentence_html(), 'RATING_DETAILS' => lorem_sentence_html(), 'COMMENTS_DETAILS' => lorem_sentence_html(), 'NUM_IMAGES' => '3')), NULL, '', true));
 }
Example #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__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));
 }
Example #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__attachment_right()
 {
     $temp_tpl = do_lorem_template('ATTACHMENT_IMG', array('A_DESCRIPTION' => lorem_phrase(), 'SCRIPT' => find_script('attachment'), 'ID' => placeholder_id(), 'SUP_PARAMS' => placeholder_id(), 'A_THUMB' => placeholder_image_url(), 'FORUM_DB_BIN' => lorem_word(), 'CLEAN_SIZE' => placeholder_filesize(), 'A_WIDTH' => placeholder_number(), 'A_HEIGHT' => placeholder_number(), 'A_ORIGINAL_FILENAME' => lorem_word()));
     return array(lorem_globalise(do_lorem_template('ATTACHMENT_RIGHT', array('CONTENT' => $temp_tpl)), NULL, '', true));
 }
Example #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__gallery_flowmode_image()
 {
     $image = do_lorem_template('GALLERY_FLOWMODE_IMAGE', array('MAIN' => lorem_phrase(), 'DESCRIPTION' => lorem_paragraph_html(), 'FILE_SIZE' => placeholder_filesize(), 'RATING_DETAILS' => '', 'CAT' => placeholder_id(), 'THUMB_URL' => placeholder_image_url(), 'FULL_URL' => placeholder_url(), 'ID' => placeholder_id(), 'VIEWS' => lorem_phrase(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'SUBMITTER' => lorem_word_html(), 'THUMB' => placeholder_url(), 'VIEW_URL' => placeholder_url(), 'EDIT_URL' => placeholder_url()));
     $tags = do_lorem_template('TAGS', array('TAG' => lorem_word(), 'TAGS' => placeholder_array(), 'LINK_FULLSCOPE' => lorem_word(), 'TYPE' => NULL));
     $entries = new ocp_tempcode();
     foreach (placeholder_array(10) as $v) {
         $entries->attach(do_lorem_template('GALLERY_FLOW_ENTRY', array('ID' => lorem_word(), 'VIEWS' => placeholder_number(), 'ADD_DATE_RAW' => placeholder_time(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'SUBMITTER' => lorem_word(), 'CLASS' => lorem_word(), 'THUMB' => placeholder_image(), 'VIEW_URL' => placeholder_url(), 'VIEW_URL_2' => placeholder_url(), 'TYPE' => lorem_word())));
     }
     $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' => ''));
     $browse = do_lorem_template('NEXT_BROWSER_BROWSE_NEXT', array('NEXT_LINK' => placeholder_url(), 'PREVIOUS_LINK' => placeholder_url(), 'PAGE_NUM' => placeholder_number(), 'NUM_PAGES' => placeholder_number()));
     return array(lorem_globalise(do_lorem_template('GALLERY_FLOW_MODE_SCREEN', array('_TITLE' => lorem_phrase(), 'VIEW_URL' => placeholder_url(), 'FULL_URL' => placeholder_url(), 'PROBE_TYPE' => lorem_phrase(), 'ENTRY_VIEWS' => placeholder_number(), 'ENTRY_ADD_DATE_RAW' => placeholder_date_raw(), 'ENTRY_EDIT_DATE_RAW' => placeholder_date_raw(), 'ENTRY_TRACKBACK_DETAILS' => lorem_sentence_html(), 'ENTRY_RATING_DETAILS' => lorem_sentence_html(), 'ENTRY_COMMENT_DETAILS' => lorem_sentence_html(), 'ENTRY_EDIT_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'TAGS' => $tags, 'RATING_DETAILS' => lorem_sentence_html(), 'COMMENT_DETAILS' => $comment_details, 'BROWSE' => $browse, 'REP_IMAGE_URL' => placeholder_image_url(), 'TITLE' => lorem_title(), 'MEMBER_DETAILS' => lorem_paragraph_html(), 'DESCRIPTION' => lorem_paragraph_html(), 'CHILDREN' => lorem_phrase(), 'CURRENT_ENTRY' => $image, 'ENTRIES' => $entries, 'EDIT_URL' => placeholder_url(), 'ADD_GALLERY_URL' => placeholder_url(), 'IMAGE_URL' => placeholder_image_url(), 'MEMBER_ID' => placeholder_id(), 'VIDEO_URL' => placeholder_url(), 'MAY_DOWNLOAD' => lorem_phrase(), 'CAT' => placeholder_id(), 'FIRST_ENTRY_ID' => placeholder_id(), 'SORTING' => lorem_phrase())), NULL, '', true));
 }