/** * 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__shopping_cart_stage_pay() { return array(lorem_globalise(do_lorem_template('SHOPPING_CART_STAGE_PAY', array('TRANSACTION_BUTTON' => 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__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__purchase_wizard_stage_pay() { return array(lorem_globalise(do_lorem_template('PURCHASE_WIZARD_STAGE_PAY', array('LOGOS' => placeholder_image(), 'TRANSACTION_BUTTON' => placeholder_button(), 'CURRENCY' => placeholder_number(), 'ITEM_NAME' => lorem_word(), 'TITLE' => lorem_phrase(), 'LENGTH' => "3", 'LENGTH_UNITS' => "\$", 'PURCHASE_ID' => placeholder_id(), 'PRICE' => "123.45")), NULL, '', true)); }