Advertisement
Guest User

Untitled

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