示例#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__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));
 }
示例#2
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array                 Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__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));
 }
示例#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__opensearch()
 {
     return array(lorem_globalise(do_lorem_template('OPENSEARCH', array('DESCRIPTION' => lorem_paragraph())), NULL, '', true));
 }
示例#4
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__ocf_member_profile_posts()
 {
     //topics
     $topics = new ocp_tempcode();
     if (addon_installed('ocf_forum')) {
         foreach (placeholder_array() as $k => $v) {
             $marker = do_lorem_template('OCF_TOPIC_MARKER', array('ID' => placeholder_id()));
             $topic_row_links = do_lorem_template('OCF_TOPIC_ROW_LINK', array('URL' => placeholder_url(), 'IMG' => placeholder_img_code('ocf_topic_modifiers'), 'ALT' => lorem_phrase()));
             $topic_row_modifiers = do_lorem_template('OCF_TOPIC_ROW_MODIFIER', array('IMG' => placeholder_img_code('ocf_topic_modifiers'), 'ALT' => lorem_phrase()));
             $emoticon = do_lorem_template('OCF_TOPIC_EMOTICON', array('EMOTICON' => 'ocf_emoticons/depressed'));
             $b = do_lorem_template('OCF_USER_MEMBER', array('COLOUR' => lorem_word(), 'PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'AT' => lorem_phrase()));
             $post = do_lorem_template('OCF_PT_BETWEEN', array('A' => lorem_phrase(), 'B' => $b));
             $last_post = do_lorem_template('OCF_FORUM_TOPIC_ROW_LAST_POST', array('ID' => placeholder_id(), 'DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_time(), 'POSTER' => lorem_phrase(), 'LAST_URL' => placeholder_url()));
             $topics->attach(do_lorem_template('OCF_FORUM_TOPIC_ROW', array('BREADCRUMBS' => placeholder_breadcrumbs(), 'RAW_TIME' => placeholder_date_raw(), 'UNREAD' => lorem_phrase(), 'ID' => placeholder_id(), 'HOVER' => lorem_phrase(), 'PAGES' => lorem_phrase(), 'MARKER' => $marker, 'TOPIC_ROW_LINKS' => $topic_row_links, 'TOPIC_ROW_MODIFIERS' => $topic_row_modifiers, 'POST' => lorem_phrase(), 'EMOTICON' => $emoticon, 'DESCRIPTION' => lorem_paragraph(), 'URL' => placeholder_url(), 'TITLE' => lorem_phrase(), 'POSTER' => $post, 'NUM_POSTS' => placeholder_number(), 'NUM_VIEWS' => placeholder_number(), 'LAST_POST' => $last_post)));
         }
     }
     $results_browser = placeholder_result_browser();
     $buttons = lorem_phrase();
     $topic_wrapper = do_lorem_template('OCF_FORUM_TOPIC_WRAPPER', array('TYPE' => '', 'MAX' => lorem_phrase(), 'ORDER' => lorem_phrase(), 'MAY_CHANGE_MAX' => lorem_phrase(), 'TREE' => lorem_phrase(), 'BUTTONS' => $buttons, 'STARTER_TITLE' => lorem_phrase(), 'RESULTS_BROWSER' => $results_browser, 'MODERATOR_ACTIONS' => placeholder_options(), 'ACTION_URL' => placeholder_url(), 'TOPICS' => $topics, 'FORUM_NAME' => lorem_word()));
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_POSTS', array('MEMBER_ID' => placeholder_id(), 'TOPICS' => $topic_wrapper));
     return array(lorem_globalise($tab_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__global()
 {
     $out = new ocp_tempcode();
     $out->attach(do_lorem_template('HEADER', array('VERSION_NUMBER' => lorem_phrase(), 'CHARSET' => 'ISO-8859-1', 'HEADER_TEXT' => lorem_phrase(), 'DESCRIPTION' => lorem_paragraph(), 'KEYWORDS' => lorem_phrase(), 'SELF_URL' => placeholder_url(), 'REFRESH' => '', 'LOGOURL' => placeholder_image_url(), 'SHOW_TOP' => true)));
     $out->attach(do_lorem_template('GLOBAL', array('HELPER_PANEL_TUTORIAL' => lorem_word(), 'HELPER_PANEL_HTML' => lorem_sentence_html(), 'HELPER_PANEL_TEXT' => lorem_phrase(), 'HELPER_PANEL_PIC' => lorem_phrase(), 'MESSAGE_TOP' => lorem_phrase(), 'MESSAGE' => lorem_phrase(), 'MIDDLE' => placeholder_id(), 'BREADCRUMBS' => placeholder_breadcrumbs())));
     $out->attach(do_lorem_template('FOOTER', array('BAIL_OUT' => false, 'ERROR_MESSAGES_DURING_OUTPUT' => '', 'SHOW_BOTTOM' => true, 'HAS_SU' => lorem_phrase(), 'STAFF_ACTIONS' => lorem_phrase(), 'EXTRA_FOOT' => new ocp_tempcode())));
     return array($out);
 }
示例#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__ocf_member_profile_friends()
 {
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_FRIENDS', array('MEMBER_ID' => placeholder_id(), 'FRIENDS_A' => array(), 'FRIENDS_B' => array(array('USERNAME' => lorem_phrase(), 'URL' => placeholder_url(), 'USERGROUP' => lorem_phrase())), 'ADD_FRIEND_URL' => placeholder_url(), 'REMOVE_FRIEND_URL' => placeholder_url(), 'ALL_BUDDIES_LINK' => placeholder_url(), 'BOX' => lorem_paragraph()));
     return array(lorem_globalise($tab_content, NULL, '', true));
 }
示例#7
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__newsletter_new_resource_fcomcode()
 {
     return array(lorem_globalise(do_lorem_template('NEWSLETTER_NEW_RESOURCE_FCOMCODE', array('MEMBER_ID' => placeholder_id(), 'URL' => placeholder_url(), 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_paragraph())), NULL, '', true));
 }
示例#8
0
/**
 * Lorem version of globalise. It will wrap the input into something that is "stable XHTML" and thus can work inside an XHTML editor
 *
 * @param  tempcode		The tempcode to put into a nice frame
 * @param  ?mixed			'Additional' message (NULL: none)
 * @param  string			The type of special message
 * @set    inform warn ""
 * @param  boolean		Whether to automatically include the header and footer templates
 * @return tempcode		Standalone page
 */
function lorem_globalise($middle, $message = NULL, $type = '', $include_header_and_footer = false)
{
    global $CYCLES;
    $CYCLES = array();
    // Here we reset some Tempcode environmental stuff, because template compilation or preprocessing may have dirtied things
    global $LOREM_AVOID_GLOBALISE;
    if ($LOREM_AVOID_GLOBALISE || is_full_screen_template(NULL, $middle)) {
        return $middle;
    }
    $_message = !is_null($message) ? do_lorem_template('ADDITIONAL', array('TYPE' => $type, 'MESSAGE' => $message)) : new ocp_tempcode();
    $out = new ocp_tempcode();
    if ($include_header_and_footer) {
        $display = do_lorem_template('HEADER', array('VERSION_NUMBER' => lorem_phrase(), 'CHARSET' => 'ISO-8859-1', 'HEADER_TEXT' => lorem_phrase(), 'DESCRIPTION' => lorem_paragraph(), 'KEYWORDS' => lorem_phrase(), 'SELF_URL' => placeholder_url(), 'REFRESH' => '', 'LOGOURL' => placeholder_image_url(), 'SHOW_TOP' => true));
        $out->attach($display);
    }
    $out->attach(do_lorem_template('GLOBAL', array('HELPER_PANEL_TUTORIAL' => '', 'HELPER_PANEL_HTML' => '', 'HELPER_PANEL_TEXT' => '', 'HELPER_PANEL_PIC' => '', 'MESSAGE_TOP' => '', 'MESSAGE' => $_message, 'MIDDLE' => $middle, 'BREADCRUMBS' => '')));
    if ($include_header_and_footer) {
        $display = do_lorem_template('FOOTER', array('BAIL_OUT' => false, 'ERROR_MESSAGES_DURING_OUTPUT' => '', 'SHOW_BOTTOM' => true, 'HAS_SU' => lorem_phrase(), 'STAFF_ACTIONS' => lorem_phrase(), 'EXTRA_FOOT' => new ocp_tempcode()));
        $out->attach($display);
    }
    $out->handle_symbol_preprocessing();
    return $out;
}
示例#9
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__atom_wrapper()
 {
     $content = do_lorem_template('ATOM_ENTRY', array('TITLE' => lorem_phrase(), 'VIEW_URL' => placeholder_url(), 'DATE' => placeholder_time(), 'EDIT_DATE' => placeholder_time(), 'CATEGORY_RAW' => lorem_word(), 'CATEGORY' => lorem_word(), 'AUTHOR' => lorem_word(), 'SUMMARY' => lorem_word(), 'NEWS' => lorem_word()));
     return array(lorem_globalise(do_lorem_template('ATOM_WRAPPER', array('MODE' => lorem_word(), 'MODE_NICE' => lorem_word(), 'FILTER' => lorem_word_2(), 'DATE' => placeholder_time(), 'LOGO_URL' => placeholder_image_url(), 'CONTENT' => $content, 'CUTOFF' => placeholder_number(), 'ABOUT' => lorem_paragraph(), 'VERSION' => lorem_word(), 'COPYRIGHT' => lorem_phrase())), NULL, '', true));
 }
示例#10
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__block_main_block_help()
 {
     $parameters = new ocp_tempcode();
     foreach (placeholder_array() as $value) {
         $parameters->attach(do_lorem_template('BLOCK_MAIN_BLOCK_HELP_PARAMETER', array('NAME' => lorem_word(), 'DESCRIPTION' => lorem_paragraph())));
     }
     return array(lorem_globalise(do_lorem_template('BLOCK_MAIN_BLOCK_HELP', array('NAME' => lorem_word(), 'DESCRIPTION' => lorem_paragraph(), 'USE' => lorem_phrase(), 'PARAMETERS' => $parameters)), NULL, '', true));
 }
示例#11
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__comcode_section_controller()
 {
     $section = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $section->attach(do_lorem_template('COMCODE_SECTION', array('PASS_ID' => lorem_word(), 'DEFAULT' => false, 'NAME' => strval($k), 'CONTENT' => lorem_paragraph())));
     }
     $k++;
     $section->attach(do_lorem_template('COMCODE_SECTION', array('PASS_ID' => lorem_word(), 'DEFAULT' => true, 'NAME' => strval($k), 'CONTENT' => lorem_paragraph())));
     $page = array();
     foreach (placeholder_array(4) as $k => $v) {
         $page[] = strval($k);
     }
     $section->attach(do_lorem_template('COMCODE_SECTION_CONTROLLER', array('SECTIONS' => $page, 'PASS_ID' => lorem_word())));
     return array(lorem_globalise($section, NULL, '', true));
 }
示例#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__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));
 }
示例#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__administrative__occle_rss()
 {
     $content = do_lorem_template('OCCLE_RSS_ITEM', array('FULL_URL' => placeholder_url(), 'NEWS_TITLE' => lorem_phrase(), 'DATE' => placeholder_time(), 'SUMMARY' => lorem_paragraph()));
     return array(lorem_globalise(do_lorem_template('OCCLE_RSS', array('TITLE' => lorem_phrase(), 'CONTENT' => $content)), NULL, '', true));
 }
示例#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__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));
 }
示例#15
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__news_full_screen()
 {
     require_lang('news');
     $tags = array();
     foreach (placeholder_array() as $k => $v) {
         $tags[] = array('TAG' => lorem_word(), 'LINK_LIMITEDSCOPE' => placeholder_url(), 'LINK_FULLSCOPE' => placeholder_url());
     }
     $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('NEWS_FULL_SCREEN', array('ID' => placeholder_id(), 'CATEGORY_ID' => placeholder_id(), 'BLOG' => TRUE, '_TITLE' => lorem_phrase(), 'TAGS' => do_lorem_template('TAGS', array('TAGS' => $tags, 'TYPE' => '')), 'CATEGORIES' => placeholder_array(), 'NEWSLETTER_URL' => addon_installed('newsletter') ? placeholder_url() : '', 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => '', 'SUBMITTER' => placeholder_id(), 'CATEGORY' => lorem_word(), 'IMG' => placeholder_image(), 'TITLE' => lorem_title(), 'VIEWS' => "3", 'COMMENT_DETAILS' => $comment_details, 'RATING_DETAILS' => lorem_sentence(), 'TRACKBACK_DETAILS' => lorem_sentence(), 'DATE' => placeholder_time(), 'AUTHOR' => lorem_word(), 'AUTHOR_URL' => placeholder_url(), 'NEWS_FULL' => lorem_paragraph(), 'NEWS_FULL_PLAIN' => lorem_sentence(), 'EDIT_URL' => placeholder_url(), 'ARCHIVE_URL' => placeholder_url(), 'SUBMIT_URL' => placeholder_url(), 'WARNING_DETAILS' => '')), NULL, '', true));
 }
示例#16
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__ocf_member_profile_screen()
 {
     require_lang('news');
     $sections = array('contact' => lorem_word(), 'profile' => lorem_word_2(), 'views' => lorem_word(), 'usage' => lorem_word_2(), 'content' => lorem_word());
     $actions = array();
     $i = 0;
     $links = new ocp_tempcode();
     foreach ($sections as $section_code => $section_title) {
         $links->attach(do_lorem_template('OCF_MEMBER_ACTION', array('ID' => strval($i), 'URL' => placeholder_url(), 'LANG' => lorem_word(), 'REL' => '')));
         $actions[$section_code] = do_lorem_template('OCF_MEMBER_ACTION', array('ID' => strval($i), 'URL' => placeholder_url(), 'LANG' => lorem_word(), 'REL' => '', 'NAME' => $section_title, 'VALUE' => $links));
         $i++;
     }
     require_lang('menus');
     $tabs = array();
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_ABOUT', array('RIGHT_MARGIN' => lorem_phrase(), 'AVATAR_WIDTH' => placeholder_id(), 'PHOTO_WIDTH' => placeholder_id(), 'MOST_ACTIVE_FORUM' => lorem_phrase(), 'TIME_FOR_THEM' => placeholder_time(), 'TIME_FOR_THEM_RAW' => placeholder_date_raw(), 'SUBMIT_DAYS_AGO' => lorem_phrase(), 'SUBMIT_TIME_RAW' => placeholder_time(), 'LAST_VISIT_TIME_RAW' => placeholder_date_raw(), 'ONLINE_NOW' => lorem_phrase(), '_ONLINE_NOW' => false, 'BANNED' => lorem_phrase(), 'USER_AGENT' => lorem_phrase(), 'OPERATING_SYSTEM' => lorem_phrase(), 'DOB' => lorem_phrase(), 'IP_ADDRESS' => lorem_phrase(), 'COUNT_POSTS' => placeholder_number(), 'COUNT_POINTS' => placeholder_number(), 'PRIMARY_GROUP' => lorem_phrase(), 'PRIMARY_GROUP_ID' => placeholder_id(), 'PHOTO_URL' => placeholder_image_url(), 'PHOTO_THUMB_URL' => placeholder_image_url(), 'EMAIL_ADDRESS' => lorem_word(), 'AVATAR_URL' => placeholder_avatar(), 'SIGNATURE' => lorem_phrase(), 'JOIN_DATE' => placeholder_time(), 'JOIN_DATE_RAW' => placeholder_date_raw(), 'CUSTOM_FIELDS' => array(array('NAME' => lorem_phrase(), 'VALUE' => lorem_phrase(), 'ENCRYPTED_VALUE' => '')), 'ACTIONS_contact' => $actions['contact'], 'ACTIONS_profile' => $actions['profile'], 'ACTIONS_views' => $actions['views'], 'ACTIONS_usage' => $actions['usage'], 'ACTIONS_content' => $actions['content'], 'USERNAME' => lorem_word(), 'MEMBER_ID' => placeholder_id(), 'SECONDARY_GROUPS' => placeholder_array(), 'VIEW_PROFILES' => true, 'ON_PROBATION' => lorem_phrase(), 'USERGROUP' => lorem_word(), 'CLUBS' => lorem_phrase()));
     $tabs[] = array('TAB_CODE' => placeholder_id() . '0', 'TAB_TITLE' => lorem_title(), 'TAB_CONTENT' => $tab_content, 'TAB_FIRST' => true, 'TAB_LAST' => false);
     $tabs2 = array();
     $fields = new ocp_tempcode();
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_INTEGER', array('TABINDEX' => placeholder_number(), 'REQUIRED' => '', 'NAME' => $name, 'DEFAULT' => ''));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => $name, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $tabs2[] = array('TAB_TITLE' => lorem_title(), 'TAB_FIELDS' => $fields, 'TAB_TEXT' => lorem_paragraph(), 'TAB_FIRST' => true, 'TAB_LAST' => true);
     $tab_content = do_lorem_template('OCF_MEMBER_PROFILE_EDIT', array('URL' => placeholder_url(), 'SUBMIT_NAME' => lorem_phrase(), 'AUTOCOMPLETE' => false, 'SKIP_VALIDATION' => true, 'TABS' => $tabs2, 'HIDDEN' => ''));
     $tabs[] = array('TAB_CODE' => placeholder_id() . '1', 'TAB_TITLE' => lorem_title(), 'TAB_CONTENT' => $tab_content, 'TAB_FIRST' => false, 'TAB_LAST' => true);
     return array(lorem_globalise(do_lorem_template('OCF_MEMBER_PROFILE_SCREEN', array('TITLE' => lorem_title(), 'MEMBER_ID' => placeholder_id(), 'TABS' => $tabs)), NULL, '', true));
 }
示例#17
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @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));
 }
