diff options
-rw-r--r-- | mod/item.php | 15 | ||||
-rw-r--r-- | util/wp/post_to_red/post_to_red.php | 11 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 8 | ||||
-rwxr-xr-x | view/tpl/comment_item.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 2 |
5 files changed, 30 insertions, 8 deletions
diff --git a/mod/item.php b/mod/item.php index dba9f01b6..f5df854ee 100644 --- a/mod/item.php +++ b/mod/item.php @@ -77,6 +77,8 @@ function item_post(&$a) { $webpage = ((x($_REQUEST,'webpage')) ? intval($_REQUEST['webpage']) : 0); $pagetitle = ((x($_REQUEST,'pagetitle')) ? escape_tags($_REQUEST['pagetitle']) : ''); $layout_mid = ((x($_REQUEST,'layout_mid')) ? escape_tags($_REQUEST['layout_mid']): ''); + $plink = ((x($_REQUEST,'permalink')) ? escape_tags($_REQUEST['permalink']) : ''); + /* Check service class limits */ @@ -196,6 +198,16 @@ function item_post(&$a) { $orig_post = null; + if($namespace && $remote_id) { + // It wasn't an internally generated post - see if we've got an item matching this remote service id + $i = q("select iid from item_id where service = '%s' and sid = '%s' limit 1", + dbesc($namespace), + dbesc($remote_id) + ); + if($i) + $post_id = $i[0]['iid']; + } + if($post_id) { $i = q("SELECT * FROM `item` WHERE `uid` = %d AND `id` = %d LIMIT 1", intval($profile_uid), @@ -616,6 +628,7 @@ function item_post(&$a) { $datarray['layout_mid'] = $layout_mid; $datarray['comment_policy'] = map_scope($channel['channel_w_comment']); $datarray['term'] = $post_tags; + $datarray['plink'] = $plink; // preview mode - prepare the body for display and send it via json @@ -810,7 +823,7 @@ function item_post(&$a) { } $datarray['id'] = $post_id; - $datarray['plink'] = $a->get_baseurl() . '/display/' . $channel['channel_address'] . '/' . $post_id; + $datarray['llink'] = $a->get_baseurl() . '/display/' . $channel['channel_address'] . '/' . $post_id; call_hooks('post_local_end', $datarray); diff --git a/util/wp/post_to_red/post_to_red.php b/util/wp/post_to_red/post_to_red.php index 47af7789b..00c9b6b73 100644 --- a/util/wp/post_to_red/post_to_red.php +++ b/util/wp/post_to_red/post_to_red.php @@ -91,8 +91,6 @@ function post_to_red_post($post_id) { $message = $post->post_title . "<br /><br />" . $message; - $message .= "<br /><br />permalink: " . $post->guid; - if (isset($tag_string)) { $message .= "<br />$tag_string"; } @@ -104,7 +102,14 @@ function post_to_red_post($post_id) { $headers = array('Authorization' => 'Basic '.base64_encode("$user_name:$password")); - $body = array('status' => $bbcode,'source' => 'WordPress', 'namespace' => $message_namespace, 'remote_id' => $message_id); + $body = array( + 'title' => xpost_to_html2bbcode($post->post_title), + 'status' => $bbcode, + 'source' => 'WordPress', + 'namespace' => 'wordpress', + 'remote_id' => $message_id, + 'permalink' => $post->guid; + ); if($channel) $body['channel'] = $channel; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index ae3758c2e..ce3bfaee9 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1133,8 +1133,8 @@ footer { #profile-jot-plugin-wrapper, #profile-jot-submit-wrapper { - margin-top: 15px; - width:90%; + margin-top: 10px; + width:92%; } #profile-upload-wrapper { @@ -3515,6 +3515,10 @@ margin-right: 50px; color: $toolicon_colour; } +.comment-preview-icon { + margin-left: 15px; +} + .comment-icon:hover, .jot-icons:hover { color: $toolicon_activecolour; diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index b8e2b4730..1ea619774 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -61,7 +61,7 @@ <div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-{{$id}}" style="display: none;" > <input type="submit" onclick="post_comment({{$id}}); return false;" id="comment-edit-submit-{{$id}}" class="comment-edit-submit" name="submit" value="{{$submit}}" /> {{if $preview}} - <span onclick="preview_comment({{$id}});" id="comment-edit-preview-link-{{$id}}" class="fakelink">{{$preview}}</span> + <span onclick="preview_comment({{$id}});" id="comment-edit-preview-link-{{$id}}" class="fakelink"><i class="icon-eye-open comment-icon comment-preview-icon" title="{{$preview}}"></i></span> <div id="comment-edit-preview-{{$id}}" class="comment-edit-preview" style="display:none;"></div> {{/if}} </div> diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index b9238f0c0..666fae9cd 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -71,7 +71,7 @@ </div> {{/if}} - {{if $preview}}<span onclick="preview_post();" id="jot-preview-link" class="fakelink">{{$preview}}</span>{{/if}} + {{if $preview}}<span onclick="preview_post();" id="jot-preview-link" class="fakelink"><i class="icon-eye-open jot-icons" title="{{$preview}}"></i></span>{{/if}} <div id="profile-jot-perms-end"></div> |