1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 | # -*-s2-*- ## -- n e b u l a ! -- ###################################################### layerinfo type = "layout"; layerinfo name = "Nebula"; layerinfo redist_uniq = "nebula/layout"; layerinfo author_name = "jc"; layerinfo author_email = "[email protected]"; layerinfo des = "A simple but incredibly flexible design with sidebar, that can look as simple or as complicated as you like."; layerinfo lang = "en"; layerinfo previews = "nebula/layout.jpg"; ## -- p r o p e r t i e s -- ################################################ propgroup presentation { property int summary_items { des = "Summary Items"; note="Maximum number of items in the Page Summary list. Set to 0 to turn off the Page Summary. Set to 100 to show all available items."; } property bool pres_show_entry_list { des = "Show links to entries on page?"; } property string pres_page_width { des = "Page Width"; note = "The width of the total page content, including the sidebar."; values = "90%|90%|80%|80%|70%|70%|60%|60%|50%|50%|40%|40%"; } property string pres_page_align { des = "Page Alignment"; values = "left|Left|center|Center|right|Right"; } property string pres_sidebar_width { des = "Sidebar Width"; note = "How much of the page width is taken up by the sidebar."; values = "30%|30%|25%|25%|20%|20%|15%|15%"; } property string pres_sidebar_align { des = "Which side of the page should the sidebar show up on?"; values = "left|Left|right|Right"; } property bool pres_show_cal { des = "Show calendar strip on journal pages?"; } property bool show_entry_userpic { des = "Show entry-specific userpic next to each entry?"; } property bool pres_use_gradients { des = "Use gradients when displaying entry headers and sidebar boxes?"; } property use comment_userpic_style; property use use_shared_pic; property use view_entry_disabled; property use page_recent_items; property use page_friends_items; property use linklist_support; property string text_date_format { des = "Date format"; example = "%%yyyy%%.%%mm%%.%%dd%%"; } property string text_time_format { des = "Time format"; example = "%%HH%%:%%min%%"; } property use custom_control_strip_colors; } set summary_items = 100; set pres_show_entry_list = true; set pres_page_width = "80%"; set pres_page_align = "center"; set pres_sidebar_width = "20%"; set pres_sidebar_align = "left"; set pres_show_cal = true; set show_entry_userpic = true; set pres_use_gradients = true; set text_date_format = "%%yyyy%%.%%mm%%.%%dd%%"; set text_time_format = "%%HH%%:%%min%%"; propgroup colors { property Color col_weaker_fg { des = "Default text color for the page"; note = "This only really affects the calendar strip, although it is used elsewhere. Text color on content areas is more important."; } property Color col_weak_fg { des = "Text color on content areas"; } property Color col_stronger_fg { des = "Text color on headers"; } property Color col_strong_fg { des = "Text color on menus"; } property Color col_neutral_fg { des = "Text color on titles"; } property Color col_cmtbarone_fg { des = "Text color on comment bars"; } property Color col_cmtbartwo_fg { des = "Text color on alternating comment bars"; } property Color col_cmtbarscrn_fg { des = "Text color for screened comments"; } property Color col_entry_link { des = "Link color in entries"; } property Color col_entry_vlink { des = "Visited link color in entries"; } property Color col_sidebar_link { des = "Link color in sidebar"; } property Color col_sidebar_vlink { des = "Visited link color in sidebar"; } property Color col_weaker_bg { des = "Default background color for the page"; } property Color col_weak_bg { des = "Background color on content areas"; } property Color col_stronger_bg { des = "Background color on headers"; } property Color col_strong_bg { des = "Background color on menus"; } property Color col_neutral_bg { des = "Background color on titles"; } property Color col_entry_bg { des = "Background color on entries"; } property Color col_border { des = "Color for content area borders"; note = "Content areas affected include sidebar boxes and the mini calendar."; } property Color col_cmtbarone_bg { des = "Background color for comment bars"; } property Color col_cmtbartwo_bg { des = "Background color for alternating comment bars"; } property Color col_cmtbarscrn_bg { des = "Background color for screened comment bars"; } property use control_strip_bgcolor; property use control_strip_fgcolor; property use control_strip_bordercolor; property use control_strip_linkcolor; } set col_weaker_fg = "#000000"; set col_weak_fg = "#ffffff"; set col_stronger_fg = "#5b4b26"; set col_strong_fg = "#5b4b26"; set col_neutral_fg = "#550301"; set col_cmtbarone_fg = "#ffffff"; set col_cmtbartwo_fg = "#ffffff"; set col_cmtbarscrn_fg = "#ffffff"; set col_entry_link = "#000000"; set col_entry_vlink = "#000000"; set col_sidebar_link = "#000000"; set col_sidebar_vlink = "#000000"; set col_weaker_bg = "#effe8f"; set col_weak_bg = "#5b4b26"; set col_stronger_bg = "#fbe46a"; set col_strong_bg = "#fbe46a"; set col_neutral_bg = "#000000"; set col_entry_bg = "#977e3b"; set col_border = "#000000"; set col_cmtbarone_bg = "#e2c956"; set col_cmtbartwo_bg = "#afb13e"; set col_cmtbarscrn_bg = "#fcda3e"; propgroup fonts { property string main_font { des = "Preferred Font"; maxlength = 25; size = 10; example = "Arial"; note = "Leave blank for your browser's default font"; } property string main_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property string header_font { des = "Font for the top header box"; maxlength = 25; size = 10; example = "Arial"; note = "Leave blank for your browser's default font"; } property string header_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property string header_font_size { noui = 1; } property string content_font { des = "Font for the content boxes"; maxlength = 25; size = 10; example = "Arial"; note = "Leave blank for your browser's default font"; } property string content_font_fallback { noui = 1; } property string subheading_font { des = "Font for subheadings"; maxlength = 25; size = 10; example = "Arial"; note = "Leave blank for your browser's default font"; } property string subheading_font_fallback { noui = 1; } property string entryheading_font { des = "Font for entry headings"; maxlength = 25; size = 10; example = "Arial"; note = "Leave blank for your browser's default font"; } property string entryheading_font_fallback { noui = 1; } } set main_font = "Georgia"; set main_font_fallback = "serif"; set header_font = "Georgia"; set header_font_fallback = "serif"; set header_font_size = "2em"; set content_font = "Georgia"; set content_font_fallback = "sans-serif"; set subheading_font = "Arial"; set subheading_font_fallback = "sans-serif"; set entryheading_font = "Georgia"; set entryheading_font_fallback = "sans-serif"; propgroup images { property string background_image { des = "Background image"; note = "URL to an image to be used for the page background (leave blank for none). Page texture won't be used if an image is defined."; } property string background_repeat { des = "Background image repeat"; note = "This does not affect whether your background scrolls with the page. That option is coming up next."; values = "repeat|Repeat|no-repeat|Don't repeat|repeat-x|Repeat across only|repeat-y|Repeat down only"; } property string background_attachment { des = "Should the background image scroll with the page?"; values = "scroll|Yes|fixed|No"; } property string background_position { des = "Background image position"; note = "Does not apply if background image is repeating in both directions."; 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"; } property string pres_txtr_bg { des = "Texture to use for page background"; note = "Won't be used if a background image is defined above."; values = "none|None|brushed_metal.png|Brushed Metal|burlap.png|Burlap|camouflage.png|Camouflage|canvas.png|Canvas|chalk.png|Chalk|cork.png|Cork|fibers.png|Fibers|floral.png|Floral|ice.png|Ice|manila.png|Manila|marble.png|Marble|paper.png|Paper|ridge.png|Ridge|rough.png|Rough|stucco.png|Stucco|terracotta.png|Terracotta|type.png|Type|wavy.png|Wavy"; } property string pres_txtr_h { des = "Texture to use for page header"; values = "none|None|brushed_metal.png|Brushed Metal|burlap.png|Burlap|camouflage.png|Camouflage|canvas.png|Canvas|chalk.png|Chalk|cork.png|Cork|fibers.png|Fibers|floral.png|Floral|ice.png|Ice|manila.png|Manila|marble.png|Marble|paper.png|Paper|ridge.png|Ridge|rough.png|Rough|stucco.png|Stucco|terracotta.png|Terracotta|type.png|Type|wavy.png|Wavy"; } property string pres_txtr_c { des = "Texture to use for main content areas"; values = "none|None|brushed_metal.png|Brushed Metal|burlap.png|Burlap|camouflage.png|Camouflage|canvas.png|Canvas|chalk.png|Chalk|cork.png|Cork|fibers.png|Fibers|floral.png|Floral|ice.png|Ice|manila.png|Manila|marble.png|Marble|paper.png|Paper|ridge.png|Ridge|rough.png|Rough|stucco.png|Stucco|terracotta.png|Terracotta|type.png|Type|wavy.png|Wavy"; } property string header_image { des = "URL of image to be used as page header"; example = "http://example.com/your_image.jpg"; } property string img_edit { noui = 1; } property string img_delete { noui = 1; } property string img_screen { noui = 1; } property string img_unscreen { noui = 1; } property string img_freeze { noui = 1; } property string img_unfreeze { noui = 1; } property string img_track { noui = 1; } property string img_untrack { noui = 1; } property string img_tracking_parent { noui = 1; } } set background_image = ""; set background_repeat = "repeat"; set background_attachment = "scroll"; set background_position = "center"; set pres_txtr_bg = "none"; set pres_txtr_h = "none"; set pres_txtr_c = "none"; propgroup text { property string text_navigation { des = "Navigation menu title"; } property string text_navigation_extra { des = "Page-specific navigation menu title"; example = "This page"; } property string page_summary_title { des = "Page Summary menu title"; } property string text_entry_plural { des = "Text to describe entries in month view"; format = "plurals"; example = "1 entry // # entries"; } property use text_nosubject; property use text_meta_mood; property use text_meta_music; property use text_meta_location; property use text_meta_groups; property use text_noentries_day; property use text_max_comments; property string text_comment_from { des = "Text to indicate when comment was posted"; example = "at"; maxlength = "20"; } property use text_comment_date; property use text_comment_ipaddr; property use text_comment_frozen; property use text_reply_nocomments_header; property use text_reply_nocomments; property string text_add_mem { des = "Add to memories"; } property use text_edit_entry; property use text_edit_tags; property use text_tell_friend; property string text_track_comments { des = "Track new comments"; } property string text_untrack_comments { des = "Stop tracking new comments"; } property use text_view_recent; property use text_view_friends; property use text_view_archive; property use text_view_userinfo; property use text_view_memories; property use text_permalink; property use text_post_comment; property use text_read_comments; property use text_post_comment_friends; property use text_read_comments_friends; property use text_reply_back; property use text_comment_reply; property use text_comment_parent; property use text_comment_thread; property use text_comment_expand; property string text_link_separator { des = "Text or image to separate links with"; note = "If you use a URL of an image (starting with 'http://'), Nebula will use the image as a separator. It helps to use a small image for this purpose, and your image might break if the URL contains any spaces."; example = "&nbsp;|&nbsp; or http://www.example.com/your_image.jpg"; } } set text_navigation = "Navigation"; set text_navigation_extra = "This page"; set page_summary_title = "Summary"; set text_entry_plural = "1 entry // # entries"; set text_comment_from = ""; set text_comment_date = "at"; set text_add_mem = "Add to Memories"; set text_edit_entry = "Edit"; set text_edit_tags = "Tags"; set text_track_comments = "Track"; set text_untrack_comments = "Stop Tracking"; set text_link_separator = " "; propgroup customcss { property use include_default_stylesheet; property use linked_stylesheet; property use custom_css; } set external_stylesheet = true; set tags_aware = true; ## -- p r o p e r t y h a n d l e r s -- ################################## function prop_init () { var int entry_lightness = $*col_weaker_bg->lightness(); var Color col_entry_bg_tint = $entry_lightness > 120 ? $*col_weaker_bg->lighter(): $*col_weaker_fg; # these shouldn't be limited to a The Boxer subfolder $*img_edit = palimg_tint("boxer/edit.gif", $col_entry_bg_tint); $*img_delete = palimg_tint("boxer/delete.gif", $col_entry_bg_tint); $*img_screen = palimg_tint("boxer/screen.gif", $col_entry_bg_tint); $*img_unscreen = palimg_tint("boxer/unscreen.gif", $col_entry_bg_tint); $*img_freeze = palimg_tint("boxer/freeze.gif", $col_entry_bg_tint); $*img_unfreeze = palimg_tint("boxer/unfreeze.gif", $col_entry_bg_tint); $*img_track = palimg_tint("boxer/track.gif", $col_entry_bg_tint); $*img_untrack = palimg_tint("boxer/untrack.gif", $col_entry_bg_tint); $*img_tracking_parent = palimg_tint("boxer/tracking_parent.gif", $col_entry_bg_tint); # textures! lovely textures. if ($*pres_txtr_bg != "none") { $*pres_txtr_bg = palimg_tint("textures/$*pres_txtr_bg", $*col_stronger_fg, $*col_weaker_bg); } var Color hfg = "#ffffff"; if ($*pres_txtr_h != "none") { $*pres_txtr_h = palimg_tint("textures/$*pres_txtr_h", $hfg, $*col_stronger_bg); } if ($*pres_txtr_c != "none") { $*pres_txtr_c = palimg_tint("textures/$*pres_txtr_c", $*col_weaker_fg, $*col_weak_bg); } if ($*control_strip_bgcolor.as_string == "") { $*control_strip_bgcolor = $*col_entry_bg; } if ($*control_strip_fgcolor.as_string == "") { $*control_strip_fgcolor = $*col_weak_fg; } if ($*control_strip_bordercolor.as_string == "") { $*control_strip_bordercolor = $*col_border; } if ($*control_strip_linkcolor.as_string == "") { $*control_strip_linkcolor = $*col_entry_link; } $*theme_bgcolor = $*col_entry_bg; $*theme_fgcolor = $*col_weak_fg; $*theme_bordercolor = $*col_border; $*theme_linkcolor = $*col_entry_link; } ## -- s t y l e s h e e t f u n c t i o n s -- ############################ function appended_to_stylesheet() { # This function intentionally left blank. Override in user layer. } function print_stylesheet () { var string pres_sidebar_boxbg; var string pres_minical_boxbg; var string pres_page_margins; # figure out the shade applied to weekends on the MiniCal var int minical_lightness = $*col_strong_bg->lightness(); var Color col_minical_weekend = $minical_lightness > 120 ? $*col_strong_bg->darker(50) : $*col_strong_bg->lighter(50); # figuring out the widths and margins the ghetto way var int width_page = int($*pres_page_width); var int width_sidebar = int($*pres_sidebar_width); var int width_content = 100 - $width_sidebar - 11; # The 11 is arbitrary; it's what makes the content not move below the sidebar at 800x600 and up var int width_margin = 100 - $width_page; if ($*pres_page_align == "center") { var string str_width_margin = string($width_margin / 2); $pres_page_margins = "margin-left: $str_width_margin%;"; } else { var string str_width_margin = string($width_margin); if ($*pres_page_align == "left") { $pres_page_margins = "margin-right: $str_width_margin%;"; } else { $pres_page_margins = "margin-left: $str_width_margin%;"; } } var string pres_content_width = string($width_content) + "%"; # death to IE var string pres_sidebar_width_ie = string($width_sidebar - 3) + "%"; var string pres_content_width_ie = string($width_content - 3) + "%"; # gradients! lovely gradients. if ($*pres_use_gradients) { var Color col_black = "#000000"; var Color col_white = "#ffffff"; # Let's determine some colours first var int tmp_boxborder_lightness = $*col_border->lightness(); var Color tmp_boxborder_avg = $tmp_boxborder_lightness > 120 ? $*col_border->darker(70) : $*col_border->lighter(70); var string tmp_gstart = $tmp_boxborder_avg.as_string->substr(1, 6); var string tmp_gend = $*col_strong_bg.as_string->substr(1, 6); # Now to generate the gradients $pres_sidebar_boxbg = "background: url($*PALIMGROOT/shadow/t.gif/pt$tmp_gstart$tmp_gend) repeat-x;"; $pres_minical_boxbg = "background: $*col_strong_bg url($*PALIMGROOT/shadow/b.gif/pt$tmp_gstart$tmp_gend) repeat-x scroll bottom;"; } else { $pres_minical_boxbg = "background-color: $*col_strong_bg;"; } """ body { margin: 0; padding: 0; font-family: $*main_font, $*main_font_fallback; font-size: 0.75em; """; if (clean_url($*background_image) != "") { """ background-image: url('$*background_image'); background-position: $*background_position; background-repeat: $*background_repeat; background-attachment: $*background_attachment; """; } elseif ($*pres_txtr_bg != "none") { """ background: url($*pres_txtr_bg);"""; } """ background-color: $*col_weaker_bg; color: $*col_weaker_fg; } #mainContainer { width: $*pres_page_width; $pres_page_margins min-width: 300px; } #header { padding: 0 1em; min-height: 110px; margin: 0 0 10px 0; """; if ($*pres_txtr_h != "none") { """ background: url($*pres_txtr_h);"""; } """ background-color: $*col_stronger_bg; color: $*col_stronger_fg; } #header h1 { margin: 0 0 -10px 0; padding: 15px 0; } #header a { font-family: $*header_font, $*header_font_fallback; font-size: $*header_font_size; text-decoration: none; color: $*col_stronger_fg; } #header p { color: $*col_neutral_fg; font-size: 18px; font-style: italic; margin: 0 0 0 20px; } #content { float: left; background-color: $*col_weak_bg; color: $*col_weak_fg; padding: 5px; margin: 20px 1% 20px 1%; """; if ($*pres_txtr_c != "none") { """ background: url($*pres_txtr_c);"""; } """ width: $pres_content_width; voice-family: "\"}\""; voice-family:inherit; width: $pres_content_width_ie; } html>body #content { width: $pres_content_width_ie; } #content p { margin-top: 0px; margin-bottom: 0px; padding: 8px; } #sideBar { float: $*pres_sidebar_align; padding: 5px; margin: 20px 1% 20px 1%; background-color: $*col_weak_bg; color: $*col_weak_fg; """; if ($*pres_txtr_c != "none") { """background: url($*pres_txtr_c);"""; } """ width: $*pres_sidebar_width; voice-family: "\"}\""; voice-family:inherit; width: $pres_sidebar_width_ie; } html>body #sideBar { width: $pres_sidebar_width_ie; } #sideBarHeader { min-height: 100px; background-color: $*col_stronger_bg; color: $*col_stronger_fg; """; if ($*pres_txtr_h != "none") { """background: url($*pres_txtr_h);"""; } """ vertical-align: bottom; margin-bottom: 10px; } #sideBar h4 { color: $*col_neutral_fg; text-transform: uppercase; font-weight: normal; font-family: $*subheading_font, $*subheading_font_fallback; display: block; text-align: center; padding: 5px; padding-bottom: 0; $pres_sidebar_boxbg } #sideBar ul { margin: 0 0 1em 1em; padding: 0; list-style-type: none; } .sideBarBox { border: 2px solid $*col_border; margin-bottom: 5px; background-color: $*col_strong_bg; color: $*col_strong_fg; } .sideBarBox a, .sideBarBox a:active { color: $*col_sidebar_link; } .sideBarBox a:visited { color: $*col_sidebar_vlink; } .sideBarBox h5 { font-family: $*subheading_font, $*subheading_font_fallback; margin: 10px 0 0 0; } .sideBarUpi { margin: 0; padding: 2px; } .entry { padding: 5px; background-color: $*col_entry_bg; font-family: $*content_font, $*content_font_fallback; } .entry a { color: $*col_entry_link; } .entry a:visited { color: $*col_entry_vlink; } .entry h3 { font-family: $*entryheading_font, $*entryheading_font_fallback; font-size: 1.5em; padding: 3px; margin: 10px 0; } .entryBar { clear: both; overflow: auto; font-size: 0.9em; } .entryBar H3 A:hover, .entryBar H3 A:visited, .entryBar H3 A { text-decoration: none; color: $*col_weak_fg; } .entryText { margin-top: 5px; margin-bottom: 5px; } .entryFooter { padding-top: 1em; } .commentsInfo { float: right; } form#postform textarea { width: 100%; max-width: 99%; } form#postform input { max-width: 100%; } .commentBoxOne { border: 5px solid $*col_cmtbarone_bg; } .commentBoxTwo { border: 5px solid $*col_cmtbartwo_bg; } .commentBoxScreened { border: 5px solid $*col_cmtbarscrn_bg; } .commentBoxOne .commentInfo { background-color: $*col_cmtbarone_bg; color: $*col_cmtbarone_fg; } .commentBoxTwo .commentInfo { background-color: $*col_cmtbartwo_bg; color: $*col_cmtbartwo_fg; } .commentBoxScreened .commentInfo { background-color: $*col_cmtbarscrn_bg; color: $*col_cmtbarscrn_fg; } .commentBoxOne, .commentBoxTwo, .commentBoxScreened { background-color: $*col_weak_bg; color: $*col_weak_fg; border-right: none; border-bottom: none; width: 99%; } .commentBoxOne a, .commentBoxTwo a, .commentBoxScreened a { color: $*col_entry_link; } .commentBoxOne a:visited, .commentBoxTwo a:visited, .commentBoxScreened a:visited { color: $*col_entry_vlink; } .commentUpi { float: left; margin-right: 10px; margin-bottom: 10px; } .commentUpi img { border: 0; } .commentInfo { width: 100%; vertical-align: bottom; padding-botttom: 5px; background-color: #ccf; } .commentButs { vertical-align: bottom; text-align: right; } .commentText { padding-top: 5px; padding-left: 5px; } .commentLinks { clear: both; margin-left: 5px; } #footer { float: left; width: """+$pres_content_width+"""px; font-size: 0.8em; margin-top: 10px; margin-bottom: 10px; } h2, h3, h4 { margin-top: 0; } a { color: $*col_entry_link; text-decoration: none; } a:hover { text-decoration: underline; } a:visited { color: $*col_entry_vlink; } .userpic { float: right; margin-left: 5px; margin-bottom: 5px; } div.entrysub h3 { margin: 0; } div.MiniCalContainer { border: 2px solid $*col_border; width: 98%; height: 3em; overflow: auto; margin-top: 10px; margin-left: 1%; $pres_minical_boxbg } .MiniCalDayPosts { font-weight: bold; } td.MiniCalWeekend { background-color: $col_minical_weekend; } td.MiniCalDay, td.MiniCalDayPosts { font-family: Trebuchet, Verdana, sans-serif; font-size: 0.95em; color: $*col_strong_fg; } .MiniCalDay a, .MiniCalDay a:active, .MiniCalDayPosts a, .MiniCalDayPosts a:active { color: $*col_sidebar_link; } .MiniCalDay a:visited, .MiniCalDayPosts a:visited { color: $*col_sidebar_vlink; } .monthWrapper { display: table; border: 1px solid black; width: 100%; } .monthRow { display: table-row; border: 1px solid black; } .monthCell, .monthDay { display: table-cell; border: 1px solid black; padding: 3px; } .monthDay { font-family: $*subheading_font, $*subheading_font_fallback; font-size: 2em; text-align: right; } #cal a { text-decoration: none; color: $*col_entry_link; } .calrow { clear: both; font-family: Arial, sans-serif; } .calempty { width: 24px; font-size: 11px; margin: 1px; float: left; } .calactitem { float: left; margin: 1px; width: 23px; font-size: 11px; text-align: center; background-color: white; border-right: 1px solid black; border-bottom: 1px solid black; } .calDayEntries { font-size: 1.5em; font-weight: bold; } .calDay, .calDayEntries, .bigday { font-family: $*subheading_font, $*subheading_font_fallback; text-align: center; vertical-align: middle; } .bigday { font-weight: bold; } .cal td { padding: 3px; } .calinitem { float: left; margin: 1px; width: 23px; font-size: 11px; text-align: center; border-right: 1px solid black; border-bottom: 1px solid black; } """; print_custom_control_strip_css(); appended_to_stylesheet(); } ## -- i m a g e l i n k s e p a r a t o r -- ############################ function separator() : string { # Would do this in prop_init, except you can't use HTML in # $* variables. Poo. if (clean_url($*text_link_separator)) { return " <img src=\"$*text_link_separator\" align=\"absmiddle\" alt=\" | \" /> "; } else { return $*text_link_separator; } } ## -- p r i n t l i n k l i s t -- ######################################## function linklist() : string { var string return = ""; var Page p = get_page(); if (not $*linklist_support or size $p.linklist <= 0) { return ""; } var bool section_open = false; $return = $return + " <hr />\n"; var int count = 0; foreach var UserLink l ($p.linklist) { $count = $count + 1; if ($l.title) { if ($l.is_heading) { if ($section_open) { $return = $return + " </ul>\n </div>\n"; } $return = $return + """ <div class="sideBarBox">\n <h4>$l.title</h4>\n <ul>\n"""; $section_open = true; } else { if ($count == 1) { $return = $return + """ <div class="sideBarBox">\n <h4 style="margin-bottom: 0;"> </h4>\n <ul>\n"""; $section_open = true; } $return = $return + """ <li><a href="$l.url">$l.title</a></li>\n"""; } } } $return = $return + " </ul>\n </div>\n"; return $return; } ## -- p a g e s u m m a r i e s -- ######################################## function num_comments_in_thread (Comment[] comments) : int { var int total = 0; foreach var Comment c ($comments) { $total = $total + 1; if (size $c.replies > 0) { $total = $total + num_comments_in_thread($c.replies); } } return $total; } function Page::lay_entry_nav (Entry e) : string { var string date = $e.time->date_format($*text_date_format); var string time = $e.time->time_format($*text_time_format); var string line; var string subject = ($e.subject != "") ? " $e.subject" : """ <i class="nosubject">$*text_nosubject</i>"""; var string j = ($.view == "read" or $.view == "network" and $e.journal.username != $e.poster.username) ? " in $e.journal: " : ""; var string item = ($.view == "read" or $.view == "network" or $e.journal.username != $e.poster.username) ? "<h5>$date @ $time</h5>" + $e.poster->as_string() + "$j <a href=\"#" + $e.itemid + "\">" : "<h5>$date @ $time</h5><a href=\"#" + $e.itemid + "\">"; $line = """ <li>$item $subject</a></li>\n"""; return $line; } function Page::lay_print_summary () { } function RecentPage::lay_print_summary () { var int count = $*summary_items; if ($count == 0) { return; } var string text; foreach var Entry e ($.entries) { if($count > 0) { $text = $text + $this->lay_entry_nav($e); } $count = $count - 1; } if($text != "") { if($count < 0) { $count = $count * -1; $text = $text + """ <li><strong>+$count more</strong></li>\n"""; } print safe $text; } } function EntryPage::lay_print_summary () { var int count = $*summary_items; if($count == 0) { return; } var string text; $text = $this->lay_entry_nav($.entry); $count = $count - 1; foreach var Comment c ($.comments) { if($count > 0) { var string subject = ($c.subject != "") ? $c.subject : """<i class="nosubject">$*text_nosubject</i> """; $text = $text + """ <li>$c.poster: <a href="#$c.anchor">$subject</a>"""; var int num = num_comments_in_thread($c.replies); if($num > 0) { $text = $text + " [+" + string($num) + "] "; } $text = $text + """</li>\n"""; } $count = $count - 1; } if($text != "") { if($count < 0) { $count = $count * -1; $text = $text + """ <li><strong>+$count more</strong></li>\n"""; } if($count != ($*summary_items - 1)) { print safe $text; } } } function DayPage::lay_print_summary () { var int count = $*summary_items; if($count == 0) { return; } var string text; foreach var Entry e ($.entries) { $text = $text + $this->lay_entry_nav($e); } if($text != "") { if($count < 0) { $count = $count * -1; $text = $text + """ <li><strong>+$count more</strong></li>\n"""; } print safe $text; } } function MonthPage::lay_print_summary () { var int count = $*summary_items; if($count == 0) { return; } var string entrytext = "1 entry // # entries"; var string text; foreach var MonthDay d ($.days) { if($count > 0) { var string day = lang_ordinal($d.day); if ($d.has_entries) { var string entries = get_plural_phrase($d.num_entries, "text_entry_plural"); $text = $text + """ <li><a href="#anchor$d.day">$day [$entries]</a></li>\n"""; } } } if($text != "") { if($count < 0) { $count = $count * -1; $text = $text + """ <li><strong>+$count more</strong></li>"""; } print safe $text; } } ## -- e x t r a n a v i g a t i o n l i n k s -- ######################## function Page::lay_nav_links() : string[] { var string[] ret = []; return $ret; } function RecentPage::lay_nav_links() : string[] { var string[] ret = []; var int i = 0; if (viewer_is_owner()) { $ret[$i] = """<a href="$*SITEROOT/update.bml">Update Journal</a>"""; $i++; } if ($.nav.forward_url != "" or $.nav.backward_url != "") { if ($.nav.backward_url != "") { var string previous = get_plural_phrase($.nav.backward_count, "text_skiplinks_back"); $ret[$i] = """<a href="$.nav.backward_url">$previous</a>"""; $i++; } if ($.nav.forward_url != "") { var string next = get_plural_phrase($.nav.forward_count, "text_skiplinks_forward"); $ret[$i] = """<a href="$.nav.forward_url">$next</a>"""; $i++; } } return $ret; } function EntryPage::lay_nav_links() : string[] { var string[] ret; var int i = 0; var Link prev = $.entry->get_link("nav_prev"); var Link next = $.entry->get_link("nav_next"); if ($prev.url != "" or $next.url != "") { if ($prev.url != "") { $ret[$i] = """<a href="$prev.url">$prev.caption</a>"""; $i++; } if ($next.url != "") { $ret[$i] = """<a href="$next.url">$next.caption</a>"""; } } return $ret; } function YearPage::lay_nav_links() : string[] { var string[] ret; var int i = 0; foreach var YearYear y ($.years) { if ($y.displayed) { $ret[$i] = """<strong>$y.year</strong>\n"""; } else { $ret[$i] = """<a href="$y.url">$y.year</a>\n"""; } $i++; } return $ret; } function MonthPage::lay_nav_links() : string[] { var string[] ret = []; var int i; var string links = ""; if ($.prev_url != "") { $ret[$i] = """<a href="$.prev_url">"""+$.prev_date->date_format($*lang_fmt_month_long)+"""</a>"""; $i++; } if ($.next_url != "") { $ret[$i] = """<a href="$.next_url">"""+$.next_date->date_format($*lang_fmt_month_long)+"""</a>"""; $i++; } return $ret; } function DayPage::lay_nav_links() : string[] { var string[] ret = []; var int i; if ($.prev_url != "") { $ret[$i] = """<a href="$.prev_url">$*text_day_prev</a>"""; $i++; } if ($.next_url != "") { $ret[$i] = """<a href="$.next_url">$*text_day_next</a>"""; $i++; } return $ret; } ## -- p r i n t s i d e b a r -- ########################################## function Page::lay_print_sidebar() { var Page p = get_page(); var string userpic; var Image up_img = $.journal.default_pic; if (defined $up_img) { $userpic = """ <div id="sideBarHeader"> <div class="sideBarUpi"> <center><img src="$up_img.url" class="sideBarUpi" alt="" height="$up_img.height" width="$up_img.width" /></center> </div> </div> """; } var string website; if ($.journal.website_url != "") { $website = """<li><a href="$.journal.website_url">$.journal.website_name</a></li>\n"""; } print safe """ <div id="sideBar"> $userpic <div class="sideBarBox"> <h4>$*text_navigation</h4> <ul>\n"""; var string views; foreach var string v ($.views_order) { $views = $views + " <li"; if ($v == $.view or ($v == "archive" and $.view == "day") or ($v == "archive" and $.view == "month")) { $views = $views + " id='active'"; } else { $views = $views + " class='inactive'"; } $views = $views + ">"; $views = $views + """<a href="$.view_url{$v}">""" + lang_viewname($v) + "</a>"; $views = $views + "</li>\n"; } $views = $views + """ <li class="inactive"><a href="$*SITEROOT/tools/memories.bml?user=$p.journal.username">$*text_view_memories</a></li>\n"""; var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name; if ($.journal.website_url != "") { $views = $views + """ <li class="inactive"><a href="$.journal.website_url">$website_name</a></li>\n"""; } println safe """$views </ul>\n </div>\n"""; var string[] submenu = $this->lay_nav_links(); if (size $submenu > 0) { print safe " <div class=\"sideBarBox\">\n <h4>$*text_navigation_extra</h4>\n <ul>\n"; foreach var string subitem ($submenu) { print """ <li>$subitem</li>\n"""; } println " </ul>\n </div>\n\n"; } if ( $*pres_show_entry_list and $p.view != "archive") { print safe " <div class=\"sideBarBox\">\n <h4>$*page_summary_title</h4>\n <ul>\n"; $p->lay_print_summary(); " </ul>\n </div>\n"; } print linklist(); """ <div class="sideBarBox" style="margin-bottom: 0;"> <h4 style="margin-bottom: 5px;"><a href="$*SITEROOT">$*SITENAMESHORT</a></h4> </div> </div> """; } ## -- p r i n t c a l e n d a r -- ######################################## function print_calendar() : string { var string calendar = ""; var Page p = get_page(); var YearMonth m = $p->get_latest_month(); var string month = $m->month_format(); if($m.has_entries) { $calendar = """ <div class="MiniCalContainer" align="center"> <table class="MiniCal"> <tr><td nowrap="nowrap" class="MiniCalDay" style="color: $*col_neutral_fg;"><i>$month</i> </td> """; var YearWeek[] theWeeks = $m.weeks; foreach var YearWeek w ($theWeeks) { var YearDay[] theDays = $w.days; var int start = $w.pre_empty; foreach var YearDay d ($theDays) { $start = $start + 1; $calendar = $calendar + "\n <td valign=\"top\" class=\""; if ( $start == 1 or $start == 7 ) { $calendar = $calendar + "MiniCalWeekend "; } if ($d.num_entries) { $calendar = $calendar + """MiniCalDayPosts"><a href="$d.url">""" + $d.day->zeropad(2) + "</a></td>"; } else { $calendar = $calendar + """MiniCalDay">""" + $d.day->zeropad(2) + "</td>"; } } } $calendar = $calendar + "\n </tr>\n </table>\n </div>\n"; } if ($calendar == "") { return "Nothing to see here."; } return $calendar; } ## -- p r i n t p a g e -- ################################################ function Page::print () { var string title = $this->title(); var string headerimg = clean_url($*header_image) != "" ? "<img src='$*header_image' alt='' />" : ""; # HEAD """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="" lang=""> <head> <meta http-equiv="X-UA-Compatible" content="IE=7"/> """; $this->print_head(); $this->print_stylesheets(); print safe """ <title>$title</title> </head> """; # BODY """ <body> <a name="top"></a> """; $this->print_control_strip(); if (viewer_sees_hbox_top()) { """<div style="text-align: center;"""; if (viewer_sees_vbox()) { " width: 75%;"; } "\">"; $this->print_hbox_top(); "</div>"; } if (viewer_sees_vbox()) { """<div style="float: right; margin-right: 10px;">"""; $this->print_vbox(); "</div>"; """<div style="width: 75%;">"""; } """ <div id="mainContainer"> """; if ($*pres_show_cal and $this.view != "friends") { print print_calendar(); } if ($*pres_sidebar_align == "left") { $this->lay_print_sidebar(); } print safe """ <!-- h e a d e r --------------------------------- --> <div id="content"> <div id="header"> <div id="headerimg">$headerimg</div> <div id="title"> <h1><a href="$.base_url">$.global_title</a></h1> <p>$.global_subtitle</p> </div> </div> """; $this->print_body(); var string[] submenu = $this->lay_nav_links(); if (size $submenu > 0) { "<div class=\"entry\" align=\"center\">"; foreach var string subitem ($submenu) { print """$subitem """; } "</div>"; } "</div>"; if ($*pres_sidebar_align == "right") { $this->lay_print_sidebar(); } if (viewer_sees_hbox_bottom()) { """<div style="text-align: center; clear: both;">"""; $this->print_hbox_bottom(); "</div>"; } "</div>"; if (viewer_sees_vbox()) { "</div>"; } """ </body> </html>"""; } ## -- p r i n t e n t r y -- ############################################## function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) { var string date = $e.time->date_format($*text_date_format); var string time = $e.time->time_format($*text_time_format); var string entrybarstyle = ""; var string h3style = ""; var string link_separator = separator(); var string subjstyle = ""; if ($bgcolor and $fgcolor) { if ($e.subject->length() > 0 and $p.view == "friends" and $*pres_use_gradients) { var Color gbg = $fgcolor->average($bgcolor); var string gstart = $gbg.as_string->substr(1, 6); var string gend = $bgcolor.as_string->substr(1, 6); var string gradient = "$*PALIMGROOT/shadow/t.gif/pt" + $gstart + $gend; $entrybarstyle = " style=\"background: url($gradient) repeat-x;\""; $h3style = " style=\"background-color: $bgcolor; color: $fgcolor;\""; $subjstyle = "color: $fgcolor;"; } else { if (not defined $bgcolor) { $bgcolor = $*col_border; } } } else { if (not defined $bgcolor) { $bgcolor = $*col_border; } } "\n <a name=\"$e.itemid\"></a>\n <div class=\"entry\" style=\"border: 2px solid $bgcolor;\">\n <div class=\"entryBar\"$entrybarstyle>\n"; if (defined $e.userpic and ($*show_entry_userpic or $p.view == "friends")) { " <div class=\"userpic\" align=\"right\">\n "; print $e.userpic->as_string(); "\n </div>\n"; } if ( $e.subject ) { " <h3$h3style>"; if ($p.view != "entry") { print $e->formatted_subject({"class"=>"subj-link","style"=>"$subjstyle"}); } else { "$e.subject"; } " </h3>\n"; } " <span class=\"subHeading\"><b>Posted $e.security</b> "; if ($e.poster.username != $e.journal.username) { if ($e.journal.journal_type == "C" or $e.journal.journal_type == "S") { "by " + $e.poster->as_string(); } if ($p.view == "friends") { " in " + $e.journal->as_string(); } } else { if ($p.view == "friends") { if ($e.journal.journal_type == "Y") { "in "; } else { "by "; } print $e.journal->as_string(); } } " on $date at $time</span>\n"; if ( not $hide_text ) { # current mood, music etc if ( size $e.metadata ) { foreach var string k ( $e.metadata ) { var string key = $k; var string val = $e.metadata{$k}; if ( $k == "mood" ) { $key = $*text_meta_mood; } elseif ( $k == "music" ) { $key = $*text_meta_music; } elseif ( $k == "location" ) { $key = $*text_meta_location; } elseif ( $k == "groups") { $key = $*text_meta_groups; } if ($k == "mood" and defined $e.mood_icon) { var Image i = $e.mood_icon; $val = "<img src=\"$i.url\" width=\"$i.width\" height=\"$i.height\" alt=\"\" align=\"absmiddle\" /> $val"; } print safe " <br />\n <span class=\"subHeading\"><b>$key:</b> $val</span>\n"; } } # entry tags (why isn't this in $e.metadata?) if ($e.tags) { var int tcount = 0; " <br /><span class=\"ljtags\"><b>Tags:</b> "; foreach var Tag t ($e.tags) { """<a rel="tag" href="$t.url">$t.name</a>"""; $tcount++; if ($tcount != size $e.tags) { ", "; } } "</span>"; } " </div>\n <div class=\"entryText\">\n "; # entry text! $e->print_text();"\n </div>\n"; " <div class=\"entryFooter\">\n"; $e.comments->print(); var Link l = new Link; var int c = 0; var string ca = ""; var string{} link_caption = { "edit_entry" => $*text_edit_entry, "edit_tags" => $*text_edit_tags, "mem_add" => $*text_add_mem, "tell_friend" => $*text_tell_friend, "watch_comments" => $*text_track_comments, "unwatch_comments" => $*text_untrack_comments, }; foreach var string ls ($e.link_keyseq) { $l = $e->get_link($ls); if (defined $l) { if ($c > 0) { print safe $link_separator; } $ca = $link_caption{$ls} != "" ? $link_caption{$ls} : $l.caption; print safe """<a href="$l.url">$ca</a> """; $c++; } } } "</div>"; "</div>"; $p->print_reply_container({"target" => "topcomment"}); "<hr />"; } function Page::print_entry ( Entry e ) { print_entry( $this, $e, null Color, null Color, false ); } function FriendsPage::print_entry ( Entry e ) { var Friend f = $.friends{$e.journal.username}; print_entry( $this, $e, $f.bgcolor, $f.fgcolor, false ); } function print_ebox (Entry e) { if ($e->viewer_sees_ebox()) { """<div style="text-align:center">"""; $e->print_ebox(); "</div><hr />"; } } function RecentPage::print_body { foreach var Entry e ( $.entries ) { $this->print_entry( $e ); print_ebox($e); } } function FriendsPage::print_body { foreach var Entry e ( $.entries ) { $this->print_entry( $e ); if ($e->viewer_sees_ebox()) { """<div style="text-align:center">"""; $e->print_ebox(); "</div><hr />"; } } } ## -- p r i n t c o m m e n t i n f o -- ################################ function CommentInfo::print_postlink() { var Page p = get_page(); if ($.maxcomments) { print safe "$*text_max_comments"; } else { if ($p.view == "entry") { $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment}); } else { print safe "<a href=\"$.post_url\">"+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</a>"; } } } function CommentInfo::print () { var Page p = get_page(); var string link_separator = separator(); " <div class=\"commentsInfo\">\n "; if ( not $.enabled ) { print safe "<a href='$.read_url'>$*text_permalink</a>"; "\n </div>"; return; } if ( $.count > 0 or $.screened and $p.view != "entry") { $this->print_readlink(); } else { print safe "<a href='$.read_url'>$*text_permalink</a>"; } print safe "$link_separator"; $this->print_postlink(); "\n </div>"; } ## -- p r i n t e n t r y p a g e -- #################################### function EntryPage::print_body () { # disabled until someone can figure out why these guys aren't working set_handler("unscreen_comment_#", [ [ "set_class", "cmtbox#", "commentBoxOne", ], ]); set_handler("screen_comment_#", [ [ "set_class", "cmtbox#", "commentBoxScreened", ], ]); print_entry ( $this, $.entry, null Color, null Color, $.viewing_thread ); print_ebox($.entry); if ( $.entry.comments.enabled and $.comment_pages.total_subitems > 0) { print "<div class=\"entry\"><h3>Comments:</h3></div><hr /><div id=\"commentsWrapper\">"; if ( $this.multiform_on ) { $this->print_multiform_start(); } if ( $.comment_pages.total_subitems > 0 ) { $.comment_pages->print(); $this->print_comments( $.comments ); } if ($this.multiform_on) { print "<hr /><div class=\"entry\"><h3>Mass Action:</h3>"; $this->print_multiform_actionline(); $this->print_multiform_end(); "</div><hr />"; } "</div>"; } } ## -- p r i n t e n t r y c o m m e n t -- ############################## function EntryPage::print_comment ( Comment c ) { var string userpic; var string boxclass = ""; var string boxheight = ""; var string poster = defined $c.poster ? $c.poster->as_string() : "<i>$*text_poster_anonymous</i>"; var string sub_icon = defined $c.subject_icon ? $c.subject_icon->as_string() : "" ; if ( $c.screened ) { $boxclass = "commentBoxScreened"; } else { $boxclass = $c.depth % 2 ? "commentBoxOne" : "commentBoxTwo"; } if ( defined $c.userpic and $*comment_userpic_style != "off" ) { var int w = $c.userpic.width; var int h = $c.userpic.height; if ( $*comment_userpic_style == "small" ) { $w = $w / 2; $h = $h / 2; } $userpic = "<div class=\"commentUpi\" style=\"width: $w; float: left; margin-right: 6px; margin-bottom: 6px;\"><a href=\"$*SITEROOT/allpics.bml?user=$c.poster.username\"><img src=\"$c.userpic.url\" width=\"$w\" height=\"$h\" alt=\"$c.poster.name\" title=\"$c.poster.name\" /></a></div>"; } """ <a name="$c.anchor"></a> <div class="$boxclass" id="cmtbox$c.talkid"> $userpic <div class="commentInfo"> <div class="commentButs" style="float: right;"> """; var string{} link_image = { "edit_comment" => $*img_edit, "delete_comment" => $*img_delete, "screen_comment" => $*img_screen, "unscreen_comment" => $*img_unscreen, "freeze_thread" => $*img_freeze, "unfreeze_thread" => $*img_unfreeze, "watch_thread" => $*img_track, "unwatch_thread" => $*img_untrack, "watching_parent" => $*img_tracking_parent, }; var Link lnk; foreach var string link_key ($c.link_keyseq) { $lnk = $c->get_link($link_key); if (defined $lnk) { var string img_url = $link_image{$link_key} != "" ? $link_image{$link_key} : $lnk.icon.url; """<span class="icon"><a href="$lnk.url"><img src="$img_url" border="0" alt="$lnk.caption" title="$lnk.caption" width="20" height="21" align="middle" /></a></span>\n"""; } } print safe """ </div> $*text_comment_from $poster $*text_comment_date """ + $c->time_display("%%yyyy%%-%%mm%%-%%dd%%", "%%HH%%:%%min%%") + """ (<a href="$c.permalink_url">$*text_permalink</a>)<br />\n"""; if ( $c.metadata{"poster_ip"} ) { print safe "<small>$*text_comment_ipaddr " + $c.metadata{"poster_ip"} + "</small>"; } "</div>"; if ( $c.subject != "" ) { print "<h4>$c.subject $c.subject_icon</h4>"; } "<div class=\"commentText\">"; $c->print_text(); "</div>"; "<div style=\"padding: 3px;\" class=\"commentLinks\">"; if ( $this.multiform_on ) { "<div style=\"float: right;\"><label for='ljcomsel_$c.talkid'>$*text_multiform_check</label>"; $c->print_multiform_check(); "</div>"; } if ( $c.frozen ) { print safe $*text_comment_frozen + " :: "; } else { print "("; #$c->print_reply_link({"linktext" => $*text_comment_reply}); if($c.screened == true) { ### if comment screened - show link for unscreen var Link link; $link = $c->get_link("unscreen_to_reply"); """<a href="$link.url" title="$link.caption">$link.caption</a>"""; } else { ### showing reply link if comment not screened $c->print_reply_link({ "linktext" => $*text_comment_reply }); } ") "; ### print safe "(<a href='$c.reply_url'>$*text_comment_reply</a>) "; } if ( $c.parent_url != "" ) { print safe "(<a href='$c.parent_url'>$*text_comment_parent</a>) "; } if ( $c.thread_url != "" ) { print safe "(<a href='$c.thread_url'>$*text_comment_thread</a>) "; var Link expand_link = $c->get_link("expand_comments"); if (defined $expand_link) { println "(" + $c->expand_link() + ") "; } } if (not $c.frozen) { $c->print_reply_container({"class" => "quickreply"}); } "</div></div>\n\n"; } ## -- p r i n t r e p l y p a g e -- #################################### function ReplyPage::print_body () { if ( not $.entry.comments.enabled ) { print safe "$*text_reply_nocomments_header<hr />$*text_reply_nocomments"; return; } if ($.replyto isa Entry) { var Entry en = $.replyto as Entry; print_entry ( $this, $en, null Color, null Color, false ); } else { var string time = $.replyto.time->time_format($*text_time_format); var string date = $.replyto.time->date_format($*text_date_format); """<div class="entry"><div class="entryBar">"""; if (defined $.replyto.userpic) { """<div class="userpic"><img border="0" src="$.replyto.userpic.url" width="$.replyto.userpic.width" height="$.replyto.userpic.height" vspace="5" hspace="5" alt="" /></div>"""; } if ( $.replyto.subject ) { print "<h3>$.replyto.subject</h3>"; } "<span class=\"subHeading\">Posted by "; print defined $.replyto.poster ? $.replyto.poster->as_string() : "<i>(Anonymous)</i>"; " on $date at $time</span></div>"; "<div class=\"entryText\">"; $.replyto->print_text(); "</div>"; """<div class="entryFooter"><div class="commentsInfo">"""; print safe "<a href='$.entry.permalink_url'>$*text_reply_back</a></div> </div></div><hr />"; } print_ebox($.entry); """<div class="commentBarOne"><div class="commentInfo">"""; var string what = $.replyto.permalink_url == $.entry.permalink_url ? "entry" : "comment" ; "<h3>Reply to this $what:</h3></div>"; $.form->print(); "</div>"; } ## -- p r i n t m o n t h p a g e -- #################################### function MonthPage::print_body { "<form method='post' action='$.redir.url'>"; $.redir->print_hiddens(); var string select; if (size $.months > 1) { $select = "<select name='redir_key'>\n"; foreach var MonthEntryInfo mei ($.months) { var string sel; if ($mei.date.year == $.date.year and $mei.date.month == $.date.month) { $sel = " selected='selected'"; } $select = $select + "<option value='$mei.redir_key'$sel>" + $mei.date->date_format($*lang_fmt_month_long) + "</option>"; } $select = $select + "</select>\n<input type='submit' value='View' />"; } """ <div class="entry" align="center">$select</div> """; "</form>"; "<div class=\"entry\"><div class=\"monthWrapper\">"; foreach var MonthDay d ($.days) { if ($d.has_entries) { """ <a name="anchor$d.day"></a> <div class="monthRow"> <div class="monthCell monthDay"> <a href=\"$d.url\"><b> """; print lang_ordinal($d.day); """ </b></a></div> <div class="monthCell"> <div class="entryText"> """; $d->print_subjectlist(); """ <div class="backtop"><a href="#top">^</a></div></div> </div> </div> """; } } "</div></div>"; } ## -- p r i n t y e a r p a g e -- ###################################### function YearWeek::print() { """ <tr> """; if ($.pre_empty > 0) { """ <td colspan="$.pre_empty"></td> """; } foreach var YearDay d ($.days) { var string day = zeropad($d.day, 2); "<td>"; if ($d.num_entries > 0) { var string num = string($d.num_entries); """ <div class="calDayEntries"><a href="$d.url" title="$num">$day</a></div></div> """; } else { """<div class="calDay">$day</div>"""; } """ </td> """; } """ </tr> """; } function YearPage::print_month(YearMonth m) { if (not $m.has_entries) { return; } """ <a name="anchor$m.month"></a> <div class="entry"> <h3> """; print $m->month_format(); print safe """ </h3> <span class="subHeading"><a href="$m.url"> $*text_view_month </a> :: <a href="#top">^</a></span><br /><br /> <div class="entryText"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> """; foreach var int d (weekdays()) { """ <td width="14%"><div class="bigday">$*lang_dayname_short[$d]</div></td> """; } """ </tr> """; foreach var YearWeek w ($m.weeks) { $w->print(); } """ </table> </div> </div><hr /> """; } function YearPage::print_body { """<div id="cal">"""; foreach var YearMonth m ($.months) { $this->print_month($m); } """</div>"""; } ## -- p r i n t d a y p a g e -- ######################################## function DayPage::print_body() { """<div class="entry" style="border: 2px solid black;"><h3>"""; print $.date->date_format("long"); "</h3></div><hr />"; if ($.has_entries) { foreach var Entry e ($.entries) { $this->print_entry($e); if ($e->viewer_sees_ebox()) { """<div style="text-align:center">"""; $e->print_ebox(); "</div><hr />"; } } } else { print safe """<div class="entry">$*text_noentries_day</div>"""; } } ## -- p r i n t t h e m e p r e v i e w s -- ############################ function print_theme_preview() { var string pres_sidebar_boxbg; if ($*pres_use_gradients) { var Color col_black = "#000000"; var Color col_white = "#ffffff"; # Let's determine some colours first var int tmp_boxborder_lightness = $*col_border->lightness(); var Color tmp_boxborder_avg = $tmp_boxborder_lightness > 120 ? $*col_border->darker(70) : $*col_border->lighter(70); var string tmp_gstart = $tmp_boxborder_avg.as_string->substr(1, 6); var string tmp_gend = $*col_strong_bg.as_string->substr(1, 6); # Now to generate the gradients $pres_sidebar_boxbg = "background: url($*PALIMGROOT/shadow/t.gif/pt$tmp_gstart$tmp_gend) repeat-x;"; } """ <table cellspacing=\"20\" style=\"font-family: $*main_font, $*main_font_fallback; font-size: 0.75em; background-color: $*col_weaker_bg; color: $*col_weaker_fg;\"> <tr><td valign=\"top\" style=\"width: $*pres_sidebar_width;\"> <div style=\"padding: 5px; background-color: $*col_weak_bg; color: $*col_weak_fg;\"> <div style=\"border: 2px solid $*col_border; background-color: $*col_strong_bg; color: $*col_strong_fg; margin-bottom: 5px;\"> <h4 style=\"margin: 0; color: $*col_neutral_fg; text-transform: uppercase; font-weight: normal; font-family: $*subheading_font, $*subheading_font_fallback; display: block; text-align: center; padding: 5px; padding-bottom: 0; $pres_sidebar_boxbg\">$*text_navigation</h4> <ul style=\"margin: 0 0 1em 1em; padding: 0; list-style-type: none;\"><li><a style=\"text-decoration: none; color: $*col_entry_link;\" href=\"#\">Sed quis orci</a></li></ul> </div> <div style=\"border: 2px solid $*col_border; margin-bottom: 0; background-color: $*col_strong_bg; color: $*col_strong_fg;\"> <h4 style=\"margin: 0; color: $*col_neutral_fg; text-transform: uppercase; font-weight: normal; font-family: $*subheading_font, $*subheading_font_fallback; display: block; text-align: center; padding: 5px; padding-bottom: 0; $pres_sidebar_boxbg margin-bottom: 5px;\"><a style=\"text-decoration: none; color: $*col_entry_link;\" href=\"$*SITEROOT\">$*SITENAMESHORT</a></h4> </div> </div> </td><td> <div style=\"background-color: $*col_weak_bg; padding: 5px;\"> <div style=\"padding: 5px; color: $*col_weak_fg; background-color: $*col_entry_bg; font-family: $*content_font, $*content_font_fallback; border: 2px solid $*col_border;\"> <div style=\"font-size: 0.9em;\"> <h3 style=\"color: $*col_weak_fg; font-style: normal; font-family: $*entryheading_font, $*entryheading_font_fallback; font-size: 1.5em; padding: 3px; margin: 10px 0;\">Lorem ipsum dolor sit amet</h3> <b>Posted</b> on 2006.11.25 at 16:58 </div> <div style=\"margin-top: 5px; margin-bottom: 5px;\">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.</div> <div style=\"padding-top: 1em; text-align: right;\"><a style=\"text-decoration: none; color: $*col_entry_link;\" href=\"#\">3 comments</a> <a style=\"text-decoration: none; color: $*col_entry_link;\" href=\"#\">Leave a comment</a></div> </div> </div> </td></tr></table> """; } ## -- t h e e n d ! -- #################################################### |
Direct link: https://paste.plurk.com/show/815948