예제 #1
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__ecom_outstanding_invoices_screen()
 {
     $invoices = array();
     foreach (placeholder_array() as $invoice) {
         $invoices[] = array('INVOICE_TITLE' => lorem_word(), 'PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word_2(), 'ID' => placeholder_id(), 'STATE' => lorem_phrase(), 'AMOUNT' => placeholder_number(), 'TIME' => placeholder_time(), 'NOTE' => lorem_phrase(), 'TYPE_CODE' => lorem_phrase());
     }
     return array(lorem_globalise(do_lorem_template('ECOM_OUTSTANDING_INVOICES_SCREEN', array('TITLE' => lorem_title(), 'FROM' => lorem_phrase(), 'INVOICES' => $invoices)), NULL, '', true));
 }
예제 #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__support_tickets_screen()
 {
     $links = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $links->attach(do_lorem_template('SUPPORT_TICKET_LINK', array('NUM_POSTS' => placeholder_number(), 'CLOSED' => lorem_phrase(), 'URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'DATE' => placeholder_date(), 'DATE_RAW' => placeholder_date_raw(), 'PROFILE_LINK' => placeholder_url(), 'LAST_POSTER' => lorem_phrase(), 'UNCLOSED' => lorem_word())));
     }
     return array(lorem_globalise(do_lorem_template('SUPPORT_TICKETS_SCREEN', array('TITLE' => lorem_title(), 'MESSAGE' => lorem_phrase(), 'LINKS' => $links, 'TICKET_TYPE' => lorem_word(), 'NAME' => lorem_word_2(), 'SELECTED' => true, 'ADD_TICKET_URL' => placeholder_url(), 'TYPES' => placeholder_array(), 'LEAD_TIME' => placeholder_number())), NULL, '', true));
 }
예제 #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__administrative__config_category_screen()
 {
     $groups = new ocp_tempcode();
     foreach (placeholder_array() as $k => $group) {
         $group = do_lorem_template('CONFIG_GROUP', array('GROUP_DESCRIPTION' => lorem_word(), 'GROUP_NAME' => $group, 'GROUP' => lorem_phrase(), 'CURRENT_GROUP' => "ID{$k}"));
         $groups->attach($group->evaluate());
     }
     return array(lorem_globalise(do_lorem_template('CONFIG_CATEGORY_SCREEN', array('CATEGORY_DESCRIPTION' => lorem_word_2(), '_GROUPS' => placeholder_array(), 'PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'GROUPS' => $groups, 'SUBMIT_NAME' => lorem_word())), NULL, '', true));
 }
예제 #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__administrative__redirecte_table_screen()
 {
     require_javascript('javascript_ajax');
     $fields = new ocp_tempcode();
     foreach (placeholder_array() as $i => $row) {
         $fields->attach(do_lorem_template('REDIRECTE_TABLE_REDIRECT', array('I' => strval($i), 'TO_ZONES' => placeholder_options(), 'FROM_ZONES' => placeholder_options(), 'FROM_PAGE' => lorem_word(), 'TO_PAGE' => lorem_word_2(), 'TICKED' => true, 'NAME' => "is_transparent_{$i}")));
     }
     $new = do_lorem_template('REDIRECTE_TABLE_REDIRECT', array('I' => 'new', 'TO_ZONES' => placeholder_options(), 'FROM_ZONES' => placeholder_options(), 'FROM_PAGE' => '', 'TO_PAGE' => '', 'TICKED' => false, 'NAME' => 'is_transparent_new'));
     $out = do_lorem_template('REDIRECTE_TABLE_SCREEN', array('NOTES' => '', 'PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'TITLE' => lorem_title(), 'FIELDS' => $fields, 'NEW' => $new, 'URL' => placeholder_url()));
     return array(lorem_globalise($out, NULL, '', true));
 }
예제 #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__search_form_screen()
 {
     $options = new ocp_tempcode();
     foreach (placeholder_array() as $value) {
         $options->attach(do_lorem_template('SEARCH_FOR_SEARCH_DOMAIN_OPTION', array('NAME' => placeholder_random(), 'DISPLAY' => lorem_phrase(), 'SPECIAL' => lorem_phrase(), 'CHECKED' => lorem_phrase())));
     }
     $options->attach(do_lorem_template('SEARCH_FOR_SEARCH_DOMAIN_OPTION_LIST', array('NAME' => placeholder_random(), 'DISPLAY' => lorem_word(), 'SPECIAL' => placeholder_options(), 'CHECKED' => false)));
     $options->attach(do_lorem_template('SEARCH_FOR_SEARCH_DOMAIN_OPTION_TEXT', array('NAME' => placeholder_random(), 'DISPLAY' => lorem_word(), 'SPECIAL' => lorem_word(), 'CHECKED' => false)));
     $options->attach(do_lorem_template('SEARCH_FOR_SEARCH_DOMAIN_OPTION_TICK', array('NAME' => placeholder_random(), 'DISPLAY' => lorem_word(), 'SPECIAL' => lorem_word(), 'CHECKED' => false)));
     $specialisation = do_lorem_template('SEARCH_ADVANCED', array('AJAX' => lorem_phrase(), 'OPTIONS' => $options, 'TREE' => '', 'UNDERNEATH' => lorem_phrase()));
     $search_domains = new ocp_tempcode();
     foreach (placeholder_array() as $value) {
         $search_domains->attach(do_lorem_template('SEARCH_FOR_SEARCH_DOMAIN', array('ADVANCED_ONLY' => lorem_phrase(), 'CHECKED' => lorem_phrase(), 'OPTIONS' => placeholder_url(), 'LANG' => lorem_phrase(), 'NAME' => placeholder_random())));
     }
     $specialisation->attach(do_lorem_template('SEARCH_DOMAINS', array('SEARCH_DOMAINS' => $search_domains)));
     $result = new ocp_tempcode();
     $result->attach(do_lorem_template('SEARCH_RESULT', array('CONTENT' => lorem_paragraph_html())));
     $types_results = array();
     foreach (placeholder_array() as $i => $r) {
         $types_results[$i] = array('R' => placeholder_array());
     }
     $result->attach(do_lorem_template('SEARCH_RESULT_TABLE', array('HEADERS' => placeholder_array(), 'ROWS' => $types_results)));
     require_lang('catalogues');
     $result->attach(do_lorem_template('SEARCH_RESULT_CATALOGUE_ENTRIES', array('BUILDUP' => lorem_phrase(), 'NAME' => lorem_word(), 'TITLE' => lorem_word_2())));
     return array(lorem_globalise(do_lorem_template('SEARCH_FORM_SCREEN', array('SEARCH_TERM' => lorem_word_2(), 'NUM_RESULTS' => placeholder_number(), 'CAN_ORDER_BY_RATING' => false, 'EXTRA_SORT_FIELDS' => placeholder_array(0), 'USER_LABEL' => lorem_word(), 'DAYS_LABEL' => lorem_word(), 'BOOLEAN_SEARCH' => false, 'AND' => false, 'ONLY_TITLES' => true, 'DAYS' => placeholder_id(), 'SORT' => 'relevance', 'DIRECTION' => 'DESC', 'CONTENT' => lorem_phrase(), 'RESULTS' => NULL, 'RESULTS_BROWSER' => '', 'OLD_MYSQL' => false, 'TITLE' => lorem_title(), 'AUTHOR' => lorem_phrase(), 'SPECIALISATION' => $specialisation, 'URL' => placeholder_url())), NULL, '', true));
 }
예제 #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__block_side_stored_menu__zone()
 {
     $child = new ocp_tempcode();
     $content = new ocp_tempcode();
     foreach (placeholder_array(3) as $v) {
         $child->attach(do_lorem_template('MENU_BRANCH_zone', array('RANDOM' => placeholder_random(), 'CAPTION' => lorem_word(), 'IMG' => '', 'URL' => placeholder_url(), 'PAGE_LINK' => placeholder_link(), 'ACCESSKEY' => '', 'POPUP' => false, 'POPUP_WIDTH' => '', 'POPUP_HEIGHT' => '', 'NEW_WINDOW' => false, 'TOOLTIP' => lorem_phrase(), 'CHILDREN' => '', 'DISPLAY' => 'block', 'MENU' => lorem_word_2(), 'TOP_LEVEL' => false, 'THE_LEVEL' => '2', 'POSITION' => '1', 'LAST' => false, 'BRETHREN_COUNT' => '3', 'CURRENT' => false, 'CURRENT_ZONE' => false)));
     }
     foreach (placeholder_array(3) as $v) {
         $content->attach(do_lorem_template('MENU_BRANCH_zone', array('RANDOM' => placeholder_random(), 'CAPTION' => lorem_word(), 'IMG' => '', 'URL' => placeholder_url(), 'PAGE_LINK' => placeholder_link(), 'ACCESSKEY' => '', 'POPUP' => true, 'POPUP_WIDTH' => '500', 'POPUP_HEIGHT' => '500', 'NEW_WINDOW' => false, 'TOOLTIP' => lorem_phrase(), 'CHILDREN' => $child, 'DISPLAY' => 'block', 'MENU' => lorem_word_2(), 'TOP_LEVEL' => true, 'THE_LEVEL' => '0', 'POSITION' => '2', 'LAST' => false, 'BRETHREN_COUNT' => '3', 'CURRENT' => false, 'CURRENT_ZONE' => False)));
         $content->attach(do_lorem_template('MENU_SPACER_zone', array()));
     }
     $menu = do_lorem_template('MENU_zone', array('CONTENT' => $content, 'MENU' => 'test'));
     $menu->attach(do_lorem_template('MENU_STAFF_LINK', array('TYPE' => 'zone', 'EDIT_URL' => placeholder_url(), 'NAME' => lorem_phrase())));
     return array(lorem_globalise(do_lorem_template('BLOCK_SIDE_STORED_MENU', array('CONTENT' => $menu, 'PARAM' => lorem_phrase(), 'TRAY_STATUS' => lorem_phrase(), 'CAPTION' => lorem_phrase())), NULL, '', true));
 }
예제 #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__administrative__ocf_edit_forum_screen()
 {
     require_css('ocf');
     require_lang('ocf');
     $orderings = "<option>1</option><option>2</option><option>3</option>";
     $orderings = '<label for="order_' . strval(1) . '">' . do_lang('ORDER') . ' <select id="order_' . strval(1) . '" name="order_' . strval(1) . '">' . $orderings . '</select></label>';
     $categories = do_lorem_template('OCF_EDIT_FORUM_SCREEN_CATEGORY', array('ORDERINGS' => $orderings, 'CATEGORY' => lorem_word_2(), 'SUBFORUMS' => lorem_phrase()));
     $root_forum = do_lorem_template('OCF_EDIT_FORUM_SCREEN_FORUM', array('ID' => placeholder_id(), 'ORDERINGS' => lorem_phrase(), 'CATEGORIES' => $categories, 'CLASS' => lorem_phrase(), 'FORUM' => lorem_phrase(), 'VIEW_URL' => placeholder_url(), 'EDIT_URL' => placeholder_url()));
     return array(lorem_globalise(do_lorem_template('OCF_EDIT_FORUM_SCREEN', array('REORDER_URL' => placeholder_url(), 'TITLE' => lorem_title(), 'ROOT_FORUM' => $root_forum)), NULL, '', true));
 }
예제 #8
0
파일: core.php 프로젝트: erico-deh/ocPortal
 /**
  * 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__broken_urls()
 {
     require_lang('cleanup');
     $found_404 = array();
     foreach (placeholder_array() as $value) {
         $found_404[] = array('URL' => placeholder_url(), 'SPOT' => $value);
     }
     $found = array();
     foreach (placeholder_array() as $k => $value) {
         $found[] = array('URL' => placeholder_url(), 'TABLE' => $value, 'FIELD' => lorem_word_2(), 'ID' => strval($k));
     }
     return array(lorem_globalise(do_lorem_template('BROKEN_URLS', array('FOUND' => $found, 'FOUND_404' => $found_404)), NULL, '', true));
 }
예제 #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__atom_wrapper()
 {
     $content = do_lorem_template('ATOM_ENTRY', array('TITLE' => lorem_phrase(), 'VIEW_URL' => placeholder_url(), 'DATE' => placeholder_time(), 'EDIT_DATE' => placeholder_time(), 'CATEGORY_RAW' => lorem_word(), 'CATEGORY' => lorem_word(), 'AUTHOR' => lorem_word(), 'SUMMARY' => lorem_word(), 'NEWS' => lorem_word()));
     return array(lorem_globalise(do_lorem_template('ATOM_WRAPPER', array('MODE' => lorem_word(), 'MODE_NICE' => lorem_word(), 'FILTER' => lorem_word_2(), 'DATE' => placeholder_time(), 'LOGO_URL' => placeholder_image_url(), 'CONTENT' => $content, 'CUTOFF' => placeholder_number(), 'ABOUT' => lorem_paragraph(), 'VERSION' => lorem_word(), 'COPYRIGHT' => lorem_phrase())), NULL, '', true));
 }
예제 #10
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__table_category_screen()
 {
     $subcategory = new ocp_tempcode();
     foreach (placeholder_array(3) as $k => $v) {
         $subcategory->attach(do_lorem_template('CATALOGUE_DEFAULT_SUBCATEGORY', array('ID' => placeholder_id(), 'CATALOGUE' => lorem_word_2(), 'URL' => placeholder_url(), 'NUM_CHILDREN' => '3', 'NUM_ENTRIES' => '2', 'NUM_CHILDREN_RECURSIVE' => '3', 'NUM_ENTRIES_DIRECT' => '2', 'NAME' => lorem_word())));
     }
     $subcategories = do_lorem_template('CATALOGUE_DEFAULT_SUBCATEGORY_WRAP', array('CATALOGUE' => lorem_word(), 'CONTENT' => $subcategory));
     $tags = do_lorem_template('TAGS', array('TAGS' => placeholder_array(), 'TYPE' => NULL, 'LINK_FULLSCOPE' => placeholder_url(), 'TAG' => lorem_word()));
     $entries = new ocp_tempcode();
     $head = do_lorem_template('CATALOGUE_DEFAULT_TAB_FIELD_HEAD', array('SORT_ASC_SELECTED' => TRUE, 'SORT_DESC_SELECTED' => FALSE, 'SORT_URL_ASC' => placeholder_url(), 'SORT_URL_DESC' => placeholder_url(), 'CATALOGUE' => lorem_word(), 'FIELDID' => placeholder_id(), '_FIELDID' => placeholder_id(), 'FIELD' => lorem_word(), 'FIELDTYPE' => 'text'));
     $fields = new ocp_tempcode();
     $fields->attach(do_lorem_template('CATALOGUE_DEFAULT_TAB_FIELD', array('FIELDID' => placeholder_id(), 'ENTRYID' => placeholder_id(), 'VALUE' => lorem_phrase())));
     $entries->attach(do_lorem_template('CATALOGUE_DEFAULT_TAB_ENTRY', array('FIELDS_TABLE' => $fields, 'EDIT_URL' => placeholder_url(), 'VIEW_URL' => placeholder_url())));
     $content = do_lorem_template('CATALOGUE_DEFAULT_TAB_WRAP', array('CATALOGUE' => lorem_word(), 'HEAD' => $head, 'CONTENT' => $entries, 'FIELD_COUNT' => "1"));
     return array(lorem_globalise(do_lorem_template('CATALOGUE_DEFAULT_CATEGORY_SCREEN', array('ID' => placeholder_id(), 'ADD_DATE_RAW' => placeholder_time(), 'TITLE' => lorem_title(), '_TITLE' => lorem_phrase(), 'TAGS' => $tags, 'CATALOGUE' => lorem_word_2(), 'BROWSER' => '', 'SORTING' => '', 'ADD_LINK' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'EDIT_CATALOGUE_URL' => placeholder_url(), 'ENTRIES' => $content, 'SUBCATEGORIES' => $subcategories, 'DESCRIPTION' => lorem_sentence(), 'CART_LINK' => placeholder_url(), 'TREE' => lorem_phrase())), NULL, '', true));
 }
예제 #11
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__xml_storage_import_results_screen()
 {
     $ops_nice = array();
     foreach (placeholder_array() as $v) {
         $ops_nice[] = array('OP' => lorem_word(), 'PARAM_A' => lorem_word_2(), 'PARAM_B' => lorem_word_2());
     }
     return array(lorem_globalise(do_lorem_template('XML_STORAGE_IMPORT_RESULTS_SCREEN', array('TITLE' => lorem_title(), 'OPS' => $ops_nice)), 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__full_table_screen()
 {
     $table_rows = new ocp_tempcode();
     foreach (placeholder_array() as $row) {
         $actions = do_lorem_template('TABLE_TABLE_ACTION_DELETE_ENTRY', array('GET' => true, 'HIDDEN' => '', 'NAME' => lorem_phrase(), 'URL' => placeholder_url()));
         $actions->attach(do_lorem_template('TABLE_TABLE_ACTION_INSTALL_ENTRY', array('GET' => true, 'HIDDEN' => '', 'NAME' => lorem_phrase(), 'URL' => placeholder_url())));
         $actions->attach(do_lorem_template('TABLE_TABLE_ACTION_UPGRADE_ENTRY', array('GET' => true, 'HIDDEN' => '', 'NAME' => lorem_phrase(), 'URL' => placeholder_url())));
         $actions->attach(do_lorem_template('TABLE_TABLE_ACTION_REINSTALL_ENTRY', array('GET' => true, 'HIDDEN' => '', 'NAME' => lorem_phrase(), 'URL' => placeholder_url())));
         $select = do_lorem_template('TABLE_TABLE_ROW_CELL_SELECT', array('LABEL' => lorem_phrase(), 'NAME' => placeholder_random_id(), 'LIST' => placeholder_options()));
         $values = array(lorem_word(), lorem_word(), lorem_word(), placeholder_time(), $select, $actions);
         $cells = new ocp_tempcode();
         foreach ($values as $value) {
             $cells->attach(do_lorem_template('TABLE_TABLE_ROW_CELL', array('VALUE' => $value)));
         }
         $tpl = do_lorem_template('TABLE_TABLE_ROW', array('CELLS' => $cells));
         $table_rows->attach($tpl);
     }
     $values = array(lorem_word(), lorem_word_2(), lorem_word(), lorem_word_2(), lorem_word(), lorem_word());
     $cells = new ocp_tempcode();
     foreach ($values as $value) {
         $cells->attach(do_lorem_template('TABLE_TABLE_HEADER_ROW_CELL', array('VALUE' => $value)));
     }
     $header_row = do_lorem_template('TABLE_TABLE_HEADER_ROW', array('CELLS' => $cells));
     $field_rows = do_lorem_template('TABLE_TABLE', array('HEADER_ROW' => $header_row, 'ROWS' => $table_rows));
     $return = do_lorem_template('FORM_GROUPED', array('TEXT' => "", 'URL' => "#", 'FIELD_GROUPS' => $field_rows, 'SUBMIT_NAME' => lorem_word_2()));
     return array(lorem_globalise($return, NULL, '', true));
 }
예제 #13
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__bookmarks_screen()
 {
     require_lang('zones');
     $bookmarks = array(array('CAPTION' => lorem_word(), 'ID' => placeholder_id(), 'FOLDER' => lorem_word_2(), 'PAGE_LINK' => placeholder_url()));
     return array(lorem_globalise(do_lorem_template('BOOKMARKS_SCREEN', array('TITLE' => lorem_title(), 'FORM_URL' => placeholder_url(), 'FORM' => placeholder_form(), 'BOOKMARKS' => $bookmarks)), 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__permission_screen_permissions_screen()
 {
     $header_cells = new ocp_tempcode();
     foreach (placeholder_array() as $id => $name) {
         $header_cells->attach(do_lorem_template('PERMISSION_HEADER_CELL', array('COLOR' => 'b7b7b7', 'GROUP' => $name)));
     }
     $header_cells->attach(do_lorem_template('PERMISSION_HEADER_CELL', array('COLOR' => 'b7b7b7', 'GROUP' => '')));
     $cols = new ocp_tempcode();
     foreach (placeholder_array() as $id => $g_name) {
         $cols->attach(do_lorem_template('PERMISSION_COLUMN_SIZER'));
     }
     $k = 0;
     $rows = new ocp_tempcode();
     foreach (placeholder_array() as $zone) {
         foreach (placeholder_array() as $page) {
             $cells = new ocp_tempcode();
             $code = '';
             $has = true;
             foreach (placeholder_array() as $id => $g_name) {
                 $cells->attach(do_lorem_template('PERMISSION_CELL', array('CHECKED' => true, 'HUMAN' => lorem_phrase(), 'NAME' => "id_" . strval($k))));
                 $k++;
             }
             $rows->attach(do_lorem_template('PERMISSION_ROW', array('HAS' => true, 'ABBR' => lorem_word(), 'PERMISSION' => lorem_word_2(), 'CELLS' => $cells, 'CODE' => '')));
         }
     }
     return array(lorem_globalise(do_lorem_template('PERMISSION_SCREEN_PERMISSIONS_SCREEN', array('COLS' => lorem_phrase(), 'ZONE' => lorem_phrase(), 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'HEADER_CELLS' => $header_cells, 'ROWS' => $rows)), NULL, '', true));
 }
예제 #15
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__module_screen()
 {
     $modules = array('gallery', 'downloads', 'catalogues');
     $tpl_modules = new ocp_tempcode();
     foreach ($modules as $module) {
         $actions = new ocp_tempcode();
         $status = do_lang_tempcode('STATUS_TO_UPGRADE');
         if ($module == 'downloads') {
             $actions->attach(do_lorem_template('TABLE_TABLE_ACTION_REINSTALL_ENTRY', array('HIDDEN' => '', 'NAME' => lorem_phrase(), 'URL' => placeholder_url())));
             $status = do_lang_tempcode('STATUS_CURRENT');
         } else {
             $actions->attach(do_lorem_template('TABLE_TABLE_ACTION_UPGRADE_ENTRY', array('HIDDEN' => '', 'NAME' => lorem_phrase(), 'URL' => placeholder_url())));
         }
         $tpl_modules->attach(do_lorem_template('MODULE_SCREEN_MODULE', array('STATUS' => $status, 'NAME' => $module, 'AUTHOR' => lorem_word(), 'ORGANISATION' => lorem_phrase(), 'VERSION' => placeholder_number(), 'HACKED_BY' => lorem_word_2(), 'HACK_VERSION' => placeholder_number(), 'ACTIONS' => $actions)));
     }
     return array(lorem_globalise(do_lorem_template('MODULE_SCREEN', array('TITLE' => lorem_title(), 'MODULES' => $tpl_modules)), NULL, '', true));
 }
예제 #16
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_category_screen()
 {
     $out = new ocp_tempcode();
     foreach (placeholder_array() as $id => $subcats) {
         $out->attach(do_lorem_template('CATEGORY_ENTRY', array('ID' => "{$id}", 'NAME_FIELD' => 'category', 'AJAX_EDIT_URL' => placeholder_url(), 'URL' => placeholder_url(), 'REP_IMAGE' => placeholder_image(), 'CHILDREN' => lorem_word(), 'NAME' => lorem_phrase(), 'NAME_PLAIN' => lorem_word_2())));
     }
     $subcategories = do_lorem_template('CATEGORY_LIST', array('CONTENT' => $out));
     $downloads = new ocp_tempcode();
     $subdownloads = new ocp_tempcode();
     $download_items = array(array('id' => 1, 'file_size' => placeholder_number(), 'description' => lorem_phrase(), 'add_date' => placeholder_time(), 'category_id' => placeholder_id(), 'default_pic' => '', 'download_views' => placeholder_number(), 'submitter' => placeholder_id(), 'num_downloads' => placeholder_number(), 'edit_date' => placeholder_time(), 'name' => lorem_phrase()));
     foreach ($download_items as $download) {
         $map = array('ID' => placeholder_id(), 'VIEWS' => placeholder_number(), 'SUBMITTER' => placeholder_id(), 'DESCRIPTION' => lorem_sentence(), 'FILE_SIZE' => placeholder_number(), 'DOWNLOADS' => placeholder_number(), 'DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_date(), 'EDIT_DATE_RAW' => '', 'SIZE' => placeholder_number(), 'URL' => placeholder_url(), 'NAME' => lorem_phrase(), 'TREE' => placeholder_link(), 'IMGCODE' => '', 'AUTHOR' => lorem_word());
         $tpl = do_lorem_template('DOWNLOAD_BOX', $map);
         $downloads->attach($tpl);
         $tpl2 = do_lorem_template('IMG_THUMB', array('JS_TOOLTIP' => true, 'CAPTION' => $tpl, 'URL' => placeholder_image_url()));
         foreach (placeholder_array(20) as $v) {
             $subdownloads->attach($tpl2);
         }
     }
     return array(lorem_globalise(do_lorem_template('DOWNLOAD_CATEGORY_SCREEN', array('TAGS' => lorem_word_html(), 'TITLE' => lorem_title(), 'SUBMIT_URL' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'DESCRIPTION' => lorem_paragraph_html(), 'SUBCATEGORIES' => $subcategories, 'DOWNLOADS' => $downloads, 'SUBDOWNLOADS' => $subdownloads, 'SORTING' => lorem_phrase(), 'ID' => placeholder_id())), NULL, '', true));
 }
예제 #17
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  string			View type.
  * @return tempcode		Preview.
  */
 function calendar_main_screen($view)
 {
     require_lang('dates');
     switch ($view) {
         case 'day':
             $hours = new ocp_tempcode();
             for ($i = 0; $i < 24; $i++) {
                 $_streams = new ocp_tempcode();
                 foreach (placeholder_array(2) as $k => $v) {
                     $entry = do_lorem_template('CALENDAR_DAY_ENTRY_FREE', array('CLASS' => lorem_word(), 'TEXT' => lorem_phrase()));
                     $_streams->attach(do_lorem_template('CALENDAR_DAY_STREAM_HOUR', array('CURRENT' => lorem_word(), 'ADD_URL' => placeholder_url(), 'PRIORITY' => lorem_phrase(), 'DOWN' => '1', 'ENTRY' => $entry)));
                 }
                 foreach (placeholder_array(2) as $v) {
                     $entries = do_lorem_template('CALENDAR_DAY_ENTRY', array('ID' => placeholder_id(), 'URL' => placeholder_url(), 'TIME' => placeholder_time(), 'T_TITLE' => lorem_phrase(), 'TITLE' => lorem_word(), 'DESCRIPTION' => lorem_word_2(), 'RECURRING' => false));
                     $_streams->attach(do_lorem_template('CALENDAR_DAY_STREAM_HOUR', array('CURRENT' => lorem_word(), 'ADD_URL' => placeholder_url(), 'PRIORITY' => lorem_phrase(), 'DOWN' => '1', 'ENTRY' => $entry)));
                 }
                 $hours->attach(do_lorem_template('CALENDAR_DAY_HOUR', array('HOUR' => lorem_word(), 'STREAMS' => $_streams)));
             }
             $main = do_lorem_template('CALENDAR_DAY', array('HOURS' => $hours, 'PERIOD_START' => placeholder_date_raw(), 'PERIOD_END' => placeholder_date_raw()));
             break;
         case 'week':
             $hours = new ocp_tempcode();
             for ($i = 0; $i < 24; $i++) {
                 $days = new ocp_tempcode();
                 for ($j = 0; $j < 7; $j++) {
                     if ($i % 2 == 0) {
                         $entries = do_lorem_template('CALENDAR_WEEK_ENTRY_FREE', array('CLASS' => lorem_word(), 'TEXT' => ''));
                     } else {
                         $entries = do_lorem_template('CALENDAR_WEEK_ENTRY', array('ID' => placeholder_id(), 'URL' => placeholder_url(), 'TIME' => placeholder_time(), 'TITLE' => lorem_word(), 'E' => lorem_word(), 'ICON' => 'calendar/general', 'RECURRING' => false));
                     }
                     $days->attach(do_lorem_template('CALENDAR_WEEK_HOUR_DAY', array('CURRENT' => lorem_word(), 'ADD_URL' => placeholder_url(), 'DOWN' => '1', 'DAY' => lorem_word(), 'HOUR' => lorem_word(), 'CLASS' => lorem_word(), 'ENTRIES' => $entries)));
                 }
                 $hours->attach(do_lorem_template('CALENDAR_WEEK_HOUR', array('HOUR' => lorem_word(), 'DAYS' => $days)));
             }
             $main = do_lorem_template('CALENDAR_WEEK', array('MONDAY_DATE' => lorem_word(), 'TUESDAY_DATE' => lorem_word(), 'WEDNESDAY_DATE' => lorem_word(), 'THURSDAY_DATE' => lorem_word(), 'FRIDAY_DATE' => lorem_word(), 'SATURDAY_DATE' => lorem_word(), 'SUNDAY_DATE' => lorem_word(), 'MONDAY_URL' => placeholder_url(), 'TUESDAY_URL' => placeholder_url(), 'WEDNESDAY_URL' => placeholder_url(), 'THURSDAY_URL' => placeholder_url(), 'FRIDAY_URL' => placeholder_url(), 'SATURDAY_URL' => placeholder_url(), 'SUNDAY_URL' => placeholder_url(), 'HOURS' => $hours, 'PERIOD_START' => placeholder_date_raw(), 'PERIOD_END' => placeholder_date_raw()));
             break;
         case 'month':
             $empty_entry = do_lorem_template('CALENDAR_MONTH_ENTRY_FREE', array('CLASS' => lorem_word(), 'TEXT' => ''));
             $days = new ocp_tempcode();
             foreach (placeholder_array() as $k => $v) {
                 $entries = new ocp_tempcode();
                 foreach (placeholder_array() as $k => $v) {
                     $entries->attach(do_lorem_template('CALENDAR_MONTH_ENTRY', array('ID' => placeholder_id(), 'T_TITLE' => lorem_phrase(), 'PRIORITY' => lorem_word(), 'ICON' => 'calendar/' . placeholder_img_code('calendar'), 'TIME' => placeholder_number(), 'TITLE' => lorem_word(), 'URL' => placeholder_url(), 'RECURRING' => lorem_word())));
                 }
                 $days->attach(do_lorem_template('CALENDAR_MONTH_DAY', array('CURRENT' => false, 'DAY_URL' => '', 'CLASS' => '', 'DAY' => '', 'ENTRIES' => $entries)));
             }
             $weeks = new ocp_tempcode();
             foreach (placeholder_array() as $k => $v) {
                 $weeks->attach(do_lorem_template('CALENDAR_MONTH_WEEK', array('WEEK_URL' => placeholder_url(), 'WEEK_DATE' => lorem_word(), 'DAYS' => $days)));
             }
             $main = do_lorem_template('CALENDAR_MONTH', array('WEEKS' => $weeks, 'PERIOD_START' => placeholder_date_raw(), 'PERIOD_END' => placeholder_date_raw()));
             break;
         case 'year':
             $months = '';
             $month_rows = new ocp_tempcode();
             for ($i = 1; $i <= 12; $i++) {
                 if (($i - 1) % 3 == 0 && $i != 1) {
                     $month_rows->attach(do_lorem_template('CALENDAR_YEAR_MONTH_ROW', array('MONTHS' => $months, 'MONTH_A_URL' => placeholder_url(), 'MONTH_B_URL' => placeholder_url(), 'MONTH_C_URL' => placeholder_url(), 'MONTH_A' => lorem_word(), 'MONTH_B' => lorem_word(), 'MONTH_C' => lorem_word())));
                     $months = '';
                 }
                 $_entries = new ocp_tempcode();
                 $__entries = new ocp_tempcode();
                 $dotw = 0;
                 for ($j = 1; $j <= 31; $j++) {
                     if ($j == 10) {
                         $__entries->attach(do_lorem_template('CALENDAR_YEAR_MONTH_DAY_FREE', array('CLASS' => lorem_word(), 'CURRENT' => lorem_word(), 'DAY_URL' => placeholder_url(), 'DATE' => placeholder_date(), 'DAY' => lorem_word_2())));
                     } else {
                         $__entries->attach(do_lorem_template('CALENDAR_YEAR_MONTH_DAY_ACTIVE', array('CURRENT' => lorem_word(), 'DAY_URL' => placeholder_url(), 'DATE' => placeholder_date(), 'TITLE' => '', 'TIME' => '', 'URL' => '', 'ID' => '', 'PRIORITY' => lorem_word(), 'DAY' => placeholder_number(), 'ICON' => '', 'COUNT' => placeholder_number(), 'EVENTS_AND_PRIORITY_LANG' => lorem_phrase())));
                     }
                     if ($dotw == 6) {
                         $_entries->attach(do_lorem_template('CALENDAR_YEAR_MONTH_DAY_ROW', array('ENTRIES' => $__entries)));
                         $__entries = new ocp_tempcode();
                         $dotw = 0;
                     } else {
                         $dotw++;
                     }
                 }
                 for ($j = $dotw; $j < 7; $j++) {
                     $__entries->attach(do_lorem_template('CALENDAR_YEAR_MONTH_DAY_SPACER'));
                 }
                 $_entries->attach(do_lorem_template('CALENDAR_YEAR_MONTH_DAY_ROW', array('ENTRIES' => $__entries)));
                 $month = do_lorem_template('CALENDAR_YEAR_MONTH', array('ENTRIES' => $_entries));
                 $months .= $month->evaluate();
             }
             $month_rows->attach(do_lorem_template('CALENDAR_YEAR_MONTH_ROW', array('MONTHS' => $months, 'MONTH_A_URL' => placeholder_url(), 'MONTH_B_URL' => placeholder_url(), 'MONTH_C_URL' => placeholder_url(), 'MONTH_A' => lorem_word(), 'MONTH_B' => lorem_word(), 'MONTH_C' => lorem_word())));
             $main = do_lorem_template('CALENDAR_YEAR', array('MONTH_ROWS' => $month_rows, 'PERIOD_START' => placeholder_date_raw(), 'PERIOD_END' => placeholder_date_raw()));
             break;
     }
     $events1 = do_lorem_template('CALENDAR_EVENT_TYPE', array('S' => 'I', 'INTERESTED' => 'interested', 'TYPE' => lorem_phrase(), 'TYPE_ID' => placeholder_id()));
     $events2 = do_lorem_template('CALENDAR_EVENT_TYPE', array('S' => 'F', 'INTERESTED' => 'not_interested', 'TYPE' => lorem_phrase(), 'TYPE_ID' => placeholder_id()));
     return do_lorem_template('CALENDAR_MAIN_SCREEN', array('RSS_FORM' => placeholder_form(), 'DAY_URL' => placeholder_url(), 'WEEK_URL' => placeholder_url(), 'MONTH_URL' => placeholder_url(), 'YEAR_URL' => placeholder_url(), 'PREVIOUS_URL' => placeholder_url(), 'NEXT_URL' => placeholder_url(), 'ADD_URL' => placeholder_url(), 'TITLE' => lorem_title(), 'BACK_URL' => placeholder_url(), 'MAIN' => $main, 'FILTER_URL' => placeholder_url(), 'EVENT_TYPES_1' => $events1, 'INTERESTS_URL' => placeholder_url(), 'EVENT_TYPES_2' => $events2, 'PREVIOUS_NO_FOLLOW' => true, 'NEXT_NO_FOLLOW' => true));
 }
예제 #18
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__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));
 }
예제 #19
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_screen()
 {
     require_lang('news');
     $sections = array('contact' => lorem_word(), 'profile' => lorem_word_2(), 'views' => lorem_word(), 'usage' => lorem_word_2(), 'content' => lorem_word());
     $actions = array();
     $i = 0;
     $links = new ocp_tempcode();
     foreach ($sections as $section_code => $section_title) {
         $links->attach(do_lorem_template('OCF_MEMBER_ACTION', array('ID' => strval($i), 'URL' => placeholder_url(), 'LANG' => lorem_word(), 'REL' => '')));
         $actions[$section_code] = do_lorem_template('OCF_MEMBER_ACTION', array('ID' => strval($i), 'URL' => placeholder_url(), 'LANG' => lorem_word(), 'REL' => '', 'NAME' => $section_title, 'VALUE' => $links));
         $i++;
     }
     require_lang('menus');
     $tabs = array();
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_ABOUT', array('RIGHT_MARGIN' => lorem_phrase(), 'AVATAR_WIDTH' => placeholder_id(), 'PHOTO_WIDTH' => placeholder_id(), 'MOST_ACTIVE_FORUM' => lorem_phrase(), 'TIME_FOR_THEM' => placeholder_time(), 'TIME_FOR_THEM_RAW' => placeholder_date_raw(), 'SUBMIT_DAYS_AGO' => lorem_phrase(), 'SUBMIT_TIME_RAW' => placeholder_time(), 'LAST_VISIT_TIME_RAW' => placeholder_date_raw(), 'ONLINE_NOW' => lorem_phrase(), '_ONLINE_NOW' => false, 'BANNED' => lorem_phrase(), 'USER_AGENT' => lorem_phrase(), 'OPERATING_SYSTEM' => lorem_phrase(), 'DOB' => lorem_phrase(), 'IP_ADDRESS' => lorem_phrase(), 'COUNT_POSTS' => placeholder_number(), 'COUNT_POINTS' => placeholder_number(), 'PRIMARY_GROUP' => lorem_phrase(), 'PRIMARY_GROUP_ID' => placeholder_id(), 'PHOTO_URL' => placeholder_image_url(), 'PHOTO_THUMB_URL' => placeholder_image_url(), 'EMAIL_ADDRESS' => lorem_word(), 'AVATAR_URL' => placeholder_avatar(), 'SIGNATURE' => lorem_phrase(), 'JOIN_DATE' => placeholder_time(), 'JOIN_DATE_RAW' => placeholder_date_raw(), 'CUSTOM_FIELDS' => array(array('NAME' => lorem_phrase(), 'VALUE' => lorem_phrase(), 'ENCRYPTED_VALUE' => '')), 'ACTIONS_contact' => $actions['contact'], 'ACTIONS_profile' => $actions['profile'], 'ACTIONS_views' => $actions['views'], 'ACTIONS_usage' => $actions['usage'], 'ACTIONS_content' => $actions['content'], 'USERNAME' => lorem_word(), 'MEMBER_ID' => placeholder_id(), 'SECONDARY_GROUPS' => placeholder_array(), 'VIEW_PROFILES' => true, 'ON_PROBATION' => lorem_phrase(), 'USERGROUP' => lorem_word(), 'CLUBS' => lorem_phrase()));
     $tabs[] = array('TAB_CODE' => placeholder_id() . '0', 'TAB_TITLE' => lorem_title(), 'TAB_CONTENT' => $tab_content, 'TAB_FIRST' => true, 'TAB_LAST' => false);
     $tabs2 = array();
     $fields = new ocp_tempcode();
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_INTEGER', array('TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'NAME' => $name, 'DEFAULT' => ''));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $tabs2[] = array('TAB_TITLE' => lorem_title(), 'TAB_FIELDS' => $fields, 'TAB_TEXT' => lorem_paragraph(), 'TAB_FIRST' => true, 'TAB_LAST' => true);
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_EDIT', array('URL' => placeholder_url(), 'SUBMIT_NAME' => lorem_phrase(), 'AUTOCOMPLETE' => false, 'SKIP_VALIDATION' => true, 'TABS' => $tabs2, 'HIDDEN' => ''));
     $tabs[] = array('TAB_CODE' => placeholder_id() . '1', 'TAB_TITLE' => lorem_title(), 'TAB_CONTENT' => $tab_content, 'TAB_FIRST' => false, 'TAB_LAST' => true);
     return array(lorem_globalise(do_lorem_template('OCF_MEMBER_PROFILE_SCREEN', array('TITLE' => lorem_title(), 'MEMBER_ID' => placeholder_id(), 'TABS' => $tabs)), NULL, '', true));
 }
예제 #20
0
파일: news.php 프로젝트: erico-deh/ocPortal
 /**
  * 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_news()
 {
     require_lang('news');
     require_lang('ocf');
     require_css('news');
     $contents = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $contents->attach(do_lorem_template('NEWS_PIECE_SUMMARY', array('BLOG' => lorem_phrase(), 'AUTHOR_URL' => placeholder_url(), 'CATEGORY' => lorem_phrase(), 'IMG' => placeholder_image_url(), 'AUTHOR' => lorem_phrase(), '_AUTHOR' => lorem_phrase(), 'SUBMITTER' => lorem_phrase(), 'AVATAR' => lorem_phrase(), 'NEWS_TITLE' => lorem_phrase(), 'DATE' => lorem_phrase(), 'NEWS' => lorem_phrase(), 'COMMENTS' => lorem_phrase(), 'VIEW' => lorem_phrase(), 'ID' => placeholder_id(), 'FULL_URL' => placeholder_url(), 'COMMENT_COUNT' => lorem_phrase(), 'READ_MORE' => lorem_sentence(), 'TRUNCATE' => false, 'FIRSTTIME' => lorem_word(), 'LASTTIME' => lorem_word_2(), 'CLOSED' => lorem_word(), 'FIRSTUSERNAME' => lorem_word(), 'LASTUSERNAME' => lorem_word(), 'FIRSTMEMBERID' => lorem_word(), 'LASTMEMBERID' => lorem_word(), 'DATE_RAW' => lorem_word(), 'TAGS' => '')));
     }
     return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_NEWS', array('BLOG' => TRUE, 'TITLE' => lorem_phrase(), 'CONTENT' => $contents, 'RSS_URL' => placeholder_url(), 'ATOM_URL' => placeholder_url(), 'SUBMIT_URL' => placeholder_url(), 'ARCHIVE_URL' => placeholder_url(), 'BRIEF' => lorem_phrase())), NULL, '', true));
 }
예제 #21
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__themewizard_2_screen()
 {
     require_lang('themes');
     return array(lorem_globalise(do_lorem_template('THEMEWIZARD_2_SCREEN', array('SOURCE_THEME' => 'default', 'ALGORITHM' => 'equations', 'RED' => placeholder_id(), 'GREEN' => placeholder_id(), 'BLUE' => placeholder_id(), 'SEED' => lorem_word(), 'DARK' => lorem_word_2(), 'DOMINANT' => lorem_word(), 'LD' => lorem_phrase(), 'TITLE' => lorem_title(), 'CHANGE_LINK' => placeholder_url(), 'STAGE3_LINK' => placeholder_url())), NULL, '', true));
 }
예제 #22
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__news_piece_summary()
 {
     return array(lorem_globalise(do_lorem_template('NEWS_PIECE_SUMMARY', array('BLOG' => lorem_phrase(), 'AUTHOR_URL' => placeholder_url(), 'TAGS' => '', 'CATEGORY' => lorem_phrase(), 'IMG' => placeholder_image_url(), 'AUTHOR' => lorem_phrase(), '_AUTHOR' => lorem_phrase(), 'SUBMITTER' => lorem_phrase(), 'AVATAR' => lorem_phrase(), 'NEWS_TITLE' => lorem_phrase(), 'DATE' => lorem_phrase(), 'NEWS' => lorem_phrase(), 'COMMENTS' => lorem_phrase(), 'VIEW' => lorem_phrase(), 'ID' => placeholder_id(), 'FULL_URL' => placeholder_url(), 'COMMENT_COUNT' => lorem_phrase(), 'READ_MORE' => lorem_sentence(), 'TRUNCATE' => false, 'FIRSTTIME' => lorem_word(), 'LASTTIME' => lorem_word_2(), 'CLOSED' => lorem_word(), 'FIRSTUSERNAME' => lorem_word(), 'LASTUSERNAME' => lorem_word(), 'FIRSTMEMBERID' => lorem_word(), 'LASTMEMBERID' => lorem_word(), 'DATE_RAW' => lorem_word())), NULL, '', true));
 }
예제 #23
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__list_catalogue_screen_products()
 {
     require_lang('catalogues');
     require_css('catalogues');
     $all_rating_criteria = array();
     $all_rating_criteria[] = array('TITLE' => lorem_word(), 'RATING' => make_string_tempcode("6"), 'TYPE' => lorem_word());
     $line = new ocp_tempcode();
     foreach (placeholder_array(1) as $v) {
         $line->attach(do_lorem_template('CATALOGUE_products_LINE', array('FIELD_0' => lorem_phrase(), 'FIELD_7_THUMB' => lorem_phrase(), 'RATING' => new ocp_tempcode(), 'FIELD_2' => placeholder_number(), 'ADD_TO_CART' => placeholder_url(), 'VIEW_URL' => placeholder_url(), 'GO_FOR_IT' => lorem_phrase())));
     }
     $entry = do_lorem_template('CATALOGUE_products_LINE_WRAP', array('CONTENT' => $line));
     return array(lorem_globalise(do_lorem_template('CATALOGUE_DEFAULT_CATEGORY_SCREEN', array('ID' => placeholder_random_id(), 'ADD_DATE_RAW' => placeholder_time(), 'TITLE' => lorem_title(), '_TITLE' => lorem_phrase(), 'TAGS' => '', 'CATALOGUE' => lorem_word_2(), 'BROWSER' => '', 'SORTING' => '', 'ADD_LINK' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'EDIT_CATALOGUE_URL' => placeholder_url(), 'ENTRIES' => $entry, 'SUBCATEGORIES' => '', 'DESCRIPTION' => lorem_sentence(), 'CART_LINK' => placeholder_url(), 'TREE' => lorem_phrase())), NULL, '', true));
 }
예제 #24
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__block_main_topsites()
 {
     return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_TOPSITES', array('TYPE' => lorem_phrase(), 'BANNERS' => placeholder_array(), 'SUBMIT_URL' => placeholder_url(), 'DESCRIPTION' => lorem_word(), 'BANNER' => lorem_word_2(), 'HITSFROM' => placeholder_number(), 'HITSTO' => placeholder_number())), NULL, '', true));
 }
예제 #25
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__theme_manage_screen()
 {
     require_lang('zones');
     $themes = new ocp_tempcode();
     foreach (placeholder_array() as $value) {
         $themes->attach(do_lorem_template('THEME_MANAGE', array('THEME_USAGE' => lorem_phrase(), 'SEED' => '123456', 'DATE' => placeholder_time(), 'RAW_DATE' => placeholder_date_raw(), 'NAME' => $value, 'DESCRIPTION' => lorem_paragraph_html(), 'AUTHOR' => lorem_phrase(), 'TITLE' => lorem_phrase(), 'CSS_URL' => placeholder_url(), 'TEMPLATES_URL' => placeholder_url(), 'IMAGES_URL' => placeholder_url(), 'DELETABLE' => placeholder_table(), 'EDIT_URL' => placeholder_url(), 'DELETE_URL' => placeholder_url(), 'SCREEN_PREVIEW_URL' => placeholder_url())));
     }
     $zones = array();
     foreach (placeholder_array() as $v) {
         $zones[] = array('0' => lorem_word(), '1' => lorem_word_2());
     }
     return array(lorem_globalise(do_lorem_template('THEME_MANAGE_SCREEN', array('TITLE' => lorem_title(), 'THEMES' => $themes, 'THEME_DEFAULT_REASON' => lorem_phrase(), 'ZONES' => $zones)), NULL, '', true));
 }
예제 #26
0
파일: chat.php 프로젝트: erico-deh/ocPortal
 /**
  * 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__chat_set_effects_screen()
 {
     require_javascript('javascript_validation');
     require_javascript('javascript_swfupload');
     $setting_blocks = new ocp_tempcode();
     foreach (placeholder_array() as $member => $values) {
         $effects = array();
         foreach (placeholder_array() as $k => $v) {
             $effects[] = array('KEY' => strval($k), 'VALUE' => $v, 'MEMBER_ID' => "{$member}", 'USERNAME' => lorem_phrase(), 'EFFECT_TITLE' => lorem_word(), 'EFFECT_SHORT' => lorem_word_2(), 'EFFECT' => lorem_word());
         }
         $block = do_lorem_template('CHAT_SET_EFFECTS_SETTING_BLOCK', array('HAS_SOME' => false, 'EFFECTS' => $effects, 'LIBRARY' => placeholder_array()));
         $setting_blocks->attach($block);
     }
     return array(lorem_globalise(do_lorem_template('CHAT_SET_EFFECTS_SCREEN', array('TITLE' => lorem_title(), 'SUBMIT_NAME' => lorem_word(), 'HIDDEN' => '', 'POST_URL' => placeholder_url(), 'SETTING_BLOCKS' => $setting_blocks, 'CHAT_SOUND' => '')), 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__block_main_staff_checklist()
 {
     $_status = do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_1');
     $info = do_lang_tempcode('DUE_TIME', placeholder_number(), placeholder_number());
     $dates = do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM', array('URL' => placeholder_url(), 'STATUS' => $_status, 'CONTACT_US_MESSAGING' => lorem_phrase(), 'TASK' => lorem_phrase(), 'INFO' => $info, 'NUM_QUEUE' => placeholder_id()));
     $status = do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_0', array('ORDER_STATUS' => 'not_completed'));
     $url = build_url(array('page' => 'admin_orders', 'type' => 'show_orders', 'filter' => 'undispatched'), get_module_zone('admin_orders'));
     $no_times = do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM', array('URL' => placeholder_url(), 'STATUS' => $status, 'TASK' => lorem_phrase(), 'CONTACT_US_MESSAGING' => lorem_phrase(), 'INFO' => lorem_phrase(), 'NUM_QUEUE' => placeholder_id()));
     $todo = do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM', array('URL' => placeholder_url(), 'STATUS' => do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_1'), 'CONTACT_US_MESSAGING' => lorem_phrase(), 'TASK' => lorem_phrase(), 'INFO' => lorem_phrase(), 'NUM_QUEUE' => placeholder_id()));
     $custom_task = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $custom_task->attach(do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_CUSTOM_TASK', array('TASKDONE' => 'checklist0', 'ADD_TIME' => placeholder_time(), 'RECURINTERVAL' => '', 'ID' => placeholder_id(), 'TASKTITLE' => lorem_word_2())));
     }
     $custom_task->attach(do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_NA', array()));
     return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_STAFF_CHECKLIST', array('URL' => placeholder_url(), 'NOTES' => lorem_phrase(), 'CUSTOMTASKS' => $custom_task, 'DATES' => $dates, 'NO_TIMES' => $no_times, 'TODO_COUNTS' => $todo)), NULL, '', true));
 }
예제 #28
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_download()
 {
     return array(lorem_globalise(do_lorem_template('ATTACHMENT_DOWNLOAD', array('SCRIPT' => placeholder_url(), 'A_DESCRIPTION' => lorem_word(), 'A_ORIGINAL_FILENAME' => lorem_word_2(), 'ID' => placeholder_id(), 'CLEAN_SIZE' => placeholder_random(), 'SUP_PARAMS' => placeholder_blank(), 'FORUM_DB_BIN' => placeholder_blank())), NULL, '', true));
 }
예제 #29
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__form_screen_input_permission()
 {
     require_lang('permissions');
     $permission_rows = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $overrides = new ocp_tempcode();
         $all_global = true;
         foreach (placeholder_array() as $k => $v) {
             $overrides->attach(do_lorem_template('FORM_SCREEN_INPUT_PERMISSION_OVERRIDE', array('FORCE_PRESETS' => false, 'GROUP_NAME' => lorem_phrase(), 'VIEW_ACCESS' => '', 'TABINDEX' => placeholder_number(), 'GROUP_ID' => placeholder_random_id(), 'SP' => strval($k), 'ALL_GLOBAL' => true, 'TITLE' => lorem_phrase(), 'DEFAULT_ACCESS' => '', 'CODE' => '-1')));
         }
         $permission_rows->attach(do_lorem_template('FORM_SCREEN_INPUT_PERMISSION', array('FORCE_PRESETS' => false, 'GROUP_NAME' => lorem_phrase(), 'OVERRIDES' => $overrides->evaluate(), 'ALL_GLOBAL' => true, 'VIEW_ACCESS' => '', 'TABINDEX' => placeholder_number(), 'GROUP_ID' => placeholder_random_id(), 'PINTERFACE_VIEW' => '')));
     }
     $permission_rows->attach(do_lorem_template('FORM_SCREEN_INPUT_PERMISSION_MATRIX_OUTER', array('INNER' => lorem_word())));
     $permission_rows->attach(do_lorem_template('FORM_SCREEN_INPUT_PERMISSION_ADMIN', array('PINTERFACE_VIEW' => lorem_word(), 'GROUP_ID' => placeholder_random_id(), 'GROUP_NAME' => lorem_phrase(), 'FORCE_PRESETS' => false, 'OVERRIDES' => placeholder_array())));
     $field = do_lorem_template('FORM_SCREEN_INPUT_PERMISSION_MATRIX', array('TITLE' => lorem_phrase(), 'SERVER_ID' => placeholder_id(), 'COLOR' => lorem_word(), 'OVERRIDES' => placeholder_array(), 'PERMISSION_ROWS' => $permission_rows));
     return array(lorem_globalise(do_lorem_template('FORM_GROUPED', array('URL' => '#', 'FIELD_GROUPS' => $field, 'TEXT' => '', 'SUBMIT_NAME' => lorem_word_2())), NULL, '', true));
 }
예제 #30
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__occle_command()
 {
     $notifications = do_lorem_template('OCCLE_NOTIFICATION', array('SECTION' => lorem_phrase(), 'TYPE' => lorem_phrase(), 'NOTIFICATION_CONTENT' => lorem_phrase()));
     return array(lorem_globalise(do_lorem_template('OCCLE_COMMAND', array('NOTIFICATIONS' => $notifications, 'METHOD' => lorem_phrase(), 'STDOUT' => lorem_phrase(), 'STDHTML' => lorem_phrase(), 'STDCOMMAND' => lorem_word_2(), 'STDERR' => lorem_phrase())), NULL, '', true));
 }