Ejemplo n.º 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__ocf_group_directory_screen()
 {
     $_rank = array(placeholder_array());
     $ranks = array();
     foreach ($_rank as $g_id => $_rank) {
         $rank = new ocp_tempcode();
         foreach ($_rank as $row) {
             $entries = new ocp_tempcode();
             foreach (placeholder_array() as $k => $v) {
                 $cells = new ocp_tempcode();
                 $values = array(placeholder_link(), placeholder_number(), lorem_word());
                 foreach ($values as $k => $v) {
                     $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $v), NULL, false, 'RESULTS_TABLE_FIELD'));
                 }
                 $entries->attach(do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false, 'RESULTS_TABLE_ENTRY'));
             }
             $rank->attach($entries);
         }
         $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));
         $results_browser = placeholder_result_browser();
         $fields_title = new ocp_tempcode();
         foreach (placeholder_array() as $k => $v) {
             $fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => $v)));
         }
         $ranks[] = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $rank, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => $results_browser, 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     }
     return array(lorem_globalise(do_lorem_template('OCF_GROUP_DIRECTORY_SCREEN', array('TITLE' => lorem_title(), 'STAFF' => lorem_phrase(), 'OTHERS' => lorem_phrase(), 'RANKS' => $ranks)), NULL, '', true));
 }
Ejemplo n.º 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__table_category_screen_products()
 {
     require_lang('catalogues');
     require_css('catalogues');
     $subcategories = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $subcategories->attach(do_lorem_template('CATEGORY_products_ENTRY', array('ID' => placeholder_id(), 'NAME_FIELD' => lorem_word(), 'AJAX_EDIT_URL' => placeholder_url(), 'URL' => placeholder_url(), 'REP_IMAGE' => placeholder_image(), 'CHILDREN' => lorem_phrase(), 'NAME' => lorem_phrase(), 'NAME_PLAIN' => lorem_phrase(), 'DESCRIPTION' => lorem_phrase())));
     }
     $results_browser = placeholder_result_browser();
     $cart_link = do_lorem_template('CATALOGUE_ENTRY_ADD_TO_CART', array('OUT_OF_STOCK' => lorem_phrase(), 'ACTION_URL' => placeholder_url(), 'PRODUCT_ID' => placeholder_id(), 'ALLOW_OPTOUT_TAX' => lorem_phrase(), 'PURCHASE_ACTION_URL' => placeholder_url(), 'CART_URL' => placeholder_url()));
     return array(lorem_globalise(do_lorem_template('CATALOGUE_products_CATEGORY_SCREEN', array('TITLE' => lorem_title(), 'DESCRIPTION' => lorem_sentence(), 'SUBCATEGORIES' => $subcategories, 'CART_LINK' => $cart_link, 'ENTRIES' => lorem_phrase(), 'TAGS' => lorem_phrase(), 'ADD_LINK' => placeholder_url(), 'CATALOGUE_GENERIC_ADD' => lorem_phrase(), 'CATALOGUE' => lorem_phrase(), 'ADD_CAT_URL' => placeholder_url(), 'CATALOGUE_GENERIC_ADD_CATEGORY' => lorem_phrase(), 'EDIT_CAT_URL' => placeholder_url(), 'CATALOGUE_GENERIC_EDIT_CATEGORY' => lorem_phrase(), '_TITLE' => lorem_phrase(), 'EDIT_CATALOGUE_URL' => placeholder_url(), 'EDIT_CATALOGUE' => lorem_phrase(), 'BROWSER' => $results_browser, 'TREE' => lorem_phrase(), 'ID' => placeholder_id())), NULL, '', true));
 }
Ejemplo n.º 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.
  *
  * @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));
 }
