/** * 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__flagrant_manage_screen() { $about_current = do_lorem_template('FLAGRANT_DETAILS', array('USERNAME' => lorem_word_html(), 'DAYS_ORDERED' => lorem_phrase(), 'DATE_RAW' => placeholder_time(), 'DATE' => placeholder_time())); $out = new ocp_tempcode(); foreach (placeholder_array() as $key => $value) { $text = do_lorem_template('FLAGRANT_STORE_LIST_LINE', array('MESSAGE' => $value, 'STATUS' => do_lang('NEW'))); $out->attach(do_lorem_template('FORM_SCREEN_INPUT_LIST_ENTRY', array('SELECTED' => false, 'DISABLED' => false, 'CLASS' => '', 'NAME' => strval($key), 'TEXT' => $text->evaluate()))); } $input = do_lorem_template('FORM_SCREEN_INPUT_LIST', array('TABINDEX' => '5', 'REQUIRED' => '_required', 'NAME' => lorem_word(), 'CONTENT' => $out, 'INLINE_LIST' => true)); $fields = do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => lorem_word(), 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')); //Create 'FLAGRANT_MANAGE_SCREEN' using the sub-templates 'FLAGRANT_DETAILS' and 'FLAGRANT_STORE_LIST_LINE' return array(lorem_globalise(do_lorem_template('FORM_SCREEN', array('TITLE' => lorem_title(), 'TEXT' => $about_current, 'HIDDEN' => '', 'URL' => placeholder_url(), 'GET' => true, 'FIELDS' => $fields, 'SUBMIT_NAME' => lorem_word())), 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__search_result_catalogue_entries() { return array(lorem_globalise(do_lorem_template('SEARCH_RESULT_CATALOGUE_ENTRIES', array('BUILDUP' => lorem_phrase(), 'NAME' => lorem_word_html(), 'TITLE' => lorem_word())), 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__iotd_view_screen() { require_lang('ocf'); require_lang('captcha'); require_lang('trackbacks'); $trackbacks = new ocp_tempcode(); foreach (placeholder_array(1) as $k => $v) { $trackbacks->attach(do_lorem_template('TRACKBACK', array('ID' => placeholder_id(), 'TIME_RAW' => placeholder_date_raw(), 'TIME' => placeholder_date(), 'URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'EXCERPT' => lorem_paragraph(), 'NAME' => lorem_phrase()))); } $trackback_details = do_lorem_template('TRACKBACK_WRAPPER', array('TRACKBACKS' => $trackbacks, 'TRACKBACK_PAGE' => placeholder_id(), 'TRACKBACK_ID' => placeholder_id(), 'TRACKBACK_TITLE' => lorem_phrase())); $rating_details = new ocp_tempcode(); $review_titles = array(); $review_titles[] = array('REVIEW_TITLE' => lorem_word(), 'REVIEW_RATING' => make_string_tempcode(float_format(10.0))); $comments = ''; $form = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST_URL' => placeholder_url(), 'FIRST_POST' => lorem_paragraph_html(), 'TYPE' => 'downloads', 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => $review_titles, 'USE_CAPTCHA' => true, 'GET_EMAIL' => false, 'EMAIL_OPTIONAL' => true, 'GET_TITLE' => true, 'POST_WARNING' => do_lang('POST_WARNING'), 'COMMENT_TEXT' => get_option('comment_text'), 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'COMMENT_URL' => placeholder_url(), 'TITLE' => lorem_word(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true)); $comment_details = do_lorem_template('COMMENTS_WRAPPER', array('TYPE' => lorem_phrase(), 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => $review_titles, 'AUTHORISED_FORUM_LINK' => placeholder_url(), 'FORM' => $form, 'COMMENTS' => $comments)); return array(lorem_globalise(do_lorem_template('IOTD_VIEW_SCREEN', array('TITLE' => lorem_title(), 'SUBMITTER' => lorem_word_html(), 'I_TITLE' => lorem_phrase(), 'CAPTION' => lorem_phrase(), 'DATE_RAW' => placeholder_date_raw(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_time(), 'ADD_DATE' => placeholder_time(), 'EDIT_DATE' => placeholder_time(), 'VIEWS' => placeholder_number(), 'TRACKBACK_DETAILS' => $trackback_details, 'RATING_DETAILS' => $rating_details, 'COMMENT_DETAILS' => $comment_details, 'EDIT_URL' => placeholder_url(), 'URL' => placeholder_image_url())), 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 boolean Whether to show for a has-voted-poll or not. * @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_topic_wrap($voted = false) { require_css('ocf'); require_lang('ocf'); require_lang('polls'); $warning_details = do_lorem_template('WARNING_TABLE', array('WARNING' => lorem_phrase())); foreach (placeholder_array() as $k => $v) { $members_viewing = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { $members_viewing->attach(do_lorem_template('OCF_USER_MEMBER', array('PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'AT' => lorem_phrase(), 'COLOUR' => lorem_word()))); } $results_browser = placeholder_result_browser(); $quick_reply = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST' => lorem_paragraph_html(), 'USE_CAPTCHA' => false, 'GET_EMAIL' => false, 'EMAIL_OPTIONAL' => true, 'GET_TITLE' => false, 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'EM' => placeholder_emoticon_chooser(), 'EXPAND_TYPE' => 'expand', 'DISPLAY' => '', 'MORE_URL' => placeholder_url(), 'FIRST_POST_URL' => placeholder_url(), 'COMMENT_URL' => placeholder_url(), 'TITLE' => lorem_word(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true)); $poll = new ocp_tempcode(); $num_choices = do_lorem_template('PARAGRAPH', array('TEXT' => lorem_phrase(), 'CLASS' => lorem_word())); $private = $num_choices; if (!$voted) { $answers = new ocp_tempcode(); $answer_tpl = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RADIO', array('REAL_BUTTON' => '', 'ID' => placeholder_random(), 'ANSWER' => lorem_phrase(), 'I' => placeholder_random()))); } $answers->attach($answer_tpl); $answer_tpl = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER', array('REAL_BUTTON' => '', 'ID' => placeholder_random(), 'ANSWER' => lorem_phrase(), 'I' => placeholder_random()))); } $answers->attach($answer_tpl); $button = do_lorem_template('OCF_TOPIC_POLL_BUTTON', array('RESULTS_URL' => placeholder_url())); $poll->attach(do_lorem_template('OCF_TOPIC_POLL', array('ID' => placeholder_random(), 'NUM_CHOICES' => $num_choices, 'PRIVATE' => $private, 'QUESTION' => lorem_phrase(), 'ANSWERS' => $answers, 'REAL_BUTTON' => '', 'BUTTON' => $button, 'VOTE_URL' => placeholder_url(), 'MINIMUM_SELECTIONS' => placeholder_number(), 'MAXIMUM_SELECTIONS' => placeholder_number()))); } else { $answers = new ocp_tempcode(); $answer_tpl = new ocp_tempcode(); $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RESULTS', array('ID' => placeholder_random(), 'NUM_VOTES' => '10', 'WIDTH' => '30', 'ANSWER' => lorem_phrase(), 'I' => placeholder_random()))); $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RESULTS', array('ID' => placeholder_random(), 'NUM_VOTES' => '15', 'WIDTH' => '45', 'ANSWER' => lorem_phrase(), 'I' => placeholder_random()))); $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RESULTS', array('ID' => placeholder_random(), 'NUM_VOTES' => '20', 'WIDTH' => '60', 'ANSWER' => lorem_phrase(), 'I' => placeholder_random()))); $answers->attach($answer_tpl); $button = new ocp_tempcode(); $poll->attach(do_lorem_template('OCF_TOPIC_POLL_VIEW_RESULTS', array('ID' => placeholder_random(), 'NUM_CHOICES' => $num_choices, 'PRIVATE' => $private, 'QUESTION' => lorem_phrase(), 'ANSWERS' => $answers, 'REAL_BUTTON' => '', 'BUTTON' => $button, 'VOTE_URL' => placeholder_url(), 'MINIMUM_SELECTIONS' => placeholder_number(), 'MAXIMUM_SELECTIONS' => placeholder_number()))); } //buttons $buttons = new ocp_tempcode(); foreach (placeholder_array(1) as $k => $v) { $buttons->attach(do_lorem_template('SCREEN_BUTTON', array('REL' => lorem_word(), 'IMMEDIATE' => NULL, 'URL' => placeholder_url(), 'IMG' => placeholder_img_code('page'), 'TITLE' => lorem_word()))); } //posts $posts = new ocp_tempcode(); $first_unread = do_lorem_template('OCF_TOPIC_FIRST_UNREAD'); $last_edited = do_lorem_template('OCF_TOPIC_POST_LAST_EDITED', array('LAST_EDIT_DATE_RAW' => placeholder_date_raw(), 'LAST_EDIT_DATE' => placeholder_time(), 'LAST_EDIT_PROFILE_URL' => placeholder_url(), 'LAST_EDIT_USERNAME' => lorem_word())); $custom_fields = do_lorem_template('OCF_TOPIC_POST_CUSTOM_FIELD', array('NAME' => lorem_phrase(), 'VALUE' => placeholder_ip())); $poster_details = do_lorem_template('OCF_GUEST_DETAILS', array('CUSTOM_FIELDS' => $custom_fields)); $poster_details_mem = do_lorem_template('OCF_POSTER_DETAILS', array('AVATAR_URL' => placeholder_url(), 'ONLINE' => false, 'POSTS' => placeholder_number(), 'POINTS' => placeholder_number(), 'JOIN_DATE_RAW' => placeholder_date_raw(), 'POSTER' => lorem_phrase(), 'JOIN_DATE' => placeholder_time(), 'PRIMARY_GROUP_NAME' => lorem_phrase(), 'CUSTOM_FIELDS' => lorem_phrase(), 'CUSTOM_FIELDS_FULL' => lorem_phrase())); $poster = do_lorem_template('OCF_POSTER_GUEST', array('IP_LINK' => placeholder_url(), 'POSTER_DETAILS' => $poster_details, 'POSTER_USERNAME' => lorem_word())); $poster->attach(do_lorem_template('OCF_POSTER_MEMBER', array('ID' => placeholder_random(), 'POSTER_DETAILS' => $poster_details_mem, 'PROFILE_URL' => placeholder_url(), 'POSTER_USERNAME' => lorem_word(), 'OTHER_USERGROUPS' => array(lorem_word_html()), 'POSTER' => placeholder_number(), 'HIGHLIGHT_NAME' => lorem_word_html(), 'ONLINE' => false))); $post_avatar = do_lorem_template('OCF_TOPIC_POST_AVATAR', array('AVATAR' => placeholder_image_url())); $rank_images = do_lorem_template('OCF_RANK_IMAGE', array('GROUP_NAME' => lorem_phrase(), 'USERNAME' => lorem_word(), 'IMG' => placeholder_img_code(''), 'IS_LEADER' => lorem_phrase())); //buttons $buttons = new ocp_tempcode(); foreach (placeholder_array(1) as $k => $v) { $buttons->attach(do_lorem_template('SCREEN_ITEM_BUTTON', array('REL' => lorem_word(), 'IMMEDIATE' => '', 'URL' => placeholder_url(), 'IMG' => placeholder_img_code('pageitem'), 'TITLE' => lorem_word()))); } $posts->attach(do_lorem_template('OCF_TOPIC_POST', array('ID' => placeholder_random(), 'TOPIC_FIRST_POST_ID' => placeholder_random(), 'TOPIC_FIRST_POSTER' => lorem_phrase(), 'POST_ID' => placeholder_random(), 'URL' => placeholder_url(), 'CLASS' => lorem_phrase(), 'EMPHASIS' => lorem_phrase(), 'FIRST_UNREAD' => $first_unread, 'POSTER_TITLE' => lorem_word(), 'POST_TITLE' => lorem_word(), 'POST_DATE_RAW' => placeholder_date_raw(), 'POST_DATE' => placeholder_time(), 'POST' => lorem_phrase(), 'TOPIC_ID' => placeholder_id(), 'LAST_EDITED_RAW' => lorem_phrase(), 'LAST_EDITED' => $last_edited, 'POSTER_ID' => placeholder_id(), 'POSTER' => $poster, 'POSTER_DETAILS' => $poster_details, 'POST_AVATAR' => $post_avatar, 'RANK_IMAGES' => $rank_images, 'BUTTONS' => $buttons, 'SIGNATURE' => lorem_phrase(), 'UNVALIDATED' => lorem_phrase(), 'DESCRIPTION' => lorem_phrase()))); } $topic_tpl = do_lorem_template('OCF_TOPIC_WRAP', array('THREADED' => false, 'ID' => placeholder_id(), 'TITLE' => lorem_phrase(), 'WARNING_DETAILS' => $warning_details, 'MAX' => lorem_phrase(), 'ACTION_URL' => placeholder_url(), 'NUM_GUESTS' => placeholder_number(), 'NUM_MEMBERS' => placeholder_number(), 'MEMBERS_VIEWING' => $members_viewing, 'RESULTS_BROWSER' => $results_browser, 'MODERATOR_ACTIONS' => placeholder_options(), 'MARKED_POST_ACTIONS' => placeholder_options(), 'QUICK_REPLY' => $quick_reply, 'TREE' => lorem_phrase(), 'POLL' => $poll, 'SCREEN_BUTTONS' => $buttons, 'POSTS' => $posts, 'MAY_CHANGE_MAX' => lorem_word(), 'LAST_POSTER' => placeholder_random())); //Wrap the content $notifications = do_lorem_template('OCF_NOTIFICATION', array('ADDITIONAL_POSTS' => placeholder_number(), '_ADDITIONAL_POSTS' => lorem_phrase(), 'ID' => placeholder_random(), 'U_TITLE' => lorem_word(), 'IGNORE_URL' => placeholder_url(), 'IGNORE_URL_2' => placeholder_url(), 'REPLY_URL' => placeholder_url(), 'TOPIC_URL' => placeholder_url(), 'POST' => lorem_phrase(), 'DESCRIPTION' => lorem_paragraph_html(), 'TIME' => placeholder_time(), 'TIME_RAW' => placeholder_date_raw(), 'BY' => lorem_phrase(), 'PROFILE_LINK' => placeholder_url(), 'TYPE' => lorem_phrase())); $mem_link = new ocp_tempcode(); foreach (placeholder_array() as $v) { $mem_link->attach(do_lorem_template('OCF_MEMBER_LINK', array('URL' => placeholder_url(), 'page' => lorem_phrase(), 'id' => placeholder_random(), 'LANG' => lorem_phrase()))); } $head = new ocp_tempcode(); $head->attach(do_lorem_template('OCF_MEMBER_BAR', array('AVATAR' => placeholder_image_url(), 'PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'LOGOUT_URL' => placeholder_url(), 'NUM_POINTS_ADVANCE' => placeholder_number(), 'NUM_POINTS' => placeholder_number(), 'NUM_POSTS' => placeholder_number(), 'PRIMARY_GROUP' => lorem_phrase(), 'LAST_VISIT_DATE_RAW' => placeholder_date_raw(), 'LAST_VISIT_DATE' => placeholder_time(), 'MEMBER_LINKS' => $mem_link, 'PERSONAL_TOPIC_URL' => placeholder_url(), 'NEW_POSTS_URL' => placeholder_url(), 'UNREAD_TOPICS_URL' => placeholder_url(), 'RECENTLY_READ_URL' => placeholder_url(), 'PT_EXTRA' => lorem_phrase(), 'NEW_TOPICS' => lorem_phrase(), 'NEW_POSTS' => lorem_phrase(), 'INLINE_PERSONAL_POSTS_URL' => placeholder_url(), 'MAX_AVATAR_HEIGHT' => placeholder_number()))); //$head->attach(do_lorem_template('OCF_GUEST_BAR',array('NAVIGATION'=>lorem_phrase(),'LOGIN_URL'=>placeholder_url(),'JOIN_LINK'=>placeholder_url(),'FULL_LINK'=>placeholder_url()))); $birthdays = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { $birthdays->attach(do_lorem_template('OCF_BIRTHDAY_LINK', array('AGE' => placeholder_number(), 'PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'BIRTHDAY_LINK' => placeholder_url()))); } $birthdays = do_lorem_template('OCF_BIRTHDAYS', array('BIRTHDAYS' => $birthdays)); $foot = do_lorem_template('OCF_STATS', array('NEWEST_MEMBER_PROFILE_URL' => placeholder_url(), 'NEWEST_MEMBER_USERNAME' => lorem_word(), 'NUM_MEMBERS' => placeholder_number(), 'NUM_TOPICS' => placeholder_number(), 'NUM_POSTS' => placeholder_number(), 'BIRTHDAYS' => $birthdays, 'USERS_ONLINE' => lorem_phrase(), 'USERS_ONLINE_URL' => placeholder_url(), 'page' => lorem_phrase(), 'GID' => placeholder_random(), 'GCOLOUR' => lorem_word(), 'GTITLE' => lorem_word(), 'GROUPS' => placeholder_array())); return array(lorem_globalise(do_lorem_template('OCF_WRAPPER', array('TITLE' => lorem_title(), 'NOTIFICATIONS' => $notifications, 'HEAD' => $head, 'FOOT' => $foot, 'CONTENT' => $topic_tpl)), 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__ecom_subscription_button_via_secpay() { return array(lorem_globalise(do_lorem_template('ECOM_SUBSCRIPTION_BUTTON_VIA_SECPAY', array('PRODUCT' => lorem_phrase(), 'DIGEST' => lorem_phrase(), 'TEST' => lorem_phrase(), 'TRANS_ID' => placeholder_id(), 'FIRST_REPEAT' => lorem_phrase(), 'LENGTH' => lorem_phrase(), 'LENGTH_UNITS_2' => lorem_phrase(), 'ITEM_NAME' => lorem_word_html(), 'PURCHASE_ID' => placeholder_id(), 'AMOUNT' => placeholder_number(), 'CURRENCY' => lorem_phrase(), 'USERNAME' => lorem_word(), 'IPN_URL' => placeholder_url(), 'PRICE' => placeholder_number())), 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__block_main_forum_news() { require_lang('news'); //Create the 'NEWS_PIECE_SUMMARY' template value $out = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { $out->attach(do_lorem_template('NEWS_PIECE_SUMMARY', array('TRUNCATE' => false, 'BLOG' => false, 'FIRSTTIME' => lorem_word(), 'LASTTIME' => lorem_word(), 'CLOSED' => lorem_word(), 'FIRSTUSERNAME' => lorem_word(), 'LASTUSERNAME' => lorem_word(), 'FIRSTMEMBERID' => lorem_word(), 'LASTMEMBERID' => lorem_word(), 'ID' => lorem_word(), 'FULL_URL' => placeholder_url(), 'SUBMITTER' => lorem_word(), 'DATE' => placeholder_time(), 'DATE_RAW' => placeholder_date_raw(), 'NEWS_TITLE' => lorem_word(), 'CATEGORY' => '', 'IMG' => '', 'AUTHOR' => lorem_word(), 'AUTHOR_URL' => placeholder_url(), 'NEWS' => lorem_paragraph()))); } //Create the 'BLOCK_MAIN_FORUM_NEWS' with 'NEWS_PIECE_SUMMARY' as sub-template. return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_FORUM_NEWS', array('TITLE' => lorem_word(), 'FORUM_NAME' => lorem_word_html(), 'CONTENT' => $out, 'BRIEF' => lorem_phrase(), 'ARCHIVE_URL' => placeholder_url(), 'SUBMIT_URL' => placeholder_url(), 'RSS_URL' => placeholder_url(), 'ATOM_URL' => placeholder_url())), 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__gallery_entry_screen() { $nav = do_lorem_template('GALLERY_NAV', array('BACK_URL' => placeholder_url(), 'SLIDESHOW' => false, '_X' => placeholder_number(), '_N' => placeholder_number(), 'X' => placeholder_number(), 'N' => placeholder_number(), 'SLIDESHOW_URL' => placeholder_url(), 'SLIDESHOW_NEXT_URL' => placeholder_url(), 'PREVIOUS_URL' => placeholder_url(), 'NEXT_URL' => placeholder_url(), 'MORE_URL' => placeholder_url(), 'CATEGORY_NAME' => 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' => '')); $video = do_lorem_template('GALLERY_VIDEO_GENERAL', array('URL' => placeholder_url(), 'WIDTH' => placeholder_number(), 'HEIGHT' => placeholder_number())); return array(lorem_globalise(do_lorem_template('GALLERY_ENTRY_SCREEN', array('CAT' => placeholder_id(), 'MEDIA_TYPE' => 'image', 'ID' => placeholder_id(), 'SLIDESHOW' => false, 'TRUE_GALLERY_TITLE' => lorem_phrase(), 'E_TITLE' => lorem_phrase(), 'GALLERY_TITLE' => lorem_phrase(), 'MEMBER_ID' => placeholder_id(), 'TAGS' => lorem_word_html(), 'TITLE' => lorem_title(), 'SUBMITTER' => lorem_word_html(), 'URL' => placeholder_url(), 'VIDEO_DETAILS' => lorem_sentence_html(), 'MEMBER_DETAILS' => lorem_sentence_html(), 'X' => lorem_phrase(), 'N' => lorem_phrase(), 'VIEWS' => lorem_phrase(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'ADD_DATE' => placeholder_date(), 'EDIT_DATE' => placeholder_date(), 'RATING_DETAILS' => lorem_sentence_html(), 'TRACKBACK_DETAILS' => lorem_sentence_html(), 'COMMENT_DETAILS' => $comment_details, 'EDIT_URL' => placeholder_url(), 'NAV' => $nav, 'COMMENTS' => lorem_phrase(), 'VIDEO' => $video, '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__comcode_page_screen() { return array(lorem_globalise(do_lorem_template('COMCODE_PAGE_SCREEN', array('BEING_INCLUDED' => false, 'IS_PANEL' => false, 'SUBMITTER' => placeholder_id(), 'TAGS' => lorem_word_html(), 'WARNING_DETAILS' => '', 'EDIT_DATE_RAW' => placeholder_date_raw(), 'SHOW_AS_EDIT' => lorem_phrase(), 'CONTENT' => lorem_phrase(), 'EDIT_URL' => placeholder_url(), 'ADD_CHILD_URL' => placeholder_url(), 'NAME' => lorem_word())), 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__comments() { require_lang('comcode'); require_javascript('javascript_swfupload'); require_javascript('javascript_posting'); $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(), 'POSTING_FIELD_NAME' => '', 'ATTACHMENTS' => $content, 'MAX_ATTACHMENTS' => placeholder_number(), 'NUM_ATTACHMENTS' => placeholder_number())); $ret = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'ATTACHMENTS' => $attachments, 'ATTACH_SIZE_FIELD' => '', 'POST_WARNING' => lorem_phrase(), 'COMMENT_TEXT' => lorem_sentence_html(), 'GET_EMAIL' => lorem_word_html(), 'EMAIL_OPTIONAL' => lorem_word_html(), 'GET_TITLE' => true, 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => lorem_phrase(), 'COMMENT_URL' => placeholder_url(), 'SUBMIT_NAME' => lorem_word(), 'TITLE' => lorem_word(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true, 'FIRST_POST' => lorem_paragraph_html(), 'FIRST_POST_URL' => placeholder_url())); $ret->attach(do_lorem_template('COMMENT_AJAX_HANDLER', array('OPTIONS' => '', 'HASH' => ''))); return array(lorem_globalise($ret, 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__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)); }
/** * 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__security_alert_screen() { require_lang('security'); return array(lorem_globalise(do_lorem_template('SECURITY_ALERT_SCREEN', array('TITLE' => lorem_title(), 'USER_AGENT' => lorem_phrase(), 'REFERER' => lorem_phrase(), 'USER_OS' => lorem_phrase(), 'REASON' => lorem_phrase(), 'IP' => lorem_phrase(), 'USERNAME' => lorem_word_html(), 'POST' => lorem_phrase(), 'URL' => placeholder_url())), 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__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)); }
/** * 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__calendar_screen() { $sub = new ocp_tempcode(); foreach (placeholder_array() as $v) { $sub->attach(do_lorem_template('CALENDAR_SCREEN_PERSONAL_SUBSCRIPTION', array('UNSUBSCRIBE_URL' => placeholder_url(), 'TIME' => placeholder_time()))); } $subed = new ocp_tempcode(); foreach (placeholder_array() as $v) { $subed->attach(do_lorem_template('CALENDAR_SCREEN_SUBSCRIPTION', array('MEMBER_URL' => placeholder_url(), 'USERNAME' => 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' => '')); return array(lorem_globalise(do_lorem_template('CALENDAR_SCREEN', array('ID' => placeholder_id(), 'TAGS' => lorem_word_html(), 'WARNING_DETAILS' => '', 'SUBMITTER' => lorem_word_html(), 'ADD_DATE' => placeholder_date_raw(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'VIEWS' => lorem_phrase(), 'LOGO' => placeholder_img_code(''), 'DAY' => placeholder_time(), 'RECURRENCE' => placeholder_number(), 'IS_PUBLIC' => lorem_phrase(), 'PRIORITY' => lorem_phrase(), 'PRIORITY_LANG' => lorem_phrase(), 'TYPE' => lorem_phrase(), 'TIME' => placeholder_time(), 'TIME_RAW' => placeholder_date_raw(), 'TIME_VCAL' => placeholder_date_raw(), 'EDIT_URL' => placeholder_url(), 'SUBSCRIPTIONS' => $sub, 'SUBSCRIBE_URL' => placeholder_url(), 'TITLE' => lorem_title(), 'BACK_URL' => placeholder_url(), 'CONTENT' => lorem_phrase(), 'SUBSCRIBED' => $subed, 'RATING_DETAILS' => lorem_sentence_html(), 'TRACKBACK_DETAILS' => lorem_sentence_html(), 'COMMENT_DETAILS' => $comment_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__php_function() { $parameters = new ocp_tempcode(); $full_parameters = new ocp_tempcode(); foreach (placeholder_array() as $value) { $parameters->attach(do_lorem_template('PHP_PARAMETER_LIST', array('TYPE' => lorem_word_2(), 'NAME' => lorem_word()))); $bits = do_lorem_template('PHP_PARAMETER_BIT', array('NAME' => do_lang_tempcode('NAME'), 'VALUE' => $value)); $full_parameters->attach(do_lorem_template('PHP_PARAMETER', array('BITS' => $bits))); } $classes = new ocp_tempcode(); foreach (placeholder_array() as $k => $value) { $function = do_lorem_template('PHP_FUNCTION', array('FILENAME' => lorem_phrase(), 'CODE' => lorem_phrase(), 'RETURN_TYPE' => lorem_phrase(), 'FUNCTION' => strval($k), 'CLASS' => lorem_word(), 'PARAMETERS' => $parameters, 'DESCRIPTION' => lorem_paragraph_html(), 'FULL_PARAMETERS' => $full_parameters, 'RETURN' => lorem_phrase())); $summary = do_lorem_template('PHP_FUNCTION_SUMMARY', array('FILENAME' => lorem_word_html(), 'RETURN_TYPE' => lorem_phrase(), 'CLASS' => lorem_word_2(), 'FUNCTION' => strval($k), 'PARAMETERS' => $parameters)); $classes->attach(do_lorem_template('PHP_CLASS', array('CLASS_NAME' => lorem_word() . strval($k), 'FUNCTION_SUMMARIES' => $summary, 'FUNCTIONS' => $function))); } return array(lorem_globalise(do_lorem_template('PHP_FILE', array('FILENAME' => lorem_word(), 'CLASSES' => $classes)), 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__category_list() { $cat_entry = new ocp_tempcode(); foreach (placeholder_array() as $key => $values) { $cat_entry->attach(do_lorem_template('CATEGORY_ENTRY', array('ID' => placeholder_id(), 'NAME_FIELD' => $values, 'AJAX_EDIT_URL' => placeholder_url(), 'URL' => placeholder_url(), 'REP_IMAGE' => placeholder_image(), 'CHILDREN' => lorem_phrase(), 'NAME' => lorem_word(), 'NAME_PLAIN' => lorem_word_html(), 'NUM_CHILDREN' => '3', 'NUM_ENTRIES' => '2', 'NUM_CHILDREN_RECURSIVE' => '3', 'NUM_ENTRIES_DIRECT' => '2'))); } return array(lorem_globalise(do_lorem_template('CATEGORY_LIST', array('CONTENT' => $cat_entry)), 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__cedi_page_screen() { require_lang('ocf'); $extra = new ocp_tempcode(); $extra = do_lorem_template('SCREEN_ITEM_BUTTON', array('REL' => 'edit', 'IMMEDIATE' => false, 'URL' => placeholder_url(), 'TITLE' => do_lang_tempcode('EDIT'), 'IMG' => 'edit')); $extra->attach(do_lorem_template('SCREEN_ITEM_BUTTON', array('REL' => 'move', 'IMMEDIATE' => false, 'URL' => placeholder_url(), 'TITLE' => do_lang_tempcode('MOVE'), 'IMG' => 'move'))); $all_rating_criteria = array(); $all_rating_criteria[] = array('TITLE' => lorem_word(), 'RATING' => make_string_tempcode("6"), 'NUM_RATINGS' => placeholder_number(), 'TYPE' => lorem_word()); $rating_inside = do_lorem_template('CEDI_RATING_FORM', array('LIKES' => true, 'CONTENT_TYPE' => 'seedy', 'ID' => placeholder_id(), 'URL' => placeholder_url(), 'ALL_RATING_CRITERIA' => $all_rating_criteria, 'OVERALL_NUM_RATINGS' => placeholder_number(), 'HAS_RATINGS' => true, 'SIMPLISTIC' => true, 'ERROR' => '')); $rating_details = do_lorem_template('CEDI_RATING', array('OVERALL_NUM_RATINGS' => placeholder_number(), 'RATING_FORM' => $rating_inside, 'ALL_RATING_CRITERIA' => $all_rating_criteria, 'HAS_RATINGS' => true)); $posts = do_lorem_template('CEDI_POST', array('INCLUDE_EXPANSION' => lorem_phrase(), 'UNVALIDATED' => do_lang('UNVALIDATED'), 'STAFF_ACCESS' => lorem_phrase(), 'EXP_IMG' => placeholder_img_code(), 'RATE_URL' => placeholder_url(), 'RATING' => $rating_details, 'ID' => placeholder_id(), 'POSTER_URL' => placeholder_url(), 'POSTER' => lorem_phrase(), 'POST_DATE_RAW' => placeholder_date(), 'POST_DATE' => placeholder_date(), 'POST' => lorem_phrase(), 'BUTTONS' => $extra)); $_child = do_lorem_template('CEDI_SUBCATEGORY_CHILDREN', array('MY_CHILD_POSTS' => lorem_phrase(), 'MY_CHILD_CHILDREN' => lorem_phrase())); $child = do_lorem_template('CEDI_SUBCATEGORY_LINK', array('URL' => placeholder_url(), 'CHILD' => $_child, 'SUP' => lorem_phrase())); return array(lorem_globalise(do_lorem_template('CEDI_PAGE_SCREEN', array('TAGS' => lorem_word_html(), 'HIDE_POSTS' => placeholder_id(), 'ID' => placeholder_id(), 'VIEWS' => placeholder_number(), 'STAFF_ACCESS' => '1', 'DESCRIPTION' => lorem_paragraph_html(), 'TITLE' => lorem_title(), 'CHILDREN' => $child, 'POSTS' => $posts, 'NUM_POSTS' => placeholder_number(), 'MENU' => placeholder_button())), 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__block_main_contact_simple() { require_lang('ocf'); $comment_details = 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, 'EMAIL_OPTIONAL' => lorem_word(), 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'GET_EMAIL' => lorem_word(), 'GET_TITLE' => lorem_word(), 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'TITLE' => lorem_phrase(), 'COMMENT_URL' => placeholder_url(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true)); return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_CONTACT_SIMPLE', array('EMAIL_OPTIONAL' => lorem_word_html(), 'COMMENT_DETAILS' => $comment_details, 'MESSAGE' => lorem_phrase())), 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__js_refresh() { return array(lorem_globalise(do_lorem_template('JS_REFRESH', array('FORM_NAME' => lorem_word_html())), 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__author_screen() { require_lang('authors'); $news_released = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { $tpl = do_lorem_template('NEWS_BRIEF', array('DATE' => placeholder_time(), 'URL' => placeholder_url(), 'TITLE_PLAIN' => lorem_word(), 'ID' => placeholder_id(), 'TITLE' => lorem_word())); $news_released->attach($tpl); } $downloads_released = new ocp_tempcode(); foreach (placeholder_array() as $k => $v) { if ($k != 0) { $downloads_released->attach(do_lorem_template('BLOCK_SEPARATOR', array())); } $downloads_released->attach(lorem_sentence_html()); } $staff_details = do_lorem_template('AUTHOR_SCREEN_POTENTIAL_ACTION_ENTRY', array('ACTION' => hyperlink(placeholder_url(), do_lang_tempcode('DEFINE_AUTHOR'), false))); $point_details = do_lorem_template('AUTHOR_SCREEN_POTENTIAL_ACTION_ENTRY', array('ACTION' => hyperlink(placeholder_url(), do_lang_tempcode('AUTHOR_POINTS')))); $url_details = do_lorem_template('AUTHOR_SCREEN_POTENTIAL_ACTION_ENTRY', array('ACTION' => hyperlink(placeholder_url(), do_lang_tempcode('AUTHOR_HOMEPAGE')))); $search_details = do_lorem_template('AUTHOR_SCREEN_POTENTIAL_ACTION_ENTRY', array('ACTION' => hyperlink(placeholder_url(), do_lang_tempcode('SEARCH')))); $forum_details = do_lorem_template('AUTHOR_SCREEN_POTENTIAL_ACTION_ENTRY', array('ACTION' => hyperlink(placeholder_url(), do_lang_tempcode('AUTHOR_PROFILE')))); $skills = new ocp_tempcode(); $description = new ocp_tempcode(); return array(lorem_globalise(do_lorem_template('AUTHOR_SCREEN', array('TAGS' => lorem_word_html(), 'TITLE' => lorem_title(), 'EDIT_URL' => placeholder_url(), 'AUTHOR' => lorem_phrase(), 'NEWS_RELEASED' => $news_released, 'DOWNLOADS_RELEASED' => $downloads_released, 'STAFF_DETAILS' => $staff_details, 'POINT_DETAILS' => $point_details, 'URL_DETAILS' => $url_details, 'SEARCH_DETAILS' => $search_details, 'FORUM_DETAILS' => $forum_details, 'SKILLS' => $skills, 'DESCRIPTION' => $description)), NULL, '', true)); }