/**
* 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_edit_avatar_tab()
{
require_lang('ocf');
require_css('ocf');
$avatar = do_lorem_template('OCF_TOPIC_POST_AVATAR', array('AVATAR' => placeholder_image_url()));
return array(lorem_globalise(do_lorem_template('OCF_EDIT_AVATAR_TAB', array('USERNAME' => lorem_word(), 'AVATAR' => $avatar, 'WIDTH' => placeholder_number(), 'HEIGHT' => placeholder_number())), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__supermembers_screen()
{
require_lang('authors');
require_lang('points');
$groups_current = do_lorem_template('SUPERMEMBERS_SCREEN_ENTRY', array('NAME' => lorem_phrase(), 'DAYS' => placeholder_number(), 'PROFILE_URL' => placeholder_url(), 'AUTHOR_URL' => placeholder_url(), 'POINTS_URL' => placeholder_url(), 'PM_URL' => placeholder_url(), 'SKILLS' => lorem_phrase()));
$groups = do_lorem_template('SUPERMEMBERS_SCREEN_GROUP', array('ENTRIES' => $groups_current, 'GROUP_NAME' => lorem_phrase()));
return array(lorem_globalise(do_lorem_template('SUPERMEMBERS_SCREEN', array('TITLE' => lorem_title(), 'GROUPS' => $groups, 'TEXT' => lorem_sentence_html())), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__administrative__tester_statistics_screen()
{
$testers = new ocp_tempcode();
foreach (placeholder_array() as $k => $v) {
$testers->attach(do_lorem_template('TESTER_STATISTICS_MEMBER', array('TESTER' => lorem_word(), 'NUM_TESTS' => placeholder_number(), 'NUM_TESTS_SUCCESSFUL' => placeholder_number(), 'NUM_TESTS_FAILED' => placeholder_number(), 'NUM_TESTS_INCOMPLETE' => placeholder_number())));
}
return array(lorem_globalise(do_lorem_template('TESTER_STATISTICS_SCREEN', array('TITLE' => lorem_title(), 'TESTERS' => $testers, 'NUM_TESTS' => placeholder_number(), 'NUM_TESTS_SUCCESSFUL' => placeholder_number(), 'NUM_TESTS_FAILED' => placeholder_number(), 'NUM_TESTS_INCOMPLETE' => placeholder_number())), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__form_screen_input_captcha()
{
require_code('captcha');
generate_captcha();
$input = do_lorem_template('FORM_SCREEN_INPUT_CAPTCHA', array('TABINDEX' => placeholder_number()));
$captcha = do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => 'security_image', 'NAME' => lorem_phrase(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => ''));
return array(lorem_globalise(do_lorem_template('FORM_SCREEN', array('SKIP_VALIDATION' => true, 'HIDDEN' => '', 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'FIELDS' => $captcha, 'SUBMIT_NAME' => lorem_word(), 'TEXT' => lorem_sentence_html())), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__block_side_stats()
{
$full_tpl = new ocp_tempcode();
$bits = new ocp_tempcode();
foreach (placeholder_array() as $v) {
$bits->attach(do_lorem_template('BLOCK_SIDE_STATS_SUBLINE', array('KEY' => lorem_phrase(), 'VALUE' => placeholder_number())));
}
$full_tpl->attach(do_lorem_template('BLOCK_SIDE_STATS_SECTION', array('SECTION' => lorem_phrase(), 'CONTENT' => $bits)));
return array(lorem_globalise(do_lorem_template('BLOCK_SIDE_STATS', array('CONTENT' => $full_tpl)), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__block_main_forum_topics()
{
require_lang('ocf');
//Create the 'BLOCK_MAIN_FORUM_TOPICS_TOPIC' template value
$out = new ocp_tempcode();
foreach (placeholder_array() as $k => $v) {
$out->attach(do_lorem_template('BLOCK_MAIN_FORUM_TOPICS_TOPIC', array('POST' => lorem_paragraph(), 'FORUM_ID' => NULL, 'FORUM_NAME' => lorem_word(), 'TOPIC_LINK' => placeholder_url(), 'TITLE' => lorem_word(), 'DATE' => placeholder_time(), 'DATE_RAW' => placeholder_date_raw(), 'USERNAME' => lorem_word(), 'MEMBER_ID' => NULL, 'NUM_POSTS' => placeholder_number())));
}
//Create the 'BLOCK_MAIN_FORUM_TOPICS' with 'BLOCK_MAIN_FORUM_TOPICS_TOPIC' as sub-template.
return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_FORUM_TOPICS', array('TITLE' => lorem_word(), 'CONTENT' => $out, 'FORUM_NAME' => lorem_word_html(), 'SUBMIT_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__newsletter_automated_fcomcode()
{
$automatic = array();
foreach (placeholder_array() as $k => $v) {
$tmp = do_lorem_template('NEWSLETTER_AUTOMATE_SECTION_FCOMCODE', array('I' => lorem_word(), 'TITLE' => lorem_phrase(), 'CONTENT' => lorem_sentence()));
$automatic[] = $tmp->evaluate(placeholder_number());
}
$content = '';
foreach ($automatic as $tp) {
$content .= $tp;
}
return array(lorem_globalise(do_lorem_template('NEWSLETTER_AUTOMATED_FCOMCODE', array('CONTENT' => $content)), 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__catalogue_categories_list_line()
{
return array(lorem_globalise(do_lorem_template('CATALOGUE_CATEGORIES_LIST_LINE', array('TREE' => lorem_phrase(), 'COUNT' => placeholder_number())), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__block_main_rss()
{
require_lang('news');
require_css('news');
$content = new ocp_tempcode();
foreach (placeholder_array() as $k => $v) {
$news_full = do_lorem_template('BLOCK_MAIN_RSS_FULL', array('RAND' => placeholder_number(), 'NEWS_FULL' => lorem_paragraph()));
$tails = do_lorem_template('BLOCK_MAIN_RSS_LIST_FIRST', array('X' => lorem_phrase()));
$tails->attach(do_lorem_template('BLOCK_MAIN_RSS_LIST_MIDDLE', array('X' => placeholder_url())));
$tails->attach(do_lorem_template('BLOCK_MAIN_RSS_LIST_LAST', array('X' => placeholder_url())));
$category = do_lorem_template('BLOCK_MAIN_RSS_CATEGORY', array('IMG' => placeholder_image_url(), 'CATEGORY' => lorem_phrase()));
$category->attach(do_lorem_template('BLOCK_MAIN_RSS_CATEGORY_NO_IMG', array('CATEGORY' => lorem_phrase())));
$_title = do_lorem_template('BLOCK_MAIN_RSS_TITLE', array('CATEGORY' => lorem_phrase(), 'TITLE' => lorem_phrase()));
$__title = do_lorem_template('BLOCK_MAIN_RSS_FROM_TITLE', array('FEED_URL' => placeholder_url(), 'NEWS_TITLE' => lorem_phrase(), 'DATE' => placeholder_time()));
$content->attach(do_lorem_template('BLOCK_MAIN_RSS_SUMMARY', array('FEED_URL' => placeholder_url(), 'NEWS_FULL' => $news_full, 'DATE' => placeholder_time(), 'TAILS' => $tails, 'AUTHOR' => lorem_phrase(), 'CATEGORY' => $category, 'FULL_URL' => placeholder_link(), 'FULL_URL_RAW' => placeholder_url(), 'NEWS_TITLE' => $__title, 'NEWS' => lorem_paragraph())));
}
return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_RSS', array('FEED_URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'COPYRIGHT' => lorem_phrase(), 'AUTHOR' => lorem_phrase(), 'CONTENT' => $content)), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__cedi_post_screen()
{
require_javascript('javascript_validation');
require_lang('comcode');
$posting_form = do_lorem_template('POSTING_FORM', array('TABINDEX_PF' => placeholder_number(), 'JAVASCRIPT' => '', 'PREVIEW' => lorem_phrase(), 'COMCODE_EDITOR' => lorem_phrase(), 'COMCODE_EDITOR_SMALL' => lorem_phrase(), 'CLASS' => lorem_phrase(), 'COMCODE_URL' => placeholder_url(), 'EXTRA' => '', 'POST_COMMENT' => lorem_phrase(), 'EMOTICON_CHOOSER' => lorem_phrase(), 'SUBMIT_NAME' => lorem_word(), 'HIDDEN_FIELDS' => '', 'COMCODE_HELP' => lorem_phrase(), 'URL' => placeholder_url(), 'POST' => lorem_phrase(), 'DEFAULT_PARSED' => lorem_phrase(), 'CONTINUE_URL' => placeholder_url(), 'ATTACHMENTS' => lorem_phrase(), 'SPECIALISATION' => placeholder_fields(), 'SPECIALISATION2' => ''));
return array(lorem_globalise(do_lorem_template('CEDI_POST_SCREEN', array('PING_URL' => '', 'WARNING_DETAILS' => '', 'TEXT' => lorem_phrase(), 'TITLE' => lorem_title(), 'POSTING_FORM' => $posting_form)), 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__translate_screen_content_screen()
{
require_lang('lang');
$lines = new ocp_tempcode();
foreach (placeholder_array() as $key => $value) {
$actions = do_lorem_template('TRANSLATE_ACTION', array('LANG_FROM' => fallback_lang(), 'LANG_TO' => fallback_lang(), 'NAME' => 'trans_' . strval($key), 'OLD' => $value));
$lines->attach(do_lorem_template('TRANSLATE_LINE_CONTENT', array('ID' => strval($key), 'NAME' => 'trans_' . strval($key), 'OLD' => $value, 'CURRENT' => $value, 'ACTIONS' => $actions, 'PRIORITY' => lorem_word())));
}
return array(lorem_globalise(do_lorem_template('TRANSLATE_SCREEN_CONTENT_SCREEN', array('LANG_NICE_NAME' => lorem_word(), 'LANG_NICE_ORIGINAL_NAME' => lorem_word(), 'TOO_MANY' => lorem_phrase(), 'INTERTRANS' => lorem_phrase(), 'TOTAL' => placeholder_number(), 'LANG' => fallback_lang(), 'LANG_ORIGINAL_NAME' => fallback_lang(), 'LINES' => $lines, 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'MAX' => placeholder_number())), NULL, '', true));
}
/**
* Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
* Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
* Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
*
* @return array Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
*/
function tpl_preview__gallery_video_flv()
{
return array(lorem_globalise(do_lorem_template('GALLERY_VIDEO_FLV', array('URL' => placeholder_url(), 'THUMB_URL' => placeholder_url(), 'WIDTH' => placeholder_number(), 'HEIGHT' => placeholder_number(), 'LENGTH' => placeholder_number())), NULL, '', true));
}
请发表评论