Ejemplo n.º 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__search_saved_screen()
 {
     $entries = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $deletion_button = do_lorem_template('SEARCH_SAVED_DELETION_BUTTON', array('NAME' => lorem_phrase(), 'URL' => placeholder_url(), 'ID' => placeholder_random()));
         $run_button = do_lorem_template('SEARCH_SAVED_RUN_BUTTON', array('NAME' => lorem_phrase(), 'URL' => placeholder_url(), 'HIDDEN' => ''));
         $cells = new ocp_tempcode();
         $entry_data = array('Title' => lorem_word(), 'Date' => placeholder_date(), 'Delete' => $deletion_button, 'Run search' => $run_button);
         foreach ($entry_data as $k => $v) {
             $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $v), NULL, false, 'RESULTS_TABLE_FIELD'));
         }
         $entries->attach(do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false, 'RESULTS_TABLE_ENTRY'));
     }
     $selectors = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $selectors->attach(do_lorem_template('RESULTS_BROWSER_SORTER', array('SELECTED' => '', 'NAME' => $v, 'VALUE' => $v)));
     }
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $fields_title = new ocp_tempcode();
     foreach (array('Title', 'Date', 'Delete', 'Run search') as $k => $v) {
         $fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => $v)));
     }
     $results_table = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $entries, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => placeholder_result_browser(), 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     $saved_search_screen = do_lorem_template('SEARCH_SAVED_SCREEN', array('TITLE' => lorem_title(), 'SEARCHES' => $results_table, 'URL' => placeholder_url()));
     return array(lorem_globalise($saved_search_screen, NULL, '', true));
 }
Ejemplo n.º 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__administrative__ecom_transaction_logs_screen()
 {
     $results_browser = placeholder_result_browser();
     //results_table starts
     //results_entry starts
     $cells = new ocp_tempcode();
     foreach (placeholder_array(11) as $k => $v) {
         $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => $v)));
     }
     $fields_title = $cells;
     $order_entries = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $cells = new ocp_tempcode();
         foreach (placeholder_array(11) as $k => $v) {
             $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => lorem_word()), NULL, false, 'RESULTS_TABLE_FIELD'));
         }
         $order_entries->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(11) as $k => $v) {
         $selectors->attach(do_lorem_template('RESULTS_BROWSER_SORTER', array('SELECTED' => '', 'NAME' => $v, 'VALUE' => $v)));
     }
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $results_table = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $order_entries, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => $results_browser, 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     //results_table ends
     return array(lorem_globalise(do_lorem_template('ECOM_TRANSACTION_LOGS_SCREEN', array('TITLE' => lorem_title(), 'PRODUCTS' => lorem_phrase(), 'URL' => placeholder_url(), 'RESULTS_TABLE' => $results_table)), NULL, '', true));
 }
Ejemplo n.º 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__ocf_member_profile_blog()
 {
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_BLOG', array('MEMBER_ID' => placeholder_id(), 'RECENT_BLOG_POSTS' => lorem_paragraph_html(), 'RSS_URL' => placeholder_url(), 'ADD_BLOG_POST_URL' => placeholder_url(), 'RESULTS_BROWSER' => placeholder_result_browser()));
     return array(lorem_globalise($tab_content, NULL, '', true));
 }
Ejemplo n.º 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__survey_results_screen()
 {
     $fields = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $fields->attach(do_lorem_template('VIEW_SPACE_FIELD_RAW', array('ABBR' => '', 'NAME' => lorem_phrase(), 'VALUE' => lorem_phrase())));
     }
     $summary = do_lorem_template('VIEW_SPACE', array('WIDTH' => placeholder_number(), 'FIELDS' => $fields));
     $browse = do_lorem_template('NEXT_BROWSER_BROWSE_NEXT', array('PREVIOUS_LINK' => placeholder_link(), 'NEXT_LINK' => placeholder_link(), 'PAGE_NUM' => placeholder_number(), 'NUM_PAGES' => placeholder_number()));
     $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;
     $results = 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'));
         }
         $results->attach(do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false, 'RESULTS_TABLE_ENTRY'));
     }
     $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));
     $results_browser = placeholder_result_browser();
     $results = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $results, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => $results_browser, 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     return array(lorem_globalise(do_lorem_template('SURVEY_RESULTS_SCREEN', array('TITLE' => lorem_title(), 'SUMMARY' => $summary, 'RESULTS' => $results)), NULL, '', true));
 }
Ejemplo n.º 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__gallery_regular_mode_screen()
 {
     $tags = do_lorem_template('TAGS', array('LINK_FULLSCOPE' => lorem_word(), 'TAG' => lorem_word(), 'TAGS' => placeholder_array(), 'TYPE' => NULL));
     $results_browser = placeholder_result_browser();
     $entry = new ocp_tempcode();
     $map = array('TITLE' => lorem_phrase(), 'DESCRIPTION' => lorem_paragraph(), 'TYPE' => 'image', 'ID' => placeholder_id(), 'FILE_SIZE' => lorem_word(), 'SUBMITTER' => lorem_word(), 'FULL_URL' => placeholder_url(), 'THUMB_URL' => placeholder_url(), 'CAT' => lorem_word(), 'THUMB' => placeholder_image(), 'VIEW_URL' => placeholder_url(), 'EDIT_DATE_RAW' => placeholder_time(), 'ADD_DATE_RAW' => placeholder_time(), 'VIEWS' => placeholder_number());
     $entry = do_lorem_template('GALLERY_IMAGE', $map);
     $entries = new ocp_tempcode();
     $entries->attach(do_lorem_template('GALLERY_ENTRY_WRAP', array('ENTRY' => $entry) + $map));
     $video_details = do_lorem_template('GALLERY_VIDEO_INFO', array('HEIGHT' => placeholder_number(), 'WIDTH' => placeholder_number(), 'LENGTH' => placeholder_number()));
     $map = array('VIDEO_DETAILS' => $video_details, 'TITLE' => lorem_phrase(), 'DESCRIPTION' => lorem_phrase(), 'ADD_DATE_RAW' => placeholder_time(), 'EDIT_DATE_RAW' => placeholder_time(), 'VIEWS' => placeholder_number(), 'VIEW_URL' => placeholder_url(), 'SUBMITTER' => placeholder_id(), 'ID' => placeholder_id(), 'THUMB' => placeholder_image());
     $entry = do_lorem_template('GALLERY_VIDEO', $map);
     $entries->attach(do_lorem_template('GALLERY_ENTRY_WRAP', array('ENTRY' => $entry) + $map));
     $children = do_lorem_template('GALLERY_SUBGALLERY_WRAP', array('CONTENT' => do_lorem_template('GALLERY_SUBGALLERY', array('THUMB' => '', 'NUM_VIDEOS' => lorem_word(), 'NUM_IMAGES' => lorem_word(), 'NUM_CHILDREN' => lorem_word(), 'ID' => lorem_word(), 'LANG' => lorem_word(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'ADD_DATE' => lorem_word(), 'MEMBER_INFO' => lorem_paragraph(), 'URL' => placeholder_url(), 'PIC' => placeholder_image_url(), 'TITLE' => lorem_phrase(), 'COMMENTS' => lorem_paragraph()))));
     $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('GALLERY_REGULAR_MODE_SCREEN', array('_TITLE' => lorem_phrase(), 'RESULTS_BROWSER' => $results_browser, 'TAGS' => $tags, 'CAT' => lorem_word(), 'MEMBER_DETAILS' => lorem_sentence_html(), 'RATING_DETAILS' => lorem_sentence_html(), 'COMMENT_DETAILS' => $comment_details, 'ADD_GALLERY_URL' => placeholder_url(), 'EDIT_URL' => placeholder_url(), 'CHILDREN' => $children, 'TITLE' => lorem_title(), 'DESCRIPTION' => lorem_paragraph_html(), 'IMAGE_URL' => placeholder_url(), 'VIDEO_URL' => placeholder_url(), 'MAY_DOWNLOAD' => lorem_phrase(), 'ENTRIES' => $entries, 'SORTING' => lorem_phrase())), NULL, '', true));
 }
