From 73e0e4d78341cb96ef9665a0ee4fb7e7ee2a701f Mon Sep 17 00:00:00 2001 From: ike Date: Sun, 19 Feb 2012 20:05:51 +0100 Subject: [PATCH 01/10] New theme "vier" derives from "quattro" --- view/theme/vier/colors.less | 94 ++ view/theme/vier/contact_template.tpl | 21 + view/theme/vier/icons.less | 54 + view/theme/vier/icons.png | Bin 0 -> 20316 bytes view/theme/vier/icons.svg | 1463 +++++++++++++++++++++++++ view/theme/vier/quattro.less | 833 ++++++++++++++ view/theme/vier/search_item.tpl | 87 ++ view/theme/vier/style.css | 1517 ++++++++++++++++++++++++++ view/theme/vier/style.less | 14 + view/theme/vier/wall_item.tpl | 90 ++ view/theme/vier/wallwall_item.tpl | 97 ++ 11 files changed, 4270 insertions(+) create mode 100644 view/theme/vier/colors.less create mode 100644 view/theme/vier/contact_template.tpl create mode 100644 view/theme/vier/icons.less create mode 100644 view/theme/vier/icons.png create mode 100644 view/theme/vier/icons.svg create mode 100644 view/theme/vier/quattro.less create mode 100755 view/theme/vier/search_item.tpl create mode 100644 view/theme/vier/style.css create mode 100644 view/theme/vier/style.less create mode 100644 view/theme/vier/wall_item.tpl create mode 100644 view/theme/vier/wallwall_item.tpl diff --git a/view/theme/vier/colors.less b/view/theme/vier/colors.less new file mode 100644 index 000000000..5314b5284 --- /dev/null +++ b/view/theme/vier/colors.less @@ -0,0 +1,94 @@ +// Quattro Theme LESS file + +// "Echo" palette from Inkscape +@Blue1:rgb(25,174,255); +@Blue2:rgb(0,132,200); +@Blue3:rgb(0,92,148); +@Red1:rgb(255,65,65); +@Red2:rgb(220,0,0); +@Red3:rgb(181,0,0); +@Orange1:rgb(255,255,62); +@Orange2:rgb(255,153,0); +@Orange3:rgb(255,102,0); +@Brown1:rgb(255,192,34); +@Brown2:rgb(184,129,0); +@Brown3:rgb(128,77,0); +@Green1:rgb(204,255,66); +@Green2:rgb(154,222,0); +@Green3:rgb(0,145,0); +@Purple1:rgb(241,202,255); +@Purple2:rgb(215,108,255); +@Purple3:rgb(186,0,255); +@Metalic1:rgb(189,205,212); +@Metalic2:rgb(158,171,176); +@Metalic3:rgb(54,78,89); +@Metalic4:rgb(14,35,46); +@Grey1:rgb(255,255,255); +@Grey2:rgb(204,204,204); +@Grey3:rgb(153,153,153); +@Grey4:rgb(102,102,102); +@Grey5:rgb(45,45,45); + + +// Theme colors +@BodyBackground: @Grey1; +@BodyColor: @Grey5; + +@Link: @Blue3; +@LinkHover: @Blue3; +@LinkVisited: @Blue3; + + +@ButtonColor: @Grey1; +@ButtonBackgroundColor: @Grey5; + +@Banner: @Grey1; + +@NavbarBackground:@Metalic4; +@NavbarSelectedBg:@Metalic3; +@NavbarSelectedBorder: @Metalic2; +@NavbarNotifBg: @Blue1; + +@Menu: @Grey5; +@MenuBg: @Grey1; +@MenuBorder: @Metalic3; +@MenuItem: @Grey5; +@MenuItemHoverBg: @Metalic1; +@MenuItemSeparator: @Metalic2; +@MenuEmpty: @Metalic2; +@MenuItemDetail: @Metalic2; + +@AsideBorder: @Metalic1; +@AsideConnect: @Grey1; +@AsideConnectBg: @Blue3; +@AsideConnectHoverBg: @Blue1; +@VCardLabelColor: @Grey3; + +@InfoColor: @Grey1; +@InfoBackgroundColor: @Metalic3; + +@NoticeColor: @Grey1; +@NoticeBackgroundColor: #511919; + +@ThreadBackgroundColor: #f6f7f8; + +@CommentBoxEmptyColor: @Grey3; +@CommentBoxEmptyBorderColor: @Grey3; +@CommentBoxFullColor: @Grey5; +@CommentBoxFullBorderColor: @Grey5; + +@TagColor: @Grey1; + +@JotToolsBackgroundColor: @Metalic4; +@JotToolsBorderColor: @Metalic2; +@JotToolsOverBackgroundColor: @Metalic3; +@JotToolsOverBorderColor: @Metalic1; +@JotToolsText: @Grey2; +@JotSubmitBackgroundColor: @Grey2; +@JotSubmitText: @Grey4; +@JotSubmitOverBackgroundColor: @Metalic1; +@JotSubmitOverText: @Grey4; +@JotPermissionUnlockBackgroundColor: @Grey2; +@JotPermissionLockBackgroundColor: @Grey4; +@JotLoadingBackgroundColor: @Grey1; + diff --git a/view/theme/vier/contact_template.tpl b/view/theme/vier/contact_template.tpl new file mode 100644 index 000000000..f2749656a --- /dev/null +++ b/view/theme/vier/contact_template.tpl @@ -0,0 +1,21 @@ + +
+
+
+ + $name + + menu + + +
+ +
+
$name
+ + +
+ diff --git a/view/theme/vier/icons.less b/view/theme/vier/icons.less new file mode 100644 index 000000000..f87327703 --- /dev/null +++ b/view/theme/vier/icons.less @@ -0,0 +1,54 @@ +// Quattro Theme LESS file +/* icons */ + +.icons(@size: 22) { + &.notify { background-image: url("../../../images/icons/@{size}/notify_off.png"); } + &.gear { background-image: url("../../../images/icons/@{size}/gear.png"); } + + &.add { background-image: url("../../../images/icons/@{size}/add.png"); } + &.delete { background-image: url("../../../images/icons/@{size}/delete.png"); } + &.edit { background-image: url("../../../images/icons/@{size}/edit.png"); } + &.star { background-image: url("../../../images/icons/@{size}/star.png"); } + &.menu { background-image: url("../../../images/icons/@{size}/menu.png"); } + &.link { background-image: url("../../../images/icons/@{size}/link.png"); } + &.lock { background-image: url("../../../images/icons/@{size}/lock.png"); } + &.unlock { background-image: url("../../../images/icons/@{size}/unlock.png"); } + +} + + +.icon { + background-color: transparent ; + background-repeat: no-repeat; + background-position: left center; + display: block; + overflow: hidden; + text-indent: -9999px; + padding: 1px; + + &.text { + text-indent: 0px; + } + + &.s10 { + min-width:10px; height: 10px; + .icons(10); + &.text { padding: 2px 0px 0px 15px; } + } + &.s16 { + min-width:16px; height: 16px; + .icons(16); + &.text { padding: 4px 0px 0px 20px; } + } + &.s22 { + min-width:22px; height: 22px; + .icons(22); + &.text { padding: 10px 0px 0px 25px; } + } + &.s48 { + width:48px; height: 48px; + .icons(48); + } + + +} diff --git a/view/theme/vier/icons.png b/view/theme/vier/icons.png new file mode 100644 index 0000000000000000000000000000000000000000..0e1e7662d6ba1cd9454faddc4f30eb9492a58da6 GIT binary patch literal 20316 zcmXtA1ytNxv<)`6yGxNmad(G8u|jcocXy|_Q{26{yK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-e^tt5+{);lc%c`q}5a z``&N(;@}bf_21saT7Q;5eClyxVq-%7FhYpY#{8eWwXK5-Bc`bWTyDPN$y|>PZLYgc zRXKgSo|2M-Uf(}__$Z2^ken#@-a-NGGhUI!0yH zu~Fa8%ge!GchJ&uC8WAS2;YKQW4b(d3A58vsXktZYZBLzKmT1LYuBve-Cw~p(u8&7>}3m^S<50#aplW2qx6BAIA$3#c5Bs&vp z!#Ql{8Yk`Kvyu~e=IJN+-KYE5zrT3W>Ixz538=~A<7c2K3g;V}CiUd==4YU)DkY@{ z$3IvI5t4wKytlWHGxatGLs(=omX3~2_UtVjj(ZkDOum4c{BHjMt!*8XzMXJ)*DX$; zsYkC5etD}9A}|4U?ZO2aY~B0_vC+|!dh#t>9_63@;WbibB~5BwA;dlUK+;;<+Br}-(BC^5w*2<($?NNZZUsptv7CV z`8?iQe->-~*>USiTB{JDleAVLrZ`D!6=I5$v{oUexc>!B$Cvz)qB;ct0000 + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YouTube + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem Ip + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ? + ? + + + diff --git a/view/theme/vier/quattro.less b/view/theme/vier/quattro.less new file mode 100644 index 000000000..671577303 --- /dev/null +++ b/view/theme/vier/quattro.less @@ -0,0 +1,833 @@ +// Quattro Theme LESS file + +/* global */ +body { + font-family: Liberation Sans,helvetica,arial,clean,sans-serif; + font-size: 10px; + background-color: @BodyBackground; + color: @BodyColor; + margin: 50px 0px 0px 0px; + display:table; +} +h4 { font-size: 1.1em } + +.shadow(@x: 0px, @y: 5px){ + -webkit-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); + box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); +} + +.rounded(@tr: 5px, @tl: 5px, @bl: 5px, @br: 5px){ + -moz-border-radius: @arguments; + -webkit-border-radius: @arguments; + border-radius: @arguments; +} +.roundbottom (@radius: 5px){ .rounded(0, 0, @radius, @radius); } +.roundtop (@radius: 5px){ .rounded(@radius, @radius, 0, 0); } + +.opaque(@v: 0.5){ + opacity: @v; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + + +a, a:link { color: @Link; text-decoration: none; } +a:visited { color: @LinkVisited; text-decoration: none; } +a:hover {color: @LinkHover; text-decoration: underline; } + +.left { float: left; } +.right { float: right; } +.hidden { display: none; } +.clear { clear: both; } + +code { + font-family: Courier, monospace; + white-space: pre; + display: block; + overflow: auto; + border: 1px solid #444; + background: #EEE; + color: #444; + padding: 10px; + margin-top: 20px; +} +/* tool */ + +.tool { + height: auto; overflow: auto; + .label { float: left;} + .action { float: right; } +} + + + + +/* popup notifications */ +div.jGrowl div.notice { + background: @NoticeBackgroundColor url("../../../images/icons/48/notice.png") no-repeat 5px center; + color: @NoticeColor; + padding-left: 58px; +} +div.jGrowl div.info { + background: @InfoBackgroundColor url("../../../images/icons/48/info.png") no-repeat 5px center; + color: @InfoColor; + padding-left: 58px; +} + + + +/* header */ +header { + position: fixed; left: 43%; right: 43%; top: 0px; + margin: 0px; padding: 0px; + /*width: 100%; height: 12px; */ + z-index: 110; + color: @Grey1; + #site-location { + display: none; + } + + #banner { + overflow: hidden; + text-align: center; + width: 100%; + a, a:active, a:visited, a:link, a:hover { color: @Grey1; text-decoration: none; outline: none; vertical-align: bottom; } + #logo-img { height: 22px; margin-top:5px;} + #logo-text { font-size: 22px } + } +} +/* nav */ +nav { + width: 100%; height: 32px; + position: fixed; left: 0px; top: 0px; + padding: 0px; + background-color: @NavbarBackground; + color: @Grey1; + z-index: 100; + .shadow(0px, 0px); + + a, a:active, a:visited, a:link, a:hover { color: @Banner; text-decoration: none; outline: none; } + + ul { + margin: 0px; + padding: 0px 20px; + li { + list-style: none; + margin: 0px; padding: 0px; + float: left; + .menu-popup{ left: 0px; right: auto; } + } + + } + + .nav-menu-icon { + position: relative; + height: 22px; + padding: 5px; + margin: 0px 10px; + .roundtop(); + + &.selected { + background-color: @NavbarSelectedBg; + } + + img { width: 22px; height: 22px; } + .nav-notify { top: 3px; } + } + + .nav-menu { + position: relative; + height: 16px; + padding: 5px; + margin: 3px 15px 0px; + font-size: 14px; + border-bottom: 3px solid @NavbarBackground; + &.selected { + border-bottom: 3px solid @NavbarSelectedBorder; + } + + } + + .nav-notify { + display: none; + position: absolute; + background-color: @NavbarNotifBg; + .rounded(); + font-size: 10px; + padding: 1px 3px; + top: 0px; + right: -10px; + min-width: 15px; + text-align: right; + + &.show{ display: block; } + } + + + #nav-help-link, + #nav-search-link, + #nav-directory-link, + #nav-apps-link, + #nav-site-linkmenu { + float: right; + .menu-popup{ right: 0px; left: auto; } + } + + #nav-notifications-linkmenu.on .icon.s22.notify, + #nav-notifications-linkmenu.selected .icon.s22.notify { background-image: url("../../../images/icons/22/notify_on.png") } + #nav-apps-link.selected { background-color: @NavbarSelectedBg; } +} + + +ul.menu-popup { + position: absolute; + display: none; + width: 10em; + background: @MenuBg; + color: @Menu; + margin: 0px; + padding: 0px; + list-style: none; + border: 3px solid @MenuBorder; + z-index: 100000; + + .shadow(); + + a { display: block; color: @MenuItem; padding: 5px 10px; text-decoration: none;} + a:hover { background-color: @MenuItemHoverBg; } + .menu-sep { border-top: 1px solid @MenuItemSeparator; } + li { float: none; overflow: auto; height: auto; display: block; } + li img { float: left; width: 16px; height: 16px; padding-right: 5px;} + .empty { + padding: 5px; + text-align: center; + color: @MenuEmpty; + } + +} + +/* autocomplete popup */ +.acpopup { + max-height:150px; + background-color:@MenuBg; + color: @Menu; + border:1px solid #MenuBorder; + overflow:auto; + z-index:100000; + .shadow(); +} +.acpopupitem { + color: @MenuItem; padding: 4px; + clear:left; + img { + float: left; + margin-right: 4px; + } + &.selected{ + background-color: @MenuItemHoverBg; + } +} + + +#nav-notifications-menu { + width: 400px; + img { float: left; margin-right: 5px; } + .contactname { font-weight: bold; } + .notif-when { font-size: 10px; color: @MenuItemDetail; display: block; } +} + + + + +/* aside */ +aside { + display: table-cell; + vertical-align: top; + width: 200px; + padding:0px 10px 0px 20px; + border-right: 1px solid @AsideBorder; + + .vcard { + .fn { font-size: 16px; font-weight: bold; margin-bottom: 5px; } + .title { margin-bottom: 5px; } + dl { height: auto; overflow: auto; } + dt {float: left; margin-left: 0px; width: 35%; text-align: right; color: @VCardLabelColor; } + dd {float: left; margin-left: 4px; width: 60%;} + + } + + #profile-extra-links { + ul { padding: 0px; margin: 0px; } + li { padding: 0px; margin: 0px; list-style: none; } + } + + #dfrn-request-link { + display: block; + .rounded(); + color: @AsideConnect; + background: @AsideConnectBg url('../../../images/connect-bg.png') no-repeat left center; + font-weight: bold; + text-transform:uppercase; + padding: 4px 2px 2px 35px; + + &:hover { text-decoration: none; background-color: @AsideConnectHoverBg; } + } + + #profiles-menu { width: 20em; } + + +} + +#contact-block { + overflow: auto; height: auto; + .contact-block-h4 { float: left; margin: 5px 0px; } + .allcontact-link { float: right; margin: 5px 0px; } + .contact-block-content { + clear: both; + overflow: auto; height: auto; + } + .contact-block-link { + float: left; + margin: 0px 2px 2px 0px; + img { widht: 48px; height: 58px; } + } +} + + +/* widget */ +.widget { + margin-bottom: 2em; + + h3 { padding: 0px; margin: 2px;} + .action { .opaque(0.1); } + input.action { .opaque(0.5); } + &:hover .title .action { .opaque(1); } + .tool:hover .action { .opaque(1); } + .tool:hover .action.ticked { .opaque(1); } + + ul { padding: 0px;} + ul li {padding-left: 16px; min-height: 16px; list-style: none; } + + .tool.selected { + background: url('../../../images/selected.png') no-repeat left center; + } + + /*.action .s10 { width: 10px; overflow: hidden; padding: 0px;} + .action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/ + +} + +/* widget: search */ +#add-search-popup { + width: 200px; + top: 18px; +} + + +/* section */ +section { + display: table-cell; + vertical-align: top; + width: 800px; + padding:0px 20px 0px 10px; +} + +/* wall item */ +.tread-wrapper { + background-color: @ThreadBackgroundColor; + position: relative; + padding: 10px; + margin-bottom: 20px; + width: 780px; +} +.wall-item-decor { position: absolute; left: 790px; top: -10px; width: 16px;} +.unstarred { display: none; } + +.wall-item-container { + display: table; + width: 780px; + + .wall-item-item, + .wall-item-bottom { display: table-row; } + + .wall-item-bottom { .opaque(0.5); } + &:hover .wall-item-bottom { .opaque(1); } + .wall-item-info { + display: table-cell; + vertical-align: top; + text-align: left; + width: 60px; + + } + .wall-item-location { + word-wrap: break-word; + width: 50px; + } + .wall-item-content { + display: table-cell; + font-size: 12px; + max-width: 720px; + word-wrap: break-word; + } + .wall-item-content img { max-width: 710px; } + .wall-item-links, + .wall-item-actions { + display: table-cell; + vertical-align: middle; + + .icon { + .opaque(0.5); + } + .icon:hover { + .opaque(1.0); + } + } + + .wall-item-ago { padding-right: 40px; } + .wall-item-name { font-weight: bold; } + + .wall-item-actions-author { float: left; width: 20em; margin-top: 0.5em; } + .wall-item-actions-social { float: left; margin-top: 0.5em; + a { margin-right: 3em; } + } + .wall-item-actions-tools { float: right; width: 15%; + a { float: right; } + input { float: right; } + } + +} + + +.wall-item-container.comment { + /*margin-top: 50px;*/ + .contact-photo { width: 32px; height: 32px; margin-left: 16px; + /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ + } + .contact-photo-menu-button { + top: 15px !important; + left: 15px !important; + } + .wall-item-links { padding-left: 12px; } +} + +.wall-item-comment-wrapper { + margin: 30px 2em 2em 60px; + .comment-edit-photo { display: none; } + textarea { + height: 1em; width: 100%; font-size: 10px; + color: @CommentBoxEmptyColor; + border: 1px solid @CommentBoxEmptyBorderColor; + padding:0.3em; + } + .comment-edit-text-full { + font-size: 14px; + height: 4em; + color: @CommentBoxFullColor; + border: 1px solid @CommentBoxFullBorderColor; + } +} + + + +.wall-item-tags { padding-top: 5px; } +.tag { + background: url("../../../images/tag_b.png") no-repeat center left; + color: @TagColor; + padding-left: 3px; + a { + padding-right: 8px; + background: url("../../../images/tag.png") no-repeat center right; + color: @TagColor; + } +} + +/* contacts menu */ +.contact-photo-wrapper { position: relative; } +.contact-photo { + width: 48px; height: 48px; + img { width: 48px; height: 48px; } + overflow: hidden; + display: block; + } +.contact-photo-menu-button { + display: none; + position: absolute; + left: -2px; + top: 31px; +} + +.contact-wrapper { + float: left; + width: 90px; + height: 90px; + .contact-photo { + width: 80px; height: 80px; + img { width: 80px; height: 80px; } + } + .contact-photo-menu-button { + left: 0px; + top: 63px; + } +} +.directory-item { + float: left; + width: 200px; + height: 200px; + .contact-photo { + width: 175px; height: 175px; + img { width: 175px; height: 175px; } + } +} +.contact-name { text-align: center; font-weight: bold; } +.contact-details { color: @Grey3;} + +/* editor */ +.jothidden { display: none; } +#jot { + + width: 100%; + margin: 0px 2em 20px 0px; + + + .profile-jot-text { + height: 1em; width: 99%; font-size: 10px; + color: @CommentBoxEmptyColor; + border: 1px solid @CommentBoxEmptyBorderColor; + padding:0.3em; + } + + #jot-tools { + margin: 0px; padding: 0px; + height: 40px; overflow: none; + width: 800px; + background-color: @JotToolsBackgroundColor; + border-bottom: 2px solid @JotToolsBorderColor; + li { + list-style: none; + float: left; + width: 80px; + height: 40px; + border-bottom: 2px solid @JotToolsBorderColor; + a { + display: block; + color: @JotToolsText; + width: 100%; + height:40px; + text-align: center; + line-height: 40px; + overflow: hidden; + } + } + li:hover { + background-color: @JotToolsOverBackgroundColor; + border-bottom: 2px solid @JotToolsOverBorderColor; + } + li.perms { + float: right; + width: 40px; + a.unlock { + width: 30px; + border-left: 10px solid @JotPermissionUnlockBackgroundColor; + background-color: @JotPermissionUnlockBackgroundColor; + } + a.lock { + width: 30px; + border-left: 10px solid @JotPermissionLockBackgroundColor; + background-color: @JotPermissionLockBackgroundColor; + } + + } + li.submit { + float: right; + background-color: @JotSubmitBackgroundColor; + border-bottom: 2px solid @JotSubmitBackgroundColor; + border-right: 1px solid @Grey4; + border-left: 1px solid @Grey4; + input { + border: 0px; margin: 0px; padding: 0px; + background-color: @JotSubmitBackgroundColor; + color: @JotSubmitText; + width: 80px; height: 40px; + line-height: 40px; + } + input:hover { + background-color: @JotSubmitOverBackgroundColor; + color: @JotSubmitOverText; + } + } + li.loading { + float: right; + background-color: @JotLoadingBackgroundColor; + width: 20px; + vertical-align: center; + text-align: center; + img { margin-top: 10px; } + border-top: 2px solid @JotToolsBorderColor; + height: 38px; + } + } + + #jot-title { + border: 0px; + margin: 0px; + height: 20px; + width: 700px; + font-weight: bold; + border: 1px solid @BodyBackground; + + &:-webkit-input-placeholder { + font-weight: normal; + } + + &:-moz-placeholder { + font-weight: normal; + } + + &:hover { border: 1px solid @CommentBoxEmptyBorderColor } + &:focus { border: 1px solid @CommentBoxEmptyBorderColor } + } + + #character-counter { + width: 80px; + float: right; + text-align: right; + height: 20px; + line-height: 20px; + padding-right: 20px; + } + +} + + +/** buttons **/ +/*input[type="submit"] { + border: 0px; + background-color: @ButtonBackgroundColor; + color: @ButtonColor; + padding: 0px 10px; + .rounded(5px); + height: 18px; +}*/ + + +/** acl **/ +#photo-edit-perms-select, +#photos-upload-permissions-wrapper, +#profile-jot-acl-wrapper{ + display:block!important; +} + + + +#acl-wrapper { + width: 690px; + float:left; +} +#acl-search { + float:right; + background: #ffffff url("../../../images/search_18.png") no-repeat right center; + padding-right:20px; +} +#acl-showall { + float: left; + display: block; + width: auto; + height: 18px; + background-color: #cccccc; + background-image: url("../../../images/show_all_off.png"); + background-position: 7px 7px; + background-repeat: no-repeat; + padding: 7px 5px 0px 30px; + color: #999999; + .rounded(5px); +} +#acl-showall.selected { + color: #000000; + background-color: #ff9900; + background-image: url("../../../images/show_all_on.png"); +} + +#acl-list { + height: 210px; + border: 1px solid #cccccc; + clear: both; + margin-top: 30px; + overflow: auto; +} +#acl-list-content { + +} +.acl-list-item { + display: block; + width: 150px; + height: 30px; + border: 1px solid #cccccc; + margin: 5px; + float: left; +} +.acl-list-item img{ + width:22px; + height: 22px; + float: left; + margin: 4px; +} +.acl-list-item p { height: 12px; font-size: 10px; margin: 0px; padding: 2px 0px 1px; overflow: hidden;} +.acl-list-item a { + font-size: 8px; + display: block; + width: 40px; + height: 10px; + float: left; + color: #999999; + background-color: #cccccc; + background-position: 3px 3px; + background-repeat: no-repeat; + margin-right: 5px; + -webkit-border-radius: 2px ; + -moz-border-radius: 2px; + border-radius: 2px; + padding-left: 15px; +} +#acl-wrapper a:hover { + text-decoration: none; + color:#000000; +} +.acl-button-show { background-image: url("../../../images/show_off.png"); } +.acl-button-hide { background-image: url("../../../images/hide_off.png"); } + +.acl-button-show.selected { + color: #000000; + background-color: #9ade00; + background-image: url("../../../images/show_on.png"); +} +.acl-button-hide.selected { + color: #000000; + background-color: #ff4141; + background-image: url("../../../images/hide_on.png"); +} +.acl-list-item.groupshow { border-color: #9ade00; } +.acl-list-item.grouphide { border-color: #ff4141; } +/** /acl **/ + +/** tab buttons **/ +ul.tabs { + list-style-type: none; + padding-bottom: 10px; + + li { + float: left; + margin-left: 20px; + + .active { + border-bottom: 1px solid @LinkVisited; + } + } + +} + + +/** + * Form fields + */ +.field { + margin-bottom: 10px; + padding-bottom: 10px; + overflow: auto; + width: 100%; + + + label { + float: left; + width: 200px; + } + + input, + textarea { + width: 400px; + } + textarea { height: 100px; } + .field_help { + display: block; + margin-left: 200px; + color: #666666; + + } + + + .onoff { + float: left; + width: 80px; + } + .onoff a { + display: block; + border:1px solid #666666; + background-image:url("../../../images/onoff.jpg"); + background-repeat: no-repeat; + padding: 4px 2px 2px 2px; + height: 16px; + text-decoration: none; + } + .onoff .off { + border-color:#666666; + padding-left: 40px; + background-position: left center; + background-color: #cccccc; + color: #666666; + text-align: right; + } + .onoff .on { + border-color:#204A87; + padding-right: 40px; + background-position: right center; + background-color: #D7E3F1; + color: #204A87; + text-align: left; + } + .hidden { display: none!important; } + + &.radio .field_help { margin-left: 0px; } +} + +#profile-edit-links li { + list-style: none; +} + +/* oauth */ +.oauthapp { + height: auto; overflow: auto; + border-bottom: 2px solid #cccccc; + padding-bottom: 1em; + margin-bottom: 1em; +} +.oauthapp img { + float: left; + width: 48px; height: 48px; + margin: 10px; +} +.oauthapp img.noicon { + background-image: url("../../../images/icons/48/plugin.png"); + background-position: center center; + background-repeat: no-repeat; +} +.oauthapp a { + float: left; +} + +/* contacts */ +.contact-entry-wrapper { + width: 50px; float: left; +} + +/* photo */ +.lframe { + float: left; + margin: 0px 10px 10px 0px; +} + + +/* page footer */ +footer { height: 100px; display: table-row; } diff --git a/view/theme/vier/search_item.tpl b/view/theme/vier/search_item.tpl new file mode 100755 index 000000000..9cd3c8e2e --- /dev/null +++ b/view/theme/vier/search_item.tpl @@ -0,0 +1,87 @@ + +
+ $star.starred + {{ if $lock }}$lock{{ endif }} + +
+ +
+
+
+
+ + $name + + menu + + +
+
+
+ $name + -   + {{ if $plink }}$ago{{ else }} $ago {{ endif }} + +
+
+ {{ if $title }}

