Advertisement
Guest User

Untitled

a guest
Dec 28th, 2011
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 72.02 KB | None | 0 0
  1. # -----------------------------------
  2. # LAYER INFO
  3. # -----------------------------------
  4. layerinfo type = "layout";
  5. layerinfo name = "Flexible Squares";
  6. layerinfo lang = "en";
  7. layerinfo author_name = "Yati Mansor";
  8. layerinfo redist_uniq = "flexiblesquares/layout";
  9. layerinfo previews = "flexiblesquares/layout.jpg";
  10.  
  11. # -----------------------------------
  12. # PROPGROUPS
  13. # -----------------------------------
  14.  
  15. ### PRESENTATION
  16. propgroup presentation
  17. {
  18. property use page_recent_items;
  19. property use page_friends_items;
  20. property use view_entry_disabled;
  21. property bool show_entry_userpic
  22. {
  23. des = "Show user picture icons with each of your entries?";
  24. }
  25. property string userpic_position
  26. {
  27. des = "Set the user picture position for each entry";
  28. values = "left|Left|right|Right";
  29. }
  30. property bool use_friends_colours
  31. {
  32. des = "Use friends colors when viewing Friends page";
  33. }
  34. set show_entry_userpic = true;
  35. set userpic_position = "left";
  36. set use_friends_colours = true;
  37. property use use_shared_pic;
  38. property string page_alignment
  39. {
  40. des = "Set page alignment";
  41. values= "right|Right|center|Center|left|Left";
  42. }
  43. set page_alignment = "center";
  44. property int journal_width
  45. {
  46. des = "Journal width";
  47. note = "Journal width can be set in either percentage of the browser window or in pixels (see next option)";
  48. min = 1;
  49. }
  50. property string journal_width_unit
  51. {
  52. des = "Unit of journal width";
  53. note = "Journal width can be set either in percentage of the browser window or in pixels";
  54. values = "%|%|px|px";
  55. }
  56. set journal_width = 80;
  57. set journal_width_unit = "%";
  58. property use custom_control_strip_colors;
  59. }
  60.  
  61. ### COLOURS
  62. propgroup colors
  63. {
  64. property Color page_bgcolor
  65. {
  66. des = "Background color for the page";
  67. }
  68. property Color page_fgcolor
  69. {
  70. des = "Text color for the page";
  71. }
  72. property Color content_bgcolor
  73. {
  74. des = "Background color for box containing the main contents of the page";
  75. }
  76.  
  77. property Color outer_table_bgcolor
  78. {
  79. des = "Background color of the outer table";
  80. }
  81.  
  82. property Color entry_bgcolor
  83. {
  84. des = "Background color of the entries";
  85. }
  86. property Color entry_fgcolor
  87. {
  88. des = "Text color of the entries";
  89. }
  90. property Color border_color
  91. {
  92. des = "Border color of the content and header/footer boxes";
  93. }
  94.  
  95. property Color entrytitle_bgcolor
  96. {
  97. des = "Background color of the subject, date and comment links";
  98. }
  99.  
  100. property Color sidebar_header_bgcolor
  101. {
  102. des = "Background color for the headers in the sidebar";
  103. }
  104.  
  105. property Color sidebar_fgcolor
  106. {
  107. des = "Text color for the sidebar";
  108. }
  109.  
  110. property Color header_footer_bgcolor
  111. {
  112. des = "Background color of the header and footer";
  113. }
  114.  
  115. property Color header_footer_fgcolor
  116. {
  117. des = "Text color for the header and footer";
  118. }
  119.  
  120. property Color subject_fgcolor
  121. {
  122. des = "Text color for the subject of the entries";
  123. }
  124.  
  125. property Color date_fgcolor
  126. {
  127. des = "Text color for the date of the entries";
  128. }
  129.  
  130. set page_bgcolor = "#99AECE";
  131. set page_fgcolor = "#000000";
  132. set content_bgcolor = "#C2CDE0";
  133. set entry_bgcolor = "#D4DCE8";
  134. set entry_fgcolor = "#000000";
  135. set border_color = "#999999";
  136. set entrytitle_bgcolor = "#919BAD";
  137. set outer_table_bgcolor = "#A9B3C4";
  138. set sidebar_fgcolor = "#000000";
  139. set sidebar_header_bgcolor = "#919BAD";
  140. set header_footer_bgcolor = "#D4DCE8";
  141. set header_footer_fgcolor = "#000000";
  142. set subject_fgcolor = "#000000";
  143. set date_fgcolor = "#000000";
  144.  
  145. property Color link_color
  146. {
  147. des = "Link color for both visited and unvisited links";
  148. }
  149.  
  150. property Color link_hover_color
  151. {
  152. des = "Link color on hover";
  153. }
  154.  
  155. property Color comments_link_color
  156. {
  157. des = "Link color for visited and unvisited comment links";
  158. }
  159.  
  160. property Color comments_link_hover
  161. {
  162. des = "Link color for comment links on hover";
  163. }
  164.  
  165. property Color sidebar_link_color
  166. {
  167. des = "Link color for visited and unvisited sidebar links";
  168. }
  169.  
  170. property Color sidebar_link_hover
  171. {
  172. des = "Link color for sidebar links on hover";
  173. }
  174.  
  175. property Color header_footer_link_color
  176. {
  177. des = "Link color for visited and unvisited links for the header and footer";
  178. }
  179.  
  180. property Color header_footer_link_hover
  181. {
  182. des = "Link color for comment links on hover for the header and footer";
  183. }
  184.  
  185. property use control_strip_bgcolor;
  186. property use control_strip_fgcolor;
  187. property use control_strip_bordercolor;
  188. property use control_strip_linkcolor;
  189.  
  190. set link_color = "#5674B9";
  191. set link_hover_color = "#7AA1F8";
  192. set comments_link_color = "#FFFFFF";
  193. set comments_link_hover = "#B0B9C8";
  194. set sidebar_link_color = "#5674B9";
  195. set sidebar_link_hover = "#7AA1F8";
  196. set header_footer_link_color = "#5674B9";
  197. set header_footer_link_hover = "#7AA1F8";
  198. }
  199.  
  200. ### FONTS
  201. propgroup fonts
  202. {
  203. property string font_unit
  204. {
  205. des = "Font unit";
  206. values = "pt|Points|px|Pixels|em|Em";
  207. }
  208. set font_unit = "px";
  209. property string main_font
  210. {
  211. des = "Preferred/base font";
  212. maxlength = 25;
  213. size = 10;
  214. example = "Tahoma";
  215. note = "Leave blank for your browser's default font";
  216. }
  217. property string main_font_fallback
  218. {
  219. des = "Alternative font style";
  220. values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default";
  221. note = "This general style will serve as a fallback if your preferred font is unavailable.";
  222. }
  223. property string main_font_size
  224. {
  225. des = "Base font size";
  226. }
  227. set main_font = "Verdana";
  228. set main_font_fallback = "sans-serif";
  229. set main_font_size= "11";
  230. property string content_font
  231. {
  232. des = "Font for the entry/date/entry subject";
  233. maxlength = 25;
  234. size = 10;
  235. example = "Verdana";
  236. note = "Leave blank for your browser's default font";
  237. }
  238. property string content_font_fallback
  239. {
  240. des = "Alternative font style";
  241. values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default";
  242. note = "This general style will serve as a fallback if your preferred font is unavailable.";
  243. }
  244. property string content_font_size
  245. {
  246. des = "Entry/date/subject font size";
  247. }
  248. property string date_font_size
  249. {
  250. des = "Date font size";
  251. }
  252. property string subject_font_size
  253. {
  254. des = "Subject font size";
  255. }
  256. set content_font = "Verdana";
  257. set content_font_fallback = "sans-serif";
  258. set content_font_size= "11";
  259. set date_font_size= "11";
  260. set subject_font_size= "11";
  261.  
  262.  
  263. property string sidebar_font
  264. {
  265. des = "Font for the sidebar";
  266. maxlength = 25;
  267. size = 10;
  268. example = "Verdana";
  269. note = "Leave blank for your browser's default font";
  270. }
  271. property string sidebar_font_fallback
  272. {
  273. des = "Alternative font style";
  274. values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default";
  275. note = "This general style will serve as a fallback if your preferred font is unavailable.";
  276. }
  277. property string sidebar_font_size
  278. {
  279. des = "Sidebar font size";
  280. }
  281.  
  282. set sidebar_font = "Verdana";
  283. set sidebar_font_fallback = "sans-serif";
  284. set sidebar_font_size= "11";
  285.  
  286. property string header_footer_font
  287. {
  288. des = "Font for the header and footer";
  289. maxlength = 25;
  290. size = 10;
  291. example = "Verdana";
  292. note = "Leave blank for your browser's default font";
  293. }
  294. property string header_footer_font_fallback
  295. {
  296. des = "Alternative font style";
  297. values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default";
  298. note = "This general style will serve as a fallback if your preferred font is unavailable.";
  299. }
  300. property string header_footer_font_size
  301. {
  302. des = "Header and footer font size";
  303. }
  304.  
  305. set header_footer_font = "Verdana";
  306. set header_footer_font_fallback = "sans-serif";
  307. set header_footer_font_size= "11";
  308.  
  309. property string title_font
  310. {
  311. des = "Font for the title and subtitle";
  312. maxlength = 25;
  313. size = 10;
  314. example = "Verdana";
  315. note = "Leave blank for your browser's default font";
  316. }
  317. property string title_font_fallback
  318. {
  319. des = "Alternative font style";
  320. values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default";
  321. note = "This general style will serve as a fallback if your preferred font is unavailable.";
  322. }
  323. property string title_font_size
  324. {
  325. des = "Title font size";
  326. }
  327. property string subtitle_font_size
  328. {
  329. des = "Subtitle font size";
  330. }
  331. set title_font = "Verdana";
  332. set title_font_fallback = "sans-serif";
  333. set title_font_size= "11";
  334. set subtitle_font_size= "11";
  335. }
  336.  
  337. ### IMAGES
  338. propgroup images
  339. {
  340. property string page_background_image
  341. {
  342. des = "Background image URL";
  343. note = "URL to an image to be used for the page background (leave blank for none).";
  344. }
  345. property string page_background_repeat
  346. {
  347. des = "Background image repeat";
  348. values = "repeat|Repeat|no-repeat|Don't repeat|repeat-x|Repeat across only|repeat-y|Repeat down only";
  349. }
  350. property string page_background_position
  351. {
  352. des = "Background image position";
  353. note = "Does not apply if background image is repeating in both directions.";
  354. values = "center|Center|center left|Center-left|center right|Center-right|top|Top|top left|Top-left|top right|Top-right|bottom|Bottom|bottom left|Bottom-left|bottom right|Bottom-right|left|Left|right|Right";
  355. }
  356. property string page_background_scrolling
  357. {
  358. des = "Background image scrolling";
  359. note = "Not supported in all browsers, but allows for the background image to be in a fixed position when scrolling.";
  360. values = "scroll|Scroll|fixed|Fixed";
  361. }
  362. set page_background_image = "";
  363. set page_background_repeat = "repeat";
  364. set page_background_position = "center";
  365. set page_background_scrolling = "scroll";
  366. }
  367.  
  368. ### TEXT
  369. propgroup text
  370. {
  371. property use text_meta_music;
  372. property use text_meta_mood;
  373. property use text_meta_location;
  374.  
  375. property use text_post_comment;
  376. property use text_read_comments;
  377. property use text_post_comment_friends;
  378. property use text_read_comments_friends;
  379.  
  380. property use text_website_default_name;
  381. property use text_view_recent;
  382. property use text_view_friends;
  383. property use text_view_userinfo;
  384. property use text_view_archive;
  385. set text_view_archive = "Archive";
  386. set text_view_friends = "Friends";
  387. set text_view_recent = "Recent Entries";
  388. set text_view_userinfo = "User Info";
  389. set text_website_default_name = "Website";
  390.  
  391. property use text_nosubject;
  392. property string text_edit
  393. {
  394. des = "Text for an entry's edit link";
  395. }
  396. property string text_edit_tags
  397. {
  398. des = "Text for an entry's edit tags link";
  399. }
  400. property string text_memories
  401. {
  402. des = "Text to add an entry to the memories";
  403. }
  404. property use text_tell_friend;
  405.  
  406. property string text_track
  407. {
  408. des = "Text to track new comments on an entry";
  409. }
  410. property string text_untrack
  411. {
  412. des = "Text to stop tracking new comments on an entry";
  413. }
  414. property string text_previous_entry
  415. {
  416. des = "Text to link to the previous entry";
  417. }
  418. property string text_next_entry
  419. {
  420. des = "Text to link to the next entry";
  421. }
  422. set text_nosubject = "(no subject)";
  423. set text_permalink = "Link";
  424. set text_edit = "Edit";
  425. set text_edit_tags = "Tag";
  426. set text_memories = "Memories";
  427. set text_track = "Track";
  428. set text_untrack = "Untrack";
  429. set text_next_entry = "Next";
  430. set text_previous_entry = "Previous";
  431.  
  432. property use text_skiplinks_back;
  433. property use text_skiplinks_forward;
  434. set text_skiplinks_back = "go earlier";
  435. set text_skiplinks_forward = "go later";
  436. }
  437.  
  438. ### SIDEBAR
  439. propgroup sidebar
  440. {
  441. property bool show_sidebar
  442. {
  443. des = "Show the sidebar?";
  444. }
  445. set show_sidebar = true;
  446. property string sidebar_position
  447. {
  448. des="Set sidebar position";
  449. values="left|Left|right|Right";
  450. }
  451. set sidebar_position="right";
  452. property bool show_default_userpic
  453. {
  454. des = "Show the default user picture on the sidebar?";
  455. }
  456. set show_default_userpic = true;
  457. property bool show_blurb
  458. {
  459. des = "Show the blurb/free text in the sidebar?";
  460. }
  461. property string text_sidebar_blurb
  462. {
  463. des = "Title of the blurb sidebar box";
  464. }
  465. property string sidebar_blurb {
  466. des = "Text to be added to the sidebar";
  467. note = "Appears in the sidebar 'Blurb'";
  468. rows = 10;
  469. cols = 25;
  470. string_mode = "html";
  471. }
  472. set show_blurb = true;
  473. set text_sidebar_blurb = "Blurb";
  474. property bool show_linklist
  475. {
  476. des = "Show the link list in the sidebar?";
  477. }
  478. property string text_sidebar_links
  479. {
  480. des = "Title of the links sidebar box";
  481. }
  482. set show_linklist = true;
  483. set text_sidebar_links = "Links";
  484. property bool show_tags
  485. {
  486. des = "Show tags in the sidebar?";
  487. }
  488. property string sidebar_tags_display
  489. {
  490. des = "Display of tags in the sidebar";
  491. values = "cloud|Cloud|list|List";
  492. }
  493. property string text_sidebar_tags {
  494. des = "Title of the tags sidebar box";
  495. }
  496. set show_tags = false;
  497. set sidebar_tags_display = "list";
  498. set text_sidebar_tags = "Tags";
  499. property bool show_summary
  500. {
  501. des = "Show the page summary in the sidebar?";
  502. }
  503. property string text_sidebar_summary
  504. {
  505. des = "Title of the page summary sidebar box";
  506. }
  507. set show_summary = false;
  508. set text_sidebar_summary = "Page Summary";
  509. property bool show_calendar
  510. {
  511. des = "Show the calendar in the sidebar?";
  512. }
  513. set show_calendar = true;
  514. property int sidebar_width
  515. {
  516. des = "Set sidebar width, in pixels";
  517. min = 0;
  518. }
  519. set sidebar_width = 160;
  520. property string sidebar_order_1
  521. {
  522. des = "First box in the sidebar";
  523. values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
  524. }
  525. property string sidebar_order_2
  526. {
  527. des = "Second box in the sidebar";
  528. values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
  529. }
  530. property string sidebar_order_3
  531. {
  532. des = "Third box in the sidebar";
  533. values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
  534. }
  535. property string sidebar_order_4
  536. {
  537. des = "Fourth box in the sidebar";
  538. values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
  539. }
  540. property string sidebar_order_5
  541. {
  542. des = "Fifth box in the sidebar";
  543. values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
  544. }
  545. property string sidebar_order_6
  546. {
  547. des = "Sixth box in the sidebar";
  548. values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
  549. }
  550. set sidebar_order_1 = "userpic";
  551. set sidebar_order_2 = "blurb";
  552. set sidebar_order_3 = "linklist";
  553. set sidebar_order_4 = "calendar";
  554. set sidebar_order_5 = "tags";
  555. set sidebar_order_6 = "summary";
  556. }
  557.  
  558. ### CUSTOM CSS
  559. propgroup customcss
  560. {
  561. property use include_default_stylesheet;
  562. property bool include_default_stylesheet_with_linked
  563. {
  564. des = "Use layout's stylesheet(s) when including custom external stylesheet";
  565. note = "This option will have no effect unless the \"Use external stylesheets\" option is turned on and a custom external stylesheet URL has been provided. It will override the previous option's setting.";
  566. }
  567. property bool external_stylesheet
  568. {
  569. des = "Use external stylesheets";
  570. }
  571. property string external_stylesheet_url
  572. {
  573. des = "Custom external stylesheet URL";
  574. note = "If you have a custom external stylesheet that you'd like to use, enter its URL here. Be sure to select \"Yes\" in the above option.";
  575. }
  576. property use custom_css;
  577.  
  578. set include_default_stylesheet_with_linked = false;
  579. set external_stylesheet = true;
  580. set external_stylesheet_url = "";
  581. }
  582.  
  583.  
  584. function prop_init () {
  585. if ($*control_strip_bgcolor.as_string == "") {
  586. $*control_strip_bgcolor = $*entry_bgcolor;
  587. }
  588. if ($*control_strip_fgcolor.as_string == "") {
  589. $*control_strip_fgcolor = $*entry_fgcolor;
  590. }
  591. if ($*control_strip_bordercolor.as_string == "") {
  592. $*control_strip_bordercolor = $*border_color;
  593. }
  594. if ($*control_strip_linkcolor.as_string == "") {
  595. $*control_strip_linkcolor = $*link_color;
  596. }
  597.  
  598. $*theme_bgcolor = $*entry_bgcolor;
  599. $*theme_fgcolor = $*entry_fgcolor;
  600. $*theme_bordercolor = $*entrytitle_bgcolor;
  601. $*theme_linkcolor = $*link_color;
  602. }
  603.  
  604. # -----------------------------------
  605. # STYLESHEET
  606. # -----------------------------------
  607.  
  608.  
  609. function css_font_family(string base, string fallback) : string
  610. {
  611. var string return;
  612. if ($base != "" or $fallback != "none") {
  613. $return = $return + "font-family: ";
  614. if ($base != "") {
  615. $return = $return + "\"$base\"";
  616. if ($fallback != "none") {
  617. $return = $return + ", ";
  618. }
  619. }
  620. if ($fallback != "none") {
  621. $return = $return + $fallback;
  622. }
  623. }
  624. return $return;
  625. }
  626.  
  627. function print_stylesheet ()
  628. {
  629. var string body_font_family = css_font_family($*main_font, $*main_font_fallback);
  630. var string content_font_family = css_font_family($*content_font, $*content_font_fallback);
  631. var string sidebar_font_family = css_font_family($*sidebar_font, $*sidebar_font_fallback);
  632. var string header_footer_font_family = css_font_family($*header_footer_font, $*header_footer_font_fallback);
  633. var string title_font_family = css_font_family($*title_font, $*title_font_fallback);
  634. var string body_background = "";
  635. if (clean_url($*page_background_image) != "") {
  636. $body_background = """
  637. background-image: url("$*page_background_image");
  638. background-repeat: $*page_background_repeat;
  639. background-position: $*page_background_position;
  640. background-attachment: $*page_background_scrolling;
  641. """;
  642. }
  643.  
  644. var string page_align = "";
  645. var string body_align = "";
  646. if ($*page_alignment == "left")
  647. {
  648. $page_align = "margin-left: 20px; margin-right: auto";
  649. }
  650. if ($*page_alignment == "right")
  651. {
  652. $page_align = "margin-left: auto; margin-right: 20px";
  653. $body_align = "text-align: right";
  654. }
  655. if ($*page_alignment == "center")
  656. {
  657. $page_align = "margin-left: auto; margin-right: auto";
  658. $body_align = "text-align: center";
  659. }
  660.  
  661. var string maincontent_prop = "";
  662. var string sidebar_prop = "";
  663. var int float_margin = $*sidebar_width + 20;
  664. if (($*show_sidebar or viewer_sees_vbox()) and $*sidebar_position == "right")
  665. {
  666. $maincontent_prop = "margin-right: ${float_margin}px;";
  667. $sidebar_prop = "float: right;";
  668.  
  669. }
  670.  
  671. if (($*show_sidebar or viewer_sees_vbox()) and $*sidebar_position == "left")
  672. {
  673. $maincontent_prop = "margin-left: ${float_margin}px;";
  674. $sidebar_prop = "float: left;";
  675. }
  676. if (not $*show_sidebar and not viewer_sees_vbox())
  677. {
  678. $maincontent_prop = "";
  679. }
  680.  
  681. var string sidebar_pos = "";
  682. if ($*sidebar_position == "left")
  683. {
  684. $sidebar_pos = "clear: right";
  685. }
  686. if ($*sidebar_position == "right")
  687. {
  688. $sidebar_pos = "clear: left";
  689. }
  690.  
  691. print """
  692.  
  693. body {
  694. background-color: $*page_bgcolor;
  695. $body_background
  696. $body_align;
  697. color: $*page_fgcolor;
  698. $body_font_family;
  699. font-size: $*main_font_size$*font_unit;
  700. margin: 20px 0 20px 0;
  701. }
  702.  
  703. a, a:link, a:visited {
  704. color: $*link_color;
  705. text-decoration: none;
  706. }
  707.  
  708. a:hover {
  709. color: $*link_hover_color;
  710. text-decoration: underline;
  711. }
  712.  
  713. p, td, blockquote {
  714. font-size: $*content_font_size$*font_unit;
  715. }
  716.  
  717. code, kbd, pre, tt {
  718. font-family: monospace;
  719. }
  720.  
  721. #content
  722. {
  723. width: $*journal_width$*journal_width_unit;
  724. $page_align;
  725. background-color: $*outer_table_bgcolor;
  726. border-width: 1px;
  727. border-style: solid;
  728. border-color: $*border_color;
  729. padding: 15px;
  730. }
  731.  
  732. #maincontent {
  733. margin-top: 15px;
  734. $content_font_family;
  735. font-size: $*content_font_size$*font_unit;
  736. background-color: $*content_bgcolor;
  737. color: $*page_fgcolor;
  738. border-style: solid;
  739. border-color: $*border_color;
  740. border-width: 1px;
  741. $maincontent_prop
  742. text-align: left;
  743. }
  744.  
  745. #sidebar {
  746.  
  747. padding-top: 15px;
  748. margin-top: 15px;
  749. background-color: $*content_bgcolor;
  750. border-color: $*border_color;
  751. border-width: 1px;
  752. border-style: solid;
  753. font-size: $*sidebar_font_size$*font_unit;
  754. $sidebar_font_family;
  755. color: $*sidebar_fgcolor;
  756. width: ${*sidebar_width}px;
  757. $sidebar_prop
  758. text-align: left;
  759. }
  760.  
  761. #header {
  762. padding: 10px 0px 20px 0px;
  763. margin: 0px;
  764. text-align: center;
  765. $header_footer_font_family;
  766. font-size: $*header_footer_font_size$*font_unit;
  767. font-weight: bold;
  768. letter-spacing: 2px;
  769. border-style: solid;
  770. border-color: $*border_color;
  771. border-width: 1px;
  772. background-color: $*header_footer_bgcolor;
  773. color: $*header_footer_fgcolor;
  774. }
  775.  
  776. #footer {
  777. text-align: center;
  778. $header_footer_font_family;
  779. font-size: $*header_footer_font_size$*font_unit;
  780. font-weight: bold;
  781. letter-spacing: 1px;
  782. background-color: $*header_footer_bgcolor;
  783. color: $*header_footer_fgcolor;
  784. border-color: $*border_color;
  785. border-width: 1px;
  786. border-style: solid;
  787. z-index: 100;
  788. clear: both;
  789. }
  790.  
  791. /* header -- links to views; title of journal; subtitle of journal */
  792.  
  793. div#header a, div#header a:link, div#header a:visited, div#footer a, div#footer a:link, div#footer a:visited {
  794. color: $*header_footer_link_color;
  795. }
  796.  
  797. div#header a:hover, div#footer a:hover {
  798. color: $*header_footer_link_hover;
  799. text-decoration: none;
  800. }
  801.  
  802. ul.navheader
  803. {
  804. padding: 0px;
  805. margin: 0px;
  806. }
  807.  
  808. ul.navheader li {
  809. display: inline;
  810. padding: 0 3px 0 3px;
  811. }
  812.  
  813. .title {
  814. $title_font_family;
  815. font-size: $*title_font_size$*font_unit;
  816. font-weight: normal;
  817. line-height: 200%;
  818. top: 10px;
  819. }
  820.  
  821. .subtitle{
  822. $title_font_family;
  823. font-size: $*subtitle_font_size$*font_unit;
  824. font-weight: normal;
  825. top: 10px;
  826. }
  827.  
  828.  
  829. /* sidebar */
  830.  
  831. div#sidebar a, div#sidebar a:link, div#sidebar a:visited{
  832. color: $*sidebar_link_color;
  833. }
  834.  
  835. div#sidebar a:hover {
  836. color: $*sidebar_link_hover;
  837. text-decoration: none;
  838. }
  839.  
  840. .defaultuserpic {
  841. text-align: center;
  842. }
  843.  
  844. .sbarheader {
  845. padding: 0px 5px 0px 5px;
  846. }
  847.  
  848. .sbarbody {
  849. padding: 0px 5px 0px 5px;
  850. }
  851.  
  852. .sbarbody2 {
  853. padding: 0 15px 0 15px;
  854. }
  855.  
  856. #sidebar_summary li.sbaritem {
  857. margin: 0 10px;
  858. padding: 3px 0;
  859. border-bottom: 1px $*border_color solid;
  860. }
  861.  
  862. table.calendar {
  863. margin-right: auto;
  864. margin-left: auto;
  865. }
  866.  
  867. .sbarcalendar {
  868. border-color: $*page_fgcolor;
  869. border-width: 1px;
  870. border-style: solid;
  871. text-align: center;
  872. $sidebar_font_family;
  873. font-size: $*sidebar_font_size$*font_unit;
  874. }
  875.  
  876. .sbarcalendarposts {
  877. border-color: $*page_fgcolor;
  878. border-width: 1px;
  879. border-style: solid;
  880. background-color: $*entry_bgcolor;
  881. text-align: center;
  882. $sidebar_font_family;
  883. font-size: $*sidebar_font_size$*font_unit;
  884. }
  885.  
  886. ul.sbarlist
  887. {
  888. padding-left: 0px;
  889. margin-left: 0px;
  890. list-style: none;
  891. }
  892.  
  893. li.sbaritem, .tagcloud
  894. {
  895. padding-left: 15px;
  896. list-style: none;
  897. }
  898.  
  899. li.sbartitle
  900. {
  901. padding-left: 15px;
  902. list-style: none;
  903. border-style: solid;
  904. border-width: 1px;
  905. border-color: $*border_color;
  906. background-color: $*sidebar_header_bgcolor;
  907. margin-bottom: 10px;
  908. margin-top: 10px;
  909. }
  910.  
  911.  
  912. /* maincontent */
  913.  
  914. .subcontent {
  915. }
  916.  
  917. .entry {
  918. margin: 0px 10px 10px 30px;
  919. padding: 10px;
  920. background-color: $*entry_bgcolor;
  921. color: $*entry_fgcolor;
  922. $content_font_family;
  923. font-size: $*content_font_size$*font_unit;
  924. text-align: left;
  925. border-width: 1px;
  926. border-color: $*entrytitle_bgcolor;
  927. border-style: solid;
  928. }
  929.  
  930. .entry ul li
  931. {
  932. padding-left: 5px;
  933. margin-left: 15px;
  934. }
  935.  
  936. .entry ol li
  937. {
  938. padding-left: 5px;
  939. margin-left: 15px;
  940. }
  941.  
  942. .userpic {
  943. position: relative;
  944. float: $*userpic_position;
  945. background-color: $*entry_bgcolor;
  946. padding: 5px;
  947. margin: 10px;
  948. z-index: 15;
  949. border-width: 1px;
  950. border-color: $*entrytitle_bgcolor;
  951. border-style: solid;
  952. }
  953.  
  954. .userpicfriends {
  955. position: relative;
  956. float: $*userpic_position;
  957. padding: 5px;
  958. margin: 10px;
  959. text-align: center;
  960. border-style: solid;
  961. border-width: 1px;
  962. border-color: $*entrytitle_bgcolor;
  963. $content_font_family;
  964. font-size: $*content_font_size$*font_unit;
  965. z-index: 15;
  966. }
  967.  
  968. .date {
  969. line-height: 200%;
  970. top: 5px;
  971. color: $*date_fgcolor;
  972. $content_font_family;
  973. font-size: $*date_font_size$*font_unit;
  974. }
  975.  
  976. .subject {
  977. font-weight: bold;
  978. padding: 10px;
  979. color: $*subject_fgcolor;
  980. $content_font_family;
  981. font-size: $*subject_font_size$*font_unit;
  982. }
  983.  
  984. .subject a, .subject a:link, .subject a:visited {
  985. color: $*comments_link_color;
  986. }
  987.  
  988. .subject a:hover {
  989. color: $*comments_link_hover;
  990. }
  991.  
  992. .datesubject {
  993. background-color: $*entrytitle_bgcolor;
  994. padding: 5px;
  995. }
  996.  
  997. .currents, .currentmood, .currentmusic {
  998. $content_font_family;
  999. font-size: $*content_font_size$*font_unit;
  1000. }
  1001.  
  1002. .comments {
  1003. $content_font_family;
  1004. font-size: $*content_font_size$*font_unit;
  1005. text-align: right;
  1006. background-color: $*entrytitle_bgcolor;
  1007. padding: 0px 5px 0px 5px;
  1008. position: relative;
  1009. top: 15px;
  1010. }
  1011.  
  1012. div.comments a, div.comments a:link, div.comments a:visited{
  1013. color: $*comments_link_color;
  1014. }
  1015.  
  1016. div.comments a:hover {
  1017. color: $*comments_link_hover;
  1018. text-decoration: none;
  1019. }
  1020.  
  1021.  
  1022. /* maincontent -- entry, reply pages */
  1023.  
  1024. .datesubjectcomment {
  1025. background-color: $*entrytitle_bgcolor;
  1026. padding: 5px;
  1027. margin-top: 20px;
  1028. }
  1029.  
  1030. .userpiccomment {
  1031. position: relative;
  1032. border-width: 5px;
  1033. border-style: solid;
  1034. border-color: $*entry_bgcolor;
  1035. background-color: $*entry_bgcolor;
  1036. top: -30px;
  1037. left: 0px;
  1038. padding: 5px;
  1039. margin: 10px 10px -20px 10px;
  1040. z-index: 15;
  1041. float: $*userpic_position;
  1042. border-width: 1px;
  1043. border-color: $*entrytitle_bgcolor;
  1044. border-style: solid;
  1045. }
  1046.  
  1047. .box {
  1048. border-style: solid;
  1049. border-width: 1px 0px 0px 0px;
  1050. border-color: $*border_color;
  1051. padding: 10px;
  1052. $sidebar_pos;
  1053. }
  1054.  
  1055. input, textarea {
  1056. background-color: $*entry_bgcolor;
  1057. color: $*entry_fgcolor;
  1058. }
  1059.  
  1060. textarea.textbox {
  1061. width: 95% !important;
  1062. }
  1063.  
  1064. .reply {
  1065. position: relative;
  1066. margin: 20px 30px 10px 30px;
  1067. padding: 25px 10px 10px 10px;
  1068. text-align: left;
  1069. $content_font_family;
  1070. font-size: $*content_font_size$*font_unit;
  1071. line-height: 125%;
  1072. background-color: $*entry_bgcolor;
  1073. color: $*entry_fgcolor;
  1074. }
  1075.  
  1076. .replytosubject {
  1077. font-weight: bold;
  1078. }
  1079.  
  1080.  
  1081. .commentreply {
  1082. position: relative;
  1083. margin: 10px;
  1084. font-size: $*content_font_size$*font_unit;
  1085. $content_font_family;
  1086. color: $*entry_fgcolor;
  1087. }
  1088.  
  1089. .commentbox {
  1090.  
  1091. border-color: $*border_color;
  1092. border-width: 1px;
  1093. border-style: solid;
  1094. padding: 10px;
  1095. margin: 10px;
  1096. background-color: $*entry_bgcolor;
  1097. }
  1098.  
  1099. .datesubjectcomment a:link, .datesubjectcomment a:visited {
  1100. color: $*comments_link_color;
  1101. }
  1102.  
  1103. .datesubjectcomment a:hover {
  1104. color: $*comments_link_hover;
  1105. }
  1106.  
  1107. .commentboxpartial {
  1108. border-color: $*border_color;
  1109. border-width: 1px;
  1110. border-style: solid;
  1111. padding: 10px;
  1112. margin: 10px;
  1113. background-color: $*entry_bgcolor;
  1114. }
  1115.  
  1116. .commentinfo {
  1117. background-color: $*entry_bgcolor;
  1118. margin-top: 10px;
  1119. width: 100%;
  1120. }
  1121.  
  1122.  
  1123. /* maincontent -- year/achive pages */
  1124.  
  1125. ul.year {
  1126. text-align: center;
  1127. padding-bottom: 40px;
  1128. }
  1129.  
  1130. ul.year li {
  1131. display: inline;
  1132. }
  1133.  
  1134. table.yeartable {
  1135. margin-left: auto;
  1136. margin-right: auto;
  1137. }
  1138.  
  1139. table.yeartable td.yeardate, table.yeartable td.yearday {
  1140. border-width: 1px;
  1141. border-style: solid;
  1142. border-color: $*border_color;
  1143. }
  1144.  
  1145. table.yeartable td.yearday {
  1146. background-color: $*entry_bgcolor;
  1147. text-align: center;
  1148. }
  1149.  
  1150. td.yearmonth {
  1151. border-style: none;
  1152. }
  1153.  
  1154.  
  1155. /* footer */
  1156.  
  1157. ul.navfooter{
  1158. padding: 0px;
  1159. margin: 0px;
  1160. }
  1161.  
  1162. ul.navfooter li {
  1163. display: inline;
  1164. margin: 0 5px 0 5px;
  1165. }
  1166.  
  1167.  
  1168. .clearfoot {
  1169. clear: both;
  1170. }
  1171.  
  1172.  
  1173. /* misc */
  1174.  
  1175. .clear {
  1176. height: 15px;
  1177. }
  1178.  
  1179. .skiplinks {
  1180. text-align: center;
  1181. }
  1182.  
  1183. .headerimage {
  1184. /* for formatting header image */
  1185. }
  1186.  
  1187. .separator{
  1188. /* for formatting separators between entries */
  1189. height: 35px;
  1190. }
  1191.  
  1192. * html div.subcontent {
  1193. /* fixes an IE reply page bug */
  1194. height: 1%;
  1195. clear: none;
  1196. }
  1197.  
  1198. * html div.box#commentform {
  1199. /* fixes an IE reply page bug */
  1200. position: absolute;
  1201. border-width: 1px;
  1202. border-style: solid;
  1203. border-color: $*border_color;
  1204. background-color: $*content_bgcolor;
  1205. }
  1206. """;
  1207.  
  1208. print_custom_control_strip_css();
  1209. }
  1210.  
  1211. function print_custom_stylesheet()
  1212. {
  1213. # override
  1214. }
  1215.  
  1216. # -----------------------------------
  1217. # SIDEBAR
  1218. # -----------------------------------
  1219.  
  1220.  
  1221. function Page::lay_sidebar_view_summary() : string
  1222. {
  1223. return "";
  1224. }
  1225.  
  1226. function print_sidebar_box(string title, string body, string id)
  1227. {
  1228. var string box_id = ($id == "") ? "" : " id='$id'";
  1229. print safe """
  1230. <div class="sbarbody"$box_id><ul class="sbarlist">$title</ul><ul class="sbarlist sbarcontent">$body</ul></div>
  1231. """;
  1232. }
  1233.  
  1234. function print_sidebar_box(string title, string body)
  1235. {
  1236. print_sidebar_box($title, $body, "");
  1237. }
  1238.  
  1239.  
  1240. function print_userpic () {
  1241. var Page p= get_page();
  1242. var Image up_img = $p.journal.default_pic;
  1243. if (defined $up_img) {
  1244. """<div class="defaultuserpic">
  1245. <a href="$p.journal.userpic_listing_url"><img border="0" src="$up_img.url" height="$up_img.height" width="$up_img.width" alt="$p.journal.name" title="$p.journal.name" /></a>
  1246. </div>""";
  1247. }
  1248. }
  1249.  
  1250.  
  1251.  
  1252. function print_sidebar_calendar()
  1253. {
  1254. var string calendar;
  1255. var Page p = get_page();
  1256. var YearMonth m = $p->get_latest_month();
  1257. var string month = $m->month_format();
  1258. if($m.has_entries) {
  1259. $calendar = """<table class="calendar" align="center">""";
  1260. var YearWeek[] theWeeks = $m.weeks;
  1261. foreach var YearWeek w ($theWeeks) {
  1262. $calendar = $calendar + "<tr>";
  1263. var YearDay[] theDays = $w.days;
  1264. var int pre = $w.pre_empty;
  1265. if($pre > 0) {
  1266. $calendar = $calendar + """<td colspan="$pre" valign="top">&nbsp;</td>""";
  1267. }
  1268. foreach var YearDay d ($theDays) {
  1269. if ($d.num_entries) {
  1270. $calendar = $calendar + """<td valign="top" class="sbarcalendarposts"><a href="$d.url">$d.day</a></td>""";
  1271. } else {
  1272. $calendar = $calendar + """<td valign="top" class="sbarcalendar">$d.day</td>""";
  1273. }
  1274. }
  1275. $calendar = $calendar + "</tr>\n";
  1276. }
  1277. $calendar = $calendar + "</table>";
  1278. }
  1279. if ($calendar != "") {
  1280. print_sidebar_box("<li class='sbartitle'>$month</li>", $calendar, "sidebar_calendar");
  1281. }
  1282. }
  1283.  
  1284.  
  1285. function print_sidebar_blurb ()
  1286. {
  1287. var string blurb_title = "";
  1288. if ($*text_sidebar_blurb == "")
  1289. {
  1290. $blurb_title = "";
  1291. }
  1292. else
  1293. {
  1294. $blurb_title = """<div class="sbarbody"><ul class="sbarlist"><li class="sbartitle">$*text_sidebar_blurb</li></ul></div>""";
  1295. }
  1296. var string blurb = "";
  1297. $blurb = """<div class="sbarbody2">$*sidebar_blurb</div>""";
  1298.  
  1299. if ($*show_blurb and ($*sidebar_blurb != ""))
  1300. {
  1301. print safe $blurb_title;
  1302. print $blurb;
  1303. }
  1304. }
  1305.  
  1306. function print_sidebar_linklist()
  1307. {
  1308. var Page p = get_page();
  1309. if (size $p.linklist <= 0 or not $*linklist_support)
  1310. {
  1311. return;
  1312. }
  1313.  
  1314. var string list = "";
  1315. foreach var UserLink l ($p.linklist)
  1316. {
  1317. if ($l.title) {
  1318. if ($l.is_heading)
  1319. {
  1320. $list = $list + """<li class="sbartitle">$l.title</li>""";
  1321. }
  1322. else
  1323. {
  1324. $list = $list + """<li class="sbaritem"><a href="$l.url">$l.title</a></li>""";
  1325. }
  1326. }
  1327. else
  1328. {
  1329. $list = $list + """<li class="sbarblank">&nbsp;</li>""";
  1330. }
  1331. }
  1332.  
  1333. var string list_title = ($*text_sidebar_links != "") ? "<li class='sbartitle'>$*text_sidebar_links</li>" : "";
  1334. print_sidebar_box($list_title, $list, "sidebar_linklist");
  1335. }
  1336.  
  1337. function print_sidebar_tags()
  1338. {
  1339. var Page p= get_page();
  1340. var TagDetail[] tag_list = $p->visible_tag_list();
  1341. if( size $tag_list == 0)
  1342. {
  1343. return;
  1344. }
  1345. var string tags = "";
  1346.  
  1347. if($*sidebar_tags_display == "list")
  1348. {
  1349. foreach var TagDetail t ($tag_list)
  1350. {
  1351. $tags = $tags + """<li class="sbaritem"><a rel="tag" href="$t.url">$t.name</a></li> """ + "\n";
  1352. }
  1353. }
  1354. elseif($*sidebar_tags_display == "cloud")
  1355. {
  1356. var int tag_category = 10; # number of tag categories
  1357. var int basefontsize = 80; # size of the first tag category in percent of the default font size of the page
  1358. var int increment = 20; # The difference in size between tag categories.
  1359.  
  1360. var int max_use_count = 0;
  1361. var int min_use_count;
  1362. var int x;
  1363. var int category;
  1364.  
  1365.  
  1366. # Define a maximum and minimum number of uses of the tags:
  1367. $min_use_count = $tag_list[0].use_count;
  1368. foreach var TagDetail td ($tag_list)
  1369. {
  1370. if ($td.use_count > $max_use_count)
  1371. {
  1372. $max_use_count = $td.use_count;
  1373. }
  1374. elseif ($td.use_count < $min_use_count)
  1375. {
  1376. $min_use_count = $td.use_count;
  1377. }
  1378.  
  1379. }
  1380.  
  1381. # Avoid a division by zero
  1382. if ($max_use_count == $min_use_count)
  1383. {
  1384. $max_use_count = $max_use_count + 1;
  1385. }
  1386.  
  1387. # Put the tags into categories according to the number of times they're used,
  1388. # then use it to determine the size of the tag:
  1389. foreach var TagDetail td ($tag_list)
  1390. {
  1391. # Create different categories according to the number of uses of the tag
  1392. $category = (($td.use_count - $min_use_count) * $tag_category / ($max_use_count - $min_use_count));
  1393. if ($category == $tag_category) { $category = $tag_category - 1; }
  1394.  
  1395. # Convert those categories into sizes
  1396. $x = ($category * $increment) + $basefontsize;
  1397. $tags = $tags + """<span style="font-size: $x%;"><a href="$td.url" title="$td.use_count" class="tagcategory$category">$td.name</a></span> """;
  1398. }
  1399.  
  1400. # Enclose the entire list in an li tag as required by the layout.
  1401. $tags = """<li class="tagcloud">""" + $tags + """</li>""";
  1402. }
  1403.  
  1404. var string tags_title = ($*text_sidebar_tags != "") ? "<li class='sbartitle'>$*text_sidebar_tags</li>" : "";
  1405. print_sidebar_box($tags_title, $tags, "sidebar_tags");
  1406. }
  1407.  
  1408. function print_sidebar_summary()
  1409. {
  1410. var Page page = get_page();
  1411. var string summary_title = ($*text_sidebar_summary != "") ? "<li class='sbartitle'>$*text_sidebar_summary</li>" : "";
  1412. var string summary = $page->lay_sidebar_view_summary();
  1413. if ($summary != "")
  1414. {
  1415. print_sidebar_box($summary_title, $summary, "sidebar_summary");
  1416. }
  1417. }
  1418.  
  1419. function RecentPage::lay_sidebar_view_summary() : string
  1420. {
  1421. var string return = "";
  1422. var string item;
  1423. foreach var Entry e ($.entries) {
  1424. $item = "";
  1425. var string datetime = $e.time->date_format() + " " + $e.time->time_format();
  1426. var string subject = $e.subject != "" ? $e->plain_subject() : $*text_nosubject;
  1427. if ($e.security) { $item = $item + " $e.security_icon"; }
  1428. $item = $e.poster.username != $.journal.username ?
  1429. $item + """ $e.poster &mdash; <a href="#$e.journal.username$e.itemid" title="$datetime">$subject</a>""" :
  1430. $item + """ <a href="#$e.journal.username$e.itemid" title="$datetime">$subject</a>""";
  1431. $item = $item + """ <span class="count">[+<a href="$e.permalink_url">$e.comments.count</a>]</span>""";
  1432. $return = $return + """<li class="sbaritem">$item</li>""";
  1433. }
  1434. return $return;
  1435. }
  1436.  
  1437. function FriendsPage::lay_sidebar_view_summary() : string
  1438. {
  1439. var string return = "";
  1440. var string item;
  1441. foreach var Entry e ($.entries) {
  1442. $item = "";
  1443. var string datetime = $e.time->date_format() + " " + $e.time->time_format();
  1444. var string poster = $e.poster.username != $e.journal.username ?
  1445. "$e.poster in $e.journal" : $e.journal->as_string();
  1446. var string subject = $e.subject != "" ? $e->plain_subject() : $*text_nosubject;
  1447.  
  1448. if ($e.security) { $item = $item + " $e.security_icon"; }
  1449. $item = $item + """ $poster &mdash; <a href="#$e.journal.username$e.itemid" title="$datetime">$subject</a>""";
  1450. $item = $item + """ <span class="count">[+<a href="$e.permalink_url">$e.comments.count</a>]</span>""";
  1451. $return = $return + """<li class="sbaritem">$item</li>""";
  1452. }
  1453. return $return;
  1454. }
  1455.  
  1456. function comment_count(Comment[] c) : int
  1457. {
  1458. var int count = size $c;
  1459. foreach var Comment comment ($c)
  1460. {
  1461. $count = $count + comment_count($comment.replies);
  1462. }
  1463. return $count;
  1464. }
  1465.  
  1466. function EntryPage::lay_sidebar_view_summary() : string
  1467. {
  1468. var string return = "";
  1469. var string item;
  1470. foreach var Comment c ($.comments) {
  1471. $item = "";
  1472. var string datetime = $c.time->date_format() + " " + $c.time->time_format();
  1473. var string poster = defined $c.poster ? $c.poster->as_string() : "<i>$*text_poster_anonymous</i>";
  1474. var string subject = $c.subject != "" ? $c.subject : $*text_nosubject;
  1475. $item = $item + """$poster &mdash; <a href="#$c.anchor" title="$datetime">$subject</a>""";
  1476. var int count = comment_count($c.replies);
  1477. $item= $item + """ <span class="count">[+<a href="$c.thread_url">$count</a>]</span>""";
  1478. $return = $return + """<li class="sbaritem">$item</li>""";
  1479. }
  1480. return $return;
  1481. }
  1482.  
  1483. function MonthPage::lay_sidebar_view_summary () : string
  1484. {
  1485. var string return = "";
  1486. foreach var MonthDay d ($.days) {
  1487. if ($d.has_entries) {
  1488. $return = $return + """<li class="sbaritem"><a href="#$d.day">""" + lang_ordinal($d.day) + "</a></li>";
  1489. }
  1490. }
  1491. return $return;
  1492. }
  1493.  
  1494. function YearPage::lay_sidebar_view_summary () : string
  1495. {
  1496. var string return = "";
  1497. foreach var YearMonth m ($.months) {
  1498. if ($m.has_entries) {
  1499. $return = $return + """<li class="sbaritem"><a href="#$m.month">""" + $m->month_format() + "</a></li>";
  1500. }
  1501. }
  1502. return $return;
  1503. }
  1504.  
  1505. function sidebar_order(string order)
  1506. {
  1507. if ($order == "userpic" and $*show_default_userpic)
  1508. {
  1509. print_userpic();
  1510. }
  1511. if ($order == "blurb" and $*show_blurb)
  1512. {
  1513. print_sidebar_blurb();
  1514. }
  1515. if ($order == "linklist" and $*show_linklist)
  1516. {
  1517. print_sidebar_linklist();
  1518. }
  1519. if ($order == "tags" and $*show_tags)
  1520. {
  1521. print_sidebar_tags();
  1522. }
  1523. if ($order == "summary" and $*show_summary)
  1524. {
  1525. print_sidebar_summary();
  1526. }
  1527. if ($order == "calendar" and $*show_calendar)
  1528. {
  1529. print_sidebar_calendar();
  1530. }
  1531. if (viewer_sees_vbox() and $order == "calendar") {
  1532. var Page p = get_page();
  1533. """<div style="margin: 10px auto 10px auto; width: 160px;">""";
  1534. $p->print_vbox();
  1535. "</div>";
  1536. }
  1537. }
  1538.  
  1539. function print_sidebar()
  1540. {
  1541. sidebar_order($*sidebar_order_1);
  1542. sidebar_order($*sidebar_order_2);
  1543. sidebar_order($*sidebar_order_3);
  1544. sidebar_order($*sidebar_order_4);
  1545. sidebar_order($*sidebar_order_5);
  1546. sidebar_order($*sidebar_order_6);
  1547.  
  1548. # Make sure the ad prints
  1549. if (viewer_sees_vbox() and $*sidebar_order_1 != "calendar" and $*sidebar_order_2 != "calendar"
  1550. and $*sidebar_order_3 != "calendar" and $*sidebar_order_4 != "calendar" and $*sidebar_order_5 != "calendar"
  1551. and $*sidebar_order_6 != "calendar") {
  1552. var Page p = get_page();
  1553. """<div style="margin: 10px auto 10px auto; width: 160px;">""";
  1554. $p->print_vbox();
  1555. "</div>";
  1556. }
  1557. }
  1558.  
  1559.  
  1560.  
  1561. # -----------------------------------
  1562. # PAGE
  1563. # -----------------------------------
  1564.  
  1565. # Header
  1566. function Page::lay_print_header()
  1567. "Prints header"
  1568. {
  1569. var Page page = get_page();
  1570. var string title = $this->title();
  1571.  
  1572. print """
  1573. <div id="header">
  1574. <ul class="navheader">""";
  1575. var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
  1576. if ($.journal.website_url != "")
  1577. {
  1578. println safe """<li><a href="$.journal.website_url">$website_name</a></li>""";
  1579. }
  1580.  
  1581. foreach var string v ($.views_order) {
  1582. if ($.view == $v) {
  1583. """<li class="view">"""; println lang_viewname($v) + "</li>";
  1584. } else {
  1585. println "<li><a href=\""+$.view_url{$v}+"\">"+lang_viewname($v)+"</a></li>";
  1586. }
  1587. }
  1588. print safe """
  1589. </ul>
  1590. <div class="title">
  1591. $title
  1592. </div>
  1593. <div class="subtitle">
  1594. $.global_subtitle
  1595. </div>
  1596. </div>
  1597. """;
  1598. }
  1599.  
  1600. # Footer
  1601. function Page::lay_print_footer()
  1602. {
  1603. """
  1604. <div class="clearfoot">&nbsp;</div>
  1605. """;
  1606. }
  1607.  
  1608. function Page::print_stylesheets() {
  1609. if ($*external_stylesheet and $*external_stylesheet_url != "") {
  1610. if ($*include_default_stylesheet_with_linked) {
  1611. println safe """<link rel="stylesheet" type="text/css" media="screen" href="$.stylesheet_url" />""";
  1612. }
  1613. println safe """<link rel="stylesheet" type="text/css" media="screen" href="$*external_stylesheet_url" />""";
  1614. }
  1615. elseif ($*external_stylesheet and $*include_default_stylesheet) {
  1616. println safe """<link rel="stylesheet" type="text/css" media="screen" href="$.stylesheet_url" />""";
  1617. }
  1618. elseif ($*include_default_stylesheet) {
  1619. println """<style type="text/css">""";
  1620. start_css();
  1621. print_stylesheet();
  1622. end_css();
  1623. println "</style>";
  1624. }
  1625.  
  1626. if ($*custom_css != "") {
  1627. println """<style type="text/css">""";
  1628. start_css();
  1629. println safe $*custom_css;
  1630. end_css();
  1631. println """</style>""";
  1632. }
  1633. }
  1634.  
  1635. function Page::print () {
  1636. var Page page = get_page();
  1637. var string title = $this->title();
  1638.  
  1639. var string page_align = "";
  1640. if ($*page_alignment == "left") {
  1641. $page_align = " margin-left: 20px; margin-right: auto;";
  1642. }
  1643. elseif ($*page_alignment == "right") {
  1644. $page_align = " margin-left: auto; margin-right: 20px;";
  1645. }
  1646. elseif ($*page_alignment == "center") {
  1647. $page_align = " margin-left: auto; margin-right: auto;";
  1648. }
  1649.  
  1650. """
  1651. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  1652. <html xmlns="http://www.w3.org/1999/xhtml">
  1653. <head>
  1654. """;
  1655. $this->print_head();
  1656. $this->print_stylesheets();
  1657. print safe """<title>$title</title>""";
  1658. $this->print_custom_head();
  1659. """
  1660. </head>
  1661. <body>
  1662. <a name="top"></a>
  1663. """;
  1664. $this->print_control_strip();
  1665. if (viewer_sees_hbox_top()) {
  1666. """<div style="background-color: $*outer_table_bgcolor; border: 1px solid $*border_color; padding: 15px; text-align: center; width: 728px; margin-bottom: 10px;$page_align">""";
  1667. $this->print_hbox_top();
  1668. "</div>";
  1669. }
  1670. """
  1671. <div class="headerimage"></div>
  1672. <div id="content">
  1673. """;
  1674. $this->lay_print_header();
  1675.  
  1676. if ($*show_sidebar) {
  1677. """
  1678. <div id="sidebar">""";
  1679. print_sidebar();
  1680. """
  1681. <div class="clear">&nbsp;</div>
  1682. </div>
  1683. """;
  1684. } elseif (viewer_sees_vbox()) {
  1685. """<div id="sidebar">""";
  1686. """<div style="margin: 0 auto 0 auto; width: 160px;">""";
  1687. $this->print_vbox();
  1688. "</div>";
  1689. """<div class="clear">&nbsp;</div>""";
  1690. "</div>";
  1691. }
  1692. """
  1693. <div id="maincontent">""";
  1694. $this->print_body();
  1695. "
  1696. </div>";
  1697. $this->lay_print_footer();
  1698. "</div>";
  1699. if (viewer_sees_hbox_bottom()) {
  1700. """<div style="background-color: $*outer_table_bgcolor; border: 1px solid $*border_color; padding: 15px; text-align: center; width: 728px; margin-top: 10px;$page_align">""";
  1701. $this->print_hbox_bottom();
  1702. "</div>";
  1703. }
  1704. "</body>
  1705. </html>";
  1706. }
  1707.  
  1708.  
  1709.  
  1710.  
  1711. function Entry::print_linkbar()
  1712. {
  1713. # Links (memories, edit, prev, next)
  1714. var Page p = get_page();
  1715. if ($p.view == "entry" or $p.view == "reply")
  1716. {
  1717. var Link prev = $this->get_link("nav_prev");
  1718. var Link next = $this->get_link("nav_next");
  1719.  
  1720. var string{} link_text = {
  1721. "edit_entry" => $*text_edit,
  1722. "edit_tags" => $*text_edit_tags,
  1723. "mem_add" => $*text_memories,
  1724. "tell_friend" => $*text_tell_friend,
  1725. "watch_comments" => $*text_track,
  1726. "unwatch_comments" => $*text_untrack,
  1727. };
  1728. print safe """
  1729. <div class="clear">&nbsp;</div>
  1730. <div class="skiplinks">
  1731. <a href="$prev.url">$*text_previous_entry</a> | """;
  1732.  
  1733. var Link link;
  1734. var string url;
  1735. var string text;
  1736. foreach var string link_key ($.link_keyseq) {
  1737. $link = $this->get_link($link_key);
  1738. $url = $link.url;
  1739. $text = $link_text{$link_key} != "" ? $link_text{$link_key} : $link.caption;
  1740. if (defined $link) {
  1741. print safe """<a href="$url">$text</a> | """;
  1742. }
  1743. }
  1744.  
  1745. print safe """<a href="$next.url">$*text_next_entry</a>
  1746. </div>
  1747. <div class="clear">&nbsp;</div>""";
  1748. }
  1749.  
  1750. }
  1751.  
  1752.  
  1753. function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor)
  1754. {
  1755. """<a name="$e.journal.username$e.itemid"></a>""";
  1756. $e->print_linkbar();
  1757.  
  1758.  
  1759. # Userpic
  1760.  
  1761. var string userpic = "";
  1762. if ($*show_entry_userpic)
  1763. {
  1764. if ($p.view == "read" or $p.view == "entry")
  1765. {
  1766. if (defined $e.userpic)
  1767. {
  1768. $userpic = $userpic + """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name""";
  1769. if ($e.poster.username != $e.journal.username)
  1770. {
  1771. $userpic = $userpic + " in $e.journal.name";
  1772. }
  1773. $userpic = $userpic + "\">";
  1774. }
  1775. }
  1776. elseif ($p.journal_type == "C" and $p.view == "recent")
  1777. {
  1778. if (defined $e.userpic)
  1779. {
  1780. $userpic = $userpic + """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" />""";
  1781. }
  1782. }
  1783. else
  1784. {
  1785. if (defined $e.userpic)
  1786. {
  1787. $userpic = $userpic + """<div class="userpic"><img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" /></div>""";
  1788. }
  1789. }
  1790. }
  1791. print """
  1792. <div class="subcontent">
  1793. """;
  1794. if (($p.view == "recent" and $p.journal_type != "C" ) or $p.view == "day")
  1795. {
  1796. print """$userpic""";
  1797. }
  1798. else
  1799. {
  1800. if ($p.view == "recent" and $p.journal_type == "C" )
  1801. {
  1802. """<div class="userpicfriends" style="background-color: $*entry_bgcolor;">""";
  1803. }
  1804. else
  1805. {
  1806. """<div class="userpicfriends" style="background-color: $bgcolor;">""";
  1807. }
  1808. print """$userpic""";
  1809.  
  1810.  
  1811. # Poster
  1812.  
  1813. if ($p.view == "read" or $p.view == "entry")
  1814. {
  1815. var UserLite linkto;
  1816. $linkto = $e.poster;
  1817. #print "$e.poster.username";
  1818. """<br /><a href=\"""" + $linkto->base_url() + "\">";
  1819. "<font color=\"$fgcolor\">$linkto.username</font></a>";
  1820. }
  1821. elseif ($p.journal_type == "C" and $p.view == "recent")
  1822. {
  1823. var UserLite linkto;
  1824. $linkto = $e.poster;
  1825. #print "$e.poster.username";
  1826. """<br /><a href=\"""" + $linkto->base_url() + "\">";
  1827. "$linkto.username</a>";
  1828. }
  1829. if (($p.view == "read" or $p.view == "entry") and $e.poster.username != $e.journal.username)
  1830. {
  1831. var UserLite linkto;
  1832. $linkto = $e.journal;
  1833. """<br />[<a href=\"""" + $linkto->base_url() + "\">";
  1834. "<font color=\"$fgcolor\">$linkto.username</font></a>]";
  1835. }
  1836. if ($p.view == "recent" and $p.journal_type == "C")
  1837. {
  1838. print "</div>";
  1839. }
  1840. if ($p.view != "recent" and $p.view != "day")
  1841. {
  1842. print """</div>""";
  1843. }
  1844. }
  1845.  
  1846.  
  1847. # Date, time, subject
  1848.  
  1849. var string time = "";
  1850. $time = $time + """ @ """;
  1851. $time = $time + $e.time->time_format("short");
  1852. var string date = "";
  1853. $date = $date + $e.time->date_format("long_day");
  1854. """
  1855. <div class="datesubject"><div class="date">""";
  1856. print $e.time->date_format("%%dd%% %%month%% %%yyyy%%");
  1857. "$time
  1858. </div>";
  1859. """
  1860. <div class="subject">""";
  1861. if ($e.security != "")
  1862. {
  1863. $e.security_icon->print();
  1864. }
  1865. """
  1866. $e.subject &nbsp;
  1867. </div>
  1868. </div>
  1869. """;
  1870.  
  1871. """
  1872. <div class="entry">
  1873. <div class="entry_text">""";
  1874.  
  1875. $e->print_text();
  1876. print "</div> ";
  1877.  
  1878. # Currents
  1879.  
  1880. var string currents ="";
  1881. $e->print_metadata();
  1882.  
  1883. # Comments
  1884.  
  1885. """
  1886. <div class="clear">&nbsp;</div>
  1887. <div class="comments">""";
  1888. if ($p.view != "entry" or $p.view != "reply")
  1889. {
  1890. $e.comments->print();
  1891. }
  1892. elseif ($e.comments.enabled)
  1893. {
  1894. $e.comments->print_postlink();
  1895. }
  1896. else
  1897. {
  1898. "&nbsp;";
  1899. }
  1900. """
  1901. </div>
  1902. </div>
  1903. </div>
  1904.  
  1905. <div class="separator"></div>
  1906. <div class="clear">&nbsp;</div>""";
  1907. }
  1908.  
  1909.  
  1910. function Page::print_entry(Entry e) {
  1911. print_entry($this, $e, null Color, null Color);
  1912. }
  1913.  
  1914.  
  1915. function FriendsPage::print_entry (Entry e)
  1916. {
  1917. if ($*use_friends_colours)
  1918. {
  1919. var Friend f = $.friends{$e.journal.username};
  1920. print_entry($this, $e, $f.bgcolor, $f.fgcolor);
  1921. }
  1922. else
  1923. {
  1924. print_entry($this, $e, $*entry_bgcolor, $*entry_fgcolor);
  1925. }
  1926. }
  1927.  
  1928. function EntryPage::print_entry(Entry e) {
  1929. print_entry($this, $e, $*entry_bgcolor, $*entry_fgcolor);
  1930. }
  1931.  
  1932. function Entry::print_metadata() {
  1933. if (size $.metadata)
  1934. {
  1935. print """<div class="clear">&nbsp;</div><div class="clear">&nbsp;</div>
  1936. <div class="currents">""";
  1937. var string currents;
  1938. foreach var string k ($.metadata)
  1939. {
  1940. var string text = $k;
  1941. var string val = $.metadata{$k};
  1942. if ($k == "mood")
  1943. {
  1944. $text = $*text_meta_mood;
  1945. }
  1946. elseif ($k == "music")
  1947. {
  1948. $text = $*text_meta_music;
  1949. }
  1950. elseif ($k == "location")
  1951. {
  1952. $text = $*text_meta_location;
  1953. }
  1954. if ($k == "mood" and defined $.mood_icon)
  1955. {
  1956. var Image i = $.mood_icon;
  1957. $val = "<img src='$i.url' width='$i.width' height='$i.height' align='middle' alt='' /> $val";
  1958. }
  1959. $currents = $currents + """<div class="current$k"><strong>$text:</strong> $val</div>""";
  1960. }
  1961. $currents = $currents + "</div>";
  1962. println safe "$currents";
  1963. }
  1964. }
  1965.  
  1966.  
  1967. function RecentPage::lay_print_footer()
  1968. {
  1969. var string range = "most recent entries";
  1970. var string sep;
  1971. var string back;
  1972. var string forward;
  1973.  
  1974. if ($.nav.skip > 0)
  1975. {
  1976. $range = "$.nav.skip entries back";
  1977. }
  1978. if ($.nav.forward_url != "" or $.nav.backward_url != "")
  1979. {
  1980. if ($.nav.backward_url != "")
  1981. {
  1982. $back = """<li><a href="$.nav.backward_url">""" + get_plural_phrase($.nav.backward_count, "text_skiplinks_back") + """</a></li>""";
  1983. }
  1984. if ($.nav.forward_url != "")
  1985. {
  1986. $forward = """<li><a href="$.nav.forward_url">""" + get_plural_phrase($.nav.forward_count, "text_skiplinks_forward") + """</a></li>""";
  1987. }
  1988. }
  1989. print safe """
  1990. <div class="clearfoot">&nbsp;</div>
  1991. <div id="footer">
  1992. <ul class="navfooter">
  1993. $back
  1994. <li class="viewing">viewing $range</li>
  1995. $forward
  1996. </ul>
  1997. </div>
  1998. <div class="clearfoot">&nbsp;</div>
  1999. """;
  2000. }
  2001.  
  2002. function RecentPage::print_body
  2003. {
  2004. foreach var Entry e ($.entries)
  2005. {
  2006. $this->print_entry($e);
  2007. if ($e->viewer_sees_ebox()) {
  2008. """<table align="center"><tr><td>""";
  2009. $e->print_ebox();
  2010. """
  2011. </td></tr></table>
  2012. <div class="separator"></div>
  2013. <div class="clear">&nbsp;</div>
  2014. """;
  2015. }
  2016. }
  2017. }
  2018.  
  2019.  
  2020. function EntryPage::print_body()
  2021. {
  2022. $this->print_entry($.entry);
  2023. if ($.multiform_on and $.entry.comments.enabled and $.comment_pages.total_subitems > 0)
  2024. {
  2025. $this->print_multiform_start();
  2026. }
  2027. if ($.entry.comments.enabled)
  2028. {
  2029. """
  2030. <div class="box">
  2031.  
  2032. <center>""";
  2033. $.comment_pages->print();
  2034. """
  2035. <b>( <a href="$.entry.comments.post_url">Post a new comment</a> )</b>
  2036. </center>""";
  2037. $this->print_comments($.comments);
  2038. """
  2039. </div>""";
  2040. }
  2041.  
  2042. if ($this.multiform_on and $.entry.comments.enabled and $.entry.comments.count > 0)
  2043. {
  2044. """
  2045. <div class="box">""";
  2046. $this->print_multiform_actionline();
  2047. $this->print_multiform_end();
  2048. """
  2049. <center>
  2050. <b>( <a href="$.entry.comments.post_url">Post a new comment</a> )</b>""";
  2051. $.comment_pages->print();
  2052. """
  2053. <br />
  2054. </center>
  2055. </div>""";
  2056. }
  2057. }
  2058.  
  2059.  
  2060.  
  2061. # -----------------------------------
  2062. # ENTRY
  2063. # -----------------------------------
  2064.  
  2065. function EntryPage::print_comments( Comment[] comments )
  2066. {
  2067. if ( size $comments == 0 )
  2068. {
  2069. return;
  2070. }
  2071.  
  2072. foreach var Comment c ( $comments )
  2073. {
  2074. var int indent = ($c.depth - 1) * 30;
  2075. var string partialcomment = $c.full ? "" : "partial";
  2076. var string margin = "";
  2077. if ($*userpic_position == "left")
  2078. {
  2079. $margin = "right";
  2080. }
  2081. else
  2082. {
  2083. $margin = "left";
  2084. }
  2085.  
  2086. """<a name="$c.anchor"></a>""";
  2087. """<div class="commentbox$partialcomment" id="$c.dom_id" style="margin-$*userpic_position: ${indent}px">\n""";
  2088. if ( $c.full )
  2089. {
  2090. $this->print_comment( $c );
  2091. }
  2092. else
  2093. {
  2094. $this->print_comment_partial( $c );
  2095. }
  2096. "</div>";
  2097. $this->print_comments( $c.replies );
  2098. }
  2099. }
  2100.  
  2101.  
  2102. function EntryPage::print_comment (Comment comment) {
  2103.  
  2104. var string subject = $comment.subject ? $comment.subject : $*text_nosubject;
  2105. var string date = $comment.time->date_format();
  2106. var string poster = isnull $comment.poster ? $*text_poster_anonymous : $comment.poster->as_string();
  2107.  
  2108. #Comment Userpic
  2109. if (defined $comment.userpic and $*show_entry_userpic)
  2110. {
  2111. var int w = $comment.userpic.width;
  2112. var int h = $comment.userpic.height;
  2113. var string alt = $comment.metadata{"picture_keyword"};
  2114. if ($*comment_userpic_style == "small")
  2115. {
  2116. $w = $w / 2;
  2117. $h = $h / 2;
  2118. }
  2119. if ($alt != "")
  2120. {
  2121. $alt = ": " + $alt;
  2122. }
  2123. """
  2124. <div class="datesubjectcomment">
  2125. <img class="userpiccomment" src="$comment.userpic.url" width="$w" height="$h" alt="$comment.poster.name$alt" title="$comment.poster.name$alt" />""";
  2126. print """$poster on """;
  2127. print $comment->time_display("long", "");
  2128. }
  2129. else
  2130. {
  2131. print """
  2132. <div class="datesubjectcomment">$poster on """;
  2133. print $comment->time_display("long", "");
  2134. }
  2135. if (defined $comment.subject_icon or $comment.subject != "")
  2136. {
  2137. print "<br />$comment.subject_icon <strong>$comment.subject</strong>" + "<br />";
  2138. }
  2139. if ($comment.metadata{"poster_ip"})
  2140. {
  2141. print "<br />" + $*text_comment_ipaddr + "(" + $comment.metadata{"poster_ip"} + ")" + "<br />";
  2142. }
  2143. "</div>";
  2144.  
  2145. print """
  2146. <div class="commentreply">"""; $comment->print_text(); """</div>\n""";
  2147. var string alignlinks = "";
  2148. if ($*userpic_position == "left")
  2149. {
  2150. $alignlinks = "right";
  2151. }
  2152. else
  2153. {
  2154. $alignlinks = "left";
  2155. }
  2156. "<div style='margin-top: 3px; font-size: smaller; text-align: $alignlinks;'>";
  2157.  
  2158. if ($comment.frozen)
  2159. {
  2160. "($*text_comment_frozen)";
  2161. }
  2162. else
  2163. {
  2164. "(<a href='$comment.reply_url'>$*text_comment_reply</a>) ";
  2165. }
  2166.  
  2167. if ($comment.parent_url != "")
  2168. {
  2169. "(<a href='$comment.parent_url'>$*text_comment_parent</a>) ";
  2170. }
  2171.  
  2172. if ($comment.thread_url != "")
  2173. {
  2174. """(<a href="$comment.thread_url">$*text_comment_thread</a>) """;
  2175. }
  2176.  
  2177. "(<a href='$comment.permalink_url'>$*text_permalink</a>)";
  2178.  
  2179.  
  2180. """<div style="padding: 10px; text-align: $alignlinks;">""";
  2181. if ($this.multiform_on)
  2182. {
  2183. """<label for="ljcomsel_$comment.talkid">$*text_multiform_check</label>""";
  2184. $comment->print_multiform_check();
  2185. }
  2186. $comment->print_linkbar();
  2187.  
  2188.  
  2189. "</div></div>\n";
  2190. }
  2191.  
  2192. function EntryPage::print_comment_partial( Comment c )
  2193. {
  2194. var string subject = $c.subject ? $c.subject : $*text_nosubject;
  2195. var string date = $c->time_display("long", "");
  2196. var string poster = isnull $c.poster ? $*text_poster_anonymous : $c.poster->as_string();
  2197.  
  2198. print safe """<a href="$c.permalink_url">$subject</a> - $poster on $date""";
  2199. }
  2200.  
  2201. # -----------------------------------
  2202. # DAY
  2203. # -----------------------------------
  2204.  
  2205.  
  2206. function DayPage::print_body() {
  2207. """
  2208. <div class="clear">&nbsp;</div>
  2209. <div class="skiplinks">
  2210. <a href="$.prev_url">$*text_day_prev</a> |
  2211. <a href="$.next_url">$*text_day_next</a>
  2212. </div>
  2213. <div class="clear">&nbsp;</div>""";
  2214. if ($.has_entries)
  2215. {
  2216. foreach var Entry e ($.entries)
  2217. {
  2218. $this->print_entry($e);
  2219. if ($e->viewer_sees_ebox()) {
  2220. """<table align="center"><tr><td>""";
  2221. $e->print_ebox();
  2222. """
  2223. </td></tr></table>
  2224. <div class="separator"></div>
  2225. <div class="clear">&nbsp;</div>
  2226. """;
  2227. }
  2228. }
  2229. }
  2230. else {
  2231. """<p style="text-align: center">$*text_noentries_day</p>""";
  2232. }
  2233. """
  2234. <div class="clear">&nbsp;</div>
  2235. <div class="skiplinks">
  2236. <a href="$.prev_url">$*text_day_prev</a> |
  2237. <a href="$.next_url">$*text_day_next</a>\n
  2238. </div>
  2239. <div class="clear">&nbsp;</div>
  2240. """;
  2241. }
  2242.  
  2243. function CommentInfo::print() {
  2244. if (not $.enabled) { return; }
  2245. if ($.count > 0 or $.screened) {
  2246. $this->print_readlink();
  2247. " | ";
  2248. }
  2249. $this->print_postlink();
  2250. }
  2251.  
  2252.  
  2253. # -----------------------------------
  2254. # REPLY
  2255. # -----------------------------------
  2256.  
  2257.  
  2258. function ReplyPage::print_body
  2259. {
  2260. if (not $.entry.comments.enabled)
  2261. {
  2262. print "
  2263. <h2>$*text_reply_nocomments_header</h2>
  2264. <p>$*text_reply_nocomments</p>";
  2265. return;
  2266. }
  2267.  
  2268. $.entry->print_linkbar();
  2269.  
  2270. """<div class="subcontent">""";
  2271. if (defined $.replyto.userpic)
  2272. {
  2273. print """<div class="userpic">$.replyto.userpic</div>""";
  2274. }
  2275.  
  2276. var string poster = isnull $.replyto.poster ? $*text_poster_anonymous : $.replyto.poster->as_string();
  2277. var Page p;
  2278. print """
  2279. <div class="datesubject">
  2280. <div class="replytoposter">""";
  2281. print $.replyto.poster.name + " (";
  2282. print $poster + ") ";
  2283. print "wrote";
  2284. if ($.journal_type == "C")
  2285. {
  2286. print " in ";
  2287. print $.replyto.journal;
  2288. print " ";
  2289. }
  2290. print " "+lang_at_datetime($.replyto.time);
  2291.  
  2292. print """
  2293. </div>
  2294. <div class="replytosubject">$.replyto.subject</div>
  2295. </div>
  2296. <div class="entry">"""; $.replyto->print_text(); """</div>
  2297. </div>
  2298. <div class="clear">&nbsp;</div>
  2299. <div class="box">
  2300. <center><b>( <a href="$.entry.permalink_url">Read comments</a> )</b> </center>
  2301. Post a comment in response:<br/>""";
  2302. $.form->print();
  2303. "
  2304. </div>
  2305. ";
  2306. }
  2307.  
  2308.  
  2309.  
  2310. # -----------------------------------
  2311. # MONTH
  2312. # -----------------------------------
  2313.  
  2314. function MonthPage::print_body {
  2315. "<form method='post' action='$.redir.url'>
  2316. <center><br />";
  2317. $.redir->print_hiddens();
  2318. if ($.prev_url != "")
  2319. {
  2320. "[<a href='$.prev_url'>&lt;&lt;&lt;</a>]\n";
  2321. }
  2322. if (size $.months > 1)
  2323. {
  2324. "<select name='redir_key'>\n";
  2325. foreach var MonthEntryInfo mei ($.months)
  2326. {
  2327. var string sel;
  2328. if ($mei.date.year == $.date.year and $mei.date.month == $.date.month)
  2329. {
  2330. $sel = " selected='selected'";
  2331. }
  2332. "<option value='$mei.redir_key'$sel>" + $mei.date->date_format($*lang_fmt_month_long) + "</option>";
  2333. }
  2334. "</select>\n<input type='submit' value='View' />";
  2335. }
  2336. if ($.next_url != "")
  2337. {
  2338. "\n[<a href='$.next_url'>&gt;&gt;&gt;</a>]\n";
  2339. }
  2340. """
  2341. </center></form>\n
  2342. <br /><br />
  2343. <div class="subcontent">
  2344. <div class="entry"><dl>""";
  2345. foreach var MonthDay d ($.days)
  2346. {
  2347. if ($d.has_entries)
  2348. {
  2349. "<dt><a href=\"$d.url\"><b>";
  2350. print lang_ordinal($d.day);
  2351. "</b></a></dt>\n<dd>";
  2352. $d->print_subjectlist();
  2353. "</dd>\n";
  2354. }
  2355. }
  2356. "</dl>
  2357. </div>
  2358. </div>";
  2359. }
  2360.  
  2361.  
  2362.  
  2363.  
  2364. # -----------------------------------
  2365. # YEAR
  2366. # -----------------------------------
  2367.  
  2368.  
  2369. function YearPage::print_body
  2370. {
  2371. $this->print_year_links();
  2372. foreach var YearMonth m ($.months)
  2373. {
  2374. $this->print_month($m);
  2375. }
  2376. }
  2377.  
  2378. function YearPage::print_year_links() {
  2379. """<ul class="year">\n""";
  2380. foreach var YearYear y ($.years) {
  2381. if ($y.displayed) {
  2382. """<li class="active">$y.year</li>\n""";
  2383. } else {
  2384. """<li><a href="$y.url">$y.year</a></li>\n""";
  2385. }
  2386. }
  2387. """</ul>\n""";
  2388. }
  2389.  
  2390.  
  2391. function YearPage::print_month(YearMonth m) {
  2392. if (not $m.has_entries)
  2393. {
  2394. return;
  2395. }
  2396. """<table class="yeartable" align="center">\n
  2397. <tr><td colspan="4" class="yearmonth" align="left">""";
  2398. print $m->month_format();
  2399. print safe """</td>
  2400. <td colspan="3" class="yearmonth" align="right"><a href="$m.url">$*text_view_month</a></td>
  2401. </tr>\n<tr>""";
  2402. foreach var int d (weekdays()) {
  2403. """<td width="50px" class="yearday">"""+$*lang_dayname_short[$d]+"</td>\n";
  2404. }
  2405. "</tr>\n";
  2406. foreach var YearWeek w ($m.weeks) {
  2407. $w->print();
  2408. }
  2409. "</table>
  2410. <br /><br /><br />";
  2411. }
  2412.  
  2413. function YearWeek::print()
  2414. {
  2415. """<tr valign="top">\n""";
  2416. if ($.pre_empty > 0)
  2417. {
  2418. """<td class="yeardate" colspan="$.pre_empty">&nbsp;</td>\n""";
  2419. }
  2420. foreach var YearDay d ($.days)
  2421. {
  2422. """<td class="yeardate">\n""";
  2423. """<div style="text-align: right;">$d.day</div>\n""";
  2424. if ($d.num_entries > 0)
  2425. {
  2426. """<div style="text-align: center;"><a href="$d.url">$d.num_entries</a></div>\n""";
  2427. }
  2428. else
  2429. {
  2430. """<div>&nbsp;</div>""";
  2431. }
  2432. """</td>\n""";
  2433. }
  2434. if ($.post_empty > 0)
  2435. {
  2436. """<td class="yeardate" colspan="$.post_empty">&nbsp;</td>\n""";
  2437. }
  2438. "</tr>";
  2439. }
  2440.  
  2441. function print_theme_preview() {
  2442. var string content_font_family = css_font_family($*content_font, $*content_font_fallback);
  2443.  
  2444. """
  2445. <div style="background-color: $*outer_table_bgcolor; padding: 15px; border: 1px solid $*border_color;">
  2446. <div style="background-color: $*content_bgcolor; border: 1px solid $*border_color;">
  2447. <div style="position: relative; float: $*userpic_position; background-color: $*entry_bgcolor; padding: 5px; margin: 10px; z-index: 15; border-width: 1px; border-color: $*entrytitle_bgcolor; border-style: solid;"><div style="background-color: #666; width: 100px; height: 100px;">&nbsp;</div></div>
  2448. <div style="background-color: $*entrytitle_bgcolor; padding: 5px;">
  2449. <div style='line-height: 200%; top: 5px; color: $*date_fgcolor; $content_font_family; font-size: $*date_font_size$*font_unit;'>25 November 2006 @ 04:58 pm</div>
  2450. <div style='font-weight: bold; padding: 10px; color: $*subject_fgcolor; $content_font_family; font-size: $*subject_font_size$*font_unit;'>Lorem ipsum dolor sit amet</div>
  2451. </div>
  2452.  
  2453. <div style='margin: 0px 10px 10px 30px; padding: 10px; background-color: $*entry_bgcolor; color: $*entry_fgcolor; $content_font_family; font-size: $*content_font_size$*font_unit; text-align: left; border-width: 1px; border-color: $*entrytitle_bgcolor; border-style: solid;'>
  2454. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc tincidunt sollicitudin orci. Vivamus sollicitudin arcu non mi lobortis lacinia. Sed quis orci. Vestibulum in risus sit amet lectus gravida pellentesque. Curabitur faucibus risus eu pede hendrerit eleifend. Nunc vitae odio. Praesent turpis velit, venenatis vitae, accumsan quis, aliquam scelerisque, diam. Nulla fringilla dapibus nulla. Sed in sapien sit amet odio eleifend venenatis. Nunc neque ipsum, convallis id, volutpat eget, bibendum placerat, magna. Integer commodo, nunc eu faucibus tincidunt, est lectus sodales purus, pulvinar pretium purus diam sollicitudin justo. Nulla facilisi. Vivamus eleifend. Fusce sodales dui sit amet dolor.
  2455.  
  2456. <div style="height: 15px;">&nbsp;</div>
  2457. <div style='$content_font_family; font-size: $*content_font_size$*font_unit; text-align: right; background-color: $*entrytitle_bgcolor; padding: 0px 5px 0px 5px; position: relative; top: 15px;'><a style="color: $*comments_link_color;" href='#'>3 comments</a> | <a style="color: $*comments_link_color;" href='#'>Leave a comment</a></div>
  2458. </div>
  2459.  
  2460. <div style="height: 35px;"></div>
  2461. <div style="height: 15px;">&nbsp;</div>
  2462. </div>
  2463. </div>
  2464. """;
  2465. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement