本文整理汇总了PHP中lorem_phrase函数的典型用法代码示例。如果您正苦于以下问题:PHP lorem_phrase函数的具体用法?PHP lorem_phrase怎么用?PHP lorem_phrase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lorem_phrase函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tpl_preview__form_screen_input_captcha
/**
* 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));
}
示例2: tpl_preview__supermembers_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__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));
}
示例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__zone_editor_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__zone_editor_screen()
{
require_lang('zones');
$comcode_editor = do_lorem_template('COMCODE_EDITOR_BUTTON', array('DIVIDER' => true, 'FIELD_NAME' => lorem_word(), 'TITLE' => lorem_word(), 'B' => 'block'));
$editor = array();
foreach (array('panel_left', 'panel_middle', 'panel_right') as $i => $for) {
$editor[$for] = do_lorem_template('ZONE_EDITOR_PANEL', array('CLASS' => '', 'ZONES' => '', 'CURRENT_ZONE' => '', 'ZONE' => '', 'COMCODE' => lorem_phrase(), 'PREVIEW' => lorem_phrase(), 'ID' => $for, 'IS_PANEL' => true, 'TYPE' => lorem_phrase(), 'EDIT_URL' => placeholder_url(), 'SETTINGS' => NULL, 'COMCODE_EDITOR' => $comcode_editor));
}
return array(lorem_globalise(do_lorem_template('ZONE_EDITOR_SCREEN', array('PING_URL' => placeholder_url(), 'WARNING_DETAILS' => '', 'TITLE' => lorem_title(), 'ID' => '', 'LANG' => fallback_lang(), 'URL' => placeholder_url(), 'LEFT_EDITOR' => $editor['panel_left'], 'RIGHT_EDITOR' => $editor['panel_right'], 'MIDDLE_EDITOR' => $editor['panel_middle'])), NULL, '', true));
}
示例6: 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));
}
示例7: 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));
}
示例8: tpl_preview__comcode_page_preview
/**
* 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));
}
示例9: tpl_preview__administrative__query_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__query_screen()
{
$queries = new ocp_tempcode();
foreach (placeholder_array() as $value) {
$queries->attach(do_lorem_template('QUERY_LOG', array('TIME' => placeholder_number(), 'TEXT' => lorem_sentence())));
}
return array(lorem_globalise(do_lorem_template('QUERY_SCREEN', array('TITLE' => lorem_title(), 'TOTAL' => lorem_phrase(), 'TOTAL_TIME' => placeholder_number(), 'QUERIES' => $queries)), NULL, '', true));
}
示例10: tpl_preview__administrative__errorlog_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__errorlog_screen()
{
return array(lorem_globalise(do_lorem_template('ERRORLOG_SCREEN', array('TITLE' => lorem_title(), 'ERROR' => lorem_phrase(), 'PERMISSION' => lorem_phrase())), NULL, '', true));
}
示例11: tpl_preview__cedi_post_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__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));
}
示例12: tpl_preview__ocf_view_group_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__ocf_view_group_screen()
{
$_primary_members = placeholder_array();
$primary_members = new ocp_tempcode();
$_secondary_members = new ocp_tempcode();
$secondary_members = new ocp_tempcode();
$prospective_members = new ocp_tempcode();
$_prospective_members = new ocp_tempcode();
foreach ($_primary_members as $i => $primary_member) {
$temp = do_lorem_template('OCF_VIEW_GROUP_MEMBER', array('NAME' => $primary_member, 'URL' => placeholder_url()));
//results_entry starts
$cells = do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $temp), NULL, false);
$entries = do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false);
//results_entry ends
$primary_members->attach($entries);
}
$fields_title = do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => lorem_word()));
//results_table
$primary_members = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $primary_members, 'MESSAGE' => '', 'SORT' => '', 'BROWSER' => '', 'WIDTHS' => array(placeholder_number())), NULL, false);
$temp = new ocp_tempcode();
foreach (placeholder_array() as $i => $v) {
$temp = do_lorem_template('OCF_VIEW_GROUP_MEMBER_SECONDARY', array('URL' => placeholder_url(), 'REMOVE_URL' => placeholder_url(), 'NAME' => $v));
$cells = do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $temp), NULL, false);
/* $cells->attach(do_lorem_template('RESULTS_TABLE_FIELD',array('VALUE'=>strval($i)),NULL,false));
$cells->attach(do_lorem_template('RESULTS_TABLE_FIELD',array('VALUE'=>strval($i)),NULL,false));*/
$entries = do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false);
$_secondary_members->attach($entries);
}
$fields_title = do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => lorem_word()));
/*$fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE',array('VALUE'=>lorem_word_2())));
$fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE',array('VALUE'=>lorem_word_2())));*/
//results_table
$secondary_members = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $_secondary_members, 'MESSAGE' => '', 'SORT' => '', 'BROWSER' => '', 'WIDTHS' => array(placeholder_number())), NULL, false);
foreach (placeholder_array() as $i => $v) {
$temp = do_lorem_template('OCF_VIEW_GROUP_MEMBER_PROSPECTIVE', array('ACCEPT_URL' => placeholder_url(), 'DECLINE_URL' => placeholder_url(), 'NAME' => lorem_word(), 'URL' => placeholder_url()));
$cells = do_lorem_template('RESULTS_TABLE_FIELD', array('VALUE' => $temp), NULL, false);
//$cells->attach(do_lorem_template('RESULTS_TABLE_FIELD',array('VALUE'=>strval($i)),NULL,false));
$entries = do_lorem_template('RESULTS_TABLE_ENTRY', array('VALUES' => $cells), NULL, false);
$_prospective_members->attach($entries);
}
$fields_title = do_lorem_template('RESULTS_TABLE_FIELD_TITLE', array('VALUE' => lorem_word()));
//$fields_title->attach(do_lorem_template('RESULTS_TABLE_FIELD_TITLE',array('VALUE'=>lorem_word_2())));
//results_table
$prospective_members = do_lorem_template('RESULTS_TABLE', array('TEXT_ID' => lorem_phrase(), 'FIELDS_TITLE' => $fields_title, 'FIELDS' => $_prospective_members, 'MESSAGE' => '', 'SORT' => '', 'BROWSER' => '', 'WIDTHS' => array(placeholder_number())), NULL, false);
return array(lorem_globalise(do_lorem_template('OCF_VIEW_GROUP_SCREEN', array('GROUP_NAME' => lorem_phrase(), 'ID' => placeholder_id(), 'FORUM' => '', 'CLUB' => false, 'EDIT_URL' => placeholder_url(), 'TITLE' => lorem_title(), 'LEADER' => lorem_phrase(), 'NAME' => lorem_word(), 'PROMOTION_INFO' => new ocp_tempcode(), 'ADD_URL' => placeholder_url(), 'APPLY_URL' => placeholder_url(), 'APPLY_TEXT' => lorem_sentence(), 'PRIMARY_MEMBERS' => $primary_members, 'SECONDARY_MEMBERS' => $secondary_members, 'PROSPECTIVE_MEMBERS' => $prospective_members)), NULL, '', true));
}
示例13: tpl_preview__news_piece_summary
/**
* 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));
}
示例14: tpl_preview__administrative__translate_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__translate_screen()
{
require_lang('lang');
$lines = '';
foreach (placeholder_array() as $value) {
$temp = do_lorem_template('TRANSLATE_LINE', array('TRANSLATE_AUTO' => $value, 'DESCRIPTION' => lorem_sentence(), 'NAME' => placeholder_random(), 'OLD' => str_replace('\\n', chr(10), $value), 'CURRENT' => $value, 'ACTIONS' => new ocp_tempcode()));
$lines .= $temp->evaluate();
}
return array(lorem_globalise(do_lorem_template('TRANSLATE_SCREEN', array('PAGE' => lorem_phrase(), 'INTERTRANS' => lorem_phrase(), 'LANG' => fallback_lang(), 'LINES' => $lines, 'TITLE' => lorem_title(), 'URL' => placeholder_url())), NULL, '', true));
}
示例15: tpl_preview__administrative__import_phpnuke_fcomcodepage
/**
* 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__import_phpnuke_fcomcodepage()
{
return array(lorem_globalise(do_lorem_template('IMPORT_PHPNUKE_FCOMCODEPAGE', array('TITLE' => lorem_phrase(), 'SUBTITLE' => lorem_phrase(), 'PAGE_HEADER' => lorem_phrase(), 'TEXT' => lorem_sentence_html(), 'PAGE_FOOTER' => lorem_phrase(), 'SIGNATURE' => lorem_phrase())), NULL, '', true));
}