Advertisement
Guest User

yyClassicHyper 2024-11-30

a guest
Nov 30th, 2024
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.18 KB | None | 0 0
  1. # -*-s2-*-
  2.  
  3. layerinfo type = "layout";
  4. layerinfo name = "yyClassicHyper";
  5. layerinfo redist_uniq = "classic/layout";
  6. layerinfo previews = "classic/classic.jpg";
  7.  
  8. propgroup colors {
  9. property Color body_bgcolor {
  10. des = "Background color of page";
  11. s1color = "stronger_back";
  12. }
  13. property Color main_bgcolor {
  14. des = "Background color of main text area";
  15. s1color = "page_back";
  16. }
  17. property Color main_fgcolor {
  18. des = "Color of text on main text areas";
  19. s1color = "page_text";
  20. }
  21. property Color headerbar_bgcolor {
  22. des = "Background color of header bars";
  23. s1color = "strong_back";
  24. }
  25. property Color headerbar_fgcolor {
  26. des = "Color of text on header bars";
  27. s1color = "strong_text";
  28. }
  29. property Color metabar_bgcolor {
  30. des = "Background color of side bar";
  31. s1color = "weak_back";
  32. }
  33. property Color metabar_fgcolor {
  34. des = "Color of text on side bar";
  35. s1color = "weak_text";
  36. }
  37. property Color page_title_color {
  38. des = "Text color of the page's main title";
  39. s1color = "page_text_title";
  40. }
  41. property Color page_subtitle_color {
  42. des = "Text color of the page's subtitles";
  43. s1color = "page_text_em";
  44. }
  45. property Color link_color {
  46. des = "Text color of links";
  47. s1color = "page_link";
  48. }
  49. property Color vlink_color {
  50. des = "Text color of visited links";
  51. s1color = "page_vlink";
  52. }
  53. property Color alink_color {
  54. des = "Text color of active links";
  55. s1color = "page_alink";
  56. }
  57. property Color comment_bar_one_bgcolor {
  58. des = "Alternating background color for comment bars (one)";
  59. }
  60. property Color comment_bar_two_fgcolor {
  61. des = "Text color on alternating comment bars (one)";
  62. }
  63. property Color comment_bar_two_bgcolor {
  64. des = "Alternating background color for comment bars (two)";
  65. }
  66. property Color comment_bar_one_fgcolor {
  67. des = "Text color on alternating comment bars (two)";
  68. }
  69. property Color comment_bar_screened_bgcolor {
  70. des = "Background bar color for screened comments";
  71. }
  72. property Color comment_bar_screened_fgcolor {
  73. des = "Text color on background bar for screened comments";
  74. }
  75. }
  76. set body_bgcolor = "#6666cc";
  77. set main_bgcolor = "#ffffff";
  78. set main_fgcolor = "#000000";
  79. set headerbar_bgcolor = "#c0c0ff";
  80. set headerbar_fgcolor = "#000000";
  81. set metabar_bgcolor = "#eeeeff";
  82. set metabar_fgcolor = "#000000";
  83. set page_title_color = "#8b1a1a";
  84. set page_subtitle_color = "#c00000";
  85. set link_color = "#000050";
  86. set vlink_color = "#500050";
  87. set alink_color = "#ff00c0";
  88. set comment_bar_one_bgcolor = "#c0c0ff";
  89. set comment_bar_one_fgcolor = "#000000";
  90. set comment_bar_two_bgcolor = "#eeeeff";
  91. set comment_bar_two_fgcolor = "#000000";
  92. set comment_bar_screened_bgcolor = "#dddddd";
  93. set comment_bar_screened_fgcolor = "#000000";
  94. set tags_aware = true;
  95.  
  96.  
  97.  
  98. ### My code (Y. Y.)
  99.  
  100. set lang_fmt_time_short = "%%HH%%:%%min%%";
  101. set lang_fmt_date_long = "%%yyyy%%-%%mm%%-%%dd%%";
  102.  
  103. set text_comment_from = "";
  104. set text_comment_date = "";
  105. set text_comment_ipaddr = "";
  106.  
  107. propgroup ExtraProperties {
  108. property string main_left_margin {
  109. des = "Main left margin";
  110. }
  111. property int minimal_comment_width {
  112. des = "Minimal comment width (integer, %)";
  113. }
  114. property int comment_half_depth {
  115. des = "Глубина комментария, на которой его отступ равен половине максимального (integer)";
  116. }
  117. property int userpic_scaling_factor_numerator {
  118. des = "Userpic scaling factor numerator (integer)";
  119. }
  120. property int userpic_scaling_factor_denominator {
  121. des = "Userpic scaling factor denominator (integer)";
  122. }
  123. property string image_max_width {
  124. des = "Maximal image width";
  125. }
  126. property string image_max_height {
  127. des = "Maximal image height";
  128. }
  129. property string entry_text_indent {
  130. des = "Indentation for entry text";
  131. }
  132. property string comment_text_indent {
  133. des = "Indentation for comment text";
  134. }
  135. property string global_comments_indent {
  136. des = "Additional indentation for all comments";
  137. }
  138. property string main_area_maximal_width {
  139. des = "Main area maximal width (e.g. 100%, 800px)";
  140. }
  141. property string main_border_css_style {
  142. des = "Main border css style";
  143. }
  144. property string top_margin_Powered_by {
  145. des = "Top margin of ''Powered by...''";
  146. }
  147. property string header_date_format {
  148. des = "Date format for header";
  149. }
  150. }
  151. set main_left_margin = "30px";
  152. set minimal_comment_width = 25;
  153. set comment_half_depth = 35;
  154. set userpic_scaling_factor_numerator = 1;
  155. set userpic_scaling_factor_denominator = 1;
  156. set image_max_width = "100%";
  157. set image_max_height = "5000px";
  158. set entry_text_indent = "2px";
  159. set comment_text_indent = "0px";
  160. set global_comments_indent = "2px";
  161. set main_area_maximal_width = "100%";
  162. set main_border_css_style = "0px solid #c0c0ff";
  163. set top_margin_Powered_by = "0px";
  164. set header_date_format = "%%day%%, %%month%% %%dayord%%, %%yyyy%%";
  165.  
  166. ## Переопределяем EntryPage::print_comments,
  167. ## чтобы изменить отступы в дереве комментариев
  168.  
  169. function EntryPage::print_comments (Comment[] cs) {
  170. if (size $cs == 0) { return; }
  171. foreach var Comment c ($cs) {
  172. var int indent = (1000000 * (100 - $*minimal_comment_width) * (100 * ($c.depth - 1))) / (100 * ($*comment_half_depth + ($c.depth - 1)));
  173. var int indent_q = $indent / 1000000;
  174. var int indent_r = $indent % 1000000;
  175. if (($indent_r < 1000000) and ($indent_r >= 100000)) {
  176. "<div id='$c.dom_id' style='margin-left: ${indent_q}.${indent_r}%; margin-top: 5px'>\n";
  177. }
  178. if (($indent_r < 100000) and ($indent_r >= 10000)) {
  179. "<div id='$c.dom_id' style='margin-left: ${indent_q}.0${indent_r}%; margin-top: 5px'>\n";
  180. }
  181. if (($indent_r < 10000) and ($indent_r >= 1000)) {
  182. "<div id='$c.dom_id' style='margin-left: ${indent_q}.00${indent_r}%; margin-top: 5px'>\n";
  183. }
  184. if (($indent_r < 1000) and ($indent_r >= 100)) {
  185. "<div id='$c.dom_id' style='margin-left: ${indent_q}.000${indent_r}%; margin-top: 5px'>\n";
  186. }
  187. if (($indent_r < 100) and ($indent_r >= 10)) {
  188. "<div id='$c.dom_id' style='margin-left: ${indent_q}.0000${indent_r}%; margin-top: 5px'>\n";
  189. }
  190. if ($indent_r < 10) {
  191. "<div id='$c.dom_id' style='margin-left: ${indent_q}.00000${indent_r}%; margin-top: 5px'>\n";
  192. }
  193. if ($c.full) {
  194. $this->print_comment($c);
  195. } else {
  196. $this->print_comment_partial($c);
  197. }
  198. "</div>";
  199. $this->print_comments($c.replies);
  200. }
  201. }
  202.  
  203.  
  204. propgroup presentation {
  205. property bool show_entry_userpic {
  206. des = "Show your userpic with your journal's entries?";
  207. }
  208. property use font_base;
  209. property use font_fallback;
  210. property use page_recent_items;
  211. property use page_friends_items;
  212. property use view_entry_disabled;
  213. property use use_shared_pic;
  214. property bool show_entrynav_icons {
  215. des = "Toggle to show the next, memory, edit, etc icons on the entry view page";
  216. }
  217. property string page_background_image {
  218. des = "URL to an image to be used for the page background";
  219. }
  220. property use external_stylesheet;
  221. }
  222. set show_entry_userpic = false;
  223. set font_base = "Arial, Helvetica";
  224. set font_fallback = "serif";
  225. set page_recent_items = 20;
  226. set page_friends_items = 25;
  227. set view_entry_disabled = false;
  228. set show_entrynav_icons = true;
  229. set page_background_image = "";
  230.  
  231. propgroup text {
  232. property use text_post_comment;
  233. property use text_read_comments;
  234. property use text_post_comment_friends;
  235. property use text_read_comments_friends;
  236. property use text_website_default_name;
  237. }
  238.  
  239. function print_stylesheet ()
  240. {
  241. print clean_url($*page_background_image) != "" ? "body { background-image: url($*page_background_image); }" : "";
  242. var string font;
  243. if ($*font_base) {
  244. $font = "\"$*font_base\"";
  245. if ($*font_fallback != "none") {
  246. $font = "$font, ";
  247. }
  248. }
  249. if ($*font_fallback != "none") {
  250. $font = "$font $*font_fallback";
  251. }
  252.  
  253. if ($font != "") {
  254. """
  255. body, table, td, th, .page_title, #yearheader {
  256. font-family: $font;
  257. }
  258. """;
  259. }
  260.  
  261. """
  262. body,.body {
  263. background-color: $*body_bgcolor;
  264. color: $*main_fgcolor;
  265. padding: 0pt;
  266. cellpadding: 5pt;
  267. }
  268. a, a:link {
  269. color: $*link_color;
  270. }
  271. a:vlink {
  272. color: $*vlink_color;
  273. }
  274. a:alink {
  275. color: $*alink_color;
  276. }
  277. a:visited {
  278. color: $*vlink_color;
  279. }
  280. a:active {
  281. color: $*alink_color;
  282. }
  283. table.main {
  284. background-color: $*main_bgcolor;
  285. color: $*main_fgcolor;
  286. max-width: $*main_area_maximal_width;
  287. border: $*main_border_css_style;
  288. padding: 2px;
  289. width: 100%;
  290. }
  291. .borderless {
  292. overflow: hidden;
  293. ### border: 0!important;
  294. ### padding: 0!important;
  295. border: 0;
  296. padding: 0;
  297. }
  298. table.bigtable {
  299. width: 100%;
  300. ### border: 0!important;
  301. border: 0;
  302. margin-top: 5px;
  303. margin-bottom: 5px;
  304. }
  305. table.bigtablesmall {
  306. width: 100%;
  307. ### border: 0!important;
  308. border: 0;
  309. }
  310. .CommentText {
  311. margin-left: $*comment_text_indent;
  312. }
  313. .CommentText img {
  314. max-width: $*image_max_width;
  315. max-height: $*image_max_height;
  316. }
  317. .entry_content {
  318. margin-left: $*entry_text_indent;
  319. }
  320. .entry_content img {
  321. max-width: $*image_max_width;
  322. max-height: $*image_max_height;
  323. }
  324. .top_margin_row_Powered_by {
  325. height: $*top_margin_Powered_by;
  326. }
  327. .page_title {
  328. color: $*page_title_color;
  329. font-size: x-large;
  330. font-family: sans-serif;
  331. }
  332. .view_links {
  333. font-family: monospace;
  334. white-space: nowrap;
  335. font-size: medium;
  336. }
  337. .view_links2 {
  338. font-family: monospace;
  339. font-size: medium;
  340. }
  341. th.headerbar {
  342. background-color: $*headerbar_bgcolor;
  343. color: $*headerbar_fgcolor;
  344. font-weight: bold;
  345. font-size: large;
  346. text-align: left;
  347. font-family: sans-serif;
  348. width: 100%;
  349. }
  350. th.smallheaderbar {
  351. background-color: $*headerbar_bgcolor;
  352. color: $*headerbar_fgcolor;
  353. font-weight: bold;
  354. font-size: large;
  355. text-align: left;
  356. font-family: sans-serif;
  357. }
  358. td.metabar {
  359. text-align: center;
  360. white-space: nowrap;
  361. width: 1%;
  362. background-color: $*metabar_bgcolor;
  363. color: $*metabar_fgcolor;
  364. }
  365. .subject {
  366. color: $*page_subtitle_color;
  367. font-weight: bold;
  368. font-family: sans-serif;
  369. font-style: italic;
  370. }
  371. .comments {
  372. text-align: right;
  373. font-size: small;
  374. }
  375. #yearheader {
  376. color: $*page_subtitle_color;
  377. font-weight: bold;
  378. font-style: italic;
  379. font-size: large;
  380. }
  381. th.monthheader {
  382. background-color: $*headerbar_bgcolor;
  383. font-size: large;
  384. }
  385. th.daysheader {
  386. background-color: $*metabar_bgcolor;
  387. font-weight: normal;
  388. }
  389. td.weekday_empty {
  390. background-color: $*metabar_bgcolor;
  391. }
  392. .day_id {
  393. font-weight: bold;
  394. font-size: small;
  395. }
  396. #archiveyearpage_nav {
  397. font-size: large;
  398. font-weight: bold;
  399. }
  400. """;
  401. }
  402.  
  403. function Page::lay_nav_blurb() { }
  404.  
  405. function Page::lay_primary_userpic() : Image {
  406. return $.journal.default_pic;
  407. }
  408.  
  409. function EntryPage::lay_primary_userpic() : Image {
  410. return $.entry.userpic;
  411. }
  412.  
  413. function Page::print_linklist() {
  414. if (size $.linklist <= 0) {
  415. return;
  416. }
  417.  
  418. var bool section_open = false;
  419.  
  420. println "<span class='view_links2'>";
  421. foreach var UserLink l ($.linklist) {
  422. if ($l.title) {
  423. if ($l.is_heading) {
  424. if ($section_open) {
  425. println "<br />";
  426. }
  427. println """<span style="font-weight: bold;">$l.title</span> """;
  428. $section_open = true;
  429. } else {
  430. println """[<a href="$l.url">$l.title</a>]""";
  431. }
  432. }
  433. }
  434. if ($section_open) {
  435. println "</span><br /><br />";
  436. }
  437. println "";
  438. }
  439.  
  440. function Page::print ()
  441. {
  442. var string title = $this->title();
  443. var string userpic;
  444. var Image default_userpic = $this->lay_primary_userpic();
  445. if (defined $default_userpic)
  446. {
  447. var int w = $default_userpic.width;
  448. var int h = $default_userpic.height;
  449. $w = $w * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
  450. $h = $h * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
  451. $userpic = "<img class='ljr_userpic' align='right' style='padding: 0;' src='$default_userpic.url' "+
  452. "width='$w' height='$h' alt='' />";
  453. }
  454. var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
  455. var string website = $.journal.website_url ?
  456. """<td><a href="$.journal.website_url">$website_name</a></td><td class="body">&nbsp;</td>""" :
  457. "";
  458. var string links;
  459. foreach var string v ($.views_order) {
  460. $links = $links + ($.view == $v ?
  461. "["+lang_viewname($v)+"]" :
  462. "[<a href='$.view_url{$v}'>"+lang_viewname($v)+"</a>]");
  463. }
  464. """
  465. <html>
  466. <head>
  467. """;
  468.  
  469. if ($*external_stylesheet) {
  470. println """<link rel="stylesheet" href="$.stylesheet_url" type="text/css" />""";
  471. } else {
  472. println """<style type="text/css">"""; print_stylesheet(); "</style>";
  473. }
  474. $this->print_head();
  475.  
  476. """
  477. <title>$title</title>
  478. </head>
  479. <body>
  480. <div align="center">
  481. <table class="main">
  482. <tr>
  483. <td class='borderless' colspan='3'>
  484. </td>
  485. </tr>
  486. <tr>
  487. <td class='borderless' colspan='3'>
  488. <table class='bigtablesmall'>
  489. <tr>
  490. <td class='borderless' style='width: 0; font-size: 0;'>
  491. </td>
  492. <td class='borderless'>
  493. $userpic
  494. <span class="page_title">$title</span>
  495. <font size="1"><br /><br /></font>
  496. <span class="view_links">$links</span>
  497. """;
  498. if (size $.linklist > 0 and $*linklist_support) {
  499. "<br />";
  500. $this->print_linklist();
  501. }
  502. $this->lay_nav_blurb();
  503. ### "<td class='borderless' style='width: 0!important; font-size: 0!important;'>";
  504. "<td class='borderless' style='width: 0; font-size: 0;'>";
  505. "</td>";
  506. "</td>";
  507. "</tr>";
  508. "</table>";
  509. "</td>";
  510. "</tr>";
  511. "<tr>";
  512. "<td class='borderless' colspan='3'>";
  513. "</td>";
  514. "</tr>";
  515. "<tr>";
  516. ### "<td class='borderless' style='width: $*main_left_margin; font-size: 0!important;'>";
  517. "<td class='borderless' style='width: $*main_left_margin; font-size: 0;'>";
  518. "</td>";
  519. "<td class='borderless'>";
  520. $this->print_body();
  521. "</td>";
  522. ### "<td class='borderless' style='width: 0!important; font-size: 0!important;'>";
  523. "<td class='borderless' style='width: 0; font-size: 0;'>";
  524. "</td>";
  525. "</tr>";
  526. "<tr>";
  527. "<td class='borderless' colspan='3'>";
  528. "</td>";
  529. "</tr>";
  530. "</table>\n";
  531.  
  532. ### Affliations
  533.  
  534. "<table cellspacing='0' style='max-width: $*main_area_maximal_width; background-color: $*body_bgcolor; white-space: nowrap;'>";
  535. "<tr class='top_margin_row_Powered_by'>";
  536. "</tr>";
  537. "<tr>";
  538. "<td width='100%'>";
  539. "</td>";
  540. print $website;
  541. "<td style='background-color: $*main_bgcolor; border: $*main_border_css_style;'>";
  542. server_sig();
  543. "</td>";
  544. "</tr>";
  545. "</table>\n";
  546.  
  547. "</div>\n</body>\n</html>";
  548. }
  549.  
  550. function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text)
  551. {
  552. var string time = $e.time->time_format();
  553. var string userpic = "";
  554. if (defined $e.userpic)
  555. {
  556. var int w = $e.userpic.width;
  557. var int h = $e.userpic.height;
  558. $w = $w * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
  559. $h = $h * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
  560. $userpic = "<img class='ljr_userpic' src='$e.userpic.url' alt='[User Picture]' height='$h' width='$w' />";
  561. }
  562. if ($e.new_day or $p.view == "entry")
  563. {
  564. "<tr><th colspan='2' align='left' class='headerbar'>";
  565. ### print $e.time->date_format("%%day%%, %%month%% %%dayord%%, %%yyyy%%");
  566. print $e.time->date_format($*header_date_format);
  567. "</th></tr>\n";
  568. } elseif ($p.view == "day") {
  569. "<tr><th class='smallheaderbar'>Time</td><td class='headerbar' style='width: 100%'>Event</th></tr>";
  570. }
  571. "<tr valign='top'>";
  572.  
  573. # Metabar
  574. "<td rowspan='2' style='background-color: $bgcolor' class='metabar'>";
  575. # Time
  576. "<em style='font-family: sans-serif; font-size: small'>$time</em><br />";
  577. # Altposter crap
  578. if ($p.view == "friends")
  579. {
  580. "<strong><a style='color: $fgcolor' href='" + $e.journal->base_url() + "/'>";
  581. print $e.journal.username;
  582. "</a></strong><br />";
  583. }
  584. if ($e.journal.username != $e.poster.username)
  585. {
  586. "[<a href='" + $e.poster->base_url() + "/'>";
  587. print $e.poster.username;
  588. "</a>]<br />";
  589. }
  590. if ($userpic != "" and ($p.view == "friends" or $*show_entry_userpic == true))
  591. {
  592. print $userpic;
  593. }
  594. # Security icon
  595. if ($e.security) { print "<br />" + $e.security_icon; }
  596. # Permalink
  597. "<p style='font-size: small'>[<a href='$e.permalink_url'>$*text_permalink</a>]</p>";
  598. "</td>";
  599.  
  600. # Entry
  601. "<td style='text-align:left; width:100%;'>";
  602. "<div class='entry_content'>";
  603.  
  604. if ($p.view == "entry" and $*show_entrynav_icons)
  605. {
  606. print "<div style='text-align: center'>";
  607. $e->print_linkbar();
  608. print "</div>";
  609. }
  610.  
  611. if ($e.subject) { "\n\n<span class='subject'>$e.subject</span><br />"; }
  612. if (not $hide_text) {
  613. print $e.text; "\n\n";
  614. if (size $e.metadata or size $e.tags)
  615. {
  616. "<p>";
  617. foreach var string k ($e.metadata)
  618. {
  619. var string key = $k;
  620. var string val = $e.metadata{$k};
  621. if ($k == "mood") { $key = $*text_meta_mood; }
  622. if ($k == "music") { $key = $*text_meta_music; }
  623. if ($k == "mood" and defined $e.mood_icon)
  624. {
  625. var Image i = $e.mood_icon;
  626. $val = "<img src='$i.url' width='$i.width' height='$i.height' alt='' /> $val";
  627. }
  628. "<strong>$key:</strong> $val<br />";
  629. }
  630.  
  631. if ($e.tags) {
  632. var int tcount = 0;
  633. "<strong>Tags:</strong> ";
  634. foreach var Tag t ($e.tags) {
  635. """<a rel="tag" href="$t.url">$t.name</a>""";
  636. $tcount++;
  637. if ($tcount != size $e.tags) { ", "; }
  638. }
  639. "<br />";
  640. }
  641.  
  642. "</p>";
  643. }
  644. }
  645. if ($hide_text) {
  646. print "<div style='font-family: monospace;'>";
  647. print "[Текст записи пропущен. Вы находитесь в режиме детального просмотра дерева комментариев.]";
  648. print "</div>";
  649. }
  650. "</div>";
  651. "</td>";
  652. "</tr>";
  653.  
  654. "<tr valign='bottom'>";
  655. "<td>";
  656. ### $e.comments->print();
  657. ### if (not $e.comments.enabled) { return; }
  658. "<p class='comments'>(";
  659. if ($e.comments.count > 0 or $e.comments.screened) {
  660. $e.comments->print_readlink();
  661. "&nbsp;|&nbsp;";
  662. }
  663. $e.comments->print_postlink();
  664. print " | <a href=" + $e.permalink_url +"?uncollapse&style>Uncollapse</a>";
  665. ")</p>";
  666. "</td>";
  667. "</tr>\n";
  668. }
  669.  
  670. function Page::print_entry (Entry e)
  671. {
  672. print_entry($this, $e, $*metabar_bgcolor, $*metabar_fgcolor, false);
  673. }
  674.  
  675. function FriendsPage::print_entry (Entry e)
  676. {
  677. var Friend f = $.friends{$e.journal.username};
  678. print_entry($this, $e, $f.bgcolor, $f.fgcolor, false);
  679. }
  680.  
  681. function RecentPage::lay_nav_blurb ()
  682. {
  683. var string user = "<a href='$.base_url/info'>$.journal.name</a>";
  684. if ($.nav.skip > 0)
  685. {
  686. "<p>Below are $.nav.count entries, after skipping $.nav.skip most recent ones in the \"$user\" journal:</p>";
  687. } else {
  688. "<p>Below are the $.nav.count most recent journal entries recorded in the \"$user\" journal:</p>";
  689. }
  690. }
  691.  
  692. function RecentPage::print_body ()
  693. {
  694. var string nav = "";
  695. if ($.nav.forward_url != "" or $.nav.backward_url != "")
  696. {
  697. if ($.nav.backward_url != "")
  698. {
  699. $nav = "<a href='$.nav.backward_url'>&lt;&lt; Previous $.nav.backward_count entries</a>";
  700. }
  701. if ($.nav.backward_url != "" and $.nav.forward_url != "")
  702. {
  703. $nav = "$nav --";
  704. }
  705. if ($.nav.forward_url != "")
  706. {
  707. $nav = "$nav <a href='$.nav.forward_url'>Next $.nav.forward_count entries &gt;&gt;</a>";
  708. }
  709. $nav = "<p align='center'>[$nav]</p>";
  710. }
  711. if ($nav != "") { print $nav; }
  712. "<table class='bigtable'>\n";
  713. foreach var Entry e ($.entries) { $this->print_entry($e); }
  714. "</table>\n";
  715. if ($nav != "") { print $nav; }
  716. }
  717.  
  718. function FriendsPage::lay_nav_blurb ()
  719. {
  720. var int total = size $.entries;
  721. if ($.nav.skip > 0)
  722. {
  723. "<p>Below are $total friends entries, after skipping $.nav.skip most recent ones:</p>";
  724. } else {
  725. "<p>Below are the $total most recent friends journal entries:</p>";
  726. }
  727. }
  728.  
  729. function CommentInfo::print ()
  730. {
  731. if (not $.enabled) { return; }
  732. "<p class='comments'>(";
  733. if ($.count > 0 or $.screened) {
  734. $this->print_readlink();
  735. "&nbsp;|&nbsp;";
  736. }
  737. $this->print_postlink();
  738. ")</p>";
  739. }
  740.  
  741. function YearPage::lay_nav_blurb()
  742. {
  743. "<p id='yearpage_nav'>";
  744. $this->print_year_links();
  745. "</p>";
  746. }
  747.  
  748. function YearPage::print_body
  749. {
  750. "<p id='yearheader'>$.year&hellip;</p>\n";
  751. foreach var YearMonth m ($.months) {
  752. $this->print_month($m);
  753. }
  754. }
  755.  
  756. function YearPage::print_year_links ()
  757. {
  758. foreach var YearYear y ($.years) {
  759. if ($y.displayed) {
  760. "[ $y.year ]";
  761. } else {
  762. "[ <a href=\"$y.url\">$y.year</a> ]";
  763. }
  764. }
  765. }
  766.  
  767. function YearPage::print_month(YearMonth m)
  768. {
  769. if (not $m.has_entries) { return; }
  770. # Table Wrapper
  771. "<center><p><table border='1' cellpadding='4' width='80%'>\n";
  772.  
  773. # Month Header
  774. "<tr align='center'><th colspan='7' class='monthheader'>\n";
  775. print $m->month_format();
  776. "</th></tr>\n";
  777.  
  778. # Weekdays Header
  779. "<tr align='center'>\n";
  780. foreach var int d (weekdays()) {
  781. "<th class='daysheader'>"+$*lang_dayname_short[$d]+"</th>\n";
  782. }
  783. "</tr>\n";
  784.  
  785. # Weeks
  786. foreach var YearWeek w ($m.weeks) {
  787. $w->print();
  788. }
  789.  
  790. # Footer
  791. "<tr><td colspan='7'><div style='text-align: center'><a href='$m.url'>$*text_view_month</a></div></td></tr>\n";
  792.  
  793. # End Table
  794. "</table></p></center>\n";
  795. }
  796.  
  797. function YearWeek::print ()
  798. {
  799. "<tr>";
  800. if ($.pre_empty) { "<td colspan='$.pre_empty' class='weekday_empty'>&nbsp;</td>"; }
  801. foreach var YearDay d ($.days) {
  802. "<td valign='top'><span class='day_id'>$d.day</span><div style='text-align: center'>";
  803. if ($d.num_entries) {
  804. "<a href='$d.url'>$d.num_entries</a>";
  805. } else {
  806. "&nbsp;";
  807. }
  808. "</div></td>\n";
  809. }
  810. if ($.post_empty) { "<td colspan='$.post_empty' class='weekday_empty'>&nbsp;</td>"; }
  811. "</tr>";
  812. }
  813.  
  814. function DayPage::print_body ()
  815. {
  816. "<h2 class='daypage_header'>"; print $.date->date_format("%%month%% %%dayord%%, %%yyyy%%"); "</h2>";
  817. if (not $.has_entries)
  818. {
  819. "<blockquote><em>"; print ehtml($*text_noentries_day); "</em></blockquote>";
  820. } else {
  821. "<table class='bigtable'>";
  822. foreach var Entry e ($.entries) { $this->print_entry($e); }
  823. "</table>";
  824. }
  825.  
  826. var string tprev = ehtml($*text_day_prev);
  827. var string tnext = ehtml($*text_day_next);
  828.  
  829. "<table align='center'><tr align='middle'>\n";
  830.  
  831. "<td width='33%' align='left'><a href='$.prev_url'>$tprev</a></td>\n";
  832. "<td align='center' width='33%'>";
  833. "<strong>"; print $.date->date_format("%%yyyy%%/%%mm%%/%%dd%%"); "</strong><br />";
  834. "[<a href='"; print $this.journal->base_url(); "/calendar'>$*text_view_archive</a>]</td>\n";
  835. "<td width='33%' align='right'><a href='$.next_url'>$tnext</a></td>\n";
  836.  
  837. "</tr></table>";
  838.  
  839. }
  840.  
  841. function EntryPage::print_body () {
  842. set_handler("unscreen_comment_#", [
  843. [ "style_bgcolor", "cmtbar#", "$*comment_bar_one_bgcolor", ],
  844. [ "style_color", "cmtbar#", "$*comment_bar_one_fgcolor", ],
  845. ]);
  846. set_handler("screen_comment_#", [
  847. [ "style_bgcolor", "cmtbar#", "$*comment_bar_screened_bgcolor", ],
  848. [ "style_color", "cmtbar#", "$*comment_bar_screened_fgcolor", ],
  849. ]);
  850.  
  851. "<table class='bigtable'>\n";
  852. print_entry($this, $.entry, $*metabar_bgcolor, $*metabar_fgcolor, $.viewing_thread);
  853.  
  854. if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0)
  855. {
  856. $this->print_multiform_start();
  857. "<tr valign='top'><th class='headerbar' colspan='2'>Comments</th></tr>";
  858. "<tr valign='top'>";
  859. "<td style='background-color: $*metabar_bgcolor' class='metabar'>&nbsp;</td>";
  860. "<td style='width: 100%'>";
  861. "<div style='margin-left: $*global_comments_indent;'>";
  862. if ($.comment_pages.total_subitems > 0) {
  863. $.comment_pages->print();
  864. $this->print_comments($.comments);
  865. $.comment_pages->print();
  866. }
  867. "</div>";
  868. "</td></tr>";
  869. if ($this.multiform_on) {
  870. "<tr valign='top'><th class='headerbar' colspan='2'>Mass Action</th></tr>";
  871. "<tr valign='top'>";
  872. "<td style='background-color: $*metabar_bgcolor' class='metabar'>&nbsp;</td>";
  873. "<td style='width: 100%' colspan='2'>";
  874. $this->print_multiform_actionline();
  875. $this->print_multiform_end();
  876. "</td></tr>";
  877. }
  878. }
  879. "</table>\n";
  880. }
  881.  
  882. function EntryPage::print_comment (Comment c) {
  883. var Color background; var Color color;
  884. if ($c.screened) {
  885. $background = $*comment_bar_screened_bgcolor;
  886. $color = $*comment_bar_screened_fgcolor;
  887. } elseif ($c.depth % 2) {
  888. $background = $*comment_bar_one_bgcolor;
  889. $color = $*comment_bar_one_fgcolor;
  890. } else {
  891. $background = $*comment_bar_two_bgcolor;
  892. $color = $*comment_bar_two_fgcolor;
  893. }
  894. var string poster = defined $c.poster ? $c.poster->as_string() : "<i>(Anonymous)</i>";
  895. var string sub_icon;
  896. if (defined $c.subject_icon) {
  897. $sub_icon = $c.subject_icon->as_string();
  898. }
  899. "<a name='$c.anchor'></a><div id='cmtbar$c.talkid' style='background-color: $background; color: $color; margin-top: 10px; width: 100%'>";
  900. "<table cellpadding='2' cellspacing='0' summary='0' style='width: 100%'><tr valign='top'>";
  901. if (defined $c.userpic and $*comment_userpic_style != "off") {
  902. var int w = $c.userpic.width;
  903. var int h = $c.userpic.height;
  904. # WARNING: this will later be done by the system (it'll be a
  905. # constructional property), so don't copy this hack into your
  906. # layout layers or you'll be messed up later.
  907. $w = $w * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
  908. $h = $h * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
  909. print "<td style='width: 102px'><img class='ljr_userpic' src='$c.userpic.url' width='$w' height='$h' alt='[User Picture]' /></td>";
  910. }
  911.  
  912. "<td style='width: 100%'><table style='width: 100%'><tr>";
  913.  
  914. ### From, date, etc
  915. "<td align='left' style='width: 70%'>";
  916. print "<table cellpadding='2' cellspacing='0'>";
  917. print "<tr><td>$poster</td></tr>\n";
  918. ### print "<tr><td style='white-space: nowrap; font-size: small'>";
  919. print "<tr><td style='font-size: small'>";
  920. print $c.time->date_format("long") + " " + $c.time->time_format() + " " + "(<a href='$c.permalink_url'>Link</a>)" + "</td></tr>";
  921. if ($c.metadata{"poster_ip"}) { print "<tr><td>(" + $c.metadata{"poster_ip"} + ")</td></tr>"; }
  922. "</table></td>";
  923.  
  924. ### Gadgets
  925. "<td align='right' style='width: 50%'>";
  926. if ($this.multiform_on) {
  927. " <label for='ljcomsel_$c.talkid'>$*text_multiform_check</label>";
  928. $c->print_multiform_check();
  929. }
  930. $c->print_linkbar();
  931. "</td></tr>";
  932.  
  933. # ### Subject / icon
  934. # print "<tr valign='top'><td style='width: 50%'>";
  935. # print (defined $c.subject_icon or $c.subject != "") ? "<div style='font-size: smaller; font-weight: bold'>$c.subject_icon $c.subject</div>" : "";
  936. # print "</td>";
  937.  
  938. print "</table></td></tr></table></div>";
  939. print "<div class='CommentText'>";
  940. print (defined $c.subject_icon or $c.subject != "") ? "<div class='subject'>$c.subject_icon $c.subject</div>" : "";
  941. print "$c.text";
  942. print "</div>";
  943. print "<div style='margin-top: 3px; font-size: small'>";
  944. if ($c.frozen) {
  945. print "(Replies frozen) ";
  946. } else {
  947. print "(<a href='$c.reply_url'>Reply to this</a>) ";
  948. }
  949. if ($c.parent_url != "") { "(<a href='$c.parent_url'>Parent</a>) "; }
  950. if ($c.thread_url != "") { "(<a href='$c.thread_url'>Thread</a>) "; }
  951. "</div>";
  952. }
  953.  
  954. function ReplyPage::print_body()
  955. {
  956. "<table class='bigtable'>\n";
  957. if (not $.entry.comments.enabled) {
  958. print "<tr><th class='headerbar'>$*text_reply_nocomments_header</th></tr><tr><td>$*text_reply_nocomments</td></tr></table>";
  959. return;
  960. }
  961. var string time = $.replyto.time->time_format();
  962. var string userpic = "";
  963. if (defined $.replyto.userpic)
  964. {
  965. $userpic = "<img class='ljr_userpic' src='$.replyto.userpic.url' />";
  966. }
  967. ### "<tr><th class='headerbar'>Time</td><th class='headerbar' style='width: 100%'>Text</th></tr>";
  968. "<tr><th class='smallheaderbar'>Time</th><th class='headerbar' style='width: 100%'>Text</th></tr>";
  969. ### "<tr><th class='headerbar' colspan='2'>Comment</th></tr>";
  970. "<tr valign='top'>";
  971.  
  972. # Metabar
  973. "<td style='background-color: $*metabar_bgcolor;' class='metabar'>";
  974. # Time
  975. ### "<em>$time</em><br />";
  976. "<em style='font-family: sans-serif; font-size: small;'>$time</em><br />";
  977. if ($userpic)
  978. {
  979. print $userpic + "<br />\n";
  980. }
  981. print defined $.replyto.poster ? $.replyto.poster->as_string() : "<i>(Anonymous)</i>";
  982. # Permalink
  983. "<p style='font-size: small'>[<a href='$.replyto.permalink_url'>$*text_permalink</a>]</p>";
  984. "</td>";
  985.  
  986. # Text
  987. "<td style='text-align:left; width:100%;'>";
  988. "<div class='entry_content'>";
  989. if ($.replyto.subject != "") { "\n\n<span class='subject'>$.replyto.subject</span><br />"; }
  990. print $.replyto.text; "\n\n";
  991. "</div>";
  992.  
  993. "</td></tr>\n";
  994. "<div align='center'><a href='$.entry.comments.read_url'>( Read Comments )</a></div>";
  995. "<tr valign='top'><th class='headerbar' colspan='2'>Reply:</th></tr>";
  996. "<tr valing='top'>";
  997. "<td style='background-color: $*metabar_bgcolor'>";
  998. "&nbsp;";
  999. "</td>";
  1000. "<td>";
  1001. $.form->print();
  1002. "</td>";
  1003. "</tr></table>";
  1004. }
  1005.  
  1006. function print_theme_preview ()
  1007. {
  1008.  
  1009. """
  1010. <style type="text/css">
  1011. a.previewlink, a.previewlink:link {
  1012. color: #000050;
  1013. }
  1014. a.previewlink:vlink {
  1015. color: #500050;
  1016. }
  1017. a.previewlink:alink {
  1018. color: #ff00c0;
  1019. }
  1020. a.previewlink:visited {
  1021. color: #500050;
  1022. }
  1023. a.previewlink:active {
  1024. color: #ff00c0;
  1025. }
  1026. table.bigtable {
  1027. width: 100%;
  1028. border: 0;
  1029. margin-top: 5px;
  1030. margin-bottom: 5px;
  1031. }
  1032. table.bigtablesmall {
  1033. width: 100%;
  1034. border: 0;
  1035. }
  1036. .entry_content {
  1037. margin-left: 2px;
  1038. }
  1039. .entry_content img {
  1040. max-width: 100%;
  1041. max-height: 5000px;
  1042. }
  1043. .page_title {
  1044. color: #8b1a1a;
  1045. font-size: x-large;
  1046. font-family: sans-serif;
  1047. }
  1048. .view_links {
  1049. font-family: monospace;
  1050. white-space: nowrap;
  1051. font-size: medium;
  1052. }
  1053. .view_links2 {
  1054. font-family: monospace;
  1055. font-size: medium;
  1056. }
  1057. th.headerbar {
  1058. background-color: #c0c0ff;
  1059. color: #000000;
  1060. font-weight: bold;
  1061. font-size: large;
  1062. text-align: left;
  1063. font-family: sans-serif;
  1064. width: 100%;
  1065. }
  1066. th.smallheaderbar {
  1067. background-color: #c0c0ff;
  1068. color: #000000;
  1069. font-weight: bold;
  1070. font-size: large;
  1071. text-align: left;
  1072. font-family: sans-serif;
  1073. }
  1074. td.metabar {
  1075. text-align: center;
  1076. white-space: nowrap;
  1077. width: 1%;
  1078. background-color: #eeeeff;
  1079. color: #000000;
  1080. }
  1081. .subject {
  1082. color: #c00000;
  1083. font-weight: bold;
  1084. font-family: sans-serif;
  1085. font-style: italic;
  1086. }
  1087. #yearheader {
  1088. color: #c00000;
  1089. font-weight: bold;
  1090. font-style: italic;
  1091. font-size: large;
  1092. }
  1093. th.monthheader {
  1094. background-color: #c0c0ff;
  1095. font-size: large;
  1096. }
  1097. th.daysheader {
  1098. background-color: #eeeeff;
  1099. font-weight: normal;
  1100. }
  1101. td.weekday_empty {
  1102. background-color: #eeeeff;
  1103. }
  1104. .day_id {
  1105. font-weight: bold;
  1106. font-size: small;
  1107. }
  1108. </style>
  1109.  
  1110. <table style="background-color: #6666cc" width="100%"><tbody><tr><td>
  1111. <table style="background-color: #ffffff; color: #000000; max-width: 100%; border: 0px solid #c0c0ff; padding: 2px; width: 100%;">
  1112. <tr>
  1113. <td class="borderless" colspan="3">
  1114. </td>
  1115. </tr>
  1116. <tr>
  1117. <td class="borderless" colspan="3">
  1118. <table class="bigtablesmall">
  1119. <tr>
  1120. <td class="borderless" style="width: 0; font-size: 0;">
  1121. </td>
  1122. <td class="borderless">
  1123. <img class="ljr_userpic" align="right" style="padding: 0;" src="" width="100" height="100" alt="" />
  1124. <span class="page_title">John Doe</span>
  1125. <font size="1"><br /><br /></font>
  1126. <span class="view_links">[Recent Entries][<a class="previewlink" href="">Archive</a>][<a class="previewlink" href="">Friends</a>][<a class="previewlink" href="">User Info</a>]</span>
  1127. <br /><span class="view_links2">
  1128. [<a class="previewlink" href="">Link 1</a>]
  1129. [<a class="previewlink" href="">Link 2</a>]
  1130. [<a class="previewlink" href="">Link 3</a>]
  1131. [<a class="previewlink" href="">Link 4</a>]
  1132. [<a class="previewlink" href="">Link 5</a>]
  1133. [<a class="previewlink" href="">Link 6</a>]
  1134. [<a class="previewlink" href="">Link 7</a>]
  1135. [<a class="previewlink" href="">Link 8</a>]
  1136.  
  1137. <p>Below are the 20 most recent journal entries recorded in the "<a class="previewlink" href="">John Doe</a>" journal:</p>
  1138. <td class="borderless" style="width: 0; font-size: 0;">
  1139. </td>
  1140. </td>
  1141. </tr>
  1142. </table>
  1143. </td>
  1144. </tr>
  1145. <tr>
  1146. <td class="borderless" colspan="3">
  1147. </td>
  1148. </tr>
  1149. <tr>
  1150. <td class="borderless" style="width: 30px; font-size: 0;">
  1151. </td>
  1152. <td class="borderless">
  1153. <p align="center">[<a class="previewlink" href="">&lt;&lt; Previous 20 entries</a>]</p>
  1154. <table class="bigtable">
  1155. <tr>
  1156. <th colspan="2" align="left" class="headerbar">Friday, November 15th, 2002</th>
  1157. </tr>
  1158. <tr valign="top">
  1159. <td rowspan="2" style="background-color: #e5e4e2" class="metabar">
  1160. <em style="font-family: sans-serif; font-size: small">22:21</em>
  1161. <br />
  1162. <p style="font-size: small">[<a class="previewlink" href="">Link</a>]</p>
  1163. </td>
  1164. <td style="text-align:left; width:100%;">
  1165. <div class="entry_content">
  1166.  
  1167. <span class="subject">Neque porro quisquam est…</span>
  1168. <br />
  1169. Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur,
  1170. adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet,
  1171. consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia
  1172. dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem
  1173. ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est
  1174. qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro
  1175. quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit
  1176.  
  1177. </div>
  1178. </td>
  1179. </tr>
  1180. <tr valign="bottom">
  1181. <td>
  1182. <p style="text-align: right; font-size: small;">(<a class="previewlink" href="">10 comments</a>&nbsp;|&nbsp;<a class="previewlink" href="">Leave a comment</a>)</p>
  1183. </td>
  1184. </tr>
  1185. </table>
  1186. </td>
  1187. <td class="borderless" style="width: 0px; font-size: 0;">
  1188. </td>
  1189. </tr>
  1190. </table>
  1191. </td></tr></tbody></table>
  1192. """;
  1193. }
  1194.  
  1195.  
  1196.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement