本文整理汇总了PHP中placeholder_array函数的典型用法代码示例。如果您正苦于以下问题:PHP placeholder_array函数的具体用法?PHP placeholder_array怎么用?PHP placeholder_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了placeholder_array函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tpl_preview__administrative__staff_admin_screen
/**
* 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__staff_admin_screen()
{
$available = new ocp_tempcode();
foreach (placeholder_array() as $k => $v) {
$available->attach(do_lorem_template('STAFF_EDIT_WRAPPER', array('FORM' => placeholder_form(), 'NAME' => lorem_word())));
}
return array(lorem_globalise(do_lorem_template('STAFF_ADMIN_SCREEN', array('TITLE' => lorem_title(), 'TEXT' => lorem_sentence_html(), 'FORUM_STAFF' => $available)), NULL, '', true));
}
示例2: tpl_preview__block_main_custom_comcode_tags
/**
* 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_custom_comcode_tags()
{
$content = new ocp_tempcode();
foreach (placeholder_array() as $tag) {
$content->attach(do_lorem_template('CUSTOM_COMCODE_TAG_ROW', array('TITLE' => lorem_word(), 'DESCRIPTION' => lorem_paragraph(), 'EXAMPLE' => lorem_word())));
}
return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_CUSTOM_COMCODE_TAGS', array('TAGS' => $content)), NULL, '', true));
}
示例3: tpl_preview__administrative__config_category_screen
/**
* 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: tpl_preview__block_side_stats
/**
* 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));
}
示例5: tpl_preview__administrative__cleanup_completed_screen
/**
* 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__cleanup_completed_screen()
{
require_lang('stats');
$url = array();
foreach (placeholder_array() as $v) {
$url[] = array('URL' => placeholder_url());
}
$message = do_lorem_template('CLEANUP_ORPHANED_UPLOADS', array('FOUND' => $url));
$message->attach(do_lorem_template('CLEANUP_PAGE_STATS', array('STATS_BACKUP_URL' => placeholder_url())));
return array(lorem_globalise(do_lorem_template('CLEANUP_COMPLETED_SCREEN', array('TITLE' => lorem_title(), 'MESSAGES' => $message)), NULL, '', true));
}
示例6: tpl_preview__administrative__redirecte_table_screen
/**
* 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));
}
示例7: tpl_preview__ocf_post_template_select
/**
* 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_post_template_select()
{
require_lang('ocf');
require_css('ocf');
$list = new ocp_tempcode();
foreach (placeholder_array() as $key => $value) {
$list->attach(do_lorem_template('FORM_SCREEN_INPUT_LIST_ENTRY', array('SELECTED' => false, 'DISABLED' => false, 'CLASS' => '', 'NAME' => strval($key), 'TEXT' => lorem_phrase())));
}
$input = do_lorem_template('OCF_POST_TEMPLATE_SELECT', array('TABINDEX' => placeholder_number(), 'LIST' => $list));
$fields = new ocp_tempcode();
$fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => '', 'NAME' => lorem_word(), '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' => $fields, 'SUBMIT_NAME' => lorem_word(), 'TEXT' => lorem_sentence_html())), NULL, '', true));
}
示例8: tpl_preview__administrative__flagrant_manage_screen
/**
* 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__flagrant_manage_screen()
{
$about_current = do_lorem_template('FLAGRANT_DETAILS', array('USERNAME' => lorem_word_html(), 'DAYS_ORDERED' => lorem_phrase(), 'DATE_RAW' => placeholder_time(), 'DATE' => placeholder_time()));
$out = new ocp_tempcode();
foreach (placeholder_array() as $key => $value) {
$text = do_lorem_template('FLAGRANT_STORE_LIST_LINE', array('MESSAGE' => $value, 'STATUS' => do_lang('NEW')));
$out->attach(do_lorem_template('FORM_SCREEN_INPUT_LIST_ENTRY', array('SELECTED' => false, 'DISABLED' => false, 'CLASS' => '', 'NAME' => strval($key), 'TEXT' => $text->evaluate())));
}
$input = do_lorem_template('FORM_SCREEN_INPUT_LIST', array('TABINDEX' => '5', 'REQUIRED' => '_required', 'NAME' => lorem_word(), 'CONTENT' => $out, 'INLINE_LIST' => true));
$fields = do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => lorem_word(), 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => ''));
//Create 'FLAGRANT_MANAGE_SCREEN' using the sub-templates 'FLAGRANT_DETAILS' and 'FLAGRANT_STORE_LIST_LINE'
return array(lorem_globalise(do_lorem_template('FORM_SCREEN', array('TITLE' => lorem_title(), 'TEXT' => $about_current, 'HIDDEN' => '', 'URL' => placeholder_url(), 'GET' => true, 'FIELDS' => $fields, 'SUBMIT_NAME' => lorem_word())), NULL, '', true));
}
示例9: tpl_preview__administrative__ssl_configuration_screen
/**
* 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__ssl_configuration_screen()
{
require_lang('security');
$content = new ocp_tempcode();
$k = 0;
foreach (placeholder_array() as $k => $v) {
foreach (placeholder_array() as $k => $v2) {
$k++;
$content->attach(do_lorem_template('SSL_CONFIGURATION_ENTRY', array('TICKED' => lorem_word(), 'PAGE' => $v, 'ZONE' => $v2)));
}
}
return array(lorem_globalise(do_lorem_template('SSL_CONFIGURATION_SCREEN', array('URL' => placeholder_url(), 'TITLE' => lorem_title(), 'CONTENT' => $content)), NULL, '', true));
}
示例10: placeholder_result_browser
/**
* Get a results browser.
*
* @return tempcode Results browser.
*/
function placeholder_result_browser()
{
$selectors = new ocp_tempcode();
foreach (placeholder_array(11) as $k => $v) {
$selectors->attach(do_lorem_template('RESULTS_BROWSER_PER_PAGE_OPTION', array('SELECTED' => true, 'VALUE' => strval($k), 'NAME' => $v)));
}
$per_page = do_lorem_template('RESULTS_BROWSER_PER_SCREEN', array('HIDDEN' => '', 'URL' => placeholder_url(), 'MAX_NAME' => lorem_word(), 'SELECTORS' => $selectors, 'RAND' => placeholder_random()));
$part = new ocp_tempcode();
$part->attach(do_lorem_template('RESULTS_BROWSER_CONTINUE_FIRST', array('TITLE' => lorem_phrase(), 'P' => placeholder_number(), 'FIRST_URL' => placeholder_url())));
$part->attach(do_lorem_template('RESULTS_BROWSER_PREVIOUS_LINK', array('TITLE' => lorem_phrase(), 'P' => placeholder_date_raw(), 'URL' => placeholder_url())));
$part->attach(do_lorem_template('RESULTS_BROWSER_NEXT_LINK', array('REL' => NULL, 'TITLE' => lorem_phrase(), 'NUM_PAGES' => placeholder_number(), 'P' => placeholder_number(), 'URL' => placeholder_url())));
$part->attach(do_lorem_template('RESULTS_BROWSER_CONTINUE_LAST', array('TITLE' => lorem_phrase(), 'P' => placeholder_number(), 'LAST_URL' => placeholder_url())));
$pages = new ocp_tempcode();
foreach (placeholder_array() as $key => $value) {
$pages->attach(do_lorem_template('FORM_SCREEN_INPUT_LIST_ENTRY', array('SELECTED' => false, 'DISABLED' => false, 'CLASS' => '', 'NAME' => strval($key), 'TEXT' => $value)));
}
$part->attach(do_lorem_template('RESULTS_BROWSER_LIST_PAGES', array('URL' => placeholder_url(), 'RAND' => placeholder_random(), 'HIDDEN' => '', 'START_NAME' => lorem_word(), 'LIST' => $pages)));
return do_lorem_template('RESULTS_BROWSER_WRAP', array('TEXT_ID' => lorem_phrase(), 'PER_PAGE' => $per_page, 'PART' => $part));
}
示例11: tpl_preview__support_ticket_screen
/**
* 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));
}
示例12: tpl_preview__administrative__xml_storage_import_results_screen
/**
* 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));
}
示例13: tpl_preview__list_catalogue_screen_products
/**
* 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));
}
示例14: tpl_preview__chat_set_effects_screen
/**
* 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));
}
示例15: tpl_preview__block_main_forum_news
/**
* 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_news()
{
require_lang('news');
//Create the 'NEWS_PIECE_SUMMARY' template value
$out = new ocp_tempcode();
foreach (placeholder_array() as $k => $v) {
$out->attach(do_lorem_template('NEWS_PIECE_SUMMARY', array('TRUNCATE' => false, 'BLOG' => false, 'FIRSTTIME' => lorem_word(), 'LASTTIME' => lorem_word(), 'CLOSED' => lorem_word(), 'FIRSTUSERNAME' => lorem_word(), 'LASTUSERNAME' => lorem_word(), 'FIRSTMEMBERID' => lorem_word(), 'LASTMEMBERID' => lorem_word(), 'ID' => lorem_word(), 'FULL_URL' => placeholder_url(), 'SUBMITTER' => lorem_word(), 'DATE' => placeholder_time(), 'DATE_RAW' => placeholder_date_raw(), 'NEWS_TITLE' => lorem_word(), 'CATEGORY' => '', 'IMG' => '', 'AUTHOR' => lorem_word(), 'AUTHOR_URL' => placeholder_url(), 'NEWS' => lorem_paragraph())));
}
//Create the 'BLOCK_MAIN_FORUM_NEWS' with 'NEWS_PIECE_SUMMARY' as sub-template.
return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_FORUM_NEWS', array('TITLE' => lorem_word(), 'FORUM_NAME' => lorem_word_html(), 'CONTENT' => $out, 'BRIEF' => lorem_phrase(), 'ARCHIVE_URL' => placeholder_url(), 'SUBMIT_URL' => placeholder_url(), 'RSS_URL' => placeholder_url(), 'ATOM_URL' => placeholder_url())), NULL, '', true));
}