Ejemplo n.º 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__points_screen()
 {
     $browse = do_lorem_template('NEXT_BROWSER_BROWSE_NEXT', array('PREVIOUS_LINK' => placeholder_url(), 'NEXT_LINK' => placeholder_url(), 'PAGE_NUM' => placeholder_number(), 'NUM_PAGES' => placeholder_number()));
     $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;
     $chargelog_details = new ocp_tempcode();
     $charges = 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'));
         }
         $charges->attach(do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false, 'RESULTS_TABLE_ENTRY'));
     }
     $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())));
     }
     $results_browser = placeholder_result_browser();
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $chargelog_details = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $charges, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => $results_browser, 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     $chargelog_details->attach(do_lorem_template('POINTS_CHARGE', array('URL' => placeholder_url(), 'USER' => lorem_phrase())));
     $chargelog_details = do_lorem_template('POINTS_TRANSACTIONS_WRAP', array('CONTENT' => $chargelog_details, 'TITLE' => lorem_phrase()));
     $results_browser = placeholder_result_browser();
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $from = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $charges, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => $results_browser, 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     $from = do_lorem_template('POINTS_TRANSACTIONS_WRAP', array('CONTENT' => $from, 'TITLE' => lorem_phrase()));
     $results_browser = placeholder_result_browser();
     $sort = do_lorem_template('RESULTS_BROWSER_SORT', array('HIDDEN' => '', 'SORT' => lorem_word(), 'RAND' => placeholder_random(), 'URL' => placeholder_url(), 'SELECTORS' => $selectors));
     $to = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $charges, 'MESSAGE' => new ocp_tempcode(), 'SORT' => $sort, 'BROWSER' => $results_browser, 'WIDTHS' => array(placeholder_number())), NULL, false, 'RESULTS_TABLE');
     $to = do_lorem_template('POINTS_TRANSACTIONS_WRAP', array('CONTENT' => $to, 'TITLE' => lorem_phrase()));
     $give_template = do_lorem_template('POINTS_GIVE', array('GIVE_URL' => placeholder_url(), 'USER' => lorem_phrase(), 'VIEWER_GIFT_POINTS_AVAILABLE' => placeholder_number()));
     $content = do_lorem_template('POINTS_PROFILE', array('MEMBER' => lorem_phrase(), 'PROFILE_LINK' => placeholder_url(), 'NAME' => lorem_word(), 'POINTS_JOINING' => placeholder_number(), 'POINTS_RATING' => placeholder_number(), 'POINTS_VOTING' => placeholder_number(), 'POINTS_POSTING' => placeholder_number(), 'POINTS_PER_DAY' => placeholder_number(), 'POINTS_PER_DAILY_VISIT' => placeholder_number(), 'POST_COUNT' => placeholder_number(), 'POINTS_GAINED_GIVEN' => placeholder_number(), 'POINTS_GAINED_RATING' => placeholder_number(), 'POINTS_GAINED_VOTING' => placeholder_number(), 'POINTS_GAINED_AUTO' => placeholder_number(), 'POINTS_USED' => placeholder_number(), 'REMAINING' => placeholder_number(), 'GIFT_POINTS_USED' => placeholder_number(), 'GIFT_POINTS_AVAILABLE' => placeholder_number(), 'DAYS_JOINED' => placeholder_number(), 'TO' => $to, 'FROM' => $from, 'CHARGELOG_DETAILS' => $chargelog_details, 'GIVE' => $give_template, 'CEDI_POST_COUNT' => placeholder_number(), 'POINTS_CEDI_POSTING' => placeholder_number(), 'CHAT_POST_COUNT' => placeholder_number(), 'POINTS_CHAT_POSTING' => placeholder_number(), 'MULT_POINTS_RATING' => placeholder_number(), 'MULT_POINTS_VOTING' => placeholder_number(), 'MULT_POINTS_CHAT_POSTING' => placeholder_number(), 'MULT_POINTS_CEDI_POSTING' => placeholder_number(), 'MULT_POINTS_POSTING' => placeholder_number(), 'MULT_POINTS_PER_DAY' => placeholder_number()));
     return array(lorem_globalise(do_lorem_template('POINTS_SCREEN', array('TITLE' => lorem_title(), 'BROWSE' => $browse, 'CONTENT' => $content)), NULL, '', true));
 }