' : ''; $return = << EOF; $return .= TINYIB_BOARDDESC . <<<EOF $js_captcha EOF; return $return; } function pageFooter() { // If the footer link is removed from the page, please link to TinyIB somewhere on the site. // This is all I ask in return for the free software you are using. return << - futaba + futallaby + tinyib - EOF; } function supportedFileTypes() { $types_allowed = array(); if (TINYIB_PIC) { array_push($types_allowed, "GIF", "JPG", "PNG"); } if (TINYIB_SWF) { array_push($types_allowed, "SWF"); } if (TINYIB_WEBM) { array_push($types_allowed, "WebM"); } $i = 0; $types_count = count($types_allowed); $types_formatted = ""; foreach ($types_allowed as $type) { if (++$i >= $types_count - 1) { $types_formatted .= $type . ($i == $types_count - 1 && $types_count > 1 ? " and " : ""); } else { $types_formatted .= $type . ", "; } } if ($types_formatted != "") { return "Supported file type" . ($types_count != 1 ? "s are " : " is ") . $types_formatted . "."; } return $types_formatted; } function makeLinksClickable($text) { $text = preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%\!_+.,~#?&;//=]+)!i', '$1', $text); $text = preg_replace('/\(\(.*)\)\<\/a>/i', '($2)', $text); $text = preg_replace('/\(.*)\.\<\/a>/i', '$2.', $text); $text = preg_replace('/\(.*)\,\<\/a>/i', '$2,', $text); return $text; } function buildPost($post, $res) { $return = ""; $threadid = ($post['parent'] == TINYIB_NEWTHREAD) ? $post['id'] : $post['parent']; if ($res == TINYIB_RESPAGE) { $reflink = "No.{$post['id']}"; } else { $reflink = "No.{$post['id']}"; } if ($post["stickied"] == 1) { $reflink .= ' Stickied'; } if (!isset($post["omitted"])) { $post["omitted"] = 0; } $filehtml = ''; $filesize = ''; $expandhtml = ''; $direct_link = '#'; if (!isEmbed($post["file_hex"])) { $direct_link = "src/${post["file"]}"; } if ($post['parent'] == TINYIB_NEWTHREAD && $post["file"] != '') { $filesize .= isEmbed($post['file_hex']) ? 'Embed: ' : 'File: '; } if (isEmbed($post["file_hex"])) { $expandhtml = $post['file']; } else if ($post["file"] != '') { $expandhtml = ""; } $thumblink = ""; $expandhtml = rawurlencode($expandhtml); if (isEmbed($post["file_hex"])) { $filesize .= "${post['file_original']}–(${post['file_hex']})"; } else if ($post["file"] != '') { $filesize .= $thumblink . "${post["file"]}–(${post["file_size_formatted"]}, ${post["image_width"]}x${post["image_height"]}, ${post["file_original"]})"; } if ($filesize != '') { $filesize = '' . $filesize . ''; } if ($filesize != '') { if ($post['parent'] != TINYIB_NEWTHREAD) { $filehtml .= '
'; } $filehtml .= << $thumblink ${post[ EOF; if ($expandhtml != '') { $filehtml .= <<