forked from GNUsocial/gnu-social
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
This commit is contained in:
commit
4186dd2691
@ -100,6 +100,12 @@ StartPublicGroupNav: Showing the public group nav menu
|
|||||||
EndPublicGroupNav: At the end of the public group nav menu
|
EndPublicGroupNav: At the end of the public group nav menu
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
|
StartSubGroupNav: Showing the subscriptions group nav menu
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndSubGroupNav: At the end of the subscriptions group nav menu
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
RouterInitialized: After the router instance has been initialized
|
RouterInitialized: After the router instance has been initialized
|
||||||
- $m: the Net_URL_Mapper that has just been set up
|
- $m: the Net_URL_Mapper that has just been set up
|
||||||
|
|
||||||
@ -109,3 +115,5 @@ StartLogout: Before logging out
|
|||||||
EndLogout: After logging out
|
EndLogout: After logging out
|
||||||
- $action: the logout action
|
- $action: the logout action
|
||||||
|
|
||||||
|
ArgsInitialized: After the argument array has been initialized
|
||||||
|
- $args: associative array of arguments, can be modified
|
||||||
|
@ -113,6 +113,15 @@ class ShowstreamAction extends ProfileAction
|
|||||||
|
|
||||||
function getFeeds()
|
function getFeeds()
|
||||||
{
|
{
|
||||||
|
if (!empty($this->tag)) {
|
||||||
|
return array(new Feed(Feed::RSS1,
|
||||||
|
common_local_url('userrss',
|
||||||
|
array('nickname' => $this->user->nickname,
|
||||||
|
'tag' => $this->tag)),
|
||||||
|
sprintf(_('Notice feed for %s tagged %s (RSS 1.0)'),
|
||||||
|
$this->user->nickname, $this->tag)));
|
||||||
|
}
|
||||||
|
|
||||||
return array(new Feed(Feed::RSS1,
|
return array(new Feed(Feed::RSS1,
|
||||||
common_local_url('userrss',
|
common_local_url('userrss',
|
||||||
array('nickname' => $this->user->nickname)),
|
array('nickname' => $this->user->nickname)),
|
||||||
|
@ -25,14 +25,15 @@ require_once(INSTALLDIR.'/lib/rssaction.php');
|
|||||||
|
|
||||||
class UserrssAction extends Rss10Action
|
class UserrssAction extends Rss10Action
|
||||||
{
|
{
|
||||||
|
|
||||||
var $user = null;
|
var $user = null;
|
||||||
|
var $tag = null;
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$nickname = $this->trimmed('nickname');
|
$nickname = $this->trimmed('nickname');
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::staticGet('nickname', $nickname);
|
||||||
|
$this->tag = $this->trimmed('tag');
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
$this->clientError(_('No such user.'));
|
$this->clientError(_('No such user.'));
|
||||||
@ -42,6 +43,25 @@ class UserrssAction extends Rss10Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getTaggedNotices($tag = null, $limit=0)
|
||||||
|
{
|
||||||
|
$user = $this->user;
|
||||||
|
|
||||||
|
if (is_null($user)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$notice = $user->getTaggedNotices(0, ($limit == 0) ? NOTICES_PER_PAGE : $limit, 0, 0, null, $tag);
|
||||||
|
|
||||||
|
$notices = array();
|
||||||
|
while ($notice->fetch()) {
|
||||||
|
$notices[] = clone($notice);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $notices;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function getNotices($limit=0)
|
function getNotices($limit=0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -201,7 +201,6 @@ class File_redirection extends Memcached_DataObject
|
|||||||
|
|
||||||
if ($short_url) {
|
if ($short_url) {
|
||||||
$short_url = (string)$short_url;
|
$short_url = (string)$short_url;
|
||||||
if(1) {
|
|
||||||
// store it
|
// store it
|
||||||
$file = File::staticGet('url', $long_url);
|
$file = File::staticGet('url', $long_url);
|
||||||
if (empty($file)) {
|
if (empty($file)) {
|
||||||
@ -221,7 +220,6 @@ if(1) {
|
|||||||
$file_redir->file_id = $file_id;
|
$file_redir->file_id = $file_id;
|
||||||
$file_redir->insert();
|
$file_redir->insert();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $short_url;
|
return $short_url;
|
||||||
}
|
}
|
||||||
return $long_url;
|
return $long_url;
|
||||||
|
@ -105,6 +105,8 @@ function main()
|
|||||||
|
|
||||||
$args = array_merge($args, $_REQUEST);
|
$args = array_merge($args, $_REQUEST);
|
||||||
|
|
||||||
|
Event::handle('ArgsInitialize', array(&$args));
|
||||||
|
|
||||||
$action = $args['action'];
|
$action = $args['action'];
|
||||||
|
|
||||||
if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) {
|
if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) {
|
||||||
|
@ -353,7 +353,7 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
{
|
{
|
||||||
$this->elementStart('body', (common_current_user()) ? array('id' => $this->trimmed('action'),
|
$this->elementStart('body', (common_current_user()) ? array('id' => $this->trimmed('action'),
|
||||||
'class' => 'user_in')
|
'class' => 'user_in')
|
||||||
: array('id' => $this->trimmed('action')));
|
: array('id' => $this->trimmed('action')));
|
||||||
$this->elementStart('div', array('id' => 'wrap'));
|
$this->elementStart('div', array('id' => 'wrap'));
|
||||||
if (Event::handle('StartShowHeader', array($this))) {
|
if (Event::handle('StartShowHeader', array($this))) {
|
||||||
$this->showHeader();
|
$this->showHeader();
|
||||||
@ -437,10 +437,10 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
_('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
|
_('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
|
||||||
}
|
}
|
||||||
$this->menuItem(common_local_url('invite'),
|
$this->menuItem(common_local_url('invite'),
|
||||||
_('Invite'),
|
_('Invite'),
|
||||||
sprintf(_('Invite friends and colleagues to join you on %s'),
|
sprintf(_('Invite friends and colleagues to join you on %s'),
|
||||||
common_config('site', 'name')),
|
common_config('site', 'name')),
|
||||||
false, 'nav_invitecontact');
|
false, 'nav_invitecontact');
|
||||||
$this->menuItem(common_local_url('logout'),
|
$this->menuItem(common_local_url('logout'),
|
||||||
_('Logout'), _('Logout from the site'), false, 'nav_logout');
|
_('Logout'), _('Logout from the site'), false, 'nav_logout');
|
||||||
}
|
}
|
||||||
@ -597,7 +597,10 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
'class' => 'system_notice'));
|
'class' => 'system_notice'));
|
||||||
$this->element('dt', null, _('Page notice'));
|
$this->element('dt', null, _('Page notice'));
|
||||||
$this->elementStart('dd');
|
$this->elementStart('dd');
|
||||||
$this->showPageNotice();
|
if (Event::handle('StartShowPageNotice', array($this))) {
|
||||||
|
$this->showPageNotice();
|
||||||
|
Event::handle('EndShowPageNotice', array($this));
|
||||||
|
}
|
||||||
$this->elementEnd('dd');
|
$this->elementEnd('dd');
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
}
|
}
|
||||||
@ -635,7 +638,7 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
$this->elementStart('div', array('id' => 'aside_primary',
|
$this->elementStart('div', array('id' => 'aside_primary',
|
||||||
'class' => 'aside'));
|
'class' => 'aside'));
|
||||||
if (Event::handle('StartShowExportData', array($this))) {
|
if (Event::handle('StartShowExportData', array($this))) {
|
||||||
$this->showExportData();
|
$this->showExportData();
|
||||||
Event::handle('EndShowExportData', array($this));
|
Event::handle('EndShowExportData', array($this));
|
||||||
}
|
}
|
||||||
if (Event::handle('StartShowSections', array($this))) {
|
if (Event::handle('StartShowSections', array($this))) {
|
||||||
|
@ -187,7 +187,7 @@ class NoticeListItem extends Widget
|
|||||||
|
|
||||||
function showNotice()
|
function showNotice()
|
||||||
{
|
{
|
||||||
if (0)
|
if(0)
|
||||||
$this->out->elementStart('entry-title');
|
$this->out->elementStart('entry-title');
|
||||||
else
|
else
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ else
|
|||||||
$clip .= '.png';
|
$clip .= '.png';
|
||||||
$top = '20px';
|
$top = '20px';
|
||||||
}
|
}
|
||||||
if (0)
|
if(0)
|
||||||
$this->out->elementStart('div', 'entry-attachments');
|
$this->out->elementStart('div', 'entry-attachments');
|
||||||
else
|
else
|
||||||
$this->out->elementStart('p', array('class' => 'entry-attachments', 'style' => "float: right; width: $width_att; background: url($clip) no-repeat; text-align: right; height: $height;"));
|
$this->out->elementStart('p', array('class' => 'entry-attachments', 'style' => "float: right; width: $width_att; background: url($clip) no-repeat; text-align: right; height: $height;"));
|
||||||
|
@ -426,6 +426,11 @@ class Router
|
|||||||
array('size' => '(original|96|48|24)',
|
array('size' => '(original|96|48|24)',
|
||||||
'nickname' => '[a-zA-Z0-9]{1,64}'));
|
'nickname' => '[a-zA-Z0-9]{1,64}'));
|
||||||
|
|
||||||
|
$m->connect(':nickname/tag/:tag/rss',
|
||||||
|
array('action' => 'userrss'),
|
||||||
|
array('nickname' => '[a-zA-Z0-9]{1,64}'),
|
||||||
|
array('tag' => '[a-zA-Z0-9]+'));
|
||||||
|
|
||||||
$m->connect(':nickname/tag/:tag',
|
$m->connect(':nickname/tag/:tag',
|
||||||
array('action' => 'showstream'),
|
array('action' => 'showstream'),
|
||||||
array('nickname' => '[a-zA-Z0-9]{1,64}'),
|
array('nickname' => '[a-zA-Z0-9]{1,64}'),
|
||||||
|
@ -97,7 +97,11 @@ class Rss10Action extends Action
|
|||||||
// Parent handling, including cache check
|
// Parent handling, including cache check
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
// Get the list of notices
|
// Get the list of notices
|
||||||
$this->notices = $this->getNotices($this->limit);
|
if (empty($this->tag)) {
|
||||||
|
$this->notices = $this->getNotices($this->limit);
|
||||||
|
} else {
|
||||||
|
$this->notices = $this->getTaggedNotices($this->tag, $this->limit);
|
||||||
|
}
|
||||||
$this->showRss();
|
$this->showRss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,38 +74,44 @@ class SubGroupNav extends Widget
|
|||||||
|
|
||||||
$this->out->elementStart('ul', array('class' => 'nav'));
|
$this->out->elementStart('ul', array('class' => 'nav'));
|
||||||
|
|
||||||
$this->out->menuItem(common_local_url('subscriptions',
|
if (Event::handle('StartSubGroupNav', array($this))) {
|
||||||
array('nickname' =>
|
|
||||||
$this->user->nickname)),
|
$this->out->menuItem(common_local_url('subscriptions',
|
||||||
_('Subscriptions'),
|
array('nickname' =>
|
||||||
sprintf(_('People %s subscribes to'),
|
$this->user->nickname)),
|
||||||
$this->user->nickname),
|
_('Subscriptions'),
|
||||||
$action == 'subscriptions',
|
sprintf(_('People %s subscribes to'),
|
||||||
'nav_subscriptions');
|
$this->user->nickname),
|
||||||
$this->out->menuItem(common_local_url('subscribers',
|
$action == 'subscriptions',
|
||||||
array('nickname' =>
|
'nav_subscriptions');
|
||||||
$this->user->nickname)),
|
$this->out->menuItem(common_local_url('subscribers',
|
||||||
_('Subscribers'),
|
array('nickname' =>
|
||||||
sprintf(_('People subscribed to %s'),
|
$this->user->nickname)),
|
||||||
$this->user->nickname),
|
_('Subscribers'),
|
||||||
$action == 'subscribers',
|
sprintf(_('People subscribed to %s'),
|
||||||
'nav_subscribers');
|
$this->user->nickname),
|
||||||
$this->out->menuItem(common_local_url('usergroups',
|
$action == 'subscribers',
|
||||||
array('nickname' =>
|
'nav_subscribers');
|
||||||
$this->user->nickname)),
|
$this->out->menuItem(common_local_url('usergroups',
|
||||||
_('Groups'),
|
array('nickname' =>
|
||||||
sprintf(_('Groups %s is a member of'),
|
$this->user->nickname)),
|
||||||
$this->user->nickname),
|
_('Groups'),
|
||||||
$action == 'usergroups',
|
sprintf(_('Groups %s is a member of'),
|
||||||
'nav_usergroups');
|
$this->user->nickname),
|
||||||
if (!is_null($cur) && $this->user->id === $cur->id) {
|
$action == 'usergroups',
|
||||||
$this->out->menuItem(common_local_url('invite'),
|
'nav_usergroups');
|
||||||
_('Invite'),
|
if (!is_null($cur) && $this->user->id === $cur->id) {
|
||||||
sprintf(_('Invite friends and colleagues to join you on %s'),
|
$this->out->menuItem(common_local_url('invite'),
|
||||||
common_config('site', 'name')),
|
_('Invite'),
|
||||||
$action == 'invite',
|
sprintf(_('Invite friends and colleagues to join you on %s'),
|
||||||
'nav_invite');
|
common_config('site', 'name')),
|
||||||
|
$action == 'invite',
|
||||||
|
'nav_invite');
|
||||||
|
}
|
||||||
|
|
||||||
|
Event::handle('EndSubGroupNav', array($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -496,11 +496,6 @@ function common_linkify($url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$attrs = array('href' => $longurl, 'rel' => 'external');
|
$attrs = array('href' => $longurl, 'rel' => 'external');
|
||||||
if(0){
|
|
||||||
if ($longurl !== $url) {
|
|
||||||
$attrs['title'] = $longurl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return XMLStringer::estring('a', $attrs, $display);
|
return XMLStringer::estring('a', $attrs, $display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ line-height:1.618;
|
|||||||
/* entity_profile */
|
/* entity_profile */
|
||||||
.entity_profile {
|
.entity_profile {
|
||||||
position:relative;
|
position:relative;
|
||||||
width:67.702%;
|
width:74.702%;
|
||||||
min-height:123px;
|
min-height:123px;
|
||||||
float:left;
|
float:left;
|
||||||
margin-bottom:18px;
|
margin-bottom:18px;
|
||||||
@ -531,12 +531,15 @@ margin-bottom:4px;
|
|||||||
.entity_profile .entity_nickname {
|
.entity_profile .entity_nickname {
|
||||||
margin-left:11px;
|
margin-left:11px;
|
||||||
display:inline;
|
display:inline;
|
||||||
font-weight:bold;
|
|
||||||
}
|
}
|
||||||
.entity_profile .entity_nickname {
|
.entity_profile .entity_nickname {
|
||||||
margin-left:0;
|
margin-left:0;
|
||||||
}
|
}
|
||||||
|
.entity_profile .fn,
|
||||||
|
.entity_profile .nickname {
|
||||||
|
font-size:1.1em;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
.entity_profile .entity_fn dd:before {
|
.entity_profile .entity_fn dd:before {
|
||||||
content: "(";
|
content: "(";
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
@ -558,7 +561,7 @@ display:none;
|
|||||||
/*entity_actions*/
|
/*entity_actions*/
|
||||||
.entity_actions {
|
.entity_actions {
|
||||||
float:right;
|
float:right;
|
||||||
margin-left:4.35%;
|
margin-left:2.35%;
|
||||||
max-width:25%;
|
max-width:25%;
|
||||||
}
|
}
|
||||||
.entity_actions h2 {
|
.entity_actions h2 {
|
||||||
@ -636,6 +639,7 @@ margin-bottom:29px;
|
|||||||
clear:both;
|
clear:both;
|
||||||
float:left;
|
float:left;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
list-style-position:inside;
|
||||||
}
|
}
|
||||||
.aside .section h2 {
|
.aside .section h2 {
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
@ -659,6 +663,7 @@ list-style-type:none;
|
|||||||
float:left;
|
float:left;
|
||||||
margin-right:7px;
|
margin-right:7px;
|
||||||
margin-bottom:7px;
|
margin-bottom:7px;
|
||||||
|
display:inline;
|
||||||
}
|
}
|
||||||
.section .entities li .photo {
|
.section .entities li .photo {
|
||||||
margin-right:0;
|
margin-right:0;
|
||||||
@ -1039,7 +1044,7 @@ margin-left:18px;
|
|||||||
|
|
||||||
/* TOP_POSTERS */
|
/* TOP_POSTERS */
|
||||||
.section tbody td {
|
.section tbody td {
|
||||||
padding-right:11px;
|
padding-right:18px;
|
||||||
padding-bottom:11px;
|
padding-bottom:11px;
|
||||||
}
|
}
|
||||||
.section .vcard .photo {
|
.section .vcard .photo {
|
||||||
|
@ -72,13 +72,6 @@ border-top-color:#CEE1E9;
|
|||||||
border-top-color:#87B4C8;
|
border-top-color:#87B4C8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content .notice p.entry-content a:visited {
|
|
||||||
background-color:#fcfcfc;
|
|
||||||
}
|
|
||||||
#content .notice p.entry-content .vcard a {
|
|
||||||
background-color:#fcfffc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#aside_primary {
|
#aside_primary {
|
||||||
background-color:#CEE1E9;
|
background-color:#CEE1E9;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user