示例#18
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__administrative__setupwizard_block_preview()
 {
     return array(lorem_globalise(do_lorem_template('SETUPWIZARD_BLOCK_PREVIEW', array('LEFT' => lorem_paragraph(), 'RIGHT' => lorem_paragraph(), 'START' => lorem_paragraph())), NULL, '', true));
 }
示例#19
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__poll_screen()
 {
     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 = '';
     $comments = '';
     $comment_details = do_lorem_template('COMMENTS_WRAPPER', array('TYPE' => lorem_word(), 'ID' => placeholder_id(), 'REVIEW_RATING_CRITERIA' => array(), 'AUTHORISED_FORUM_LINK' => placeholder_url(), 'FORM' => placeholder_form(), 'COMMENTS' => $comments));
     $poll_details = do_lorem_template('BLOCK_MAIN_POLL_IFRAME', array('RAND' => placeholder_random(), 'PARAM' => "-1", 'ZONE' => lorem_word()));
     return array(lorem_globalise(do_lorem_template('POLL_SCREEN', array('TITLE' => lorem_title(), 'DATE_RAW' => placeholder_date_raw(), 'ADD_DATE_RAW' => placeholder_date_raw(), 'EDIT_DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_time(), 'ADD_DATE' => placeholder_date(), 'EDIT_DATE' => placeholder_date(), 'VIEWS' => placeholder_number(), 'TRACKBACK_DETAILS' => $trackback_details, 'RATING_DETAILS' => $rating_details, 'COMMENT_DETAILS' => $comment_details, 'EDIT_URL' => placeholder_url(), 'POLL_DETAILS' => $poll_details, 'ID' => placeholder_id())), NULL, '', true));
 }