Пример #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__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));
 }
Пример #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.
  *
  * @param  boolean			Whether to show for a has-voted-poll or not.
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function _tpl_preview__ocf_topic_wrap($voted = false)
 {
     require_css('ocf');
     require_lang('ocf');
     require_lang('polls');
     $warning_details = do_lorem_template('WARNING_TABLE', array('WARNING' => lorem_phrase()));
     foreach (placeholder_array() as $k => $v) {
         $members_viewing = new ocp_tempcode();
         foreach (placeholder_array() as $k => $v) {
             $members_viewing->attach(do_lorem_template('OCF_USER_MEMBER', array('PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'AT' => lorem_phrase(), 'COLOUR' => lorem_word())));
         }
         $results_browser = placeholder_result_browser();
         $quick_reply = do_lorem_template('COMMENTS_POSTING_FORM', array('JOIN_BITS' => lorem_phrase_html(), 'FIRST_POST' => lorem_paragraph_html(), 'USE_CAPTCHA' => false, 'GET_EMAIL' => false, 'EMAIL_OPTIONAL' => true, 'GET_TITLE' => false, 'POST_WARNING' => '', 'COMMENT_TEXT' => '', 'EM' => placeholder_emoticon_chooser(), 'EXPAND_TYPE' => 'expand', 'DISPLAY' => '', 'MORE_URL' => placeholder_url(), 'FIRST_POST_URL' => placeholder_url(), 'COMMENT_URL' => placeholder_url(), 'TITLE' => lorem_word(), 'MAKE_POST' => true, 'CREATE_TICKET_MAKE_POST' => true));
         $poll = new ocp_tempcode();
         $num_choices = do_lorem_template('PARAGRAPH', array('TEXT' => lorem_phrase(), 'CLASS' => lorem_word()));
         $private = $num_choices;
         if (!$voted) {
             $answers = new ocp_tempcode();
             $answer_tpl = new ocp_tempcode();
             foreach (placeholder_array() as $k => $v) {
                 $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RADIO', array('REAL_BUTTON' => '', 'ID' => placeholder_random(), 'ANSWER' => lorem_phrase(), 'I' => placeholder_random())));
             }
             $answers->attach($answer_tpl);
             $answer_tpl = new ocp_tempcode();
             foreach (placeholder_array() as $k => $v) {
                 $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER', array('REAL_BUTTON' => '', 'ID' => placeholder_random(), 'ANSWER' => lorem_phrase(), 'I' => placeholder_random())));
             }
             $answers->attach($answer_tpl);
             $button = do_lorem_template('OCF_TOPIC_POLL_BUTTON', array('RESULTS_URL' => placeholder_url()));
             $poll->attach(do_lorem_template('OCF_TOPIC_POLL', array('ID' => placeholder_random(), 'NUM_CHOICES' => $num_choices, 'PRIVATE' => $private, 'QUESTION' => lorem_phrase(), 'ANSWERS' => $answers, 'REAL_BUTTON' => '', 'BUTTON' => $button, 'VOTE_URL' => placeholder_url(), 'MINIMUM_SELECTIONS' => placeholder_number(), 'MAXIMUM_SELECTIONS' => placeholder_number())));
         } else {
             $answers = new ocp_tempcode();
             $answer_tpl = new ocp_tempcode();
             $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RESULTS', array('ID' => placeholder_random(), 'NUM_VOTES' => '10', 'WIDTH' => '30', 'ANSWER' => lorem_phrase(), 'I' => placeholder_random())));
             $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RESULTS', array('ID' => placeholder_random(), 'NUM_VOTES' => '15', 'WIDTH' => '45', 'ANSWER' => lorem_phrase(), 'I' => placeholder_random())));
             $answer_tpl->attach(do_lorem_template('OCF_TOPIC_POLL_ANSWER_RESULTS', array('ID' => placeholder_random(), 'NUM_VOTES' => '20', 'WIDTH' => '60', 'ANSWER' => lorem_phrase(), 'I' => placeholder_random())));
             $answers->attach($answer_tpl);
             $button = new ocp_tempcode();
             $poll->attach(do_lorem_template('OCF_TOPIC_POLL_VIEW_RESULTS', array('ID' => placeholder_random(), 'NUM_CHOICES' => $num_choices, 'PRIVATE' => $private, 'QUESTION' => lorem_phrase(), 'ANSWERS' => $answers, 'REAL_BUTTON' => '', 'BUTTON' => $button, 'VOTE_URL' => placeholder_url(), 'MINIMUM_SELECTIONS' => placeholder_number(), 'MAXIMUM_SELECTIONS' => placeholder_number())));
         }
         //buttons
         $buttons = new ocp_tempcode();
         foreach (placeholder_array(1) as $k => $v) {
             $buttons->attach(do_lorem_template('SCREEN_BUTTON', array('REL' => lorem_word(), 'IMMEDIATE' => NULL, 'URL' => placeholder_url(), 'IMG' => placeholder_img_code('page'), 'TITLE' => lorem_word())));
         }
         //posts
         $posts = new ocp_tempcode();
         $first_unread = do_lorem_template('OCF_TOPIC_FIRST_UNREAD');
         $last_edited = do_lorem_template('OCF_TOPIC_POST_LAST_EDITED', array('LAST_EDIT_DATE_RAW' => placeholder_date_raw(), 'LAST_EDIT_DATE' => placeholder_time(), 'LAST_EDIT_PROFILE_URL' => placeholder_url(), 'LAST_EDIT_USERNAME' => lorem_word()));
         $custom_fields = do_lorem_template('OCF_TOPIC_POST_CUSTOM_FIELD', array('NAME' => lorem_phrase(), 'VALUE' => placeholder_ip()));
         $poster_details = do_lorem_template('OCF_GUEST_DETAILS', array('CUSTOM_FIELDS' => $custom_fields));
         $poster_details_mem = do_lorem_template('OCF_POSTER_DETAILS', array('AVATAR_URL' => placeholder_url(), 'ONLINE' => false, 'POSTS' => placeholder_number(), 'POINTS' => placeholder_number(), 'JOIN_DATE_RAW' => placeholder_date_raw(), 'POSTER' => lorem_phrase(), 'JOIN_DATE' => placeholder_time(), 'PRIMARY_GROUP_NAME' => lorem_phrase(), 'CUSTOM_FIELDS' => lorem_phrase(), 'CUSTOM_FIELDS_FULL' => lorem_phrase()));
         $poster = do_lorem_template('OCF_POSTER_GUEST', array('IP_LINK' => placeholder_url(), 'POSTER_DETAILS' => $poster_details, 'POSTER_USERNAME' => lorem_word()));
         $poster->attach(do_lorem_template('OCF_POSTER_MEMBER', array('ID' => placeholder_random(), 'POSTER_DETAILS' => $poster_details_mem, 'PROFILE_URL' => placeholder_url(), 'POSTER_USERNAME' => lorem_word(), 'OTHER_USERGROUPS' => array(lorem_word_html()), 'POSTER' => placeholder_number(), 'HIGHLIGHT_NAME' => lorem_word_html(), 'ONLINE' => false)));
         $post_avatar = do_lorem_template('OCF_TOPIC_POST_AVATAR', array('AVATAR' => placeholder_image_url()));
         $rank_images = do_lorem_template('OCF_RANK_IMAGE', array('GROUP_NAME' => lorem_phrase(), 'USERNAME' => lorem_word(), 'IMG' => placeholder_img_code(''), 'IS_LEADER' => lorem_phrase()));
         //buttons
         $buttons = new ocp_tempcode();
         foreach (placeholder_array(1) as $k => $v) {
             $buttons->attach(do_lorem_template('SCREEN_ITEM_BUTTON', array('REL' => lorem_word(), 'IMMEDIATE' => '', 'URL' => placeholder_url(), 'IMG' => placeholder_img_code('pageitem'), 'TITLE' => lorem_word())));
         }
         $posts->attach(do_lorem_template('OCF_TOPIC_POST', array('ID' => placeholder_random(), 'TOPIC_FIRST_POST_ID' => placeholder_random(), 'TOPIC_FIRST_POSTER' => lorem_phrase(), 'POST_ID' => placeholder_random(), 'URL' => placeholder_url(), 'CLASS' => lorem_phrase(), 'EMPHASIS' => lorem_phrase(), 'FIRST_UNREAD' => $first_unread, 'POSTER_TITLE' => lorem_word(), 'POST_TITLE' => lorem_word(), 'POST_DATE_RAW' => placeholder_date_raw(), 'POST_DATE' => placeholder_time(), 'POST' => lorem_phrase(), 'TOPIC_ID' => placeholder_id(), 'LAST_EDITED_RAW' => lorem_phrase(), 'LAST_EDITED' => $last_edited, 'POSTER_ID' => placeholder_id(), 'POSTER' => $poster, 'POSTER_DETAILS' => $poster_details, 'POST_AVATAR' => $post_avatar, 'RANK_IMAGES' => $rank_images, 'BUTTONS' => $buttons, 'SIGNATURE' => lorem_phrase(), 'UNVALIDATED' => lorem_phrase(), 'DESCRIPTION' => lorem_phrase())));
     }
     $topic_tpl = do_lorem_template('OCF_TOPIC_WRAP', array('THREADED' => false, 'ID' => placeholder_id(), 'TITLE' => lorem_phrase(), 'WARNING_DETAILS' => $warning_details, 'MAX' => lorem_phrase(), 'ACTION_URL' => placeholder_url(), 'NUM_GUESTS' => placeholder_number(), 'NUM_MEMBERS' => placeholder_number(), 'MEMBERS_VIEWING' => $members_viewing, 'RESULTS_BROWSER' => $results_browser, 'MODERATOR_ACTIONS' => placeholder_options(), 'MARKED_POST_ACTIONS' => placeholder_options(), 'QUICK_REPLY' => $quick_reply, 'TREE' => lorem_phrase(), 'POLL' => $poll, 'SCREEN_BUTTONS' => $buttons, 'POSTS' => $posts, 'MAY_CHANGE_MAX' => lorem_word(), 'LAST_POSTER' => placeholder_random()));
     //Wrap the content
     $notifications = do_lorem_template('OCF_NOTIFICATION', array('ADDITIONAL_POSTS' => placeholder_number(), '_ADDITIONAL_POSTS' => lorem_phrase(), 'ID' => placeholder_random(), 'U_TITLE' => lorem_word(), 'IGNORE_URL' => placeholder_url(), 'IGNORE_URL_2' => placeholder_url(), 'REPLY_URL' => placeholder_url(), 'TOPIC_URL' => placeholder_url(), 'POST' => lorem_phrase(), 'DESCRIPTION' => lorem_paragraph_html(), 'TIME' => placeholder_time(), 'TIME_RAW' => placeholder_date_raw(), 'BY' => lorem_phrase(), 'PROFILE_LINK' => placeholder_url(), 'TYPE' => lorem_phrase()));
     $mem_link = new ocp_tempcode();
     foreach (placeholder_array() as $v) {
         $mem_link->attach(do_lorem_template('OCF_MEMBER_LINK', array('URL' => placeholder_url(), 'page' => lorem_phrase(), 'id' => placeholder_random(), 'LANG' => lorem_phrase())));
     }
     $head = new ocp_tempcode();
     $head->attach(do_lorem_template('OCF_MEMBER_BAR', array('AVATAR' => placeholder_image_url(), 'PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'LOGOUT_URL' => placeholder_url(), 'NUM_POINTS_ADVANCE' => placeholder_number(), 'NUM_POINTS' => placeholder_number(), 'NUM_POSTS' => placeholder_number(), 'PRIMARY_GROUP' => lorem_phrase(), 'LAST_VISIT_DATE_RAW' => placeholder_date_raw(), 'LAST_VISIT_DATE' => placeholder_time(), 'MEMBER_LINKS' => $mem_link, 'PERSONAL_TOPIC_URL' => placeholder_url(), 'NEW_POSTS_URL' => placeholder_url(), 'UNREAD_TOPICS_URL' => placeholder_url(), 'RECENTLY_READ_URL' => placeholder_url(), 'PT_EXTRA' => lorem_phrase(), 'NEW_TOPICS' => lorem_phrase(), 'NEW_POSTS' => lorem_phrase(), 'INLINE_PERSONAL_POSTS_URL' => placeholder_url(), 'MAX_AVATAR_HEIGHT' => placeholder_number())));
     //$head->attach(do_lorem_template('OCF_GUEST_BAR',array('NAVIGATION'=>lorem_phrase(),'LOGIN_URL'=>placeholder_url(),'JOIN_LINK'=>placeholder_url(),'FULL_LINK'=>placeholder_url())));
     $birthdays = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $birthdays->attach(do_lorem_template('OCF_BIRTHDAY_LINK', array('AGE' => placeholder_number(), 'PROFILE_URL' => placeholder_url(), 'USERNAME' => lorem_word(), 'BIRTHDAY_LINK' => placeholder_url())));
     }
     $birthdays = do_lorem_template('OCF_BIRTHDAYS', array('BIRTHDAYS' => $birthdays));
     $foot = do_lorem_template('OCF_STATS', array('NEWEST_MEMBER_PROFILE_URL' => placeholder_url(), 'NEWEST_MEMBER_USERNAME' => lorem_word(), 'NUM_MEMBERS' => placeholder_number(), 'NUM_TOPICS' => placeholder_number(), 'NUM_POSTS' => placeholder_number(), 'BIRTHDAYS' => $birthdays, 'USERS_ONLINE' => lorem_phrase(), 'USERS_ONLINE_URL' => placeholder_url(), 'page' => lorem_phrase(), 'GID' => placeholder_random(), 'GCOLOUR' => lorem_word(), 'GTITLE' => lorem_word(), 'GROUPS' => placeholder_array()));
     return array(lorem_globalise(do_lorem_template('OCF_WRAPPER', array('TITLE' => lorem_title(), 'NOTIFICATIONS' => $notifications, 'HEAD' => $head, 'FOOT' => $foot, 'CONTENT' => $topic_tpl)), NULL, '', true));
 }
Пример #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__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);
 }
Пример #5
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__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));
 }
Пример #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__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));
 }
