diff options
-rw-r--r-- | include/ItemObject.php | 1 | ||||
-rw-r--r-- | include/conversation.php | 3 | ||||
-rw-r--r-- | include/group.php | 2 | ||||
-rw-r--r-- | mod/_well_known.php | 8 | ||||
-rw-r--r-- | mod/follow.php | 8 | ||||
-rw-r--r-- | mod/wfinger.php | 101 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 166 | ||||
-rw-r--r-- | view/tpl/conv_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/search_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/conv_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/search_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/wall_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/wall_thread.tpl | 2 | ||||
-rw-r--r-- | view/tpl/wall_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/wall_thread.tpl | 2 |
16 files changed, 133 insertions, 174 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php index 94afaaac4..66af01a81 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -215,6 +215,7 @@ class Item extends BaseObject { 'osparkle' => $osparkle, 'sparkle' => $sparkle, 'title' => $item['title'], + 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])), 'lock' => $lock, diff --git a/include/conversation.php b/include/conversation.php index f8507c595..e8c391967 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -618,7 +618,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { 'ago' => relative_date($item['created']), 'app' => $item['app'], 'str_app' => sprintf( t(' from %s'), $item['app']), - 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), + 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), + 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), 'location' => $location, 'indent' => '', 'owner_name' => $owner_name, diff --git a/include/group.php b/include/group.php index 52a0fe522..d4a01593e 100644 --- a/include/group.php +++ b/include/group.php @@ -221,7 +221,7 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 $groups = array(); $groups[] = array( - 'text' => t('All Connections'), + 'text' => t('All Channels'), 'id' => 0, 'selected' => (($group_id == 0) ? 'group-selected' : ''), 'href' => $every, diff --git a/mod/_well_known.php b/mod/_well_known.php index 5c5f6585f..184f75593 100644 --- a/mod/_well_known.php +++ b/mod/_well_known.php @@ -17,6 +17,14 @@ function _well_known_init(&$a){ zfinger_init($a);
break;
+ case 'webfinger':
+ $a->argc -= 1;
+ array_shift($a->argv);
+ $a->argv[0] = 'wfinger';
+ require_once('mod/wfinger.php');
+ wfinger_init($a);
+ break;
+
}
}
diff --git a/mod/follow.php b/mod/follow.php index c07c210f6..05a12d0f0 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -6,7 +6,6 @@ require_once('include/follow.php'); function follow_init(&$a) { if(! local_user()) { - notice( t('Permission denied.') . EOL); return; } @@ -27,3 +26,10 @@ function follow_init(&$a) { goaway(z_root() . '/connections/' . $result['abook']['abook_id']); } + +functon follow_content(&$a) { + + if(! local_user()) { + return login(); + } +}
\ No newline at end of file diff --git a/mod/wfinger.php b/mod/wfinger.php new file mode 100644 index 000000000..3fda96181 --- /dev/null +++ b/mod/wfinger.php @@ -0,0 +1,101 @@ +<?php + +function wfinger_init(&$a) { + + $result = array(); + + $scheme = ''; + + if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) + $scheme = 'https'; + elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) + $scheme = 'https'; + + // Don't complain to me - I'm just implementing the spec. + + if($scheme !== 'https') { + header($_SERVER["SERVER_PROTOCOL"] . ' ' . 500 . ' ' . 'Webfinger requires HTTPS'); + killme(); + } + + $resource = $_REQUEST['resource']; + + header('Access-Control-Allow-Origin: *'); + + header('Content-type: application/jrd+json'); + + $pubkey = get_config('system','site_pubkey'); + + $r = null; + + if($resource) { + + if(strpos($resource,'acct:') === 0) { + $channel = str_replace('acct:','',$resource); + $channel = substr($channel,0,strpos($channel,'@')); + } + if(strpos($resource,'http') === 0) { + $channel = str_replace('~','',basename($resource)); + } + + $r = q("select * from channel left join xchan on channel_hash = xchan_hash + where channel_address = '%s' limit 1", + dbesc($channel) + ); + + } + + if($resource && $r) { + + $result['subject'] = $resource; + + $aliases = array( + 'acct:' . $r[0]['channel_address'] . '@' . $a->get_hostname(), + z_root() . '/channel/' . $r[0]['channel_address'], + z_root() . '/~' . $r[0]['channel_address'] + ); + + $result['aliases'] = array(); + + foreach($aliases as $alias) + if($alias != $resource) + $result['aliases'][] = $alias; + + + $result['links'] = array( + + array( + 'rel' => 'http://webfinger.example/rel/avatar', + 'type' => $r[0]['xchan_photo_mimetype'], + 'href' => $r[0]['xchan_photo_l'] + ), + + array( + 'rel' => 'http://webfinger.example/rel/profile-page', + 'href' => z_root() . '/profile/' . $r[0]['channel_address'], + ), + + array( + 'rel' => 'http://webfinger.example/rel/blog', + 'href' => z_root() . '/channel/' . $r[0]['channel_address'], + ), + + array( + 'rel' => 'http://purl.org/zot/protocol', + 'href' => z_root() . '/well-known/zot-info' . '?zaddr=' . $r[0]['xchan_addr'], + ) + ); + + } + else { + header($_SERVER["SERVER_PROTOCOL"] . ' ' . 400 . ' ' . 'Bad Request'); + killme(); + } + + $arr = array('channel' => $r[0], 'request' => $_REQUEST, 'result' => $result); + call_hooks('webfinger',$arr); + + echo json_encode($arr['result']); + killme(); + +}
\ No newline at end of file diff --git a/version.inc b/version.inc index 32acc8437..264a9b161 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-03-03.241 +2013-03-04.242 diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 2fa02a052..be715488a 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -419,22 +419,8 @@ footer { margin-bottom: 10px; } -.group-selected, .nets-selected, .fileas-selected, .categories-selected { - padding: 3px; - -moz-border-radius: 5px; - border-radius: 5px; - border: 1px solid #CCCCCC; - background: #F8F8F8; - font-weight: bold; -} - -.settings-widget .selected { - padding: 3px; - -moz-border-radius: 5px; - border-radius: 5px; - border: 1px solid #CCCCCC; - background: #F8F8F8; - font-weight: bold; +.group-selected, .nets-selected, .fileas-selected, .categories-selected, .settings-widget .selected { + color: #444444 !important; } .smalltext { @@ -513,62 +499,6 @@ footer { } -/* TODO - we don't use DFRN anymore. These probably have different names now. Check and clean up later */ - -input#dfrn-url { - float: left; - background: url(../img/friendika-16.png) no-repeat; - background-position: 2px center; - font-size: 17px; - padding-left: 21px; - height: 21px; - background-color: #FFFFFF; - color: #000000; - margin-bottom: 20px; -} - -#dfrn-url-label { - float: left; - width: 250px; -} - -#dfrn-request-url-end { - clear: both; -} - -#knowyouyes, #knowyouno { - float: left; -} - -#dfrn-request-knowyou-yes-wrapper, #dfrn-request-knowyou-no-wrapper { - - float: none; -} -#dfrn-request-knowyou-yes-label, #dfrn-request-knowyou-no-label { - float: left; - width: 75px; - margin-left: 50px; - margin-bottom: 7px; -} -#dfrn-request-knowyou-break, #dfrn-request-knowyou-end { - clear: both; - -} - -#dfrn-request-message-wrapper { - margin-bottom: 50px; -} -#dfrn-request-submit-wrapper { - clear: both; - margin-left: 50px; -} - -#dfrn-request-info-wrapper { - margin-left: 50px; -} - - - #cropimage-wrapper, #cropimage-preview-wrapper { float: left; padding: 30px; @@ -579,67 +509,7 @@ input#dfrn-url { clear: both; } -.intro-wrapper { - margin-top: 20px; -} - -.intro-fullname { - font-size: 1.1em; - font-weight: bold; - -} -.intro-desc { - margin-bottom: 20px; - font-weight: bold; -} - -.intro-note { - padding: 10px; -} - -.intro-end { - padding: 30px; -} - -.intro-form { - float: left; -} -.intro-approve-form { - clear: both; -} -.intro-approve-as-friend-end { - clear: both; -} -.intro-submit-approve, .intro-submit-ignore { - margin-right: 20px; -} -.intro-submit-approve { - margin-top: 15px; -} - -.intro-approve-as-friend-label, .intro-approve-as-fan-label { - float: left; - width: 100px; - margin-left: 20px; -} -.intro-approve-as-friend, .intro-approve-as-fan { - float: left; -} -.intro-form-end { - clear: both; -} -.intro-approve-as-friend-desc { - margin-top: 15px; -} -.intro-approve-as-end { - clear: both; - margin-bottom: 10px; -} -.intro-end { - clear: both; - margin-bottom: 30px; -} .aprofile dt { font-weight: bold; } @@ -677,29 +547,6 @@ input#dfrn-url { clear: both; } -#birthday-title { - float: left; - font-weight: bold; -} - -#birthday-adjust { - float: left; - font-size: 75%; - margin-left: 10px; -} - -#birthday-title-end { - clear: both; -} - -.birthday-list { - margin-left: 15px; -} - -#birthday-wrapper { - margin-bottom: 20px; -} - #profile-extra-links { clear: both; margin-top: 10px; @@ -1497,12 +1344,7 @@ input#dfrn-url { width: 200px; } -.fortune { - margin-top: 50px; - color: #4444FF; - font-weight: bold; - margin-bottom: 20px; -} + .directory-end { clear: both; @@ -1873,7 +1715,7 @@ tr.mceLast { list-style: none; } -.contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo, .group-selected, .nets-selected, .fileas-selected, .categories-selected { +.contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo { border-radius: 5px; -moz-border-radius: 5px; box-shadow: 4px 4px 3px 0 #444444; diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 0c0553639..aa2190f0f 100644 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -38,7 +38,7 @@ </div> <div class="wall-item-author"> <a href="$item.profile_url" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a>{{ if $item.owner_url }} $item.to <a href="$item.owner_url" title="$item.olinktitle" class="wall-item-name-link"><span class="wall-item-name$item.osparkle" id="wall-item-ownername-$item.id">$item.owner_name</span></a> $item.vwall{{ endif }}<br /> - <div class="wall-item-ago" id="wall-item-ago-$item.id" title="$item.localtime">$item.ago</div> + <div class="wall-item-ago" id="wall-item-ago-$item.id" title="$item.isotime">$item.localtime</div> </div> <div class="wall-item-content" id="wall-item-content-$item.id" > <div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div> diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index 304fca4d5..70c278cf4 100644 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -25,7 +25,7 @@ <div class="wall-item-author"> <a href="$item.profile_url" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a> - <div id="wall-item-ago-$item.id" class="wall-item-ago"><abbr class="wall-item-ago-time" title="$item.localtime">$item.ago</abbr>{{ if $item.app }}<span class="item.app">$item.str_app</span>{{ endif }}</div> + <div id="wall-item-ago-$item.id" class="wall-item-ago"><abbr class="wall-item-ago-time" title="$item.isotime">$item.localtime</abbr>{{ if $item.app }}<span class="item.app">$item.str_app</span>{{ endif }}</div> </div> <div class="wall-item-content" id="wall-item-content-$item.id" > diff --git a/view/tpl/smarty3/conv_item.tpl b/view/tpl/smarty3/conv_item.tpl index 37baa81bf..a03b79a90 100644 --- a/view/tpl/smarty3/conv_item.tpl +++ b/view/tpl/smarty3/conv_item.tpl @@ -43,7 +43,7 @@ </div> <div class="wall-item-author"> <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.to}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a> {{$item.vwall}}{{/if}}<br /> - <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}" title="{{$item.localtime}}">{{$item.ago}}</div> + <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}" title="{{$item.isotime}}">{{$item.localtime}}</div> </div> <div class="wall-item-content" id="wall-item-content-{{$item.id}}" > <div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div> diff --git a/view/tpl/smarty3/search_item.tpl b/view/tpl/smarty3/search_item.tpl index c889e227b..debc1d89d 100644 --- a/view/tpl/smarty3/search_item.tpl +++ b/view/tpl/smarty3/search_item.tpl @@ -30,7 +30,7 @@ <div class="wall-item-author"> <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a> - <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago"><abbr class="wall-item-ago-time" title="{{$item.localtime}}">{{$item.ago}}</abbr>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div> + <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago"><abbr class="wall-item-ago-time" title="{{$item.isotime}}">{{$item.localtime}}</abbr>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div> </div> <div class="wall-item-content" id="wall-item-content-{{$item.id}}" > diff --git a/view/tpl/smarty3/wall_item.tpl b/view/tpl/smarty3/wall_item.tpl index 1ab1fbff0..6eea3cdfe 100644 --- a/view/tpl/smarty3/wall_item.tpl +++ b/view/tpl/smarty3/wall_item.tpl @@ -29,7 +29,7 @@ </div> <div class="wall-item-author"> <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a> - <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago"><abbr class="wall-item-ago-time" title="{{$item.localtime}}">{{$item.ago}}</abbr>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div> + <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago"><abbr class="wall-item-ago-time" title="{{$item.isotime}}">{{$item.localtime}}</abbr>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div> </div> <div class="wall-item-content" id="wall-item-content-{{$item.id}}" > diff --git a/view/tpl/smarty3/wall_thread.tpl b/view/tpl/smarty3/wall_thread.tpl index cab43cfcf..47a1e2a59 100644 --- a/view/tpl/smarty3/wall_thread.tpl +++ b/view/tpl/smarty3/wall_thread.tpl @@ -43,7 +43,7 @@ </div> <div class="wall-item-author"> <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.to}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a> {{$item.vwall}}{{/if}}<br /> - <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}" title="{{$item.localtime}}">{{$item.ago}}</div> + <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}" title="{{$item.localtime}}">{{$item.localtime}}</div> </div> <div class="wall-item-content" id="wall-item-content-{{$item.id}}" > <div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div> diff --git a/view/tpl/wall_item.tpl b/view/tpl/wall_item.tpl index e3b2eca0b..1e9874dc8 100644 --- a/view/tpl/wall_item.tpl +++ b/view/tpl/wall_item.tpl @@ -24,7 +24,7 @@ </div> <div class="wall-item-author"> <a href="$item.profile_url" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a> - <div id="wall-item-ago-$item.id" class="wall-item-ago"><abbr class="wall-item-ago-time" title="$item.localtime">$item.ago</abbr>{{ if $item.app }}<span class="item.app">$item.str_app</span>{{ endif }}</div> + <div id="wall-item-ago-$item.id" class="wall-item-ago"><abbr class="wall-item-ago-time" title="$item.isotime">$item.localtime</abbr>{{ if $item.app }}<span class="item.app">$item.str_app</span>{{ endif }}</div> </div> <div class="wall-item-content" id="wall-item-content-$item.id" > diff --git a/view/tpl/wall_thread.tpl b/view/tpl/wall_thread.tpl index 9a02b2103..cfa63daec 100644 --- a/view/tpl/wall_thread.tpl +++ b/view/tpl/wall_thread.tpl @@ -38,7 +38,7 @@ </div> <div class="wall-item-author"> <a href="$item.profile_url" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a>{{ if $item.owner_url }} $item.to <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-name-link"><span class="wall-item-name$item.osparkle" id="wall-item-ownername-$item.id">$item.owner_name</span></a> $item.vwall{{ endif }}<br /> - <div class="wall-item-ago" id="wall-item-ago-$item.id" title="$item.localtime">$item.ago</div> + <div class="wall-item-ago" id="wall-item-ago-$item.id" title="$item.localtime">$item.localtime</div> </div> <div class="wall-item-content" id="wall-item-content-$item.id" > <div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div> |