Printpage.template.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2011 Simple Machines
  8. * @license http://www.simplemachines.org/about/smf/license.php BSD
  9. *
  10. * @version 2.1 Alpha 1
  11. */
  12. function template_print_above()
  13. {
  14. global $context, $settings, $options, $txt;
  15. echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  16. <html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
  19. <meta name="robots" content="noindex" />
  20. <link rel="canonical" href="', $context['canonical_url'], '" />
  21. <title>', $txt['print_page'], ' - ', $context['topic_subject'], '</title>
  22. <style type="text/css">
  23. body, a
  24. {
  25. color: #000;
  26. background: #fff;
  27. }
  28. body, td, .normaltext
  29. {
  30. font-family: Verdana, arial, helvetica, serif;
  31. font-size: small;
  32. }
  33. h1#title
  34. {
  35. font-size: large;
  36. font-weight: bold;
  37. }
  38. h2#linktree
  39. {
  40. margin: 1em 0 2.5em 0;
  41. font-size: small;
  42. font-weight: bold;
  43. }
  44. dl#posts
  45. {
  46. width: 90%;
  47. margin: 0;
  48. padding: 0;
  49. list-style: none;
  50. }
  51. dt.postheader
  52. {
  53. border: solid #000;
  54. border-width: 1px 0;
  55. padding: 4px 0;
  56. }
  57. dd.postbody
  58. {
  59. margin: 1em 0 2em 2em;
  60. }
  61. table
  62. {
  63. empty-cells: show;
  64. }
  65. blockquote, code
  66. {
  67. border: 1px solid #000;
  68. margin: 3px;
  69. padding: 1px;
  70. display: block;
  71. }
  72. code
  73. {
  74. font: x-small monospace;
  75. }
  76. blockquote
  77. {
  78. font-size: x-small;
  79. }
  80. .smalltext, .quoteheader, .codeheader
  81. {
  82. font-size: x-small;
  83. }
  84. .largetext
  85. {
  86. font-size: large;
  87. }
  88. .centertext
  89. {
  90. text-align: center;
  91. }
  92. hr
  93. {
  94. height: 1px;
  95. border: 0;
  96. color: black;
  97. background-color: black;
  98. }
  99. </style>
  100. </head>
  101. <body>
  102. <h1 id="title">', $context['forum_name_html_safe'], '</h1>
  103. <h2 id="linktree">', $context['category_name'], ' => ', (!empty($context['parent_boards']) ? implode(' => ', $context['parent_boards']) . ' => ' : ''), $context['board_name'], ' => ', $txt['topic_started'], ': ', $context['poster_name'], ' ', $txt['search_on'], ' ', $context['post_time'], '</h2>
  104. <dl id="posts">';
  105. }
  106. function template_main()
  107. {
  108. global $context, $settings, $options, $txt;
  109. foreach ($context['posts'] as $post)
  110. echo '
  111. <dt class="postheader">
  112. ', $txt['title'], ': <strong>', $post['subject'], '</strong><br />
  113. ', $txt['post_by'], ': <strong>', $post['member'], '</strong> ', $txt['search_on'], ' <strong>', $post['time'], '</strong>
  114. </dt>
  115. <dd class="postbody">
  116. ', $post['body'], '
  117. </dd>';
  118. }
  119. function template_print_below()
  120. {
  121. global $context, $settings, $options;
  122. echo '
  123. </dl>
  124. <div id="footer" class="smalltext">
  125. ', theme_copyright(), '
  126. </div>
  127. </body>
  128. </html>';
  129. }
  130. ?>