Пример #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__forum_attachment_link()
 {
     $content = do_lorem_template('FORUM_ATTACHMENT_IMAGE_THUMB', array('FULL' => placeholder_url(), 'URL' => placeholder_image_url()));
     $content->attach(do_lorem_template('FORUM_ATTACHMENT_LINK', array('FULL' => placeholder_url(), 'FILENAME' => lorem_word(), 'CLEAN_SIZE' => placeholder_filesize(), 'NUM_DOWNLOADS' => placeholder_number())));
     return array(lorem_globalise($content, 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__attachment_right()
 {
     $temp_tpl = do_lorem_template('ATTACHMENT_IMG', array('A_DESCRIPTION' => lorem_phrase(), 'SCRIPT' => find_script('attachment'), 'ID' => placeholder_id(), 'SUP_PARAMS' => placeholder_id(), 'A_THUMB' => placeholder_image_url(), 'FORUM_DB_BIN' => lorem_word(), 'CLEAN_SIZE' => placeholder_filesize(), 'A_WIDTH' => placeholder_number(), 'A_HEIGHT' => placeholder_number(), 'A_ORIGINAL_FILENAME' => lorem_word()));
     return array(lorem_globalise(do_lorem_template('ATTACHMENT_RIGHT', array('CONTENT' => $temp_tpl)), 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__administrative__theme_image_preview()
 {
     return array(lorem_globalise(do_lorem_template('THEME_IMAGE_PREVIEW', array('WIDTH' => placeholder_number(), 'HEIGHT' => placeholder_number(), 'URL' => placeholder_image_url(), 'UNMODIFIED' => lorem_phrase())), 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__banner_iframe()
 {
     return array(lorem_globalise(do_lorem_template('BANNER_IFRAME', array('B_TYPE' => lorem_phrase(), 'IMG' => placeholder_image_url(), 'WIDTH' => placeholder_number(), 'HEIGHT' => placeholder_number())), 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__catalogue_picture()
 {
     return array(lorem_globalise(do_lorem_template('CATALOGUE_DEFAULT_ENTRY_FIELD_PICTURE', array('URL' => placeholder_url(), 'THUMB_URL' => placeholder_image_url(), 'I' => '0')), 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__administrative__installer_step_4()
 {
     require_css('install');
     require_lang('installer');
     require_lang('version');
     $options = new ocp_tempcode();
     $options->attach($this->make_option(lorem_phrase(), new ocp_tempcode(), 'ftp_username', '', false, true));
     $options->attach($this->make_option(lorem_phrase(), new ocp_tempcode(), 'ftp_password', '', true));
     $options->attach($this->make_tick(lorem_word(), lorem_phrase(), 'tick', 1));
     $section = do_lorem_template('INSTALLER_STEP_4_SECTION', array('HIDDEN' => '', 'TITLE' => lorem_word(), 'TEXT' => lorem_sentence_html(), 'OPTIONS' => $options));
     $section->attach(do_lorem_template('INSTALLER_STEP_4_SECTION_HIDE', array('TITLE' => lorem_phrase(), 'CONTENT' => lorem_phrase())));
     $content = do_lorem_template('INSTALLER_STEP_4', array('JS' => '', 'MESSAGE' => '', 'LANG' => fallback_lang(), 'DB_TYPE' => lorem_phrase(), 'FORUM_TYPE' => lorem_phrase(), 'BOARD_PATH' => lorem_phrase(), 'SECTIONS' => $section, 'MAX' => '1000'));
     return array(lorem_globalise(do_lorem_template('INSTALLER_WRAP', array('CSS_NOCACHE' => ".nocss{}", 'DEFAULT_FORUM' => lorem_phrase(), 'PASSWORD_PROMPT' => lorem_phrase(), 'CSS_URL' => get_base_url() . '/themes/default/css/installer.css', 'CSS_URL_2' => get_base_url() . '/themes/default/css/installer.css', 'LOGO_URL' => placeholder_image_url(), 'STEP' => '1', 'CONTENT' => $content, 'VERSION' => lorem_phrase())), 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__download_category_screen()
 {
     $out = new ocp_tempcode();
     foreach (placeholder_array() as $id => $subcats) {
         $out->attach(do_lorem_template('CATEGORY_ENTRY', array('ID' => "{$id}", 'NAME_FIELD' => 'category', 'AJAX_EDIT_URL' => placeholder_url(), 'URL' => placeholder_url(), 'REP_IMAGE' => placeholder_image(), 'CHILDREN' => lorem_word(), 'NAME' => lorem_phrase(), 'NAME_PLAIN' => lorem_word_2())));
     }
     $subcategories = do_lorem_template('CATEGORY_LIST', array('CONTENT' => $out));
     $downloads = new ocp_tempcode();
     $subdownloads = new ocp_tempcode();
     $download_items = array(array('id' => 1, 'file_size' => placeholder_number(), 'description' => lorem_phrase(), 'add_date' => placeholder_time(), 'category_id' => placeholder_id(), 'default_pic' => '', 'download_views' => placeholder_number(), 'submitter' => placeholder_id(), 'num_downloads' => placeholder_number(), 'edit_date' => placeholder_time(), 'name' => lorem_phrase()));
     foreach ($download_items as $download) {
         $map = array('ID' => placeholder_id(), 'VIEWS' => placeholder_number(), 'SUBMITTER' => placeholder_id(), 'DESCRIPTION' => lorem_sentence(), 'FILE_SIZE' => placeholder_number(), 'DOWNLOADS' => placeholder_number(), 'DATE_RAW' => placeholder_date_raw(), 'DATE' => placeholder_date(), 'EDIT_DATE_RAW' => '', 'SIZE' => placeholder_number(), 'URL' => placeholder_url(), 'NAME' => lorem_phrase(), 'TREE' => placeholder_link(), 'IMGCODE' => '', 'AUTHOR' => lorem_word());
         $tpl = do_lorem_template('DOWNLOAD_BOX', $map);
         $downloads->attach($tpl);
         $tpl2 = do_lorem_template('IMG_THUMB', array('JS_TOOLTIP' => true, 'CAPTION' => $tpl, 'URL' => placeholder_image_url()));
         foreach (placeholder_array(20) as $v) {
             $subdownloads->attach($tpl2);
         }
     }
     return array(lorem_globalise(do_lorem_template('DOWNLOAD_CATEGORY_SCREEN', array('TAGS' => lorem_word_html(), 'TITLE' => lorem_title(), 'SUBMIT_URL' => placeholder_url(), 'ADD_CAT_URL' => placeholder_url(), 'EDIT_CAT_URL' => placeholder_url(), 'DESCRIPTION' => lorem_paragraph_html(), 'SUBCATEGORIES' => $subcategories, 'DOWNLOADS' => $downloads, 'SUBDOWNLOADS' => $subdownloads, 'SORTING' => lorem_phrase(), 'ID' => placeholder_id())), 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__img_thumb()
 {
     return array(lorem_globalise(do_lorem_template('IMG_THUMB', array('JS_TOOLTIP' => lorem_phrase(), 'CAPTION' => lorem_phrase(), 'URL' => placeholder_image_url())), 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__administrative__realtime_rain_bubble()
 {
     require_lang('realtime_rain');
     return array(lorem_globalise(do_lorem_template('REALTIME_RAIN_BUBBLE', array('TITLE' => lorem_phrase(), 'URL' => placeholder_url(), 'IMAGE' => placeholder_image_url(), 'GROUP_ID' => placeholder_id(), 'RELATIVE_TIMESTAMP' => placeholder_date_raw(), 'TICKER_TEXT' => lorem_phrase(), 'TYPE' => lorem_word(), 'IS_POSITIVE' => true, 'IS_NEGATIVE' => false)), NULL, '', true));
 }
Пример #20
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_side_weather()
 {
     return array(lorem_globalise(do_lorem_template('BLOCK_SIDE_WEATHER', array('TITLE' => lorem_phrase(), 'LOC_CODE' => placeholder_id(), 'IMAGE' => placeholder_image_url(), 'COND' => lorem_sentence(), 'FORECAST' => lorem_sentence())), NULL, '', true));
 }
Пример #21
0
 /**
  * Get a preview(s) of a (group of) template(s), as a full standalone piece of HTML in Tempcode format.
  * Uses sources/lorem.php functions to place appropriate stock-text. Should not hard-code things, as the code is intended to be declaritive.
  * Assumptions: You can assume all Lang/CSS/Javascript files in this addon have been pre-required.
  *
  * @return array			Array of previews, each is Tempcode. Normally we have just one preview, but occasionally it is good to test templates are flexible (e.g. if they use IF_EMPTY, we can test with and without blank data).
  */
 function tpl_preview__block_side_news()
 {
     $contents = new ocp_tempcode();
     foreach (placeholder_array() as $k => $v) {
         $contents->attach(do_lorem_template('BLOCK_SIDE_NEWS_SUMMARY', array('ID' => placeholder_id(), 'SUBMITTER' => placeholder_id(), 'AUTHOR' => lorem_phrase(), 'IMG_URL' => placeholder_image_url(), 'CATEGORY' => lorem_phrase(), 'BLOG' => TRUE, 'FULL_URL' => placeholder_url(), 'NEWS' => lorem_paragraph(), 'NEWS_TITLE' => lorem_phrase(), '_DATE' => placeholder_date_raw(), 'DATE' => placeholder_time())));
     }
     return array(lorem_globalise(do_lorem_template('BLOCK_SIDE_NEWS', array('BLOG' => TRUE, 'TITLE' => lorem_phrase(), 'CONTENT' => $contents, 'SUBMIT_URL' => placeholder_url(), 'ARCHIVE_URL' => placeholder_url())), NULL, '', true));
 }
Пример #22
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__form_screen()
 {
     require_lang('comcode');
     require_lang('dates');
     $input = new ocp_tempcode();
     $fields = new ocp_tempcode();
     foreach (placeholder_array(1) as $key => $val) {
         $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE', array('CHECKED' => true, 'NAME' => 'path', 'VALUE' => $val, 'URL' => placeholder_image_url(), 'PRETTY' => strval($key)));
         $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => false, 'BORING_NAME' => 'path' . "_" . $val, 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     }
     $content = new ocp_tempcode();
     $i = 0;
     foreach (placeholder_array() as $k => $v) {
         $cells = new ocp_tempcode();
         foreach (placeholder_array() as $k => $v) {
             $temp = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2', array('CHECKED' => 'true', 'PRETTY' => lorem_phrase(), 'NAME' => placeholder_random_id(), 'CODE' => $v, 'URL' => placeholder_image_url()));
             $temp->attach(do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3_NA', array('NAME' => placeholder_random_id())));
         }
         $_category = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2_WRAP', array('ROWS' => $cells));
         $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2_CAT_WRAP', array('DISPLAY' => 'block', 'CATEGORY' => $_category, 'CATEGORY_NAME' => lorem_word()));
         $content->attach($input);
     }
     //$fields->attach(do_lorem_template('FORM_SCREEN_FIELD',array('REQUIRED'=>true,'SKIP_LABEL'=>false,'BORING_NAME'=>placeholder_random(),'NAME'=>lorem_word(),'DESCRIPTION'=>lorem_sentence_html(),'DESCRIPTION_SIDE'=>'','INPUT'=>$content,'COMCODE'=>'')));
     $name = placeholder_random_id();
     $input = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST', array('REQUIRED' => true, 'NAME' => $name, 'CODE' => '', 'TABINDEX' => placeholder_number(), 'CONTENT' => $content));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => true, 'BORING_NAME' => '', 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $input, 'COMCODE' => '')));
     $entries = array();
     $first = true;
     foreach (placeholder_array() as $k => $v) {
         $entries[] = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3', array('PRETTY' => lorem_word(), 'CHECKED' => $first, 'NAME' => placeholder_random_id(), 'CODE' => lorem_word(), 'URL' => placeholder_image_url()));
         $first = false;
     }
     $content = new ocp_tempcode();
     foreach ($entries as $i => $tempcode) {
         $content->attach($tempcode);
     }
     $content = do_lorem_template('FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_3_WRAP', array('ROWS' => $content));
     $fields->attach(do_lorem_template('FORM_SCREEN_FIELD', array('REQUIRED' => true, 'SKIP_LABEL' => true, 'BORING_NAME' => placeholder_random_id(), 'NAME' => lorem_word(), 'DESCRIPTION' => lorem_sentence_html(), 'DESCRIPTION_SIDE' => '', 'INPUT' => $content, 'COMCODE' => '')));
     //$fields->attach($content);
     $fields->attach(do_lorem_template('POSTING_FIELD', array('REQUIRED' => true, 'DESCRIPTION' => lorem_phrase(), 'HIDDEN_FIELDS' => '', 'PRETTY_NAME' => lorem_word(), 'NAME' => placeholder_random_id(), 'TABINDEX_PF' => placeholder_random(), 'COMCODE_EDITOR' => placeholder_blank(), 'COMCODE_EDITOR_SMALL' => placeholder_blank(), 'CLASS' => lorem_word(), 'COMCODE_URL' => placeholder_url(), 'EMOTICON_CHOOSER' => placeholder_emoticon_chooser(), 'COMCODE_HELP' => placeholder_blank(), 'POST' => placeholder_blank(), 'DEFAULT_PARSED' => placeholder_blank(), 'ATTACHMENTS' => placeholder_blank())));
     return array(lorem_globalise(do_lorem_template('FORM_SCREEN', array('GET' => NULL, 'HIDDEN' => '', 'TITLE' => lorem_title(), 'URL' => placeholder_url(), 'FIELDS' => $fields, 'SUBMIT_NAME' => lorem_word(), 'TEXT' => lorem_sentence_html())), NULL, '', true));
 }
Пример #23
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_edit_photo_tab()
 {
     require_lang('ocf');
     require_css('ocf');
     return array(lorem_globalise(do_lorem_template('OCF_EDIT_PHOTO_TAB', array('USERNAME' => lorem_word(), 'PHOTO' => placeholder_image_url(), 'TEXT' => '')), NULL, '', true));
 }