diff --git a/include/api.php b/include/api.php index b77156df..cee1fde2 100644 --- a/include/api.php +++ b/include/api.php @@ -565,18 +565,19 @@ if(requestdata('lat') && requestdata('long')) $_REQUEST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long')); $_REQUEST['profile_uid'] = local_user(); - if(requestdata('parent')) +// if(requestdata('parent')) + if($parent) $_REQUEST['type'] = 'net-comment'; else { $_REQUEST['type'] = 'wall'; - if(x($_FILES,'media')) { - // upload the image if we have one - $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo - require_once('mod/wall_upload.php'); - $media = wall_upload_post($a); - if(strlen($media)>0) - $_REQUEST['body'] .= "\n\n".$media; - } + if(x($_FILES,'media')) { + // upload the image if we have one + $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo + require_once('mod/wall_upload.php'); + $media = wall_upload_post($a); + if(strlen($media)>0) + $_REQUEST['body'] .= "\n\n".$media; + } } // set this so that the item_post() function is quiet and doesn't redirect or emit json diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index ac693127..a0d114a3 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -109,20 +109,22 @@ function bb2diaspora($Text,$preserve_nl = false) { // "
  • " into a deeper nested element until it crashes. So pre-format // the lists as Diaspora lists before sending the $Text to bbcode() // - // Note that regular expressions are really not suitable for parsing - // text with opening and closing tags, so nested lists may make things - // wonky + // Note that to get nested lists to work for Diaspora, we would need + // to define the closing tag for the list elements. So nested lists + // are going to be flattened out in Diaspora for now $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) && (++$endlessloop < 20)) { + while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) + (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && + (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text); $Text = preg_replace_callback("/\[list=1\](.*?)\[\/list\]/is", 'diaspora_ol', $Text); $Text = preg_replace_callback("/\[list=i\](.*?)\[\/list\]/s",'diaspora_ol', $Text); $Text = preg_replace_callback("/\[list=I\](.*?)\[\/list\]/s", 'diaspora_ol', $Text); $Text = preg_replace_callback("/\[list=a\](.*?)\[\/list\]/s", 'diaspora_ol', $Text); $Text = preg_replace_callback("/\[list=A\](.*?)\[\/list\]/s", 'diaspora_ol', $Text); + $Text = preg_replace_callback("/\[ul\](.*?)\[\/ul\]/is", 'diaspora_ul', $Text); + $Text = preg_replace_callback("/\[ol\](.*?)\[\/ol\]/is", 'diaspora_ol', $Text); } - $Text = preg_replace_callback("/\[ul\](.*?)\[\/ul\]/is", 'diaspora_ul', $Text); - $Text = preg_replace_callback("/\[ol\](.*?)\[\/ol\]/is", 'diaspora_ol', $Text); // Convert it to HTML - don't try oembed $Text = bbcode($Text, $preserve_nl, false); diff --git a/include/bbcode.php b/include/bbcode.php index f542ad26..38d1e658 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -162,7 +162,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // handle nested lists $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) and (strpos($Text, "[list") !== false) and (++$endlessloop < 20)) { + while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) + (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && + (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '' ,$Text); @@ -170,11 +172,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '' ,$Text); + $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '' ,$Text); + $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '' ,$Text); } - $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '' ,$Text); - $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '' ,$Text); - $Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '$1' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '$1' ,$Text); $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '$1' ,$Text); diff --git a/include/onepoll.php b/include/onepoll.php index d68f2688..09e7bb76 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -449,7 +449,7 @@ function onepoll_run($argv, $argc){ if($xml) { logger('poller: received xml : ' . $xml, LOGGER_DATA); - if((! strstr($xml,' $rr['id'], '$profile-link' => $profile_link, - '$photo' => $rr[$photo], + '$photo' => $a->get_cached_avatar_image($rr[$photo]), '$alt-text' => $rr['name'], )); $aside['$lastusers_items'][] = $entry; diff --git a/view/theme/dispy/dark/style.css b/view/theme/dispy/dark/style.css index bf23cf62..6551d9a9 100644 --- a/view/theme/dispy/dark/style.css +++ b/view/theme/dispy/dark/style.css @@ -59,7 +59,7 @@ h6{font-size:xx-small;} .button{color:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#eeeecc;font-weight:bold;} #profile-listing-desc a{color:#eeeecc;font-weight:bold;} [class$="-desc"],[id$="-desc"]{color:#eeeecc;background:#2e2f2e;border:2px outset #d4d580;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;} -#item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;} +#item-delete-selected-desc{float:left;font-size:smaller;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;} .intro-approve-as-friend-desc{margin-top:10px;} .intro-desc{margin-bottom:20px;font-weight:bold;} #group-edit-desc{margin:10px 0px;} @@ -226,7 +226,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm .wallwall .wall-item-photo-end{clear:both;} .wall-item-arrowphoto-wrapper{position:absolute;left:35px;top:80px;z-index:10002;} .wall-item-photo-menu{min-width:92px;font-size:0.75em;border:2px solid #555753;border-top:0px;background:#555753;position:absolute;left:-2px;top:101px;display:none;z-index:10003;-o-border-radius:0 5px 5px 5px;-webkit-border-radius:0 5px 5px 5px;-moz-border-radius:0 5px 5px 5px;-ms-border-radius:0 5px 5px 5px;border-radius:0 5px 5px 5px;}.wall-item-photo-menu li a{white-space:nowrap;display:block;padding:5px 6px;color:#eeeeee;}.wall-item-photo-menu li a:hover{color:#555753;background:#eeeeee;} -#item-delete-selected{overflow:auto;width:100%;} #connect-services-header,#extra-help-header{margin:1.5em 0 0 0;} #connect-services,#extra-help{margin:0px;padding:0px;list-style:none;list-style-position:inside;margin:1em 0 0 0;}#connect-services li,#extra-help li{display:inline;} .ccollapse-wrapper{font-size:0.9em;margin-left:5em;} @@ -390,10 +389,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;} .filesavetags:hover,.categorytags:hover{margin:20px 0;opacity:1.0 !important;} .item-select{opacity:0.1;margin:5px 0 0 6px !important;}.item-select:hover{opacity:1;} .checkeditem{opacity:1;} -#item-delete-selected{margin-top:30px;} -#item-delete-selected{position:absolute;left:35px;margin-top:20px;} -#item-delete-selected-icon{float:left;margin-right:5px;} -#item-delete-selected-desc{font-size:smaller;} +#item-delete-selected{margin-top:30px;position:absolute;left:35px;width:15em;overflow:auto;} +#item-delete-selected-icon{float:left;margin:11px 5px;} .fc-state-highlight{background:#eeeecc;color:#2e2f2e;} .directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;} #group-sidebar{margin-bottom:10px;} diff --git a/view/theme/dispy/dark/style.less b/view/theme/dispy/dark/style.less index 1c2dc066..5e688396 100644 --- a/view/theme/dispy/dark/style.less +++ b/view/theme/dispy/dark/style.less @@ -325,6 +325,7 @@ h6 { } #item-delete-selected-desc { float: left; + font-size: smaller; margin-right: 5px; &:hover { text-decoration: underline; @@ -1533,10 +1534,6 @@ nav #nav-notifications-linkmenu { } } } -#item-delete-selected { - overflow: auto; - width: 100%; -} #connect-services-header, #extra-help-header { margin: 1.5em 0 0 0; @@ -2370,20 +2367,14 @@ div { } #item-delete-selected { margin-top: 30px; -} -/* was tired of having no way of moving it around, so -* here's a little 'hook' to do so */ -#item-delete-selected { position: absolute; left: 35px; - margin-top: 20px; + width: 15em; + overflow: auto; } #item-delete-selected-icon { float: left; - margin-right: 5px; -} -#item-delete-selected-desc { - font-size: smaller; + margin: 11px 5px; } .fc-state-highlight { background: @main_colour; diff --git a/view/theme/dispy/light/style.css b/view/theme/dispy/light/style.css index cbf0168f..793feb6f 100644 --- a/view/theme/dispy/light/style.css +++ b/view/theme/dispy/light/style.css @@ -59,7 +59,7 @@ h6{font-size:xx-small;} .button{color:#111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#111111;font-weight:bold;} #profile-listing-desc a{color:#eeeeec;font-weight:bold;} [class$="-desc"],[id$="-desc"]{color:#eeeeec;background:#2e3436;border:2px outset #111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;} -#item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;} +#item-delete-selected-desc{float:left;font-size:smaller;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;} .intro-approve-as-friend-desc{margin-top:10px;} .intro-desc{margin-bottom:20px;font-weight:bold;} #group-edit-desc{margin:10px 0px;} @@ -226,7 +226,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm .wallwall .wall-item-photo-end{clear:both;} .wall-item-arrowphoto-wrapper{position:absolute;left:35px;top:80px;z-index:10002;} .wall-item-photo-menu{min-width:92px;font-size:0.75em;border:2px solid #555753;border-top:0px;background:#555753;position:absolute;left:-2px;top:101px;display:none;z-index:10003;-o-border-radius:0 5px 5px 5px;-webkit-border-radius:0 5px 5px 5px;-moz-border-radius:0 5px 5px 5px;-ms-border-radius:0 5px 5px 5px;border-radius:0 5px 5px 5px;}.wall-item-photo-menu li a{white-space:nowrap;display:block;padding:5px 6px;color:#eeeeec;}.wall-item-photo-menu li a:hover{color:#555753;background:#eeeeec;} -#item-delete-selected{overflow:auto;width:100%;} #connect-services-header,#extra-help-header{margin:1.5em 0 0 0;} #connect-services,#extra-help{margin:0px;padding:0px;list-style:none;list-style-position:inside;margin:1em 0 0 0;}#connect-services li,#extra-help li{display:inline;} .ccollapse-wrapper{font-size:0.9em;margin-left:5em;} @@ -390,10 +389,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;} .filesavetags:hover,.categorytags:hover{margin:20px 0;opacity:1.0 !important;} .item-select{opacity:0.1;margin:5px 0 0 6px !important;}.item-select:hover{opacity:1;} .checkeditem{opacity:1;} -#item-delete-selected{margin-top:30px;} -#item-delete-selected{position:absolute;left:35px;margin-top:20px;} -#item-delete-selected-icon{float:left;margin-right:5px;} -#item-delete-selected-desc{font-size:smaller;} +#item-delete-selected{margin-top:30px;position:absolute;left:35px;width:15em;overflow:auto;} +#item-delete-selected-icon{float:left;margin:11px 5px;} .fc-state-highlight{background:#eeeeec;color:#111111;} .directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;} #group-sidebar{margin-bottom:10px;} diff --git a/view/theme/dispy/light/style.less b/view/theme/dispy/light/style.less index c5624841..13f296d2 100644 --- a/view/theme/dispy/light/style.less +++ b/view/theme/dispy/light/style.less @@ -326,6 +326,7 @@ h6 { } #item-delete-selected-desc { float: left; + font-size: smaller; margin-right: 5px; &:hover { text-decoration: underline; @@ -1534,10 +1535,6 @@ nav #nav-notifications-linkmenu { } } } -#item-delete-selected { - overflow: auto; - width: 100%; -} #connect-services-header, #extra-help-header { margin: 1.5em 0 0 0; @@ -2371,20 +2368,14 @@ div { } #item-delete-selected { margin-top: 30px; -} -/* was tired of having no way of moving it around, so -* here's a little 'hook' to do so */ -#item-delete-selected { position: absolute; left: 35px; - margin-top: 20px; + width: 15em; + overflow: auto; } #item-delete-selected-icon { float: left; - margin-right: 5px; -} -#item-delete-selected-desc { - font-size: smaller; + margin: 11px 5px; } .fc-state-highlight { background: @bg_colour;