$title

{{ endif }} + $body +
+
+
+ +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $plink }}$plink.title{{ endif }} +
+
+ +
$location 
+ +
+ {{ if $star }} + $star.do + $star.undo + $star.tagger + {{ endif }} + + {{ if $vote }} + $vote.like.1 + $vote.dislike.1 + {{ endif }} + + {{ if $vote.share }} + $vote.share.1 + {{ endif }} +
+ +
+ + {{ if $drop.dropping }} + + $drop.delete + {{ endif }} + {{ if $edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$dislike
+
+
diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css new file mode 100644 index 000000000..a9ff22f78 --- /dev/null +++ b/view/theme/vier/style.css @@ -0,0 +1,1517 @@ +/** + * Fabio Comuni + * Additional Changes: Michael Vogel + **/ + +/* ========= */ +/* = Admin = */ +/* ========= */ + +#adminpage { +/* width: 80%;*/ +} + +#pending-update { + float:right; + color: #ffffff; + font-weight: bold; + background-color: #FF0000; + padding: 0em 0.3em; +} + +.admin.linklist { + border: 0px; padding: 0px; +} + +.admin.link { + list-style-position: inside; + font-size: 1em; + padding: 5px; + width: 100px; + margin: 5px; +} + +#adminpage dl { + clear: left; + margin-bottom: 2px; + padding-bottom: 2px; + border-bottom: 1px solid black; +} + +#adminpage dt { + width: 200px; + float: left; + font-weight: bold; +} + +#adminpage dd { + margin-left: 200px; +} +#adminpage h3 { + border-bottom: 1px solid #898989; + margin-bottom: 5px; + margin-top: 10px; +} + +#adminpage .submit { + clear:left; +} + +#adminpage #pluginslist { + margin: 0px; padding: 0px; +} + +#adminpage .plugin { + list-style: none; + display: block; + /* border: 1px solid #888888; */ + padding: 1em; + margin-bottom: 5px; + clear: left; +} + +#adminpage .toggleplugin { + float:left; + margin-right: 1em; +} + +#adminpage table {width:100%; border-bottom: 1p solid #000000; margin: 5px 0px;} +#adminpage table th { text-align: left;} +#adminpage td .icon { float: left;} +#adminpage table#users img { width: 16px; height: 16px; } +#adminpage table tr:hover { background-color: #eeeeee; } +#adminpage .selectall { text-align: right; } +/* icons */ + + +.article { background-position: -50px 0px;} +.audio { background-position: -70px 0px;} +.block { background-position: -90px 0px;} +.drop { background-position: -110px 0px;} +.drophide { background-position: -130px 0px;} +.edit { background-position: -150px 0px;} +.camera { background-position: -170px 0px;} +.dislike { background-position: -190px 0px;} +.like { background-position: -210px 0px;} +.link { background-position: -230px 0px;} + +.globe { background-position: -50px -20px;} +.noglobe { background-position: -70px -20px;} +.no { background-position: -90px -20px;} +.pause { background-position: -110px -20px;} +.play { background-position: -130px -20px;} +.pencil { background-position: -150px -20px;} +.small-pencil { background-position: -170px -20px;} +.recycle { background-position: -190px -20px;} +.remote-link { background-position: -210px -20px;} +.share { background-position: -230px -20px;} + +.tools { background-position: -50px -40px;} +.lock { background-position: -70px -40px;} + +.video { background-position: -110px -40px;} +.youtube { background-position: -130px -40px;} + +.attach { background-position: -190px -40px;} +.language { background-position: -210px -40px;} + + +.on { background-position: -50px -60px;} +.off { background-position: -70px -60px;} +.prev { background-position: -90px -60px;} +.next { background-position: -110px -60px;} +.tagged { background-position: -130px -60px;} + +.icon.drop, .icon.drophide { + float: left; +} + +.icon { + display: block; + width: 20px; + height: 20px; + background-image: url('icons.png'); +} + +.icon { + background-color: transparent ; + background-repeat: no-repeat; + /* background-position: left center; */ + display: block; + overflow: hidden; + text-indent: -9999px; + padding: 1px; +} + +.icon.text { + text-indent: 0px; +} +.icon.s10 { + min-width: 10px; + height: 10px; +} +.icon.s10.notify { + background-image: url("../../../images/icons/10/notify_off.png"); +} +.icon.s10.gear { + background-image: url("../../../images/icons/10/gear.png"); +} +.icon.s10.add { + background-image: url("../../../images/icons/10/add.png"); +} +.icon.s10.delete { + background-image: url("../../../images/icons/10/delete.png"); +} +.icon.s10.edit { + background-image: url("../../../images/icons/10/edit.png"); +} +.icon.s10.star { + background-image: url("../../../images/icons/10/star.png"); +} +.icon.s10.menu { + background-image: url("../../../images/icons/10/menu.png"); +} +.icon.s10.link { + background-image: url("../../../images/icons/10/link.png"); +} +.icon.s10.lock { + background-image: url("../../../images/icons/10/lock.png"); +} +.icon.s10.unlock { + background-image: url("../../../images/icons/10/unlock.png"); +} +.icon.s10.text { + padding: 2px 0px 0px 15px; + font-size: 10px; +} +.icon.s16 { + min-width: 16px; + height: 16px; +} +.icon.s16.notify { + background-image: url("../../../images/icons/16/notify_off.png"); +} +.icon.s16.gear { + background-image: url("../../../images/icons/16/gear.png"); +} +.icon.s16.add { + background-image: url("../../../images/icons/16/add.png"); +} +.icon.s16.delete { + background-image: url("../../../images/icons/16/delete.png"); +} +/*.icon.s16.edit { + background-image: url("../../../images/icons/16/edit.png"); +}*/ +.icon.s16.star { + background-image: url("../../../images/icons/16/star.png"); +} +.icon.s16.menu { + background-image: url("../../../images/icons/16/menu.png"); +} +/*.icon.s16.link { + background-image: url("../../../images/icons/16/link.png"); +}*/ +.icon.s16.lock { + background-image: url("../../../images/icons/16/lock.png"); +} +.icon.s16.unlock { + background-image: url("../../../images/icons/16/unlock.png"); +} +.icon.s16.text { + padding: 4px 0px 0px 20px; + font-size: 10px; +} +.icon.s22 { + min-width: 22px; + height: 22px; +} +.icon.s22.notify { + background-image: url("../../../images/icons/22/notify_off.png"); +} +.icon.s22.gear { + background-image: url("../../../images/icons/22/gear.png"); +} +.icon.s22.add { + background-image: url("../../../images/icons/22/add.png"); +} +.icon.s22.delete { + background-image: url("../../../images/icons/22/delete.png"); +} +.icon.s22.edit { + background-image: url("../../../images/icons/22/edit.png"); +} +.icon.s22.star { + background-image: url("../../../images/icons/22/star.png"); +} +.icon.s22.menu { + background-image: url("../../../images/icons/22/menu.png"); +} +.icon.s22.link { + background-image: url("../../../images/icons/22/link.png"); +} +.icon.s22.lock { + background-image: url("../../../images/icons/22/lock.png"); +} +.icon.s22.unlock { + background-image: url("../../../images/icons/22/unlock.png"); +} +.icon.s22.text { + padding: 10px 0px 0px 25px; + width: 200px; +} +.icon.s48 { + width: 48px; + height: 48px; +} +.icon.s48.notify { + background-image: url("../../../images/icons/48/notify_off.png"); +} +.icon.s48.gear { + background-image: url("../../../images/icons/48/gear.png"); +} +.icon.s48.add { + background-image: url("../../../images/icons/48/add.png"); +} +.icon.s48.delete { + background-image: url("../../../images/icons/48/delete.png"); +} +.icon.s48.edit { + background-image: url("../../../images/icons/48/edit.png"); +} +.icon.s48.star { + background-image: url("../../../images/icons/48/star.png"); +} +.icon.s48.menu { + background-image: url("../../../images/icons/48/menu.png"); +} +.icon.s48.link { + background-image: url("../../../images/icons/48/link.png"); +} +.icon.s48.lock { + background-image: url("../../../images/icons/48/lock.png"); +} +.icon.s48.unlock { + background-image: url("../../../images/icons/48/unlock.png"); +} + +#contact-edit-links ul { + list-style: none; + list-style-type: none; +} + +.hide-comments-outer { + margin-left: 80px; + margin-bottom: 5px; + width: 684px; + border-bottom: 1px solid #BDCDD4; + border-top: 1px solid #BDCDD4; + + padding: 8px; +} + +/* global */ +body { + font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + background-color: #ffffff; + color: #2d2d2d; + margin: 50px 0px 0px 0px; + display: table; +} +h4 { + font-size: 1.1em; +} + +a {color: #3e3e8c; +text-decoration: none; +} +a:hover {color: blue; +text-decoration: underline} + +.wall-item-name-link { +/* float: left;*/ +} + +.wall-item-photo { + width: 48px; + height: 48px; + overflow: hidden; + display: block; +} + +.left { + float: left; +} +.right { + float: right; +} +.hidden { + display: none; +} +.clear { + clear: both; +} +.fakelink { + color: #3e3e8c; + text-decoration: none; + cursor: pointer; +} +.fakelink:hover { + color: blue; + /*color: #005c94; */ + text-decoration: underline; +} +code { + font-family: Courier, monospace; + white-space: pre; + display: block; + overflow: auto; + border: 1px solid #444; + background: #EEE; + color: #444; + padding: 10px; + margin-top: 20px; +} +#panel { + position: absolute; + width: 10em; + background: #ffffff; + color: #2d2d2d; + margin: 0px; + padding: 1em; + list-style: none; + border: 3px solid #364e59; + z-index: 100000; + -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} +/* tool */ +.tool { + height: auto; + overflow: auto; +} +.tool .label { + float: left; +} +.tool .action { + float: right; +} +/* popup notifications */ +div.jGrowl div.notice { + background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} +div.jGrowl div.info { + background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} +/* header */ +header { + position: fixed; + left: 43%; + right: 43%; + top: 0px; + margin: 0px; + padding: 0px; + /*width: 100%; height: 12px; */ + + z-index: 110; + color: #ffffff; +} +header #site-location { + display: none; +} +header #banner { + overflow: hidden; + text-align: center; + width: 100%; +} +header #banner a, +header #banner a:active, +header #banner a:visited, +header #banner a:link, +header #banner a:hover { + color: #ffffff; + text-decoration: none; + outline: none; + vertical-align: bottom; +} +header #banner #logo-img { + height: 22px; + margin-top: 5px; +} +header #banner #logo-text { + font-size: 22px; +} +/* nav */ +nav { + width: 100%; + height: 32px; + position: fixed; + left: 0px; + top: 0px; + padding: 0px; + background: #364A84; + background: -moz-linear-gradient(top, #516499 0%, #364a84 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#516499), color-stop(100%,#364a84)); + background: -webkit-linear-gradient(top, #516499 0%,#364a84 100%); + background: -o-linear-gradient(top, #516499 0%,#364a84 100%); + background: -ms-linear-gradient(top, #516499 0%,#364a84 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#516499', endColorstr='#364a84',GradientType=0 ); + background: linear-gradient(top, #516499 0%,#364a84 100%); + color: #ffffff; + z-index: 100; + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); +} +nav a, +nav a:active, +nav a:visited, +nav a:link, +nav a:hover { + color: #ffffff; + text-decoration: none; + outline: none; +} +nav ul { + margin: 0px; + padding: 0px 20px; +} +nav ul li { + list-style: none; + margin: 0px; + padding: 0px; + float: left; +} +nav ul li .menu-popup { + left: 0px; + right: auto; +} +nav .nav-menu-icon { + position: relative; + height: 22px; + padding: 5px; + margin: 0px 10px; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +nav .nav-menu-icon.selected { + background-color: #364e59; +} +nav .nav-menu-icon img { + width: 22px; + height: 22px; +} +nav .nav-menu-icon .nav-notify { + top: 3px; +} +nav .nav-menu { + position: relative; + height: 16px; + padding: 5px; + margin: 3px 15px 0px; + font-size: 13px; + border-bottom: 3px solid #364A84; +} +nav .nav-menu.selected { + border-bottom: 3px solid #9eabb0; +} +nav .nav-notify { + display: none; + position: absolute; + background-color: #19aeff; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + font-size: 10px; + padding: 1px 3px; + top: 0px; + right: -10px; + min-width: 15px; + text-align: right; +} +nav .nav-notify.show { + display: block; +} +nav #nav-help-link, +nav #nav-search-link, +nav #nav-directory-link, +nav #nav-apps-link, +nav #nav-site-linkmenu { + float: right; +} +nav #nav-help-link .menu-popup, +nav #nav-search-link .menu-popup, +nav #nav-directory-link .menu-popup, +nav #nav-apps-link .menu-popup, +nav #nav-site-linkmenu .menu-popup { + right: 0px; + left: auto; +} +nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify { + background-image: url("../../../images/icons/22/notify_on.png"); +} +nav #nav-apps-link.selected { + background-color: #364e59; +} +ul.menu-popup { + position: absolute; + display: none; + width: 10em; + background: #ffffff; + color: #2d2d2d; + margin: 0px; + padding: 0px; + list-style: none; + border: 3px solid #364e59; + z-index: 100000; + -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} +ul.menu-popup a { + display: block; + color: #2d2d2d; + padding: 5px 10px; + text-decoration: none; +} +ul.menu-popup a:hover { + background-color: #bdcdd4; +} +ul.menu-popup .menu-sep { + border-top: 1px solid #9eabb0; +} +ul.menu-popup li { + float: none; + overflow: auto; + height: auto; + display: block; +} +ul.menu-popup li img { + float: left; + width: 16px; + height: 16px; + padding-right: 5px; +} +ul.menu-popup .empty { + padding: 5px; + text-align: center; + color: #9eabb0; +} +/* autocomplete popup */ +.acpopup { + max-height: 150px; + background-color: #ffffff; + color: #2d2d2d; + border: 1px solid #MenuBorder; + overflow: auto; + z-index: 100000; + -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} +.acpopupitem { + color: #2d2d2d; + padding: 4px; + clear: left; +} +.acpopupitem img { + float: left; + margin-right: 4px; +} +.acpopupitem.selected { + background-color: #bdcdd4; +} +#nav-notifications-menu { + width: 400px; + max-height: 550px; + overflow: auto; +} +#nav-notifications-menu img { + float: left; + margin-right: 5px; +} +#nav-notifications-menu .contactname { + font-weight: bold; +} +#nav-notifications-menu .notif-when { + font-size: 10px; + color: #9eabb0; + display: block; +} +/* aside */ +aside { + display: table-cell; + vertical-align: top; + width: 200px; + padding: 0px 10px 0px 20px; + border-right: 1px solid #D2D2D2; + /* background: #F1F1F1; */ +} +aside .vcard .fn { + font-size: 16px; + font-weight: bold; + margin-bottom: 5px; +} +aside .vcard .title { + margin-bottom: 5px; +} +aside .vcard dl { + height: auto; + overflow: auto; +} +aside .vcard dt { + float: left; + margin-left: 0px; + width: 35%; + text-align: right; + color: #999999; +} +aside .vcard dd { + float: left; + margin-left: 4px; + width: 60%; +} +aside #profile-extra-links ul { + padding: 0px; + margin: 0px; +} +aside #profile-extra-links li { + padding: 0px; + margin: 0px; + list-style: none; +} +aside #dfrn-request-link { + display: block; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + color: #ffffff; + background: #005c94 url('../../../images/connect-bg.png') no-repeat left center; + font-weight: bold; + text-transform: uppercase; + padding: 4px 2px 2px 35px; +} +aside #dfrn-request-link:hover { + text-decoration: none; + background-color: #19aeff; +} +aside #profiles-menu { + width: 20em; +} +#contact-block { + overflow: auto; + height: auto; +} +#contact-block .contact-block-h4 { + float: left; + margin: 5px 0px; +} +#contact-block .allcontact-link { + float: right; + margin: 5px 0px; +} +#contact-block .contact-block-content { + clear: both; + overflow: auto; + height: auto; +} +#contact-block .contact-block-link { + float: left; + margin: 0px 2px 2px 0px; +} +#contact-block .contact-block-link img { + widht: 48px; + height: 58px; +} +/* widget */ +.widget { + margin-bottom: 2em; + /*.action .s10 { width: 10px; overflow: hidden; padding: 0px;} + .action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/ +/* font-size: 12px; */ +} +.widget h3 { + padding: 0px; + margin: 2px; +} +.widget .action { + opacity: 0.1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget input.action { + opacity: 0.5; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget:hover .title .action { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget .tool:hover .action { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget .tool:hover .action.ticked { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget ul { + padding: 0px; +} +.widget ul li { + padding-left: 16px; + min-height: 16px; + list-style: none; +} +.widget .tool.selected { + background: url('../../../images/selected.png') no-repeat left center; +} +/* widget: search */ +#add-search-popup { + width: 200px; + top: 18px; +} +/* section */ +section { + display: table-cell; + vertical-align: top; + width: 800px; + padding: 0px 20px 0px 10px; +} +/* wall item */ +.tread-wrapper { + border-bottom: 1px solid #D2D2D2; + position: relative; + padding: 5px; + margin-bottom: 0px; + width: 775px; +} +.wall-item-decor { + position: absolute; + left: 790px; + top: -10px; + width: 16px; +} +.unstarred { + display: none; +} +.wall-item-container { + display: table; + width: 780px; +} +.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom { + display: table-row; +} +.wall-item-bottom { + font-size: 13px; +} +.wall-item-container .wall-item-bottom { + opacity: 0.5; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container:hover .wall-item-bottom { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container .wall-item-info { + display: table-cell; + vertical-align: top; + text-align: left; + width: 80px; +} +.wall-item-container .wall-item-location { + padding-right: 40px; +} +.wall-item-container .wall-item-ago { + word-wrap: break-word; + width: 50px; + margin-left: 10px; + color: #999; +} +.wall-item-location { + width: 180px; + float: left; +} + +.wall-item-container .wall-item-content { + font-size: 13px; + max-width: 720px; + word-wrap: break-word; + line-height: 1.4; +} + +.wall-item-container .wall-item-content img { + max-width: 710px; +} +.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions { + display: table-cell; + vertical-align: middle; +} +.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon { + opacity: 0.5; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container .wall-item-name { + font-weight: bold; +} +.wall-item-container .wall-item-actions-author { + width: 100%; + margin-bottom: 0.3em; +} +.wall-item-container .wall-item-actions-social { + float: left; + margin-bottom: 1px; +} +.wall-item-container .wall-item-actions-social a { + margin-right: 1em; +} +.wall-item-container .wall-item-actions-tools { + float: right; + width: 80px; +} +.wall-item-container .wall-item-actions-tools a { + float: right; +} +.wall-item-container .wall-item-actions-tools input { + float: right; +} +.wall-item-container.comment { + margin-top: 5px; + margin-bottom: 5px; + margin-left: 80px; + width: 700px; + border-bottom: 1px solid hsl(198, 21%, 79%); +} +.wall-item-container.comment .contact-photo { + width: 32px; + height: 32px; + margin-left: 16px; + /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ + +} +.wall-item-container.comment .contact-photo-menu-button { + top: 15px !important; + left: 15px !important; +} +.wall-item-container.comment .wall-item-links { + padding-left: 12px; +} +.wall-item-comment-wrapper { + margin: 1px 5px 1px 80px; +} +.wall-item-comment-wrapper .comment-edit-photo { + display: none; +} +.wall-item-comment-wrapper textarea { + height: 1.2em; + width: 100%; + font-size: 10px; + color: #999999; + border: 1px solid #DDD; + padding: 0.3em; +} +.wall-item-comment-wrapper .comment-edit-text-full { + font-size: 14px; + height: 4em; + color: #2d2d2d; + border: 1px solid #2d2d2d; +} +.comment-edit-preview { + width: 710px; + border: 1px solid #2d2d2d; + margin-top: 10px; +} +.comment-edit-preview .contact-photo { + width: 32px; + height: 32px; + margin-left: 16px; + /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ + +} +.comment-edit-preview .contact-photo-menu-button { + top: 15px !important; + left: 15px !important; +} +.comment-edit-preview .wall-item-links { + padding-left: 12px; +} +.comment-edit-preview .wall-item-container { + width: 700px; +} +.comment-edit-preview .tread-wrapper { + width: 700px; + padding: 0; + margin: 10px 0; +} +.wall-item-tags { + padding-top: 1px; + padding-bottom: 2px; +} +.tag { + background: url("../../../images/tag_b.png") repeat-x center left; + color: #ffffff; + padding-left: 3px; + font-size: 10px; +} +.tag a { + padding-right: 8px; + background: url("../../../images/tag.png") no-repeat center right; + color: #ffffff; +} +.wwto { + position: absolute !important; + width: 25px; + height: 25px; + background: #FFFFFF; + border: 2px solid #364e59; + height: 25px; + width: 25px; + overflow: hidden; + padding: 1px; + position: absolute !important; + top: 40px; + left: 30px; + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); +} +.wwto .contact-photo { + width: auto; + height: 25px; +} +/* contacts menu */ +.contact-photo-wrapper { + position: relative; + width: 80px; +} + +.contact-photo-wrapper.wwto { + width: 25px; +} + +.contact-photo { + width: 48px; + height: 48px; + overflow: hidden; + display: block; +} +.contact-photo img { + width: 48px; + height: 48px; +} +.contact-photo-menu-button { + display: none; + position: absolute; + left: -2px; + top: 31px; +} +.contact-wrapper { + float: left; + width: 90px; + height: 90px; + margin-bottom: 15px; +} +.contact-wrapper .contact-photo { + width: 80px; + height: 80px; +} +.contact-wrapper .contact-photo img { + width: 80px; + height: 80px; +} +.contact-wrapper .contact-photo-menu-button { + left: 0px; + top: 63px; +} +.directory-item { + float: left; + width: 200px; + height: 200px; +} +.directory-item .contact-photo { + width: 175px; + height: 175px; +} +.directory-item .contact-photo img { + width: 175px; + height: 175px; +} +.contact-name { + text-align: center; + font-weight: bold; + font-size: 12px; +} +.contact-details { + color: #999999; +} +/* editor */ +.jothidden { + display: none; +} +#jot { + width: 785px; + margin: 0px 2em 20px 0px; +} +#jot .profile-jot-text { + height: 1.2em; + width: 99%; + font-size: 10px; + color: #999999; + border: 1px solid #DDD; + padding: 0.3em; +} +#jot #jot-tools { + margin: 0px; + padding: 0px; + height: 40px; + overflow: none; + width: 783px; + background-color: #0e232e; + border-bottom: 2px solid #9eabb0; +} +#jot #jot-tools li { + list-style: none; + float: left; + width: 80px; + height: 40px; + border-bottom: 2px solid #9eabb0; +} +#jot #jot-tools li a { + display: block; + color: #cccccc; + width: 100%; + height: 40px; + text-align: center; + line-height: 40px; + overflow: hidden; +} +#jot #jot-tools li:hover { + background-color: #364e59; + border-bottom: 2px solid #bdcdd4; +} +#jot #jot-tools li.perms { + float: right; + width: 40px; +} +#jot #jot-tools li.perms a.unlock { + width: 30px; + border-left: 10px solid #cccccc; + background-color: #cccccc; + background-position: left center; +} +#jot #jot-tools li.perms a.lock { + width: 30px; + border-left: 10px solid #666666; + background-color: #666666; +} +#jot #jot-tools li.submit { + float: right; + background-color: #cccccc; + border-bottom: 2px solid #cccccc; + border-right: 1px solid #666666; + border-left: 1px solid #666666; +} +#jot #jot-tools li.submit input { + border: 0px; + margin: 0px; + padding: 0px; + background-color: #cccccc; + color: #666666; + width: 80px; + height: 40px; + line-height: 40px; +} +#jot #jot-tools li.submit input:hover { + background-color: #bdcdd4; + color: #666666; +} +#jot #jot-tools li.loading { + float: right; + background-color: #ffffff; + width: 20px; + vertical-align: center; + text-align: center; + border-top: 2px solid #9eabb0; + height: 38px; +} +#jot #jot-tools li.loading img { + margin-top: 10px; +} +#jot #jot-title { + border: 0px; + margin: 0px; + height: 20px; + width: 700px; + font-weight: bold; + border: 1px solid #ffffff; +} +#jot #jot-title:-webkit-input-placeholder { + font-weight: normal; +} +#jot #jot-title:-moz-placeholder { + font-weight: normal; +} +#jot #jot-title:hover { + border: 1px solid #999999; +} +#jot #jot-title:focus { + border: 1px solid #999999; +} +#jot #character-counter { + width: 80px; + float: right; + text-align: right; + height: 20px; + line-height: 20px; + padding-right: 20px; +} +/** buttons **/ +/*input[type="submit"] { + border: 0px; + background-color: @ButtonBackgroundColor; + color: @ButtonColor; + padding: 0px 10px; + .rounded(5px); + height: 18px; +}*/ +/** acl **/ +#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper { + display: block!important; +} +#acl-wrapper { + width: 690px; + float: left; +} +#acl-search { + float: right; + background: #ffffff url("../../../images/search_18.png") no-repeat right center; + padding-right: 20px; +} +#acl-showall { + float: left; + display: block; + width: auto; + height: 18px; + background-color: #cccccc; + background-image: url("../../../images/show_all_off.png"); + background-position: 7px 7px; + background-repeat: no-repeat; + padding: 7px 5px 0px 30px; + color: #999999; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +#acl-showall.selected { + color: #000000; + background-color: #ff9900; + background-image: url("../../../images/show_all_on.png"); +} +#acl-list { + height: 210px; + border: 1px solid #cccccc; + clear: both; + margin-top: 30px; + overflow: auto; +} +.acl-list-item { + display: block; + width: 150px; + height: 30px; + border: 1px solid #cccccc; + margin: 5px; + float: left; +} +.acl-list-item img { + width: 22px; + height: 22px; + float: left; + margin: 4px; +} +.acl-list-item p { + height: 12px; + font-size: 10px; + margin: 0px; + padding: 2px 0px 1px; + overflow: hidden; +} +.acl-list-item a { + font-size: 8px; + display: block; + width: 40px; + height: 10px; + float: left; + color: #999999; + background-color: #cccccc; + background-position: 3px 3px; + background-repeat: no-repeat; + margin-right: 5px; + -webkit-border-radius: 2px ; + -moz-border-radius: 2px; + border-radius: 2px; + padding-left: 15px; +} +#acl-wrapper a:hover { + text-decoration: none; + color: #000000; +} +.acl-button-show { + background-image: url("../../../images/show_off.png"); +} +.acl-button-hide { + background-image: url("../../../images/hide_off.png"); +} +.acl-button-show.selected { + color: #000000; + background-color: #9ade00; + background-image: url("../../../images/show_on.png"); +} +.acl-button-hide.selected { + color: #000000; + background-color: #ff4141; + background-image: url("../../../images/hide_on.png"); +} +.acl-list-item.groupshow { + border-color: #9ade00; +} +.acl-list-item.grouphide { + border-color: #ff4141; +} +/** /acl **/ +/** tab buttons **/ +ul.tabs { + list-style-type: none; + padding-bottom: 10px; + font-size: 13px; +} +ul.tabs li { + float: left; + margin-left: 7px; +} +ul.tabs li .active { + border-bottom: 1px solid #005c94; +} +/** + * Form fields + */ +.field { + margin-bottom: 10px; + padding-bottom: 10px; + overflow: auto; + width: 100%; +} +.field label { + float: left; + width: 200px; +} +.field input, .field textarea { + width: 400px; +} +.field textarea { + height: 100px; +} +.field .field_help { + display: block; + margin-left: 200px; + color: #666666; +} +.field .onoff { + float: left; + width: 80px; +} +.field .onoff a { + display: block; + border: 1px solid #666666; + background-image: url("../../../images/onoff.jpg"); + background-repeat: no-repeat; + padding: 4px 2px 2px 2px; + height: 16px; + text-decoration: none; +} +.field .onoff .off { + border-color: #666666; + padding-left: 40px; + background-position: left center; + background-color: #cccccc; + color: #666666; + text-align: right; +} +.field .onoff .on { + border-color: #204A87; + padding-right: 40px; + background-position: right center; + background-color: #D7E3F1; + color: #204A87; + text-align: left; +} +.field .hidden { + display: none!important; +} +.field.radio .field_help { + margin-left: 0px; +} + +#profile-edit-links-end { + clear: both; + margin-bottom: 15px; +} + +#profile-edit-links ul { margin: 20px; padding-bottom: 20px; list-style: none; } + +#profile-edit-links li { + float: left; + list-style: none; + margin-left: 10px; +} + +.profile-edit-side-div { + display: none; +} + +#register-form label, +#profile-edit-form label { + width: 300px; float: left; +} + +.required { + display: inline; + color: #B20202; +} + +/* oauth */ +.oauthapp { + height: auto; + overflow: auto; + border-bottom: 2px solid #cccccc; + padding-bottom: 1em; + margin-bottom: 1em; +} +.oauthapp img { + float: left; + width: 48px; + height: 48px; + margin: 10px; +} +.oauthapp img.noicon { + background-image: url("../../../images/icons/48/plugin.png"); + background-position: center center; + background-repeat: no-repeat; +} +.oauthapp a { + float: left; +} +/* contacts */ +.contact-entry-wrapper { + width: 50px; + float: left; +} +/* photo */ +.lframe { + float: left; + margin: 0px 10px 10px 0px; +} +/* profile match wrapper */ +.profile-match-wrapper { + float: left; + width: 90px; + height: 90px; + margin-bottom: 20px; +} +.profile-match-wrapper .contact-photo { + width: 80px; + height: 80px; +} +.profile-match-wrapper .contact-photo img { + width: 80px; + height: 80px; +} +.profile-match-wrapper .contact-photo-menu-button { + left: 0px; + top: 63px; +} +/* page footer */ +footer { + height: 100px; + display: table-row; +} + +blockquote { + border-left: 1px solid #D2D2D2; + padding-left: 9px; + margin: 0 0 0 .8ex; +} + +/* ================== */ +/* = Contacts Block = */ +/* ================== */ + +.contact-block-img { + width: 42px; + height: 42px; + padding-right: 2px; +} +.contact-block-div { + float: left; +} + +.contact-block-textdiv { width: 150px; height: 34px; float: left; } +#contact-block-end { clear: both; } + +#group-edit-wrapper { + margin-bottom: 10px; +} + +#group-members-end { + clear: both; +} + +/* +#group-separator, +#prof-separator { display: none;} +*/ diff --git a/view/theme/vier/style.less b/view/theme/vier/style.less new file mode 100644 index 000000000..c3dbae777 --- /dev/null +++ b/view/theme/vier/style.less @@ -0,0 +1,14 @@ +/** + * Fabio Comuni + **/ +// Less file http://lesscss.org/ +// compile with lessc +// $ lessc style.less > style.css + +@import "colors"; +@import "icons"; +@import "quattro"; + + + + diff --git a/view/theme/vier/wall_item.tpl b/view/theme/vier/wall_item.tpl new file mode 100644 index 000000000..03cbd4c0b --- /dev/null +++ b/view/theme/vier/wall_item.tpl @@ -0,0 +1,90 @@ +{{ if $indent }}{{ else }} +
+ $star.starred + {{ if $lock }}$lock{{ endif }} + +
+{{ endif }} +
+
+
+
+ + $name + + menu + + +
+
+
+ $name + -   + {{ if $plink }}$ago{{ else }} $ago {{ endif }} + +
+
+ + {{ if $title }}

$title

{{ endif }} + $body +
+
+
+ +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $plink }}$plink.title{{ endif }} +
+
+
$location 
+
+ {{ if $star }} + $star.do + $star.undo + $star.tagger + {{ endif }} + + {{ if $vote }} + $vote.like.1 + $vote.dislike.1 + {{ endif }} + + {{ if $vote.share }} + $vote.share.1 + {{ endif }} +
+ +
+ + {{ if $drop.dropping }} + + $drop.delete + {{ endif }} + {{ if $edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$dislike
+
+
+ +
+ $comment +
diff --git a/view/theme/vier/wallwall_item.tpl b/view/theme/vier/wallwall_item.tpl new file mode 100644 index 000000000..3357bd8e0 --- /dev/null +++ b/view/theme/vier/wallwall_item.tpl @@ -0,0 +1,97 @@ +{{ if $indent }}{{ else }} +
+ $star.starred + {{ if $lock }}$lock{{ endif }} + +
+{{ endif }} +
+
+
+
+ + $owner_name + +
+
+ + $name + + menu + + +
+
+ +
+ $name + $to $owner_name + $vwall -   + {{ if $plink }}$ago{{ else }} $ago {{ endif }} + +
+ +
+ {{ if $title }}

$title

{{ endif }} + $body +
+
+
+ +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
+ +
+ +
$location 
+ +
+ {{ if $star }} + $star.do + $star.undo + {{ endif }} + + {{ if $vote }} + $vote.like.1 + $vote.dislike.1 + {{ endif }} + + {{ if $vote.share }} + $vote.share.1 + {{ endif }} +
+ +
+ + {{ if $drop.dropping }} + + $drop.delete + {{ endif }} + {{ if $edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$dislike
+
+
+
+ $comment +
From 4713069e68e163971f2625500f9006501e59bd04 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Feb 2012 20:11:36 +0100 Subject: [PATCH 02/10] Many small changes --- view/theme/vier/style.css | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index d4084c05d..a9ff22f78 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -200,15 +200,9 @@ .icon.s16.delete { background-image: url("../../../images/icons/16/delete.png"); } -<<<<<<< HEAD /*.icon.s16.edit { background-image: url("../../../images/icons/16/edit.png"); }*/ -======= -.icon.s16.edit { - background-image: url("../../../images/icons/16/edit.png"); -} ->>>>>>> upstream/master .icon.s16.star { background-image: url("../../../images/icons/16/star.png"); } @@ -919,11 +913,7 @@ section { } .wall-item-container .wall-item-actions-tools { float: right; -<<<<<<< HEAD width: 80px; -======= - width: 60px; ->>>>>>> upstream/master } .wall-item-container .wall-item-actions-tools a { float: right; @@ -1038,7 +1028,6 @@ section { /* contacts menu */ .contact-photo-wrapper { position: relative; -<<<<<<< HEAD width: 80px; } @@ -1046,9 +1035,6 @@ section { width: 25px; } -======= -} ->>>>>>> upstream/master .contact-photo { width: 48px; height: 48px; @@ -1410,7 +1396,6 @@ ul.tabs li .active { .field.radio .field_help { margin-left: 0px; } -<<<<<<< HEAD #profile-edit-links-end { clear: both; @@ -1439,11 +1424,6 @@ ul.tabs li .active { color: #B20202; } -======= -#profile-edit-links li { - list-style: none; -} ->>>>>>> upstream/master /* oauth */ .oauthapp { height: auto; @@ -1500,7 +1480,6 @@ footer { height: 100px; display: table-row; } -<<<<<<< HEAD blockquote { border-left: 1px solid #D2D2D2; @@ -1536,5 +1515,3 @@ blockquote { #group-separator, #prof-separator { display: none;} */ -======= ->>>>>>> upstream/master From 31653aef64c94ade956b552dad65bfe15f0ad491 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Feb 2012 20:36:59 +0100 Subject: [PATCH 03/10] Brand new html2bbcode. Some other changes in diaspora to bbcode handling --- include/bb2diaspora.php | 29 ++- include/bbcode.php | 61 +++---- include/html2bbcode.php | 396 +++++++++++++++++++++++++++------------- 3 files changed, 325 insertions(+), 161 deletions(-) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index c26b0c334..9acd1e066 100755 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -13,30 +13,45 @@ require_once('include/html2bbcode.php'); function diaspora2bb($s) { + // for testing purposes: Collect raw markdown articles + $file = tempnam("/tmp/", "markdown"); + file_put_contents($file, $s); + $s = html_entity_decode($s,ENT_COMPAT,'UTF-8'); - $s = str_replace("\r","\n",$s); + + // Too many new lines. So deactivated the following line + // $s = str_replace("\r","\n",$s); + // Simply remove cr. + $s = str_replace("\r","",$s); $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s); - $s = preg_replace('/\#([^\s\#])/','\\#$1',$s); + // Escaping the hash tags - doesn't always seem to work + // $s = preg_replace('/\#([^\s\#])/','\\#$1',$s); + // This seems to work + $s = preg_replace('/\#([^\s\#])/','#$1',$s); $s = Markdown($s); - $s = str_replace('#','#',$s); - $s = str_replace("\n",'
',$s); + $s = str_replace('#','#',$s); + + // Again: too many new lines + //$s = str_replace("\n",'
',$s); $s = html2bbcode($s); // $s = str_replace('*','*',$s); - $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); - $s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s); + $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); + $s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s); $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s); $s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s); $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s); // remove duplicate adjacent code tags $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s); - $s = scale_diaspora_images($s); + + // Don't show link to full picture (until it is fixed) + $s = scale_diaspora_images($s, false); return $s; } diff --git a/include/bbcode.php b/include/bbcode.php index cae867eb8..528df33ec 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -12,20 +12,20 @@ function stripcode_br_cb($s) { function tryoembed($match){ $url = ((count($match)==2)?$match[1]:$match[2]); // logger("tryoembed: $url"); - + $o = oembed_fetch_url($url); //echo "
"; var_dump($match, $url, $o); killme();
 
 	if ($o->type=="error") return $match[0];
-	
+
 	$html = oembed_format_object($o);
 	return $html; //oembed_iframe($html,$o->width,$o->height);
-	
+
 }
 
-// [noparse][i]italic[/i][/noparse] turns into 
-// [noparse][ i ]italic[ /i ][/noparse], 
+// [noparse][i]italic[/i][/noparse] turns into
+// [noparse][ i ]italic[ /i ][/noparse],
 // to hide them from parser.
 
 function bb_spacefy($st) {
@@ -36,7 +36,7 @@ function bb_spacefy($st) {
   return $new_str;
 }
 
-// The previously spacefied [noparse][ i ]italic[ /i ][/noparse], 
+// The previously spacefied [noparse][ i ]italic[ /i ][/noparse],
 // now turns back and the [noparse] tags are trimed
 // returning [i]italic[/i]
 
@@ -59,8 +59,8 @@ function bbcode($Text,$preserve_nl = false) {
 	$Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text);
 
 
-	// Extract a single private image which uses data url's since preg has issues with 
-	// large data sizes. Stash it away while we do bbcode conversion, and then put it back 
+	// Extract a single private image which uses data url's since preg has issues with
+	// large data sizes. Stash it away while we do bbcode conversion, and then put it back
 	// in after we've done all the regex matching. We cannot use any preg functions to do this.
 
 	$saved_image = '';
@@ -71,13 +71,13 @@ function bbcode($Text,$preserve_nl = false) {
 		$start_fragment = substr($Text,0,$img_start);
 		$img_start += strlen('[img]');
 		$saved_image = substr($Text,$img_start,$img_end - $img_start);
-		$end_fragment = substr($Text,$img_end + strlen('[/img]'));		
+		$end_fragment = substr($Text,$img_end + strlen('[/img]'));
 //		logger('saved_image: ' . $saved_image,LOGGER_DEBUG);
 		$Text = $start_fragment . '[$#saved_image#$]' . $end_fragment;
 	}
 
 	// If we find any event code, turn it into an event.
-	// After we're finished processing the bbcode we'll 
+	// After we're finished processing the bbcode we'll
 	// replace all of the event code with a reformatted version.
 
 	$ev = bbtoevent($Text);
@@ -105,7 +105,7 @@ function bbcode($Text,$preserve_nl = false) {
 	// Perform URL Search
 
 	$Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1$2', $Text);
-	
+
 	$Text = preg_replace_callback("/\[bookmark\=([^\]]*)\].*?\[\/bookmark\]/ism",'tryoembed',$Text);
 	$Text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",'[url=$1]$2[/url]',$Text);
 
@@ -118,7 +118,7 @@ function bbcode($Text,$preserve_nl = false) {
 	// Perform MAIL Search
 	$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '$1', $Text);
 	$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '$2', $Text);
-         
+
 	// Check for bold text
 	$Text = preg_replace("(\[b\](.*?)\[\/b\])ism",'$1',$Text);
 
@@ -150,20 +150,14 @@ function bbcode($Text,$preserve_nl = false) {
 	$Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); - $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '
      $1
    ' -,$Text); + $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '
      $1
    ' ,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); - $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '
      $1
    ' -,$Text); - $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
      $2
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '
      $1
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
      $2
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); $Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '$1' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '$1' ,$Text); @@ -190,21 +184,24 @@ upper-alpha;">$2' ,$Text); // Check for [code] text $Text = preg_replace("/\[code\](.*?)\[\/code\]/ism","$CodeLayout", $Text); - - - // Declare the format for [quote] layout - $QuoteLayout = '
    $1
    '; + $QuoteLayout = '
    $1
    '; // Check for [quote] text - $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text); + // handle nested quotes + $endlessloop = 0; + while (strpos($Text, "[/quote]") and strpos($Text, "[quote]") and (++$endlessloop < 20)) + $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text); // Check for [quote=Author] text $t_wrote = t('$1 wrote:'); - $Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism", - "
    " . $t_wrote . " $2
    ", - $Text); + // handle nested quotes + $endlessloop = 0; + while (strpos($Text, "[/quote]") and strpos($Text, "[quote=") and (++$endlessloop < 20)) + $Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism", + "
    " . $t_wrote . " $2
    ", + $Text); // [img=widthxheight]image source[/img] $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '', $Text); diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 8025c336b..1b4b5e99a 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -1,127 +1,279 @@ (.*?)\<\/pre\>/is', - '/\/is', - '/\<\/p\>/is', - '/\(.*?)\<\/b\>/is', - '/\(.*?)\<\/i\>/is', - '/\(.*?)\<\/u\>/is', - '/\(.*?)\<\/ul\>/is', - '/\(.*?)\<\/li\>/is', - '/\/is', - '/\/is', - '/\/is', - '/\/is', - '/\/is', - '/\(.*?)\<\/div\>/is', - '/\/is', - '/\(.*?)\<\/strong\>/is', - '/\(.*?)\<\/a\>/is', - '/\(.*?)\<\/code\>/is', - '/\(.*?)\<\/span\>/is', - '/\(.*?)\<\/span\>/is', - '/\(.*?)\<\/blockquote\>/is', - '/\(.*?)\<\/video\>/is', - '/\(.*?)\<\/audio\>/is', - '/\(.*?)\<\/iframe\>/is', - - ); - - // Replace with - - $bbtags = array( - '[code]$1[/code]', - '', - "\n", - '[b]$1[/b]', - '[i]$1[/i]', - '[u]$1[/u]', - '[list]$1[/list]', - '[*]$1', - '[img=$2x$4]$6[/img]', - '[img=$4x$2]$6[/img]', - '[img=$4x$6]$2[/img]', - '[img=$6x$4]$2[/img]', - '[img]$2[/img]', - '$2', - "\n", - '[b]$1[/b]', - '[url=$2]$4[/url]', - '[code]$1[/code]', - '[color="$1"]$2[/color]', - '[size=$1]$2[/size]', - '[quote]$1[/quote]', - '[video]$1[/video]', - '[audio]$1[/audio]', - '[iframe]$1[/iframe]', - ); - - // Replace $htmltags in $text with $bbtags - $text = preg_replace ($htmltags, $bbtags, $s); - - call_hooks('html2bbcode', $text); - - // Strip all other HTML tags - $text = strip_tags($text); - return $text; - -} - -function stripnl_exceptinpre($string) +function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb) { - // First, check for
     tag
    -    if(strpos($string, '
    ') === false)
    -    {
    -        return str_replace("\n","", $string);
    -    }
    -
    -    // If there is a 
    , we have to split by line
    -    // and manually replace the linebreaks
    -
    -    $strArr=explode("\n", $string);
    -
    -    $output="";
    -    $preFound=false;
    -
    -    // Loop over each line
    -    foreach($strArr as $line)
    -    {    // See if the line has a 
    . If it does, set $preFound to true
    -        if(strpos($line, "
    ") !== false)
    -        {
    -            $preFound=true;
    -        }
    -        elseif(strpos($line, "
    ") !== false) - { - $preFound=false; - } - - // If we are in a pre tag, add line and also add \n, else add the line without \n - if($preFound) - { - $output .= $line . "\n"; - } - else - { - $output .= $line ; - } - } - - return $output; + do { + $done = node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb); + } while ($done); } +function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb) +{ + $savestart = str_replace('$', '%', $startbb); + $replace = false; + + $xpath = new DomXPath($doc); + + $list = $xpath->query("//".$oldnode); + foreach ($list as $oldNode) { + + $attr = array(); + if ($oldNode->attributes->length) + foreach ($oldNode->attributes as $attribute) + $attr[$attribute->name] = $attribute->value; + + $replace = true; + + $startbb = $savestart; + + $i = 0; + + foreach ($attributes as $attribute => $value) { + + $startbb = str_replace('%'.++$i, '$1', $startbb); + + if (strpos('*'.$startbb, '$1') > 0) { + + if ($replace and (@$attr[$attribute] != '')) { + + $startbb = preg_replace($value, $startbb, $attr[$attribute], -1, $count); + + // If nothing could be changed + if ($count == 0) + $replace = false; + } else + $replace = false; + } else { + if (@$attr[$attribute] != $value) + $replace = false; + } + } + + if ($replace) { + $StartCode = $oldNode->ownerDocument->createTextNode($startbb); + $EndCode = $oldNode->ownerDocument->createTextNode($endbb); + + $oldNode->parentNode->insertBefore($StartCode, $oldNode); + + if ($oldNode->hasChildNodes()) { + foreach ($oldNode->childNodes as $child) { + $newNode = $child->cloneNode(true); + $oldNode->parentNode->insertBefore($newNode, $oldNode); + } + } + + $oldNode->parentNode->insertBefore($EndCode, $oldNode); + $oldNode->parentNode->removeChild($oldNode); + } + } + return($replace); +} + +function deletenode(&$doc, $node) +{ + $xpath = new DomXPath($doc); + $list = $xpath->query("//".$node); + foreach ($list as $child) + $child->parentNode->removeChild($child); +} + +function html2bbcode($message) +{ + + //$file = tempnam("/tmp/", "html"); + //file_put_contents($file, $message); + + $message = str_replace("\r", "", $message); + + $message = str_replace(array( + "
  • ", + "

  • "), + array( + "
  • ", + "
  • "), + $message); + + // remove namespaces + $message = preg_replace('=<(\w+):(.+?)>=', '', $message); + $message = preg_replace('==', '', $message); + + $doc = new DOMDocument(); + $doc->preserveWhiteSpace = false; + + $message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8"); + + @$doc->loadHTML($message); + + deletenode($doc, 'style'); + deletenode($doc, 'head'); + deletenode($doc, 'title'); + deletenode($doc, 'meta'); + deletenode($doc, 'xml'); + deletenode($doc, 'removeme'); + + $xpath = new DomXPath($doc); + $list = $xpath->query("//pre"); + foreach ($list as $node) + $node->nodeValue = str_replace("\n", "\r", $node->nodeValue); + + $message = $doc->saveHTML(); + $message = str_replace(array("\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"), array("<", ">", "
    ", " ", ""), $message); + $message = preg_replace('= [\s]*=i', " ", $message); + @$doc->loadHTML($message); + + node2bbcode($doc, 'html', array(), "", ""); + node2bbcode($doc, 'body', array(), "", ""); + + // Outlook-Quote - Variant 1 + node2bbcode($doc, 'p', array('class'=>'MsoNormal', 'style'=>'margin-left:35.4pt'), '[quote]', '[/quote]'); + + // Outlook-Quote - Variant 2 + node2bbcode($doc, 'div', array('style'=>'border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'), '[quote]', '[/quote]'); + + // MyBB-Stuff + node2bbcode($doc, 'span', array('style'=>'text-decoration: underline;'), '[u]', '[/u]'); + node2bbcode($doc, 'span', array('style'=>'font-style: italic;'), '[i]', '[/i]'); + node2bbcode($doc, 'span', array('style'=>'font-weight: bold;'), '[b]', '[/b]'); + + node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]'); + node2bbcode($doc, 'font', array('size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[size=$1][color=$2]', '[/color][/size]'); + node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(.+)/'), '[font=$1][size=$2]', '[/size][/font]'); + node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'color'=>'/(.+)/'), '[font=$1][color=$3]', '[/color][/font]'); + node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/'), '[font=$1]', '[/font]'); + node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]'); + node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]'); + + node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]'); + node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)/'), '[size=$1]', '[/size]'); + + //node2bbcode($doc, 'span', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); + //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)pt.*/'), '[font=$1][size=$2]', '[/size][/font]'); + //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)px.*/'), '[font=$1][size=$2]', '[/size][/font]'); + //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); + + node2bbcode($doc, 'strong', array(), '[b]', '[/b]'); + node2bbcode($doc, 'em', array(), '[i]', '[/i]'); + node2bbcode($doc, 'b', array(), '[b]', '[/b]'); + node2bbcode($doc, 'i', array(), '[i]', '[/i]'); + node2bbcode($doc, 'u', array(), '[u]', '[/u]'); + + node2bbcode($doc, 'big', array(), "[size=large]", "[/size]"); + node2bbcode($doc, 'small', array(), "[size=small]", "[/size]"); + + node2bbcode($doc, 'blockquote', array(), '[quote]', '[/quote]'); + + node2bbcode($doc, 'br', array(), "\n", ''); + + node2bbcode($doc, 'p', array('class'=>'MsoNormal'), "\n", ""); + node2bbcode($doc, 'div', array('class'=>'MsoNormal'), "\r", ""); + + node2bbcode($doc, 'span', array(), "", ""); + + node2bbcode($doc, 'span', array(), "", ""); + node2bbcode($doc, 'pre', array(), "", ""); + node2bbcode($doc, 'div', array(), "\r", "\r"); + node2bbcode($doc, 'p', array(), "\n", "\n"); + + node2bbcode($doc, 'ul', array(), "[list]", "[/list]"); + node2bbcode($doc, 'ol', array(), "[list=1]", "[/list]"); + node2bbcode($doc, 'li', array(), "[*]", ""); + + node2bbcode($doc, 'hr', array(), "[hr]", ""); + + node2bbcode($doc, 'table', array(), "", ""); + node2bbcode($doc, 'tr', array(), "\n", ""); + node2bbcode($doc, 'td', array(), "\t", ""); + + node2bbcode($doc, 'h1', array(), "\n\n[size=xx-large][b]", "[/b][/size]\n"); + node2bbcode($doc, 'h2', array(), "\n\n[size=x-large][b]", "[/b][/size]\n"); + node2bbcode($doc, 'h3', array(), "\n\n[size=large][b]", "[/b][/size]\n"); + node2bbcode($doc, 'h4', array(), "\n\n[size=medium][b]", "[/b][/size]\n"); + node2bbcode($doc, 'h5', array(), "\n\n[size=small][b]", "[/b][/size]\n"); + node2bbcode($doc, 'h6', array(), "\n\n[size=x-small][b]", "[/b][/size]\n"); + + node2bbcode($doc, 'a', array('href'=>'/(.+)/'), '[url=$1]', '[/url]'); + + node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'), '[img$2x$3]$1', '[/img]'); + node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '[img]$1', '[/img]'); + + + node2bbcode($doc, 'video', array('src'=>'/(.+)/'), '[video]$1', '[/video]'); + node2bbcode($doc, 'audio', array('src'=>'/(.+)/'), '[audio]$1', '[/audio]'); + node2bbcode($doc, 'iframe', array('src'=>'/(.+)/'), '[iframe]$1', '[/iframe]'); + + node2bbcode($doc, 'code', array(), '[code]$1', '[/code]'); + + $message = $doc->saveHTML(); + + // I'm removing something really disturbing + // Don't know exactly what it is + $message = str_replace(chr(194).chr(160), ' ', $message); + + $message = str_replace(" ", " ", $message); + + // removing multiple DIVs + $message = preg_replace('=\r *\r=i', "\n", $message); + $message = str_replace("\r", "\n", $message); + + call_hooks('html2bbcode', $message); + + $message = strip_tags($message); + + $message = html_entity_decode($message, ENT_QUOTES, 'UTF-8'); + + $message = str_replace(array("<"), array("<"), $message); + + // remove quotes if they don't make sense + $message = preg_replace('=\[/quote\][\s]*\[quote\]=i', "\n", $message); + + $message = preg_replace('=\[quote\]\s*=i', "[quote]", $message); + $message = preg_replace('=\s*\[/quote\]=i', "[/quote]", $message); + + do { + $oldmessage = $message; + $message = str_replace("\n \n", "\n\n", $message); + } while ($oldmessage != $message); + + do { + $oldmessage = $message; + $message = str_replace("\n\n\n", "\n\n", $message); + } while ($oldmessage != $message); + + $message = str_replace(array( + "[/size]\n\n", + "\n\n[hr]\n", + "\n[hr]\n\n", + "\n\n[list", + "[/list]\n\n", + "\n[/list]", + "[list]\n", + "[list=1]\n", + "\n\n[*]"), + array( + "[/size]\n", + "\n[hr]\n", + "\n[hr]\n", + "\n[list", + "[/list]\n", + "[/list]", + "[list]", + "[list=1]", + "\n[*]"), + $message); + + $message = str_replace(array('[b][b]', '[/b][/b]', '[i][i]', '[/i][/i]'), + array('[b]', '[/b]', '[i]', '[/i]'), $message); + + // Handling Yahoo style of mails + $message = str_replace('[hr][b]From:[/b]', '[quote][b]From:[/b]', $message); + + return(trim($message)); +} +?> From 8c8efbdf644fc645e61ba279ab52617d173cee45 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Feb 2012 20:41:55 +0100 Subject: [PATCH 04/10] README added --- README | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 000000000..e75d6319b --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +This is my personal fork of https://github.com/friendica/friendica + +If you want to have a stable version of friendica please look there. From 064c843119576c1345a61a531dfaa1076a54f3f0 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Feb 2012 21:07:45 +0100 Subject: [PATCH 05/10] Handling nested bbcodes. Some small design changes in html2bbcode. Change in poller.php is just for testing purposes. --- include/bbcode.php | 19 ++++++++++++------- include/html2bbcode.php | 35 +++++++++++++++++++++-------------- include/poller.php | 4 ++-- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 528df33ec..d639b0c39 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -149,15 +149,20 @@ function bbcode($Text,$preserve_nl = false) { $Text = str_replace("[*]", "
  • ", $Text); $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '
  • $1
  • ' ,$Text); - $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); + // handle nested lists + $endlessloop = 0; + while (strpos($Text, "[/list]") and strpos($Text, "[list") and (++$endlessloop < 20)) { + $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); + $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); + $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
      $2
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + } + $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '
      $1
    ' ,$Text); - $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); - $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '
      $1
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
      $2
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); - $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); $Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '$1' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '$1' ,$Text); diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 1b4b5e99a..4297ff2f9 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -187,9 +187,13 @@ function html2bbcode($message) node2bbcode($doc, 'hr', array(), "[hr]", ""); - node2bbcode($doc, 'table', array(), "", ""); - node2bbcode($doc, 'tr', array(), "\n", ""); - node2bbcode($doc, 'td', array(), "\t", ""); + //node2bbcode($doc, 'table', array(), "", ""); + //node2bbcode($doc, 'tr', array(), "\n", ""); + //node2bbcode($doc, 'td', array(), "\t", ""); + node2bbcode($doc, 'table', array(), "[table]", "[/table]"); + node2bbcode($doc, 'th', array(), "[th]", "[/th]"); + node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]"); + node2bbcode($doc, 'td', array(), "[td]", "[/td]"); node2bbcode($doc, 'h1', array(), "\n\n[size=xx-large][b]", "[/b][/size]\n"); node2bbcode($doc, 'h2', array(), "\n\n[size=x-large][b]", "[/b][/size]\n"); @@ -246,27 +250,30 @@ function html2bbcode($message) $message = str_replace("\n\n\n", "\n\n", $message); } while ($oldmessage != $message); - $message = str_replace(array( + do { + $oldmessage = $message; + $message = str_replace(array( "[/size]\n\n", - "\n\n[hr]\n", - "\n[hr]\n\n", - "\n\n[list", - "[/list]\n\n", + "\n[hr]", + "[hr]\n", + "\n[list", + "[/list]\n", "\n[/list]", "[list]\n", "[list=1]\n", - "\n\n[*]"), + "\n[*]"), array( "[/size]\n", - "\n[hr]\n", - "\n[hr]\n", - "\n[list", - "[/list]\n", + "[hr]", + "[hr]", + "[list", + "[/list]", "[/list]", "[list]", "[list=1]", - "\n[*]"), + "[*]"), $message); + } while ($message != $oldmessage); $message = str_replace(array('[b][b]', '[/b][/b]', '[i][i]', '[/i][/i]'), array('[b]', '[/b]', '[i]', '[/i]'), $message); diff --git a/include/poller.php b/include/poller.php index 7d42c63b5..0297eeabc 100755 --- a/include/poller.php +++ b/include/poller.php @@ -194,8 +194,8 @@ function poller_run($argv, $argc){ $update = true; break; } - if((! $update) && (! $force)) - continue; +// if((! $update) && (! $force)) +// continue; } // Check to see if we are running out of memory - if so spawn a new process and kill this one From b6d7777226517dc22745bc3d78b827b0175bcb16 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 19 Feb 2012 22:47:32 +0100 Subject: [PATCH 06/10] New version of markdown. Playing with stylesheet. Testing line breaks. --- include/bb2diaspora.php | 13 +- library/markdown.php | 884 +++++++++++++++++--------------------- view/theme/vier/style.css | 11 + 3 files changed, 404 insertions(+), 504 deletions(-) mode change 100755 => 100644 library/markdown.php diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 9acd1e066..6f0ab3d28 100755 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -8,7 +8,7 @@ require_once('include/html2bbcode.php'); // we don't want to support a bbcode specific markdown interpreter // and the markdown library we have is pretty good, but provides HTML output. -// So we'll use that to convert to HTML, then convert the HTML back to bbcode, +// So we'll use that to convert to HTML, then convert the HTML back to bbcode, // and then clean up a few Diaspora specific constructs. function diaspora2bb($s) { @@ -35,17 +35,16 @@ function diaspora2bb($s) { $s = str_replace('#','#',$s); - // Again: too many new lines - //$s = str_replace("\n",'
    ',$s); + $s = str_replace("\n",'
    ',$s); $s = html2bbcode($s); // $s = str_replace('*','*',$s); - $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); - $s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s); - $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s); - $s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s); + $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); + $s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s); + $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s); + $s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s); $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s); // remove duplicate adjacent code tags $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s); diff --git a/library/markdown.php b/library/markdown.php old mode 100755 new mode 100644 index 343153186..f548fc26c --- a/library/markdown.php +++ b/library/markdown.php @@ -3,17 +3,17 @@ # Markdown Extra - A text-to-HTML conversion tool for web writers # # PHP Markdown & Extra -# Copyright (c) 2004-2008 Michel Fortin -# +# Copyright (c) 2004-2012 Michel Fortin +# # # Original Markdown -# Copyright (c) 2004-2006 John Gruber +# Copyright (c) 2004-2006 John Gruber # # -define( 'MARKDOWN_VERSION', "1.0.1m" ); # Sat 21 Jun 2008 -define( 'MARKDOWNEXTRA_VERSION', "1.2.3" ); # Wed 31 Dec 2008 +define( 'MARKDOWN_VERSION', "1.0.1o" ); # Sun 8 Jan 2012 +define( 'MARKDOWNEXTRA_VERSION', "1.2.5" ); # Sun 8 Jan 2012 # @@ -34,17 +34,6 @@ define( 'MARKDOWNEXTRA_VERSION', "1.2.3" ); # Wed 31 Dec 2008 @define( 'MARKDOWN_FN_LINK_CLASS', "" ); @define( 'MARKDOWN_FN_BACKLINK_CLASS', "" ); -# Enables special handling for links pointing outside of the current domain. -@define( 'MARKDOWN_EL_ENABLE', true); # Use this feature at all? -@define( 'MARKDOWN_EL_LOCAL_DOMAIN', null); # Leave as null to autodetect -@define( 'MARKDOWN_EL_NEW_WINDOW', true); # Open link in a new browser? -@define( 'MARKDOWN_EL_CSS_CLASS', 'external'); # Leave as null for no class - -# Enables header auto-self-linking. -@define( 'MARKDOWN_HA_ENABLE', true ); # Use this feature at all? -@define( 'MARKDOWN_HA_CLASS', 'hidden-selflink' ); # Leave as null for no class -@define( 'MARKDOWN_HA_TEXT', '←' ); # The text to use as the link - # # WordPress settings: @@ -80,17 +69,17 @@ function Markdown($text) { /* Plugin Name: Markdown Extra -Plugin URI: http://www.michelf.com/projects/php-markdown/ -Description:
    Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... -Version: 1.2.2 +Plugin URI: http://michelf.com/projects/php-markdown/ +Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... +Version: 1.2.5 Author: Michel Fortin -Author URI: http://www.michelf.com/ +Author URI: http://michelf.com/ */ if (isset($wp_version)) { # More details about how it works here: - # - + # + # Post content and excerpts # - Remove WordPress paragraph generator. # - Run Markdown on excerpt, then remove all tags. @@ -105,13 +94,13 @@ if (isset($wp_version)) { add_filter('get_the_excerpt', 'trim', 7); add_filter('the_excerpt', 'mdwp_add_p'); add_filter('the_excerpt_rss', 'mdwp_strip_p'); - + remove_filter('content_save_pre', 'balanceTags', 50); remove_filter('excerpt_save_pre', 'balanceTags', 50); add_filter('the_content', 'balanceTags', 50); add_filter('get_the_excerpt', 'balanceTags', 9); } - + # Add a footnote id prefix to posts when inside a loop. function mdwp_MarkdownPost($text) { static $parser; @@ -126,7 +115,7 @@ if (isset($wp_version)) { } return $parser->transform($text); } - + # Comments # - Remove WordPress paragraph generator. # - Remove WordPress auto-link generator. @@ -141,7 +130,7 @@ if (isset($wp_version)) { add_filter('get_comment_text', 'Markdown', 6); add_filter('get_comment_excerpt', 'Markdown', 6); add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); - + global $mdwp_hidden_tags, $mdwp_placeholders; $mdwp_hidden_tags = explode(' ', '

     
  • '); @@ -149,7 +138,7 @@ if (isset($wp_version)) { 'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '. 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli')); } - + function mdwp_add_p($text) { if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { $text = '

    '.$text.'

    '; @@ -157,7 +146,7 @@ if (isset($wp_version)) { } return $text; } - + function mdwp_strip_p($t) { return preg_replace('{}i', '', $t); } function mdwp_hide_tags($text) { @@ -182,7 +171,7 @@ function identify_modifier_markdown() { 'authors' => 'Michel Fortin and John Gruber', 'licence' => 'GPL', 'version' => MARKDOWNEXTRA_VERSION, - 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...', + 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...', ); } @@ -229,7 +218,7 @@ class Markdown_Parser { # Needed to insert a maximum bracked depth while converting to PHP. var $nested_brackets_depth = 6; var $nested_brackets_re; - + var $nested_url_parenthesis_depth = 4; var $nested_url_parenthesis_re; @@ -240,11 +229,11 @@ class Markdown_Parser { # Change to ">" for HTML output. var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; var $tab_width = MARKDOWN_TAB_WIDTH; - + # Change to `true` to disallow markup or entities. var $no_markup = false; var $no_entities = false; - + # Predefined urls and titles for reference links and images. var $predef_urls = array(); var $predef_titles = array(); @@ -256,17 +245,17 @@ class Markdown_Parser { # $this->_initDetab(); $this->prepareItalicsAndBold(); - - $this->nested_brackets_re = + + $this->nested_brackets_re = str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). str_repeat('\])*', $this->nested_brackets_depth); - - $this->nested_url_parenthesis_re = + + $this->nested_url_parenthesis_re = str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); - + $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; - + # Sort document, block, and span gamut in ascendent priority order. asort($this->document_gamut); asort($this->block_gamut); @@ -278,27 +267,27 @@ class Markdown_Parser { var $urls = array(); var $titles = array(); var $html_hashes = array(); - + # Status flag to avoid invalid nesting. var $in_anchor = false; - - + + function setup() { # - # Called before the transformation process starts to setup parser + # Called before the transformation process starts to setup parser # states. # # Clear global hashes. $this->urls = $this->predef_urls; $this->titles = $this->predef_titles; $this->html_hashes = array(); - + $in_anchor = false; } - + function teardown() { # - # Called after the transformation process to clear any variable + # Called after the transformation process to clear any variable # which may be taking up memory unnecessarly. # $this->urls = array(); @@ -313,7 +302,7 @@ class Markdown_Parser { # and pass it through the document gamut. # $this->setup(); - + # Remove UTF-8 BOM and marker character in input, if present. $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); @@ -340,16 +329,16 @@ class Markdown_Parser { foreach ($this->document_gamut as $method => $priority) { $text = $this->$method($text); } - + $this->teardown(); return $text . "\n"; } - + var $document_gamut = array( # Strip link definitions, store in hashes. "stripLinkDefinitions" => 20, - + "runBasicBlockGamut" => 30, ); @@ -367,14 +356,18 @@ class Markdown_Parser { [ ]* \n? # maybe *one* newline [ ]* - ? # url = $2 + (?: + <(.+?)> # url = $2 + | + (\S+?) # url = $3 + ) [ ]* \n? # maybe one newline [ ]* (?: (?<=\s) # lookbehind for whitespace ["(] - (.*?) # title = $3 + (.*?) # title = $4 [")] [ ]* )? # title is optional @@ -386,8 +379,9 @@ class Markdown_Parser { } function _stripLinkDefinitions_callback($matches) { $link_id = strtolower($matches[1]); - $this->urls[$link_id] = $matches[2]; - $this->titles[$link_id] =& $matches[3]; + $url = $matches[2] == '' ? $matches[3] : $matches[2]; + $this->urls[$link_id] = $url; + $this->titles[$link_id] =& $matches[4]; return ''; # String that will replace the block } @@ -405,14 +399,14 @@ class Markdown_Parser { # hard-coded: # # * List "a" is made of tags which can be both inline or block-level. - # These will be treated block-level when the start tag is alone on - # its line, otherwise they're not matched here and will be taken as + # These will be treated block-level when the start tag is alone on + # its line, otherwise they're not matched here and will be taken as # inline later. # * List "b" is made of tags which are always block-level; # $block_tags_a_re = 'ins|del'; $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|form|fieldset|iframe|math|textarea'; + 'script|noscript|form|fieldset|iframe|math'; # Regular expression for the content of a block tag. $nested_tags_level = 4; @@ -428,7 +422,7 @@ class Markdown_Parser { | \'[^\']*\' # text inside single quotes (tolerate ">") )* - )? + )? '; $content = str_repeat(' @@ -445,7 +439,7 @@ class Markdown_Parser { str_repeat(' # closing nested tag ) - | + | <(?!/\2\s*> # other tags with a different name ) )*', @@ -471,9 +465,9 @@ class Markdown_Parser { ) ( # save in $1 - # Match from `\n` to `\n`, handling nested tags + # Match from `\n` to `\n`, handling nested tags # in between. - + [ ]{0,'.$less_than_tab.'} <('.$block_tags_b_re.')# start tag = $2 '.$attr.'> # attributes followed by > and \n @@ -491,28 +485,28 @@ class Markdown_Parser { # the matching end tag [ ]* # trailing spaces/tabs (?=\n+|\Z) # followed by a newline or end of document - - | # Special case just for
    . It was easier to make a special + + | # Special case just for
    . It was easier to make a special # case than to make the other regex more complicated. - + [ ]{0,'.$less_than_tab.'} <(hr) # start tag = $2 '.$attr.' # attributes /?> # the matching end tag [ ]* (?=\n{2,}|\Z) # followed by a blank line or end of document - + | # Special case for standalone HTML comments: - + [ ]{0,'.$less_than_tab.'} (?s: ) [ ]* (?=\n{2,}|\Z) # followed by a blank line or end of document - + | # PHP and ASP-style processor instructions (hashBlock($text); return "\n\n$key\n\n"; } - - + + function hashPart($text, $boundary = 'X') { # - # Called whenever a tag must be hashed when a function insert an atomic + # Called whenever a tag must be hashed when a function insert an atomic # element in the text stream. Passing $text to through this function gives # a unique text-token which will be reverted back when calling unhash. # @@ -550,7 +544,7 @@ class Markdown_Parser { # Swap back any tag hash found in $text so we do not have to `unhash` # multiple times at the end. $text = $this->unhash($text); - + # Then hash the block. static $i = 0; $key = "$boundary\x1A" . ++$i . $boundary; @@ -574,7 +568,7 @@ class Markdown_Parser { # "doHeaders" => 10, "doHorizontalRules" => 20, - + "doLists" => 40, "doCodeBlocks" => 50, "doBlockQuotes" => 60, @@ -584,33 +578,33 @@ class Markdown_Parser { # # Run block gamut tranformations. # - # We need to escape raw HTML in Markdown source before doing anything - # else. This need to be done for each block, and not only at the + # We need to escape raw HTML in Markdown source before doing anything + # else. This need to be done for each block, and not only at the # begining in the Markdown function since hashed blocks can be part of - # list items and could have been indented. Indented blocks would have + # list items and could have been indented. Indented blocks would have # been seen as a code block in a previous pass of hashHTMLBlocks. $text = $this->hashHTMLBlocks($text); - + return $this->runBasicBlockGamut($text); } - + function runBasicBlockGamut($text) { # - # Run block gamut tranformations, without hashing HTML blocks. This is + # Run block gamut tranformations, without hashing HTML blocks. This is # useful when HTML blocks are known to be already hashed, like in the first # whole-document pass. # foreach ($this->block_gamut as $method => $priority) { $text = $this->$method($text); } - + # Finally form paragraph and restore hashed blocks. $text = $this->formParagraphs($text); return $text; } - - + + function doHorizontalRules($text) { # Do Horizontal Rules: return preg_replace( @@ -624,7 +618,7 @@ class Markdown_Parser { [ ]* # Tailing spaces $ # End of line. }mx', - "\n".$this->hashBlock("empty_element_suffix")."\n", + "\n".$this->hashBlock("empty_element_suffix")."\n", $text); } @@ -642,7 +636,7 @@ class Markdown_Parser { # because ![foo][f] looks like an anchor. "doImages" => 10, "doAnchors" => 20, - + # Make links out of things like `` # Must come after doAnchors, because you can use < and > # delimiters in inline links like [this](). @@ -663,11 +657,11 @@ class Markdown_Parser { return $text; } - - + + function doHardBreaks($text) { # Do hard breaks: - return preg_replace_callback('/ {2,}\n/', + return preg_replace_callback('/ {2,}\n/', array(&$this, '_doHardBreaks_callback'), $text); } function _doHardBreaks_callback($matches) { @@ -681,7 +675,7 @@ class Markdown_Parser { # if ($this->in_anchor) return $text; $this->in_anchor = true; - + # # First, handle reference-style links: [link text] [id] # @@ -710,37 +704,37 @@ class Markdown_Parser { ('.$this->nested_brackets_re.') # link text = $2 \] \( # literal paren - [ ]* + [ \n]* (?: - <(\S*)> # href = $3 + <(.+?)> # href = $3 | ('.$this->nested_url_parenthesis_re.') # href = $4 ) - [ ]* + [ \n]* ( # $5 ([\'"]) # quote char = $6 (.*?) # Title = $7 \6 # matching quote - [ ]* # ignore any spaces/tabs between closing quote and ) + [ \n]* # ignore any spaces/tabs between closing quote and ) )? # title is optional \) ) }xs', - array(&$this, '_DoAnchors_inline_callback'), $text); + array(&$this, '_doAnchors_inline_callback'), $text); # # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link test][1] - # or [link test](/foo) + # These must come last in case you've also got [link text][1] + # or [link text](/foo) # -// $text = preg_replace_callback('{ -// ( # wrap whole match in $1 -// \[ -// ([^\[\]]+) # link text = $2; can\'t contain [ or ] -// \] -// ) -// }xs', -// array(&$this, '_doAnchors_reference_callback'), $text); + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ([^\[\]]+) # link text = $2; can\'t contain [ or ] + \] + ) + }xs', + array(&$this, '_doAnchors_reference_callback'), $text); $this->in_anchor = false; return $text; @@ -754,7 +748,7 @@ class Markdown_Parser { # for shortcut links like [this][] or [this]. $link_id = $link_text; } - + # lower-case and turn embedded newlines into spaces $link_id = strtolower($link_id); $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); @@ -762,14 +756,14 @@ class Markdown_Parser { if (isset($this->urls[$link_id])) { $url = $this->urls[$link_id]; $url = $this->encodeAttribute($url); - + $result = "titles[$link_id] ) ) { $title = $this->titles[$link_id]; $title = $this->encodeAttribute($title); $result .= " title=\"$title\""; } - + $link_text = $this->runSpanGamut($link_text); $result .= ">$link_text"; $result = $this->hashPart($result); @@ -792,7 +786,7 @@ class Markdown_Parser { $title = $this->encodeAttribute($title); $result .= " title=\"$title\""; } - + $link_text = $this->runSpanGamut($link_text); $result .= ">$link_text"; @@ -821,7 +815,7 @@ class Markdown_Parser { \] ) - }xs', + }xs', array(&$this, '_doImages_reference_callback'), $text); # @@ -835,18 +829,18 @@ class Markdown_Parser { \] \s? # One optional whitespace character \( # literal paren - [ ]* + [ \n]* (?: <(\S*)> # src url = $3 | ('.$this->nested_url_parenthesis_re.') # src url = $4 ) - [ ]* + [ \n]* ( # $5 ([\'"]) # quote char = $6 (.*?) # title = $7 \6 # matching quote - [ ]* + [ \n]* )? # title is optional \) ) @@ -906,7 +900,7 @@ class Markdown_Parser { # Setext-style headers: # Header 1 # ======== - # + # # Header 2 # -------- # @@ -936,7 +930,7 @@ class Markdown_Parser { # Terrible hack to check we haven't found an empty list item. if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) return $matches[0]; - + $level = $matches[2]{0} == '=' ? 1 : 2; $block = "".$this->runSpanGamut($matches[1]).""; return "\n" . $this->hashBlock($block) . "\n\n"; @@ -956,22 +950,25 @@ class Markdown_Parser { # Re-usable patterns to match list item bullets and number markers: $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[.]'; + $marker_ol_re = '\d+[\.]'; $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - $markers_relist = array($marker_ul_re, $marker_ol_re); + $markers_relist = array( + $marker_ul_re => $marker_ol_re, + $marker_ol_re => $marker_ul_re, + ); - foreach ($markers_relist as $marker_re) { + foreach ($markers_relist as $marker_re => $other_marker_re) { # Re-usable pattern to match any entirel ul or ol list: $whole_list_re = ' ( # $1 = whole list ( # $2 - [ ]{0,'.$less_than_tab.'} - ('.$marker_re.') # $3 = first list item marker + ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces + ('.$marker_re.') # $4 = first list item marker [ ]+ ) (?s:.+?) - ( # $4 + ( # $5 \z | \n{2,} @@ -980,13 +977,19 @@ class Markdown_Parser { [ ]* '.$marker_re.'[ ]+ ) + | + (?= # Lookahead for another kind of list + \n + \3 # Must have the same indentation + '.$other_marker_re.'[ ]+ + ) ) ) '; // mx - + # We use a different prefix before nested lists than top-level lists. # See extended comment in _ProcessListItems(). - + if ($this->list_level) { $text = preg_replace_callback('{ ^ @@ -1008,17 +1011,17 @@ class Markdown_Parser { function _doLists_callback($matches) { # Re-usable patterns to match list item bullets and number markers: $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[.]'; + $marker_ol_re = '\d+[\.]'; $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - + $list = $matches[1]; - $list_type = preg_match("/$marker_ul_re/", $matches[3]) ? "ul" : "ol"; - + $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; + $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); - + $list .= "\n"; $result = $this->processListItems($list, $marker_any_re); - + $result = $this->hashBlock("<$list_type>\n" . $result . ""); return "\n". $result ."\n\n"; } @@ -1050,7 +1053,7 @@ class Markdown_Parser { # without resorting to mind-reading. Perhaps the solution is to # change the syntax rules such that sub-lists must start with a # starting cardinal number; e.g. "1." or "a.". - + $this->list_level++; # trim trailing blank lines: @@ -1078,7 +1081,7 @@ class Markdown_Parser { $marker_space = $matches[3]; $tailing_blank_line =& $matches[5]; - if ($leading_line || $tailing_blank_line || + if ($leading_line || $tailing_blank_line || preg_match('/\n{2,}/', $item)) { # Replace marker with the appropriate whitespace indentation @@ -1138,25 +1141,25 @@ class Markdown_Parser { var $em_relist = array( - '' => '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?em_relist as $em => $em_re) { @@ -1168,37 +1171,37 @@ class Markdown_Parser { } $token_relist[] = $em_re; $token_relist[] = $strong_re; - + # Construct master expression from list. $token_re = '{('. implode('|', $token_relist) .')}'; $this->em_strong_prepared_relist["$em$strong"] = $token_re; } } } - + function doItalicsAndBold($text) { $token_stack = array(''); $text_stack = array(''); $em = ''; $strong = ''; $tree_char_em = false; - + while (1) { # # Get prepared regular expression for seraching emphasis tokens # in current context. # $token_re = $this->em_strong_prepared_relist["$em$strong"]; - + # - # Each loop iteration seach for the next emphasis token. + # Each loop iteration search for the next emphasis token. # Each token is then passed to handleSpanToken. # $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); $text_stack[0] .= $parts[0]; $token =& $parts[1]; $text =& $parts[2]; - + if (empty($token)) { # Reached end of text span: empty stack without emitting. # any more emphasis. @@ -1208,7 +1211,7 @@ class Markdown_Parser { } break; } - + $token_len = strlen($token); if ($tree_char_em) { # Reached closing marker while inside a three-char emphasis. @@ -1247,7 +1250,7 @@ class Markdown_Parser { $$tag = ''; # $$tag stands for $em or $strong } } else { - # Reached opening three-char emphasis marker. Push on token + # Reached opening three-char emphasis marker. Push on token # stack; will be handled by the special condition above. $em = $token{0}; $strong = "$em$em"; @@ -1321,10 +1324,10 @@ class Markdown_Parser { $bq = $this->runBlockGamut($bq); # recurse $bq = preg_replace('/^/m', " ", $bq); - # These leading spaces cause problem with
     content,
    +		# These leading spaces cause problem with 
     content, 
     		# so we need to fix that:
    -		$bq = preg_replace_callback('{(\s*
    .+?
    )}sx', - array(&$this, '_DoBlockQuotes_callback2'), $bq); + $bq = preg_replace_callback('{(\s*
    .+?
    )}sx', + array(&$this, '_doBlockQuotes_callback2'), $bq); return "\n". $this->hashBlock("
    \n$bq\n
    ")."\n\n"; } @@ -1386,7 +1389,7 @@ class Markdown_Parser { // # We can't call Markdown(), because that resets the hash; // # that initialization code should be pulled into its own sub, though. // $div_content = $this->hashHTMLBlocks($div_content); -// +// // # Run document gamut methods on the content. // foreach ($this->document_gamut as $method => $priority) { // $div_content = $this->$method($div_content); @@ -1414,11 +1417,11 @@ class Markdown_Parser { $text = str_replace('"', '"', $text); return $text; } - - + + function encodeAmpsAndAngles($text) { # - # Smart processing for ampersands and angle brackets that need to + # Smart processing for ampersands and angle brackets that need to # be encoded. Valid character entities are left alone unless the # no-entities mode is set. # @@ -1427,7 +1430,7 @@ class Markdown_Parser { } else { # Ampersand-encoding based entirely on Nat Irons's Amputator # MT plugin: - $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', + $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', '&', $text);; } # Encode remaining <'s @@ -1438,7 +1441,7 @@ class Markdown_Parser { function doAutoLinks($text) { - $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', + $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', array(&$this, '_doAutoLinks_url_callback'), $text); # Email addresses: @@ -1446,9 +1449,17 @@ class Markdown_Parser { < (?:mailto:)? ( - [-.\w\x80-\xFF]+ + (?: + [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ + | + ".*?" + ) \@ - [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ + (?: + [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ + | + \[[\d.a-fA-F:]+\] # IPv4 & IPv6 + ) ) > }xi', @@ -1487,7 +1498,7 @@ class Markdown_Parser { $addr = "mailto:" . $addr; $chars = preg_split('/(? $char) { $ord = ord($char); # Ignore non-ascii chars. @@ -1500,7 +1511,7 @@ class Markdown_Parser { else $chars[$key] = '&#'.$ord.';'; } } - + $addr = implode('', $chars); $text = implode('', array_slice($chars, 7)); # text without `mailto:` $addr = "$text"; @@ -1515,7 +1526,7 @@ class Markdown_Parser { # escaped characters and handling code spans. # $output = ''; - + $span_re = '{ ( \\\\'.$this->escape_chars_re.' @@ -1540,17 +1551,17 @@ class Markdown_Parser { while (1) { # - # Each loop iteration seach for either the next tag, the next - # openning code span marker, or the next escaped character. + # Each loop iteration seach for either the next tag, the next + # openning code span marker, or the next escaped character. # Each token is then passed to handleSpanToken. # $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); - + # Create token from text preceding tag. if ($parts[0] != "") { $output .= $parts[0]; } - + # Check if we reach the end. if (isset($parts[1])) { $output .= $this->handleSpanToken($parts[1], $parts[2]); @@ -1560,14 +1571,14 @@ class Markdown_Parser { break; } } - + return $output; } - - + + function handleSpanToken($token, &$str) { # - # Handle $token provided by parseSpan by determining its nature and + # Handle $token provided by parseSpan by determining its nature and # returning the corresponding value that should replace it. # switch ($token{0}) { @@ -1575,7 +1586,7 @@ class Markdown_Parser { return $this->hashPart("&#". ord($token{1}). ";"); case "`": # Search for end marker in remaining text. - if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', + if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', $str, $matches)) { $str = $matches[2]; @@ -1597,18 +1608,18 @@ class Markdown_Parser { } - # String length function for detab. `_initDetab` will create a function to + # String length function for detab. `_initDetab` will create a function to # hanlde UTF-8 if the default function does not exist. var $utf8_strlen = 'mb_strlen'; - + function detab($text) { # # Replace tabs with the appropriate amount of space. # # For each line we separate the line in blocks delemited by - # tab characters. Then we reconstruct every line by adding the + # tab characters. Then we reconstruct every line by adding the # appropriate number of space between each blocks. - + $text = preg_replace_callback('/^.*\t.*$/m', array(&$this, '_detab_callback'), $text); @@ -1617,7 +1628,7 @@ class Markdown_Parser { function _detab_callback($matches) { $line = $matches[0]; $strlen = $this->utf8_strlen; # strlen function for UTF-8. - + # Split in blocks. $blocks = explode("\t", $line); # Add each blocks to the line. @@ -1625,7 +1636,7 @@ class Markdown_Parser { unset($blocks[0]); # Do not add first block twice. foreach ($blocks as $block) { # Calculate amount of space, insert spaces, insert block. - $amount = $this->tab_width - + $amount = $this->tab_width - $strlen($line, 'UTF-8') % $this->tab_width; $line .= str_repeat(" ", $amount) . $block; } @@ -1634,13 +1645,13 @@ class Markdown_Parser { function _initDetab() { # # Check for the availability of the function in the `utf8_strlen` property - # (initially `mb_strlen`). If the function is not available, create a + # (initially `mb_strlen`). If the function is not available, create a # function that will loosely count the number of UTF-8 characters with a # regular expression. # if (function_exists($this->utf8_strlen)) return; $this->utf8_strlen = create_function('$text', 'return preg_match_all( - "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", + "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", $text, $m);'); } @@ -1649,7 +1660,7 @@ class Markdown_Parser { # # Swap back in all the tags hashed by _HashHTMLBlocks. # - return preg_replace_callback('/(.)\x1A[0-9]+\1/', + return preg_replace_callback('/(.)\x1A[0-9]+\1/', array(&$this, '_unhash_callback'), $text); } function _unhash_callback($matches) { @@ -1667,24 +1678,15 @@ class MarkdownExtra_Parser extends Markdown_Parser { # Prefix for footnote ids. var $fn_id_prefix = ""; - + # Optional title attribute for footnote links and backlinks. var $fn_link_title = MARKDOWN_FN_LINK_TITLE; var $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE; - + # Optional class attribute for footnote links and backlinks. var $fn_link_class = MARKDOWN_FN_LINK_CLASS; var $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS; - - var $el_enable = MARKDOWN_EL_ENABLE; - var $el_local_domain = MARKDOWN_EL_LOCAL_DOMAIN; - var $el_new_window = MARKDOWN_EL_NEW_WINDOW; - var $el_css_class = MARKDOWN_EL_CSS_CLASS; - - var $ha_enable = MARKDOWN_HA_ENABLE; - var $ha_class = MARKDOWN_HA_CLASS; - var $ha_text = MARKDOWN_HA_TEXT; - + # Predefined abbreviations. var $predef_abbr = array(); @@ -1693,15 +1695,11 @@ class MarkdownExtra_Parser extends Markdown_Parser { # # Constructor function. Initialize the parser object. # - # Add extra escapable characters before parent constructor + # Add extra escapable characters before parent constructor # initialize the table. $this->escape_chars .= ':|'; - - if ($this->el_local_domain === null) { - $this->el_local_domain = $_SERVER['SERVER_NAME']; - } - - # Insert extra document, block, and span transformations. + + # Insert extra document, block, and span transformations. # Parent constructor will do the sorting. $this->document_gamut += array( "doFencedCodeBlocks" => 5, @@ -1718,33 +1716,33 @@ class MarkdownExtra_Parser extends Markdown_Parser { "doFootnotes" => 5, "doAbbreviations" => 70, ); - + parent::Markdown_Parser(); } - - + + # Extra variables used during extra transformations. var $footnotes = array(); var $footnotes_ordered = array(); var $abbr_desciptions = array(); var $abbr_word_re = ''; - + # Give the current footnote number. var $footnote_counter = 1; - - + + function setup() { # # Setting up Extra-specific variables. # parent::setup(); - + $this->footnotes = array(); $this->footnotes_ordered = array(); $this->abbr_desciptions = array(); $this->abbr_word_re = ''; $this->footnote_counter = 1; - + foreach ($this->predef_abbr as $abbr_word => $abbr_desc) { if ($this->abbr_word_re) $this->abbr_word_re .= '|'; @@ -1752,7 +1750,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); } } - + function teardown() { # # Clearing Extra-specific variables. @@ -1761,29 +1759,29 @@ class MarkdownExtra_Parser extends Markdown_Parser { $this->footnotes_ordered = array(); $this->abbr_desciptions = array(); $this->abbr_word_re = ''; - + parent::teardown(); } - - + + ### HTML Block Parser ### - + # Tags that are always treated as block tags: var $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend'; - + # Tags treated as block tags only if the opening tag is alone on it's line: var $context_block_tags_re = 'script|noscript|math|ins|del'; - + # Tags where markdown="1" default to span mode: var $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; - - # Tags which must not have their contents modified, no matter where + + # Tags which must not have their contents modified, no matter where # they appear: var $clean_tags_re = 'script|math'; - + # Tags that do not need to be closed. var $auto_close_tags_re = 'hr|img'; - + function hashHTMLBlocks($text) { # @@ -1796,7 +1794,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { # hard-coded. # # This works by calling _HashHTMLBlocks_InMarkdown, which then calls - # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" + # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" # attribute is found whitin a tag, _HashHTMLBlocks_InHTML calls back # _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. # These two functions are calling each other. It's recursive! @@ -1805,17 +1803,17 @@ class MarkdownExtra_Parser extends Markdown_Parser { # Call the HTML-in-Markdown hasher. # list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text); - + return $text; } - function _hashHTMLBlocks_inMarkdown($text, $indent = 0, + function _hashHTMLBlocks_inMarkdown($text, $indent = 0, $enclosing_tag_re = '', $span = false) { # # Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags. # - # * $indent is the number of space to be ignored when checking for code - # blocks. This is important because if we don't take the indent into + # * $indent is the number of space to be ignored when checking for code + # blocks. This is important because if we don't take the indent into # account, something like this (which looks right) won't work as expected: # #
    @@ -1827,11 +1825,11 @@ class MarkdownExtra_Parser extends Markdown_Parser { # If you don't like this, just don't indent the tag on which # you apply the markdown="1" attribute. # - # * If $enclosing_tag_re is not empty, stops at the first unmatched closing + # * If $enclosing_tag_re is not empty, stops at the first unmatched closing # tag with that name. Nested tags supported. # - # * If $span is true, text inside must treated as span. So any double - # newline will be replaced by a single newline so that it does not create + # * If $span is true, text inside must treated as span. So any double + # newline will be replaced by a single newline so that it does not create # paragraphs. # # Returns an array of that form: ( processed text , remaining text ) @@ -1840,13 +1838,13 @@ class MarkdownExtra_Parser extends Markdown_Parser { # Regex to check for the presense of newlines around a block tag. $newline_before_re = '/(?:^\n?|\n\n)*$/'; - $newline_after_re = + $newline_after_re = '{ ^ # Start of text following the tag. (?>[ ]*)? # Optional comment. [ ]*\n # Must be followed by newline. }xs'; - + # Regex to match any tag. $block_tag_re = '{ @@ -1879,7 +1877,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { '. ( !$span ? ' # If not in span. | # Indented code block - (?> ^[ ]*\n? | \n[ ]*\n ) + (?: ^[ ]*\n | ^ | \n[ ]*\n ) [ ]{'.($indent+4).'}[^\n]* \n (?> (?: [ ]{'.($indent+4).'}[^\n]* | [ ]* ) \n @@ -1887,12 +1885,12 @@ class MarkdownExtra_Parser extends Markdown_Parser { | # Fenced code block marker (?> ^ | \n ) - [ ]{'.($indent).'}~~~+[ ]*\n + [ ]{0,'.($indent).'}~~~+[ ]*\n ' : '' ). ' # End (if not is span). ) }xs'; - + $depth = 0; # Current depth inside the tag tree. $parsed = ""; # Parsed text that will be returned. @@ -1904,32 +1902,32 @@ class MarkdownExtra_Parser extends Markdown_Parser { # # Split the text using the first $tag_match pattern found. # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made + # pattern will be at the end, and between will be any catches made # by the pattern. # - $parts = preg_split($block_tag_re, $text, 2, + $parts = preg_split($block_tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - - # If in Markdown span mode, add a empty-string span-level hash + + # If in Markdown span mode, add a empty-string span-level hash # after each newline to prevent triggering any block element. if ($span) { $void = $this->hashPart("", ':'); $newline = "$void\n"; $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void; } - + $parsed .= $parts[0]; # Text before current tag. - + # If end of $text has been reached. Stop loop. if (count($parts) < 3) { $text = ""; break; } - + $tag = $parts[1]; # Tag to handle. $text = $parts[2]; # Remaining text after current tag. $tag_re = preg_quote($tag); # For use in a regular expression. - + # # Check for: Code span marker # @@ -1949,33 +1947,34 @@ class MarkdownExtra_Parser extends Markdown_Parser { } } # - # Check for: Indented code block or fenced code block marker. + # Check for: Fenced code block marker. # - else if ($tag{0} == "\n" || $tag{0} == "~") { - if ($tag{1} == "\n" || $tag{1} == " ") { - # Indented code block: pass it unchanged, will be handled - # later. - $parsed .= $tag; + else if (preg_match('{^\n?[ ]{0,'.($indent+3).'}~}', $tag)) { + # Fenced code block marker: find matching end marker. + $tag_re = preg_quote(trim($tag)); + if (preg_match('{^(?>.*\n)+?[ ]{0,'.($indent).'}'.$tag_re.'[ ]*\n}', $text, + $matches)) + { + # End marker found: pass text unchanged until marker. + $parsed .= $tag . $matches[0]; + $text = substr($text, strlen($matches[0])); } else { - # Fenced code block marker: find matching end marker. - $tag_re = preg_quote(trim($tag)); - if (preg_match('{^(?>.*\n)+?'.$tag_re.' *\n}', $text, - $matches)) - { - # End marker found: pass text unchanged until marker. - $parsed .= $tag . $matches[0]; - $text = substr($text, strlen($matches[0])); - } - else { - # No end marker: just skip it. - $parsed .= $tag; - } + # No end marker: just skip it. + $parsed .= $tag; } } # + # Check for: Indented code block. + # + else if ($tag{0} == "\n" || $tag{0} == " ") { + # Indented code block: pass it unchanged, will be handled + # later. + $parsed .= $tag; + } + # # Check for: Opening Block level tag or - # Opening Context Block tag (like ins and del) + # Opening Context Block tag (like ins and del) # used as a block tag (tag is alone on it's line). # else if (preg_match('{^<(?:'.$this->block_tags_re.')\b}', $tag) || @@ -1985,9 +1984,9 @@ class MarkdownExtra_Parser extends Markdown_Parser { ) { # Need to parse tag and following text using the HTML parser. - list($block_text, $text) = + list($block_text, $text) = $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true); - + # Make sure it stays outside of any paragraph by adding newlines. $parsed .= "\n\n$block_text\n\n"; } @@ -2000,9 +1999,9 @@ class MarkdownExtra_Parser extends Markdown_Parser { { # Need to parse tag and following text using the HTML parser. # (don't check for markdown attribute) - list($block_text, $text) = + list($block_text, $text) = $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false); - + $parsed .= $block_text; } # @@ -2026,14 +2025,14 @@ class MarkdownExtra_Parser extends Markdown_Parser { $text = $tag . $text; break; } - + $parsed .= $tag; } else { $parsed .= $tag; } } while ($depth >= 0); - + return array($parsed, $text); } function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { @@ -2048,7 +2047,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { # Returns an array of that form: ( processed text , remaining text ) # if ($text === '') return array('', ''); - + # Regex to match `markdown` attribute inside of a tag. $markdown_attr_re = ' { @@ -2056,15 +2055,15 @@ class MarkdownExtra_Parser extends Markdown_Parser { markdown \s*=\s* (?> - (["\']) # $1: quote delimiter + (["\']) # $1: quote delimiter (.*?) # $2: attribute value - \1 # matching delimiter + \1 # matching delimiter | ([^\s>]*) # $3: unquoted attribute value ) () # $4: make $3 always defined (avoid warnings) }xs'; - + # Regex to match any tag. $tag_re = '{ ( # $2: Capture hole tag. @@ -2087,9 +2086,9 @@ class MarkdownExtra_Parser extends Markdown_Parser { # CData Block ) }xs'; - + $original_text = $text; # Save original text in case of faliure. - + $depth = 0; # Current depth inside the tag tree. $block_text = ""; # Temporary text holder for current text. $parsed = ""; # Parsed text that will be returned. @@ -2108,25 +2107,25 @@ class MarkdownExtra_Parser extends Markdown_Parser { # # Split the text using the first $tag_match pattern found. # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made + # pattern will be at the end, and between will be any catches made # by the pattern. # $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - + if (count($parts) < 3) { # # End of $text reached with unbalenced tag(s). # In that case, we return original text unchanged and pass the - # first character as filtered to prevent an infinite loop in the + # first character as filtered to prevent an infinite loop in the # parent function. # return array($original_text{0}, substr($original_text, 1)); } - + $block_text .= $parts[0]; # Text before current tag. $tag = $parts[1]; # Tag to handle. $text = $parts[2]; # Remaining text after current tag. - + # # Check for: Auto-close tag (like
    ) # Comments and Processing Instructions. @@ -2146,22 +2145,22 @@ class MarkdownExtra_Parser extends Markdown_Parser { if ($tag{1} == '/') $depth--; else if ($tag{strlen($tag)-2} != '/') $depth++; } - + # # Check for `markdown="1"` attribute and handle it. # - if ($md_attr && + if ($md_attr && preg_match($markdown_attr_re, $tag, $attr_m) && preg_match('/^1|block|span$/', $attr_m[2] . $attr_m[3])) { # Remove `markdown` attribute from opening tag. $tag = preg_replace($markdown_attr_re, '', $tag); - + # Check if text inside this tag must be parsed in span mode. $this->mode = $attr_m[2] . $attr_m[3]; $span_mode = $this->mode == 'span' || $this->mode != 'block' && preg_match('{^<(?:'.$this->contain_span_tags_re.')\b}', $tag); - + # Calculate indent before tag. if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) { $strlen = $this->utf8_strlen; @@ -2169,44 +2168,44 @@ class MarkdownExtra_Parser extends Markdown_Parser { } else { $indent = 0; } - + # End preceding block with this tag. $block_text .= $tag; $parsed .= $this->$hash_method($block_text); - + # Get enclosing tag name for the ParseMarkdown function. # (This pattern makes $tag_name_re safe without quoting.) preg_match('/^<([\w:$]*)\b/', $tag, $matches); $tag_name_re = $matches[1]; - + # Parse the content using the HTML-in-Markdown parser. list ($block_text, $text) - = $this->_hashHTMLBlocks_inMarkdown($text, $indent, + = $this->_hashHTMLBlocks_inMarkdown($text, $indent, $tag_name_re, $span_mode); - + # Outdent markdown text. if ($indent > 0) { - $block_text = preg_replace("/^[ ]{1,$indent}/m", "", + $block_text = preg_replace("/^[ ]{1,$indent}/m", "", $block_text); } - + # Append tag content to parsed text. if (!$span_mode) $parsed .= "\n\n$block_text\n\n"; else $parsed .= "$block_text"; - + # Start over a new block. $block_text = ""; } else $block_text .= $tag; } - + } while ($depth > 0); - + # # Hash last block text that wasn't processed inside the loop. # $parsed .= $this->$hash_method($block_text); - + return array($parsed, $text); } @@ -2214,87 +2213,12 @@ class MarkdownExtra_Parser extends Markdown_Parser { function hashClean($text) { # # Called whenever a tag must be hashed when a function insert a "clean" tag - # in $text, it pass through this function and is automaticaly escaped, + # in $text, it pass through this function and is automaticaly escaped, # blocking invalid nested overlap. # return $this->hashPart($text, 'C'); } - function _doAnchors_inline_callback($matches) { - // $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $url = $this->encodeAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - - if ($this->el_enable && preg_match('/^https?\:\/\//', $url) && !preg_match('/^https?\:\/\/'.$this->el_local_domain.'/', $url)) { - if ($this->el_new_window) { - $result .= ' target="_blank"'; - } - - if ($this->el_css_class) { - $result .= ' class="'.$this->el_css_class.'"'; - } - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - function _doAnchors_reference_callback($matches) { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - $result = ''; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - - if ($this->el_enable && preg_match('/^https?\:\/\//', $url) && !preg_match('/^https?\:\/\/'.$this->el_local_domain.'/', $url)) { - if ($this->el_new_window) { - $result .= ' target="_blank"'; - } - - if ($this->el_css_class) { - $result .= ' class="'.$this->el_css_class.'"'; - } - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } - else { - $result = $whole_match; - } - return $result; - } function doHeaders($text) { # @@ -2303,7 +2227,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { # Setext-style headers: # Header 1 {#header1} # ======== - # + # # Header 2 {#header2} # -------- # @@ -2345,36 +2269,15 @@ class MarkdownExtra_Parser extends Markdown_Parser { return $matches[0]; $level = $matches[3]{0} == '=' ? 1 : 2; $attr = $this->_doHeaders_attr($id =& $matches[2]); - $body = $this->runSpanGamut($matches[1]); - $body = $this->_doHeaders_selflink($id, $body); - - $block = "$body"; + $block = "".$this->runSpanGamut($matches[1]).""; return "\n" . $this->hashBlock($block) . "\n\n"; } function _doHeaders_callback_atx($matches) { $level = strlen($matches[1]); $attr = $this->_doHeaders_attr($id =& $matches[3]); - $body = $this->runSpanGamut($matches[2]); - $body = $this->_doHeaders_selflink($id, $body); - - $block = "$body"; + $block = "".$this->runSpanGamut($matches[2]).""; return "\n" . $this->hashBlock($block) . "\n\n"; } - function _doHeaders_selflink($id, $body) { - if (!empty($id)) { - $link = 'ha_class) { - $link .= ' class="'.$this->ha_class.'"'; - } - - $link .= '>'.$this->ha_text.''; - - $body .= $link; - } - - return $body; - } function doTables($text) { @@ -2396,10 +2299,10 @@ class MarkdownExtra_Parser extends Markdown_Parser { [ ]{0,'.$less_than_tab.'} # Allowed whitespace. [|] # Optional leading pipe (present) (.+) \n # $1: Header row (at least one pipe) - + [ ]{0,'.$less_than_tab.'} # Allowed whitespace. [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline - + ( # $3: Cells (?> [ ]* # Allowed whitespace. @@ -2409,7 +2312,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { (?=\n|\Z) # Stop at final double newline. }xm', array(&$this, '_doTable_leadingPipe_callback'), $text); - + # # Find tables without leading pipe. # @@ -2423,10 +2326,10 @@ class MarkdownExtra_Parser extends Markdown_Parser { ^ # Start of a line [ ]{0,'.$less_than_tab.'} # Allowed whitespace. (\S.*[|].*) \n # $1: Header row (at least one pipe) - + [ ]{0,'.$less_than_tab.'} # Allowed whitespace. ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline - + ( # $3: Cells (?> .* [|] .* \n # Row content @@ -2442,10 +2345,10 @@ class MarkdownExtra_Parser extends Markdown_Parser { $head = $matches[1]; $underline = $matches[2]; $content = $matches[3]; - + # Remove leading pipe for each row. $content = preg_replace('/^ *[|]/m', '', $content); - + return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); } function _doTable_callback($matches) { @@ -2457,7 +2360,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { $head = preg_replace('/[|] *$/m', '', $head); $underline = preg_replace('/[|] *$/m', '', $underline); $content = preg_replace('/[|] *$/m', '', $content); - + # Reading alignement from header underline. $separators = preg_split('/ *[|] */', $underline); foreach ($separators as $n => $s) { @@ -2466,13 +2369,13 @@ class MarkdownExtra_Parser extends Markdown_Parser { else if (preg_match('/^ *:-+ *$/', $s)) $attr[$n] = ' align="left"'; else $attr[$n] = ''; } - - # Parsing span elements, including code spans, character escapes, + + # Parsing span elements, including code spans, character escapes, # and inline HTML tags, so that pipes inside those gets ignored. $head = $this->parseSpan($head); $headers = preg_split('/ *[|] */', $head); $col_count = count($headers); - + # Write column headers. $text = "\n"; $text .= "\n"; @@ -2481,20 +2384,20 @@ class MarkdownExtra_Parser extends Markdown_Parser { $text .= " ".$this->runSpanGamut(trim($header))."\n"; $text .= "\n"; $text .= "\n"; - + # Split content by row. $rows = explode("\n", trim($content, "\n")); - + $text .= "\n"; foreach ($rows as $row) { - # Parsing span elements, including code spans, character escapes, + # Parsing span elements, including code spans, character escapes, # and inline HTML tags, so that pipes inside those gets ignored. $row = $this->parseSpan($row); - + # Split row by cell. $row_cells = preg_split('/ *[|] */', $row, $col_count); $row_cells = array_pad($row_cells, $col_count, ''); - + $text .= "\n"; foreach ($row_cells as $n => $cell) $text .= " ".$this->runSpanGamut(trim($cell))."\n"; @@ -2502,11 +2405,11 @@ class MarkdownExtra_Parser extends Markdown_Parser { } $text .= "\n"; $text .= "
    "; - + return $this->hashBlock($text) . "\n"; } - + function doDefLists($text) { # # Form HTML definition lists. @@ -2552,7 +2455,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { function _doDefLists_callback($matches) { # Re-usable patterns to match list item bullets and number markers: $list = $matches[1]; - + # Turn double returns into triple returns, so that we can make a # paragraph for the last item in a list, if necessary: $result = trim($this->processDefListItems($list)); @@ -2567,7 +2470,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { # into individual term and definition list items. # $less_than_tab = $this->tab_width - 1; - + # trim trailing blank lines: $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); @@ -2576,11 +2479,11 @@ class MarkdownExtra_Parser extends Markdown_Parser { (?>\A\n?|\n\n+) # leading line ( # definition terms = $1 [ ]{0,'.$less_than_tab.'} # leading whitespace - (?![:][ ]|[ ]) # negative lookahead for a definition + (?![:][ ]|[ ]) # negative lookahead for a definition # mark (colon) or more whitespace. - (?> \S.* \n)+? # actual term (not whitespace). - ) - (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed + (?> \S.* \n)+? # actual term (not whitespace). + ) + (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed # with a definition mark. }xm', array(&$this, '_processDefListItems_callback_dt'), $list_str); @@ -2596,33 +2499,20 @@ class MarkdownExtra_Parser extends Markdown_Parser { (?= \n+ # stop at next definition mark, (?: # next term or end of text [ ]{0,'.$less_than_tab.'} [:][ ] | -
    | \z + ) + ) }xm', array(&$this, '_processDefListItems_callback_dd'), $list_str); return $list_str; } function _processDefListItems_callback_dt($matches) { - $anchor_regexp = '/\{\#([-_:a-zA-Z0-9]+)\}/'; $terms = explode("\n", trim($matches[1])); $text = ''; - $id = array(); - foreach ($terms as $term) { - $id = ''; - if (preg_match($anchor_regexp, $term, $id) > 0) { - $term = preg_replace($anchor_regexp, '', $term); - $id = ' id="'.trim($id[1]).'"'; - } - - if (count($id) === 0) { - $id = ''; - } - $term = $this->runSpanGamut(trim($term)); - $text .= "\n" . $term . "
    "; + $text .= "\n
    " . $term . "
    "; } return $text . "\n"; } @@ -2655,7 +2545,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { # ~~~ # $less_than_tab = $this->tab_width; - + $text = preg_replace_callback('{ (?:\n|\A) # 1: Opening marker @@ -2663,7 +2553,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { ~{3,} # Marker: three tilde or more. ) [ ]* \n # Whitespace and newline following marker. - + # 2: Content ( (?> @@ -2671,7 +2561,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { .*\n+ )+ ) - + # Closing marker. \1 [ ]* \n }xm', @@ -2688,7 +2578,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { return "\n\n".$this->hashBlock($codeblock)."\n\n"; } function _doFencedCodeBlocks_newlines($matches) { - return str_repeat("empty_element_suffix", + return str_repeat("empty_element_suffix", strlen($matches[0])); } @@ -2698,19 +2588,19 @@ class MarkdownExtra_Parser extends Markdown_Parser { # work in the middle of a word. # var $em_relist = array( - '' => '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? $value) { $value = trim($this->runSpanGamut($value)); - + # Check if this should be enclosed in a paragraph. # Clean tag hashes & block tag hashes are left alone. $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value); - + if ($is_p) { $value = "

    $value

    "; } $grafs[$key] = $value; } - - # Join grafs in one text, then unhash HTML tags. + + # Join grafs in one text, then unhash HTML tags. $text = implode("\n\n", $grafs); - + # Finish by removing any tag hashes still present in $text. $text = $this->unhash($text); - + return $text; } - - + + ### Footnotes - + function stripFootnotes($text) { # # Strips link definitions from text, stores the URLs and titles in @@ -2765,15 +2655,15 @@ class MarkdownExtra_Parser extends Markdown_Parser { [ ]* \n? # maybe *one* newline ( # text = $2 (no blank lines allowed) - (?: + (?: .+ # actual text | - \n # newlines but + \n # newlines but (?!\[\^.+?\]:\s)# negative lookahead for footnote marker. - (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed + (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed # by non-indented content )* - ) + ) }xm', array(&$this, '_stripFootnotes_callback'), $text); @@ -2788,7 +2678,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { function doFootnotes($text) { # - # Replace footnote references in $text [^id] with a special text-token + # Replace footnote references in $text [^id] with a special text-token # which will be replaced by the actual footnote marker in appendFootnotes. # if (!$this->in_anchor) { @@ -2797,20 +2687,20 @@ class MarkdownExtra_Parser extends Markdown_Parser { return $text; } - + function appendFootnotes($text) { # # Append footnote list to text. # - $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', + $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', array(&$this, '_appendFootnotes_callback'), $text); - + if (!empty($this->footnotes_ordered)) { $text .= "\n\n"; $text .= "
    \n"; - $text .= "empty_element_suffix ."\n"; $text .= "
      \n\n"; - + $attr = " rev=\"footnote\""; if ($this->fn_backlink_class != "") { $class = $this->fn_backlink_class; @@ -2823,20 +2713,20 @@ class MarkdownExtra_Parser extends Markdown_Parser { $attr .= " title=\"$title\""; } $num = 0; - + while (!empty($this->footnotes_ordered)) { $footnote = reset($this->footnotes_ordered); $note_id = key($this->footnotes_ordered); unset($this->footnotes_ordered[$note_id]); - + $footnote .= "\n"; # Need to append newline before parsing. - $footnote = $this->runBlockGamut("$footnote\n"); - $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', + $footnote = $this->runBlockGamut("$footnote\n"); + $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', array(&$this, '_appendFootnotes_callback'), $footnote); - + $attr = str_replace("%%", ++$num, $attr); $note_id = $this->encodeAttribute($note_id); - + # Add backlink to last paragraph; create new paragraph if needed. $backlink = ""; if (preg_match('{

      $}', $footnote)) { @@ -2844,12 +2734,12 @@ class MarkdownExtra_Parser extends Markdown_Parser { } else { $footnote .= "\n\n

      $backlink

      "; } - + $text .= "
    1. \n"; $text .= $footnote . "\n"; $text .= "
    2. \n\n"; } - + $text .= "
    \n"; $text .= "
    "; } @@ -2857,14 +2747,14 @@ class MarkdownExtra_Parser extends Markdown_Parser { } function _appendFootnotes_callback($matches) { $node_id = $this->fn_id_prefix . $matches[1]; - + # Create footnote marker only if it has a corresponding footnote *and* # the footnote hasn't been used by another marker. if (isset($this->footnotes[$node_id])) { # Transfert footnote content to the ordered list. $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; unset($this->footnotes[$node_id]); - + $num = $this->footnote_counter++; $attr = " rel=\"footnote\""; if ($this->fn_link_class != "") { @@ -2877,22 +2767,22 @@ class MarkdownExtra_Parser extends Markdown_Parser { $title = $this->encodeAttribute($title); $attr .= " title=\"$title\""; } - + $attr = str_replace("%%", $num, $attr); $node_id = $this->encodeAttribute($node_id); - + return "". "$num". ""; } - + return "[^".$matches[1]."]"; } - - + + ### Abbreviations ### - + function stripAbbreviations($text) { # # Strips abbreviations from text, stores titles in hash references. @@ -2902,7 +2792,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { # Link defs are in the form: [id]*: url "optional title" $text = preg_replace_callback('{ ^[ ]{0,'.$less_than_tab.'}\*\[(.+?)\][ ]?: # abbr_id = $1 - (.*) # text = $2 (no blank lines allowed) + (.*) # text = $2 (no blank lines allowed) }xm', array(&$this, '_stripAbbreviations_callback'), $text); @@ -2917,20 +2807,20 @@ class MarkdownExtra_Parser extends Markdown_Parser { $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); return ''; # String that will replace the block } - - + + function doAbbreviations($text) { # # Find defined abbreviations in text and wrap them in elements. # if ($this->abbr_word_re) { - // cannot use the /x modifier because abbr_word_re may + // cannot use the /x modifier because abbr_word_re may // contain significant spaces: $text = preg_replace_callback('{'. '(?abbr_word_re.')'. '(?![\w\x1A])'. - '}', + '}', array(&$this, '_doAbbreviations_callback'), $text); } return $text; @@ -2961,9 +2851,9 @@ PHP Markdown Extra Description ----------- -This is a PHP port of the original Markdown formatter written in Perl -by John Gruber. This special "Extra" version of PHP Markdown features -further enhancements to the syntax for making additional constructs +This is a PHP port of the original Markdown formatter written in Perl +by John Gruber. This special "Extra" version of PHP Markdown features +further enhancements to the syntax for making additional constructs such as tables and definition list. Markdown is a text-to-HTML filter; it translates an easy-to-read / @@ -2993,7 +2883,7 @@ expected; (3) the output Markdown actually produced. Version History ---------------- +--------------- See the readme file for detailed release notes for this version. @@ -3001,14 +2891,14 @@ See the readme file for detailed release notes for this version. Copyright and License --------------------- -PHP Markdown & Extra -Copyright (c) 2004-2008 Michel Fortin - +PHP Markdown & Extra +Copyright (c) 2004-2009 Michel Fortin + All rights reserved. -Based on Markdown -Copyright (c) 2003-2006 John Gruber - +Based on Markdown +Copyright (c) 2003-2006 John Gruber + All rights reserved. Redistribution and use in source and binary forms, with or without @@ -3039,4 +2929,4 @@ negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. */ -?> +?> \ No newline at end of file diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index a9ff22f78..258a69cb5 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -122,6 +122,17 @@ .next { background-position: -110px -60px;} .tagged { background-position: -130px -60px;} +.attachtype { + display: block; width: 20px; height: 23px; + background-image: url('../../../images/content-types.png'); +} + +.type-video { background-position: 0px 0px; } +.type-image { background-position: -20px 0px; } +.type-audio { background-position: -40px 0px; } +.type-text { background-position: -60px 0px; } +.type-unkn { background-position: -80px 0px; } + .icon.drop, .icon.drophide { float: left; } From 0fb22e1284c0510a0d009e34b7a1aa31ef6be052 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 20 Feb 2012 01:53:22 +0100 Subject: [PATCH 07/10] API is now working on my nginx server. --- boot.php | 6 +++++- include/api.php | 23 +++++++++++++---------- include/bb2diaspora.php | 7 ++++++- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/boot.php b/boot.php index 0c79b6e54..d9c788f8a 100755 --- a/boot.php +++ b/boot.php @@ -309,8 +309,12 @@ class App { . 'library/phpsec' . PATH_SEPARATOR . '.' ); - if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=") + if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=") { $this->query_string = substr($_SERVER['QUERY_STRING'],2); + // removing trailing / - maybe a nginx problem + if (substr($this->query_string, 0, 1) == "/") + $this->query_string = substr($this->query_string, 1); + } if(x($_GET,'q')) $this->cmd = trim($_GET['q'],'/\\'); diff --git a/include/api.php b/include/api.php index 7b8709659..a621f1aa7 100755 --- a/include/api.php +++ b/include/api.php @@ -99,6 +99,10 @@ **************************/ function api_call(&$a){ GLOBAL $API, $called_api; + + // preset + $type="json"; + foreach ($API as $p=>$info){ if (strpos($a->query_string, $p)===0){ $called_api= explode("/",$p); @@ -109,14 +113,14 @@ load_contact_links(local_user()); - logger('API call for ' . $a->user['username'] . ': ' . $a->query_string); + logger('API call for ' . $a->user['username'] . ': ' . $a->query_string); logger('API parameters: ' . print_r($_REQUEST,true)); - $type="json"; + $type="json"; if (strpos($a->query_string, ".xml")>0) $type="xml"; if (strpos($a->query_string, ".json")>0) $type="json"; if (strpos($a->query_string, ".rss")>0) $type="rss"; - if (strpos($a->query_string, ".atom")>0) $type="atom"; - + if (strpos($a->query_string, ".atom")>0) $type="atom"; + $r = call_user_func($info['func'], $a, $type); if ($r===false) return; @@ -126,8 +130,8 @@ header ("Content-Type: text/xml"); return ''."\n".$r; break; - case "json": - //header ("Content-Type: application/json"); + case "json": + //header ("Content-Type: application/json"); foreach($r as $rr) return json_encode($rr); break; @@ -139,7 +143,7 @@ header ("Content-Type: application/atom+xml"); return ''."\n".$r; break; - + } //echo "
    "; var_dump($r); die();
     			}
    @@ -150,8 +154,8 @@
     				header ("Content-Type: text/xml");
     				return ''."\n".$r;
     				break;
    -			case "json": 
    -				header ("Content-Type: application/json");  
    +			case "json":
    +				header ("Content-Type: application/json");
     			    return json_encode(array('error' => 'not implemented'));
     				break;
     			case "rss":
    @@ -162,7 +166,6 @@
     				header ("Content-Type: application/atom+xml");
     				return ''."\n".$r;
     				break;
    -				
     		}
     	}
     
    diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
    index 6f0ab3d28..4bb9e5e47 100755
    --- a/include/bb2diaspora.php
    +++ b/include/bb2diaspora.php
    @@ -24,6 +24,9 @@ function diaspora2bb($s) {
     	// Simply remove cr.
     	$s = str_replace("\r","",$s);
     
    +	// 
    is invalid. Replace it with the valid expression + $s = str_replace("
    ","
    ",$s); + $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s); // Escaping the hash tags - doesn't always seem to work @@ -40,12 +43,14 @@ function diaspora2bb($s) { $s = html2bbcode($s); // $s = str_replace('*','*',$s); + // Convert everything that looks like a link to a link + $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3]$2$3[/url]',$s); + //$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3$4]$2$3$4[/url]',$s); $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); $s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s); $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s); $s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s); - $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s); // remove duplicate adjacent code tags $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s); From e2f276881ee31d56f244950f231fffbf935f7f0d Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 20 Feb 2012 11:15:22 +0100 Subject: [PATCH 08/10] Some testing stuff --- include/api.php | 1 + include/bb2diaspora.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index a621f1aa7..1d3e5c186 100755 --- a/include/api.php +++ b/include/api.php @@ -148,6 +148,7 @@ //echo "
    "; var_dump($r); die();
     			}
     		}
    +		logger('API call not implemented: '.$a->query_string." - ".print_r($_REQUEST,true));
     		$r = 'not implemented';
     		switch($type){
     			case "xml":
    diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
    index 4bb9e5e47..70d4bec9a 100755
    --- a/include/bb2diaspora.php
    +++ b/include/bb2diaspora.php
    @@ -14,7 +14,7 @@ require_once('include/html2bbcode.php');
     function diaspora2bb($s) {
     
     	// for testing purposes: Collect raw markdown articles
    -	$file = tempnam("/tmp/", "markdown");
    +	$file = tempnam("/tmp/friendica/", "markdown");
     	file_put_contents($file, $s);
     
     	$s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
    
    From 3a7695ded14a50b4249575372f29907bd4fe32ca Mon Sep 17 00:00:00 2001
    From: Michael 
    Date: Mon, 20 Feb 2012 15:11:27 +0100
    Subject: [PATCH 09/10] Fetched some missing styles from testbubble.
    
    ---
     view/theme/vier/calendar.png | Bin 0 -> 3779 bytes
     view/theme/vier/style.css    | 395 +++++++++++++++++++++++++++++++++++
     2 files changed, 395 insertions(+)
     create mode 100755 view/theme/vier/calendar.png
    
    diff --git a/view/theme/vier/calendar.png b/view/theme/vier/calendar.png
    new file mode 100755
    index 0000000000000000000000000000000000000000..705a75b8a8646ce86030c5ee5220bde99490bff4
    GIT binary patch
    literal 3779
    zcmV;!4m|ORP)>*G3|rWqDVrpfv9Pt#s}kz^2&=C2{EEE#KHrbB2q~U#L|L@
    zQD{pGi3+VJv_Nm?(sRGebrrGR0Gi&z#FW>+D-@gt_N(rCl
    zmmOc!<`=-t=i&87AA`4l{tIw385r39CAjLFyFdm32qD;-HEVu*;>3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k8-uHn1vveN8TYgQM9NFW6?pSs>PR|aTTTsax@_1
    zbF{Xpo@wLE;bGG((>#D{yo{sP5G&~&9;QB{!bZ6DcQ`-{#7r0cC@-boReFVrmgaoT
    z+awF)_w_SaglJ
    zWK7T2F@_B1tMz8`)T6O%O`@#bd2&0b^5h*c9tjH@%$>xK3XvTBT5puh$j`_$+9CNUJE<
    z1J@~ZI^b9yH4$x~Y+*;Xrl*)`Ols77GHReyXrosYh6(&=Z6W8Gz?&U8$y$+5Rn^==
    z87_{F!QDHz!QkK^oFAD$=mbi66tOl4g5)>`C9~84hSB0`qS7caS!fk*+IZ@ktlQ38
    zs<|!Qqe}MXB&49DKMzrN(LgnP_5y6!v>r!H~hC}D+X2%6L!
    zQ`(HAOFDR|3|I-rv)IVwfMnQUsqfopc9~u2cxPG%NMDf_qHP!weRQ5h=#Vt`F^qi}
    zao_jU{bEM67;B>j&Uoic{OX(Um=p(Jc7IIAWin|a
    z>gTjgLg&y-UuyWFp$2;l>8NHXS}aIC%eKdsW;MA$p550fpUvojDzBY a {
    +	background-color: #cdcdcd;
    +	padding: 2px;
    +	color: #000;
    +}
    +
    +.calendar th {
    +	font-size: 16px;	
    +}
    +
    +.today {
    +	font-weight: bold;
    +	text-align: center;
    +	background-color: #b20202;
    +	color: #fff;
    +}
    + 
    +#event-start-text, 
    +#event-finish-text {
    +	margin-top: 10px;
    +	margin-bottom: 5px;
    +}
    +
    +#event-nofinish-checkbox, 
    +#event-nofinish-text, 
    +#event-adjust-checkbox, 
    +#event-adjust-text,
    +#event-share-checkbox {
    +	float: left;
    +}
    +
    +#event-datetime-break {
    +	margin-bottom: 10px;
    +}
    +
    +#event-nofinish-break, 
    +#event-adjust-break,
    +#event-share-break {
    +	clear: both;
    +}
    +
    +#event-desc-text, 
    +#event-location-text {
    +	margin-top: 10px;
    +	margin-bottom: 5px;
    +}
    +
    +#event-submit {
    +	margin-top: 10px;
    +}
    +
    +/* ============= */
    +/* = Directory = */
    +/* ============= */
    +
    +.directory-item {
    +	float: left;
    +	margin: 50px 50px 0px 0px;
    +}
    +
    +.directory-details {
    +	font-size: 0.9em;
    +	font-variant: small-caps;
    +	width: 160px;
    +}
    +
    +.directory-name {
    +	font-size: 1em;
    +	font-variant: small-caps;
    +	width: 150px;	
    +}
    
    From e34a648cadaf79e1749f220b9e26c52c5e295819 Mon Sep 17 00:00:00 2001
    From: Michael 
    Date: Wed, 22 Feb 2012 15:20:49 +0100
    Subject: [PATCH 10/10] German translation more gender friendly. Some more
     logging in poller.php
    
    ---
     include/poller.php              | 25 ++++++++++++++++++++-----
     view/de/friend_complete_eml.tpl |  2 +-
     view/de/intro_complete_eml.tpl  |  2 +-
     view/de/lostpass_eml.tpl        |  2 +-
     view/de/passchanged_eml.tpl     |  2 +-
     view/de/register_open_eml.tpl   |  2 +-
     view/de/request_notify_eml.tpl  |  2 +-
     7 files changed, 26 insertions(+), 11 deletions(-)
    
    diff --git a/include/poller.php b/include/poller.php
    index 0297eeabc..0ea0c9231 100755
    --- a/include/poller.php
    +++ b/include/poller.php
    @@ -371,10 +371,14 @@ function poller_run($argv, $argc){
     			}
     			elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
     
    +				logger("Mail: Fetching");
    +
     				$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
     				if($mail_disabled)
     					continue;
     
    +				logger("Mail: Enabled");
    +
     				$mbox = null;
     				$x = q("SELECT `prvkey` FROM `user` WHERE `uid` = %d LIMIT 1",
     					intval($importer_uid)
    @@ -388,6 +392,7 @@ function poller_run($argv, $argc){
     					openssl_private_decrypt(hex2bin($mailconf[0]['pass']),$password,$x[0]['prvkey']);
     					$mbox = email_connect($mailbox,$mailconf[0]['user'],$password);
     					unset($password);
    +					logger("Mail: Connect");
     					if($mbox) {
     						q("UPDATE `mailacct` SET `last_check` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
     							dbesc(datetime_convert()),
    @@ -397,11 +402,16 @@ function poller_run($argv, $argc){
     					}
     				}
     				if($mbox) {
    +					logger("Mail: mbox");
     
     					$msgs = email_poll($mbox,$contact['addr']);
     
     					if(count($msgs)) {
    +						logger("Mail: Parsing ".count($msgs)." mails.");
    +
     						foreach($msgs as $msg_uid) {
    +							logger("Mail: Parsing mail ".$msg_uid);
    +
     							$datarray = array();
     							$meta = email_msg_meta($mbox,$msg_uid);
     							$headers = email_msg_headers($mbox,$msg_uid);
    @@ -436,23 +446,28 @@ function poller_run($argv, $argc){
     							);
     
     							if(count($r)) {
    +								logger("Mail: Seen before ".$msg_uid);
     								if($meta->deleted && ! $r[0]['deleted']) {
     									q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1",
     										dbesc(datetime_convert()),
     										intval($r[0]['id'])
     									);
    -								}		
    +								}
     								continue;
     							}
     							$datarray['title'] = notags(trim($meta->subject));
     							$datarray['created'] = datetime_convert('UTC','UTC',$meta->date);
    -	
    +
     							$r = email_get_msg($mbox,$msg_uid);
    -							if(! $r)
    +							if(! $r) {
    +								logger("Mail: can't fetch msg ".$msg_uid);
     								continue;
    +							}
     							$datarray['body'] = escape_tags($r['body']);
     
    -							// some mailing lists have the original author as 'from' - add this sender info to msg body. 
    +							logger("Mail: Importing ".$msg_uid);
    +
    +							// some mailing lists have the original author as 'from' - add this sender info to msg body.
     							// todo: adding a gravatar for the original author would be cool
     
     							if(! stristr($meta->from,$contact['addr']))
    @@ -469,7 +484,7 @@ function poller_run($argv, $argc){
     							$datarray['author-name'] = $contact['name'];
     							$datarray['author-link'] = 'mailbox';
     							$datarray['author-avatar'] = $contact['photo'];
    -						
    +
     							$stored_item = item_store($datarray);
     							q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d",
     								dbesc($datarray['parent-uri']),
    diff --git a/view/de/friend_complete_eml.tpl b/view/de/friend_complete_eml.tpl
    index f6e0adf4c..908d0df40 100755
    --- a/view/de/friend_complete_eml.tpl
    +++ b/view/de/friend_complete_eml.tpl
    @@ -1,5 +1,5 @@
     
    -Lieber $username,
    +Liebe/r $username,
     
     großartige Neuigkeiten... '$fn' von '$dfrn_url' hat deine Kontaktaufnahme auf
     '$sitename' bestätigt.
    diff --git a/view/de/intro_complete_eml.tpl b/view/de/intro_complete_eml.tpl
    index 46ffc8781..ff9b8a379 100755
    --- a/view/de/intro_complete_eml.tpl
    +++ b/view/de/intro_complete_eml.tpl
    @@ -1,5 +1,5 @@
     
    -Lieber $username,
    +Liebe/r $username,
     
     '$fn' von '$dfrn_url' hat deine Kontaktanfrage auf '$sitename' bestätigt.
     
    diff --git a/view/de/lostpass_eml.tpl b/view/de/lostpass_eml.tpl
    index 91b9b4c50..4c06d0c8d 100755
    --- a/view/de/lostpass_eml.tpl
    +++ b/view/de/lostpass_eml.tpl
    @@ -1,5 +1,5 @@
     
    -Lieber $username,
    +Liebe/r $username,
     wir haben gerade eine Anfrage erhalten dein Passwort auf $sitename zu ändern.
     Um diese Anfrage zu bestätigen folge bitte dem Bestätigungslink oder kopiere
     ihn in die Adresszeile deines Browsers.
    diff --git a/view/de/passchanged_eml.tpl b/view/de/passchanged_eml.tpl
    index 894fd4e88..d5e8d9048 100755
    --- a/view/de/passchanged_eml.tpl
    +++ b/view/de/passchanged_eml.tpl
    @@ -1,5 +1,5 @@
     
    -Lieber $username,
    +Liebe/r $username,
     dein Passwort wurde wie gewünscht geändert. Bitte hebe diese Informationen
     für deine Unterlagen auf (oder ändere das Passwort augenblicklich in etwas
     das du dir merken kannst).
    diff --git a/view/de/register_open_eml.tpl b/view/de/register_open_eml.tpl
    index ab7fed18c..d27c3c743 100755
    --- a/view/de/register_open_eml.tpl
    +++ b/view/de/register_open_eml.tpl
    @@ -1,5 +1,5 @@
     
    -Lieber $username,
    +Liebe/r $username,
     danke für die Registrierung bei $sitename. Dein neuer Account wurde angelegt.
     Die Anmeldedetails sind die Folgenden.
     
    diff --git a/view/de/request_notify_eml.tpl b/view/de/request_notify_eml.tpl
    index 15b83f64f..55fa98e96 100755
    --- a/view/de/request_notify_eml.tpl
    +++ b/view/de/request_notify_eml.tpl
    @@ -1,5 +1,5 @@
     
    -Lieber $myname,
    +Liebe/r $myname,
     
     du hast gerade eine Kontaktanfrage von '$requestor' auf $sitename erhalten.