Example #1
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__installer_wrap()
 {
     require_css('install');
     require_lang('installer');
     require_lang('version');
     return array(lorem_globalise(do_lorem_template('INSTALLER_WRAP', array('CSS_NOCACHE' => ".nocss{}", 'DEFAULT_FORUM' => lorem_phrase(), 'PASSWORD_PROMPT' => lorem_phrase(), 'CSS_URL' => get_base_url() . '/themes/default/css/installer.css', 'CSS_URL_2' => get_base_url() . '/themes/default/css/installer.css', 'LOGO_URL' => placeholder_image_url(), 'STEP' => '1', 'CONTENT' => lorem_paragraph_html(), 'VERSION' => lorem_phrase())), NULL, '', true));
 }
Example #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.
  *
  * @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));
 }
Example #3
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array                 Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__support_ticket_screen()
 {
     require_javascript('javascript_ajax');
     require_lang('ocf');
     $other_tickets = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $other_tickets->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())));
     }
     $comments = new ocp_tempcode();
     $comment_form = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST_URL' => placeholder_url(), 'FIRST_POST' => lorem_paragraph_html(), 'USE_CAPTCHA' => false, 'ATTACHMENTS' => lorem_phrase(), 'ATTACH_SIZE_FIELD' => lorem_phrase(), 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'GET_EMAIL' => lorem_word(), 'EMAIL_OPTIONAL' => lorem_word(), 'GET_TITLE' => true, 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'COMMENT_URL' => '', 'SUBMIT_NAME' => lorem_phrase(), 'TITLE' => lorem_phrase(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true));
     return array(lorem_globalise(do_lorem_template('SUPPORT_TICKET_SCREEN', array('TOGGLE_TICKET_CLOSED_URL' => placeholder_url(), 'CLOSED' => lorem_phrase(), 'OTHER_TICKETS' => $other_tickets, 'USERNAME' => lorem_word(), 'PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'NEW' => lorem_phrase(), 'TICKET_PAGE_TEXT' => lorem_sentence_html(), 'TYPES' => placeholder_array(), 'STAFF_ONLY' => placeholder_fields(), 'POSTER' => lorem_phrase(), 'TITLE' => lorem_title(), 'COMMENTS' => $comments, 'COMMENT_FORM' => $comment_form, 'STAFF_DETAILS' => placeholder_url(), 'URL' => placeholder_url(), 'ADD_TICKET_URL' => placeholder_url())), NULL, '', true));
 }
Example #4
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__block_main_awards()
 {
     return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_AWARDS', array('TITLE' => lorem_word(), 'TYPE' => lorem_word(), 'DESCRIPTION' => lorem_paragraph_html(), 'AWARDEE_PROFILE_URL' => placeholder_url(), 'AWARDEE' => lorem_phrase(), 'AWARDEE_USERNAME' => lorem_word(), 'RAW_AWARD_DATE' => placeholder_time(), 'AWARD_DATE' => placeholder_time(), 'CONTENT' => lorem_phrase_html(), 'SUBMIT_URL' => placeholder_url(), 'ARCHIVE_URL' => placeholder_url())), NULL, '', true));
 }
Example #5
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__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));
 }
Example #6
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__template_edit_link_screen()
 {
     $parameters = array('FILE' => lorem_phrase(), 'EDIT_URL' => placeholder_url(), 'CODENAME' => lorem_word(), 'GUID' => placeholder_id(), 'ID' => placeholder_random_id());
     $param_info = do_lorem_template('PARAM_INFO', array('MAP' => $parameters));
     return array(lorem_globalise(do_lorem_template('TEMPLATE_EDIT_LINK', array('PARAM_INFO' => $param_info, 'CONTENTS' => lorem_paragraph_html(), 'CODENAME' => lorem_word(), 'EDIT_URL' => placeholder_url())), NULL, '', true));
 }
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__comcode_page_preview()
 {
     return array(lorem_globalise(do_lorem_template('COMCODE_PAGE_PREVIEW', array('PAGE' => lorem_phrase(), 'ZONE' => lorem_phrase(), 'URL' => placeholder_url(), 'SUMMARY' => lorem_paragraph_html())), NULL, '', true));
 }
Example #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__attachment_flv()
 {
     return array(lorem_globalise(do_lorem_template('ATTACHMENT_FLV', array('SCRIPT' => placeholder_javascript(), 'ID' => placeholder_id(), 'A_WIDTH' => placeholder_number(), 'A_HEIGHT' => placeholder_number(), 'A_DESCRIPTION' => lorem_paragraph_html(), 'SUP_PARAMS' => placeholder_blank(), 'FORUM_DB_BIN' => placeholder_blank(), 'MIME_TYPE' => lorem_word(), 'A_ORIGINAL_FILENAME' => lorem_phrase(), 'A_URL' => placeholder_url())), NULL, '', true));
 }
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__addon_install_confirm_screen()
 {
     $_dependencies = new ocp_tempcode();
     foreach (placeholder_array() as $in) {
         if (!$_dependencies->is_empty()) {
             $_dependencies->attach(do_lang_tempcode('LIST_SEP'));
         }
         $_dependencies->attach(escape_html($in));
     }
     $warning = do_lorem_template('ADDON_INSTALL_WARNING', array('WARNING' => do_lang_tempcode('ADDON_WARNING_PRESENT_DEPENDENCIES', $_dependencies, lorem_phrase()), 'ADDON_WARNING_OVERWRITE' => lorem_phrase()));
     $files = new ocp_tempcode();
     foreach (placeholder_array() as $val) {
         $files->attach(do_lorem_template('ADDON_INSTALL_FILES_WARNING', array('PATH' => lorem_phrase(), 'ABOUT' => do_lang_tempcode('ADDON_FILE_WILL_OVERWRITE'), 'I' => placeholder_random())));
     }
     foreach (placeholder_array() as $val) {
         $files->attach(do_lorem_template('ADDON_INSTALL_FILES', array('PATH' => lorem_phrase(), 'ABOUT' => do_lang_tempcode('ADDON_FILE_NORMAL'), 'I' => placeholder_random())));
     }
     return array(lorem_globalise(do_lorem_template('ADDON_INSTALL_CONFIRM_SCREEN', array('TITLE' => lorem_title(), 'FILE' => lorem_phrase(), 'URL' => placeholder_url(), 'FILES' => $files, 'WARNINGS' => $warning, 'NAME' => lorem_word(), 'AUTHOR' => lorem_word_2(), 'ORGANISATION' => lorem_phrase(), 'VERSION' => placeholder_number(), 'DESCRIPTION' => lorem_paragraph_html())), NULL, '', true));
 }
Example #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__download_screen()
 {
     require_lang('galleries');
     $images_details = new ocp_tempcode();
     foreach (placeholder_array() as $row) {
         $image = do_lorem_template('DOWNLOAD_SCREEN_IMAGE', array('ID' => placeholder_id(), 'VIEW_URL' => placeholder_url(), 'EDIT_URL' => placeholder_url(), 'THUMB' => placeholder_image(), 'COMMENT' => lorem_phrase()));
         $cell = do_lorem_template('DOWNLOAD_GALLERY_IMAGE_CELL', array('CONTENT' => $image));
         $images_details->attach(do_lorem_template('DOWNLOAD_GALLERY_ROW', array('CELLS' => $cell)));
     }
     return array(lorem_globalise(do_lorem_template('DOWNLOAD_SCREEN', array('ORIGINAL_FILENAME' => lorem_phrase(), 'TAGS' => lorem_word_html(), 'LICENCE' => lorem_phrase(), 'LICENCE_TITLE' => lorem_phrase(), 'LICENCE_HYPERLINK' => placeholder_link(), 'SUBMITTER' => placeholder_id(), 'EDIT_DATE' => placeholder_time(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'VIEWS' => lorem_phrase(), 'DATE' => placeholder_time(), 'DATE_RAW' => placeholder_date_raw(), 'NUM_DOWNLOADS' => placeholder_number(), 'TITLE' => lorem_title(), 'NAME' => lorem_phrase(), 'OUTMODE_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'EDIT_URL' => placeholder_url(), 'ADD_IMG_URL' => placeholder_url(), 'DESCRIPTION' => lorem_paragraph_html(), 'ADDITIONAL_DETAILS' => lorem_sentence_html(), 'IMAGES_DETAILS' => $images_details, 'ID' => placeholder_id(), 'FILE_SIZE' => placeholder_filesize(), 'AUTHOR_URL' => placeholder_url(), 'AUTHOR' => lorem_phrase(), 'TRACKBACK_DETAILS' => lorem_sentence_html(), 'RATING_DETAILS' => lorem_sentence_html(), 'COMMENTS_DETAILS' => lorem_sentence_html(), 'NUM_IMAGES' => '3')), NULL, '', true));
 }
Example #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__calendar_event_box()
 {
     return array(lorem_globalise(do_lorem_template('CALENDAR_EVENT_BOX', array('URL' => placeholder_url(), 'SUMMARY' => lorem_paragraph_html(), 'TITLE' => lorem_phrase())), NULL, '', true));
 }
Example #12
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));
 }
Example #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__comcode_tab_body()
 {
     $content = new ocp_tempcode();
     $head = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         if ($k == 0) {
             $first = true;
             $last = false;
         } elseif ($k == 2) {
             $first = false;
             $last = true;
         } else {
             $first = false;
             $last = false;
         }
         $head->attach(do_lorem_template('COMCODE_TAB_HEAD', array('TITLE' => lorem_word() . $v, 'FIRST' => $first, 'LAST' => $last)));
         $content->attach(do_lorem_template('COMCODE_TAB_BODY', array('DEFAULT' => $k == 0, 'TITLE' => lorem_word() . $v, 'CONTENT' => lorem_paragraph_html())));
     }
     return array(lorem_globalise(do_lorem_template('COMCODE_TAB_CONTROLLER', array('HEADS' => $head, 'CONTENT' => $content)), NULL, '', true));
 }
Example #14
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));
 }
 /**
  * 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__simple_preview_box()
 {
     return array(lorem_globalise(do_lorem_template('SIMPLE_PREVIEW_BOX', array('SUMMARY' => lorem_paragraph_html(), 'URL' => placeholder_url())), NULL, '', true));
 }
Example #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__iotd_view_screen()
 {
     require_lang('ocf');
     require_lang('captcha');
     require_lang('trackbacks');
     $trackbacks = new ocp_tempcode();
     foreach (placeholder_array(1) as $k => $v) {
         $trackbacks->attach(do_lorem_template('TRACKBACK', array('ID' => placeholder_id(), 'TIME_RAW' => placeholder_date_raw(), 'TIME' => placeholder_date(), 'URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'EXCERPT' => lorem_paragraph(), 'NAME' => lorem_phrase())));
     }
     $trackback_details = do_lorem_template('TRACKBACK_WRAPPER', array('TRACKBACKS' => $trackbacks, 'TRACKBACK_PAGE' => placeholder_id(), 'TRACKBACK_ID' => placeholder_id(), 'TRACKBACK_TITLE' => lorem_phrase()));
     $rating_details = new ocp_tempcode();
     $review_titles = array();
     $review_titles[] = array('REVIEW_TITLE' => lorem_word(), 'REVIEW_RATING' => make_string_tempcode(float_format(10.0)));
     $comments = '';
     $form = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST_URL' => placeholder_url(), 'FIRST_POST' => lorem_paragraph_html(), 'TYPE' => 'downloads', 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => $review_titles, 'USE_CAPTCHA' => true, 'GET_EMAIL' => false, 'EMAIL_OPTIONAL' => true, 'GET_TITLE' => true, 'POST_WARNING' => do_lang('POST_WARNING'), 'COMMENT_TEXT' => get_option('comment_text'), 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'COMMENT_URL' => placeholder_url(), 'TITLE' => lorem_word(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true));
     $comment_details = do_lorem_template('COMMENTS_WRAPPER', array('TYPE' => lorem_phrase(), 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => $review_titles, 'AUTHORISED_FORUM_LINK' => placeholder_url(), 'FORM' => $form, 'COMMENTS' => $comments));
     return array(lorem_globalise(do_lorem_template('IOTD_VIEW_SCREEN', array('TITLE' => lorem_title(), 'SUBMITTER' => lorem_word_html(), 'I_TITLE' => lorem_phrase(), 'CAPTION' => lorem_phrase(), 'DATE_RAW' => placeholder_date_raw(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_time(), 'ADD_DATE' => placeholder_time(), 'EDIT_DATE' => placeholder_time(), 'VIEWS' => placeholder_number(), 'TRACKBACK_DETAILS' => $trackback_details, 'RATING_DETAILS' => $rating_details, 'COMMENT_DETAILS' => $comment_details, 'EDIT_URL' => placeholder_url(), 'URL' => placeholder_image_url())), NULL, '', true));
 }
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__comments_wrapper()
 {
     $review_titles = array();
     $review_titles[] = array('REVIEW_TITLE' => lorem_phrase(), 'REVIEW_RATING' => make_string_tempcode(float_format(10.0)));
     $comments = new ocp_tempcode();
     foreach (placeholder_array() as $i => $comment) {
         $map = array('INDIVIDUAL_REVIEW_RATINGS' => array(), 'HIGHLIGHT' => $i == 1, 'TITLE' => lorem_word(), 'TIME_RAW' => placeholder_number(), 'TIME' => placeholder_time(), 'POSTER_ID' => placeholder_id(), 'POSTER_URL' => placeholder_url(), 'POSTER_NAME' => lorem_word(), 'POSTER' => NULL, 'POSTER_DETAILS' => new ocp_tempcode(), 'ID' => placeholder_id() . strval($i), 'POST' => lorem_phrase(), 'POST_COMCODE' => lorem_phrase(), 'CHILDREN' => lorem_phrase(), 'OTHER_IDS' => array(placeholder_id()), 'RATING' => new ocp_tempcode(), 'EMPHASIS' => new ocp_tempcode(), 'BUTTONS' => new ocp_tempcode(), 'LAST_EDITED_RAW' => '', 'LAST_EDITED' => new ocp_tempcode(), 'UNVALIDATED' => new ocp_tempcode(), 'TOPIC_ID' => placeholder_id(), 'IS_SPACER_POST' => false, 'NUM_TO_SHOW_LIMIT' => placeholder_number());
         $comments->attach(do_lorem_template('POST', $map));
         do_lorem_template('POST_CHILD_LOAD_LINK', $map);
         // INCLUDE'd in above, but test set needs to see it run direct
     }
     if (addon_installed('captcha')) {
         require_code('captcha');
         $use_captcha = use_captcha();
     } else {
         $use_captcha = false;
     }
     $form = do_lorem_template('COMMENTS_POSTING_FORM', array('FIRST_POST_URL' => '', 'JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST' => lorem_paragraph_html(), 'TYPE' => 'downloads', 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => $review_titles, 'USE_CAPTCHA' => $use_captcha, 'GET_EMAIL' => false, 'EMAIL_OPTIONAL' => true, 'GET_TITLE' => true, 'POST_WARNING' => do_lang('POST_WARNING'), 'COMMENT_TEXT' => get_option('comment_text'), 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'COMMENT_URL' => placeholder_url(), 'TITLE' => lorem_word(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true));
     $out = do_lorem_template('COMMENTS_WRAPPER', array('TYPE' => lorem_phrase(), 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => $review_titles, 'AUTHORISED_FORUM_LINK' => placeholder_url(), 'FORM' => $form, 'COMMENTS' => $comments));
     $out->attach(do_lorem_template('COMMENT_AJAX_HANDLER', array('OPTIONS' => lorem_phrase(), 'HASH' => lorem_phrase())));
     return array(lorem_globalise($out, NULL, '', true));
 }
Example #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__cedi_page_screen()
 {
     require_lang('ocf');
     $extra = new ocp_tempcode();
     $extra = do_lorem_template('SCREEN_ITEM_BUTTON', array('REL' => 'edit', 'IMMEDIATE' => false, 'URL' => placeholder_url(), 'TITLE' => do_lang_tempcode('EDIT'), 'IMG' => 'edit'));
     $extra->attach(do_lorem_template('SCREEN_ITEM_BUTTON', array('REL' => 'move', 'IMMEDIATE' => false, 'URL' => placeholder_url(), 'TITLE' => do_lang_tempcode('MOVE'), 'IMG' => 'move')));
     $all_rating_criteria = array();
     $all_rating_criteria[] = array('TITLE' => lorem_word(), 'RATING' => make_string_tempcode("6"), 'NUM_RATINGS' => placeholder_number(), 'TYPE' => lorem_word());
     $rating_inside = do_lorem_template('CEDI_RATING_FORM', array('LIKES' => true, 'CONTENT_TYPE' => 'seedy', 'ID' => placeholder_id(), 'URL' => placeholder_url(), 'ALL_RATING_CRITERIA' => $all_rating_criteria, 'OVERALL_NUM_RATINGS' => placeholder_number(), 'HAS_RATINGS' => true, 'SIMPLISTIC' => true, 'ERROR' => ''));
     $rating_details = do_lorem_template('CEDI_RATING', array('OVERALL_NUM_RATINGS' => placeholder_number(), 'RATING_FORM' => $rating_inside, 'ALL_RATING_CRITERIA' => $all_rating_criteria, 'HAS_RATINGS' => true));
     $posts = do_lorem_template('CEDI_POST', array('INCLUDE_EXPANSION' => lorem_phrase(), 'UNVALIDATED' => do_lang('UNVALIDATED'), 'STAFF_ACCESS' => lorem_phrase(), 'EXP_IMG' => placeholder_img_code(), 'RATE_URL' => placeholder_url(), 'RATING' => $rating_details, 'ID' => placeholder_id(), 'POSTER_URL' => placeholder_url(), 'POSTER' => lorem_phrase(), 'POST_DATE_RAW' => placeholder_date(), 'POST_DATE' => placeholder_date(), 'POST' => lorem_phrase(), 'BUTTONS' => $extra));
     $_child = do_lorem_template('CEDI_SUBCATEGORY_CHILDREN', array('MY_CHILD_POSTS' => lorem_phrase(), 'MY_CHILD_CHILDREN' => lorem_phrase()));
     $child = do_lorem_template('CEDI_SUBCATEGORY_LINK', array('URL' => placeholder_url(), 'CHILD' => $_child, 'SUP' => lorem_phrase()));
     return array(lorem_globalise(do_lorem_template('CEDI_PAGE_SCREEN', array('TAGS' => lorem_word_html(), 'HIDE_POSTS' => placeholder_id(), 'ID' => placeholder_id(), 'VIEWS' => placeholder_number(), 'STAFF_ACCESS' => '1', 'DESCRIPTION' => lorem_paragraph_html(), 'TITLE' => lorem_title(), 'CHILDREN' => $child, 'POSTS' => $posts, 'NUM_POSTS' => placeholder_number(), 'MENU' => placeholder_button())), NULL, '', true));
 }
Example #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__block_main_contact_simple()
 {
     require_lang('ocf');
     $comment_details = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST_URL' => placeholder_url(), 'FIRST_POST' => lorem_paragraph_html(), 'USE_CAPTCHA' => false, 'EMAIL_OPTIONAL' => lorem_word(), 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'GET_EMAIL' => lorem_word(), 'GET_TITLE' => lorem_word(), 'EM' => placeholder_emoticon_chooser(), 'DISPLAY' => 'block', 'TITLE' => lorem_phrase(), 'COMMENT_URL' => placeholder_url(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true));
     return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_CONTACT_SIMPLE', array('EMAIL_OPTIONAL' => lorem_word_html(), 'COMMENT_DETAILS' => $comment_details, 'MESSAGE' => lorem_phrase())), NULL, '', true));
 }
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__block_helper_block_group()
 {
     $links = new ocp_tempcode();
     foreach (placeholder_array() as $v) {
         $links->attach(do_lorem_template('BLOCK_HELPER_BLOCK_CHOICE', array('USAGE' => placeholder_array(), 'DESCRIPTION' => lorem_paragraph_html(), 'URL' => placeholder_url(), 'LINK_CAPTION' => lorem_phrase())));
     }
     return array(lorem_globalise(do_lorem_template('BLOCK_HELPER_BLOCK_GROUP', array('IMG' => 'themes/default/images/bigicons/add_one.png', 'TITLE' => lorem_phrase(), 'LINKS' => $links)), NULL, '', true));
 }
Example #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__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));
 }