forked from GNUsocial/gnu-social
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x
This commit is contained in:
commit
fd6de17a4a
4
README
4
README
@ -178,8 +178,8 @@ and the URLs are listed here for your convenience.
|
||||
- Facebook library. Used for the Facebook application.
|
||||
- PEAR Services_oEmbed. Used for some multimedia integration.
|
||||
- PEAR HTTP_Request is an oEmbed dependency.
|
||||
- PEAR Validat is an oEmbed dependency.e
|
||||
- PEAR Net_URL is an oEmbed dependency.2
|
||||
- PEAR Validate is an oEmbed dependency.
|
||||
- PEAR Net_URL2 is an oEmbed dependency.
|
||||
|
||||
A design goal of Laconica is that the basic Web functionality should
|
||||
work on even the most restrictive commercial hosting services.
|
||||
|
@ -125,16 +125,18 @@ class BlockAction extends Action
|
||||
function areYouSureForm()
|
||||
{
|
||||
$id = $this->profile->id;
|
||||
$this->elementStart('form', array('id' => 'block-' . $id,
|
||||
'method' => 'post',
|
||||
'class' => 'form_settings form_entity_block',
|
||||
'action' => common_local_url('block')));
|
||||
$this->elementStart('fieldset');
|
||||
$this->hidden('token', common_session_token());
|
||||
$this->element('legend', _('Block user'));
|
||||
$this->element('p', null,
|
||||
_('Are you sure you want to block this user? '.
|
||||
'Afterwards, they will be unsubscribed from you, '.
|
||||
'unable to subscribe to you in the future, and '.
|
||||
'you will not be notified of any @-replies from them.'));
|
||||
$this->elementStart('form', array('id' => 'block-' . $id,
|
||||
'method' => 'post',
|
||||
'class' => 'block',
|
||||
'action' => common_local_url('block')));
|
||||
$this->hidden('token', common_session_token());
|
||||
$this->element('input', array('id' => 'blockto-' . $id,
|
||||
'name' => 'blockto',
|
||||
'type' => 'hidden',
|
||||
@ -144,8 +146,9 @@ class BlockAction extends Action
|
||||
$this->hidden($k, $v);
|
||||
}
|
||||
}
|
||||
$this->submit('no', _('No'));
|
||||
$this->submit('yes', _('Yes'));
|
||||
$this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user from this group"));
|
||||
$this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user from this group'));
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ if (!defined('LACONICA')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once(INSTALLDIR.'/lib/profilelist.php');
|
||||
require_once INSTALLDIR.'/lib/profilelist.php';
|
||||
require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
||||
|
||||
/**
|
||||
@ -107,7 +107,6 @@ class FeaturedAction extends Action
|
||||
|
||||
$featured_nicks = common_config('nickname', 'featured');
|
||||
|
||||
|
||||
if (count($featured_nicks) > 0) {
|
||||
|
||||
$quoted = array();
|
||||
@ -136,7 +135,7 @@ class FeaturedAction extends Action
|
||||
$cnt = $profile->find();
|
||||
|
||||
if ($cnt > 0) {
|
||||
$featured = new ProfileList($profile, null, $this);
|
||||
$featured = new ProfileList($profile, $this);
|
||||
$featured->show();
|
||||
}
|
||||
|
||||
|
@ -151,17 +151,19 @@ class GroupblockAction extends Action
|
||||
function areYouSureForm()
|
||||
{
|
||||
$id = $this->profile->id;
|
||||
$this->elementStart('form', array('id' => 'block-' . $id,
|
||||
'method' => 'post',
|
||||
'class' => 'form_settings form_entity_block',
|
||||
'action' => common_local_url('groupblock')));
|
||||
$this->elementStart('fieldset');
|
||||
$this->hidden('token', common_session_token());
|
||||
$this->element('legend', null, _('Block user'));
|
||||
$this->element('p', null,
|
||||
sprintf(_('Are you sure you want to block user "%s" from the group "%s"? '.
|
||||
'They will be removed from the group, unable to post, and '.
|
||||
'unable to subscribe to the group in the future.'),
|
||||
$this->profile->getBestName(),
|
||||
$this->group->getBestName()));
|
||||
$this->elementStart('form', array('id' => 'block-' . $id,
|
||||
'method' => 'post',
|
||||
'class' => 'block',
|
||||
'action' => common_local_url('groupblock')));
|
||||
$this->hidden('token', common_session_token());
|
||||
$this->hidden('blockto-' . $this->profile->id,
|
||||
$this->profile->id,
|
||||
'blockto');
|
||||
@ -173,8 +175,9 @@ class GroupblockAction extends Action
|
||||
$this->hidden($k, $v);
|
||||
}
|
||||
}
|
||||
$this->submit('no', _('No'));
|
||||
$this->submit('yes', _('Yes'));
|
||||
$this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user from this group"));
|
||||
$this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user from this group'));
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ class PeopletagAction extends Action
|
||||
|
||||
$profile->query(sprintf($qry, $this->tag, $lim));
|
||||
|
||||
$pl = new ProfileList($profile, null, $this);
|
||||
$pl = new ProfileList($profile, $this);
|
||||
$cnt = $pl->show();
|
||||
|
||||
$this->pagination($this->page > 1,
|
||||
|
@ -29,6 +29,11 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
||||
|
||||
define('NOTICE_CACHE_WINDOW', 61);
|
||||
|
||||
define('NOTICE_LOCAL_PUBLIC', 1);
|
||||
define('NOTICE_REMOTE_OMB', 0);
|
||||
define('NOTICE_LOCAL_NONPUBLIC', -1);
|
||||
define('NOTICE_GATEWAY', -2);
|
||||
|
||||
class Notice extends Memcached_DataObject
|
||||
{
|
||||
###START_AUTOCODE
|
||||
@ -816,7 +821,7 @@ class Notice extends Memcached_DataObject
|
||||
$inbox = new Notice_inbox();
|
||||
$UT = common_config('db','type')=='pgsql'?'"user"':'user';
|
||||
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created, source) ' .
|
||||
"SELECT $UT.id, " . $this->id . ", '" . $this->created . "', 2 " .
|
||||
"SELECT $UT.id, " . $this->id . ", '" . $this->created . "', " . NOTICE_INBOX_SOURCE_GROUP . " " .
|
||||
"FROM $UT JOIN group_member ON $UT.id = group_member.profile_id " .
|
||||
'WHERE group_member.group_id = ' . $group->id . ' ' .
|
||||
'AND NOT EXISTS (SELECT user_id, notice_id ' .
|
||||
|
@ -25,6 +25,10 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
||||
|
||||
define('INBOX_CACHE_WINDOW', 101);
|
||||
|
||||
define('NOTICE_INBOX_SOURCE_SUB', 1);
|
||||
define('NOTICE_INBOX_SOURCE_GROUP', 2);
|
||||
define('NOTICE_INBOX_SOURCE_GATEWAY', -1);
|
||||
|
||||
class Notice_inbox extends Memcached_DataObject
|
||||
{
|
||||
###START_AUTOCODE
|
||||
|
13
js/util.js
13
js/util.js
@ -230,21 +230,10 @@ $(document).ready(function(){
|
||||
};
|
||||
$("#form_notice").ajaxForm(PostNotice);
|
||||
$("#form_notice").each(addAjaxHidden);
|
||||
NoticeHover();
|
||||
NoticeReply();
|
||||
NoticeAttachments();
|
||||
});
|
||||
|
||||
|
||||
function NoticeHover() {
|
||||
function mouseHandler(e) {
|
||||
$(e.target).closest('li.hentry')[(e.type === 'mouseover') ? 'addClass' : 'removeClass']('hover');
|
||||
};
|
||||
$('#content .notices').mouseover(mouseHandler);
|
||||
$('#content .notices').mouseout(mouseHandler);
|
||||
}
|
||||
|
||||
|
||||
function NoticeReply() {
|
||||
if ($('#notice_data-text').length > 0) {
|
||||
$('#content .notice').each(function() {
|
||||
@ -319,4 +308,4 @@ function NoticeAttachments() {
|
||||
$(this).closest(".entry-title").removeClass('ov');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
@ -154,7 +154,8 @@ font-weight:bold;
|
||||
#form_invite legend,
|
||||
#form_notice_delete legend,
|
||||
#form_password_recover legend,
|
||||
#form_password_change legend {
|
||||
#form_password_change legend,
|
||||
.form_entity_block legend {
|
||||
display:none;
|
||||
}
|
||||
|
||||
@ -621,7 +622,8 @@ display:block;
|
||||
.entity_send-a-message a,
|
||||
.entity_edit a,
|
||||
.form_user_nudge input.submit,
|
||||
.entity_nudge p {
|
||||
.entity_nudge p,
|
||||
.form_make_admin input.submit {
|
||||
border:0;
|
||||
padding-left:20px;
|
||||
}
|
||||
|
BIN
theme/base/images/icons/twotone/green/admin.gif
Normal file
BIN
theme/base/images/icons/twotone/green/admin.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 B |
@ -65,7 +65,8 @@ div.notice-options input,
|
||||
.entity_send-a-message a,
|
||||
.form_user_nudge input.submit,
|
||||
.entity_nudge p,
|
||||
.form_settings input.form_action-primary {
|
||||
.form_settings input.form_action-primary,
|
||||
.form_make_admin input.submit {
|
||||
color:#002E6E;
|
||||
}
|
||||
|
||||
@ -166,7 +167,8 @@ background-image:url(../../base/images/icons/icon_foaf.gif);
|
||||
.form_user_unblock input.submit,
|
||||
.form_group_block input.submit,
|
||||
.form_group_unblock input.submit,
|
||||
.entity_nudge p {
|
||||
.entity_nudge p,
|
||||
.form_make_admin input.submit {
|
||||
background-position: 0 40%;
|
||||
background-repeat: no-repeat;
|
||||
background-color:transparent;
|
||||
@ -200,6 +202,9 @@ background-image:url(../../base/images/icons/twotone/green/mail.gif);
|
||||
.form_group_unblock input.submit {
|
||||
background-image:url(../../base/images/icons/twotone/green/shield.gif);
|
||||
}
|
||||
.form_make_admin input.submit {
|
||||
background-image:url(../../base/images/icons/twotone/green/admin.gif);
|
||||
}
|
||||
|
||||
/* NOTICES */
|
||||
.notice .attachment {
|
||||
@ -226,13 +231,11 @@ background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-r
|
||||
}
|
||||
|
||||
.notices div.entry-content,
|
||||
.notices div.notice-options,
|
||||
.notices li.hover .notices div.entry-content,
|
||||
.notices li.hover .notices div.notice-options {
|
||||
.notices div.notice-options {
|
||||
opacity:0.4;
|
||||
}
|
||||
.notices li.hover div.entry-content,
|
||||
.notices li.hover div.notice-options {
|
||||
.notices li:hover div.entry-content,
|
||||
.notices li:hover div.notice-options {
|
||||
opacity:1;
|
||||
}
|
||||
div.entry-content {
|
||||
@ -242,9 +245,12 @@ div.notice-options a,
|
||||
div.notice-options input {
|
||||
font-family:sans-serif;
|
||||
}
|
||||
.notices li.hover {
|
||||
.notices li:hover {
|
||||
background-color:#FCFCFC;
|
||||
}
|
||||
#conversation .notices li:hover {
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
.notices .notices {
|
||||
background-color:rgba(200, 200, 200, 0.050);
|
||||
|
@ -65,7 +65,8 @@ div.notice-options input,
|
||||
.entity_send-a-message a,
|
||||
.form_user_nudge input.submit,
|
||||
.entity_nudge p,
|
||||
.form_settings input.form_action-primary {
|
||||
.form_settings input.form_action-primary,
|
||||
.form_make_admin input.submit {
|
||||
color:#002E6E;
|
||||
}
|
||||
|
||||
@ -166,7 +167,8 @@ background-image:url(../../base/images/icons/icon_foaf.gif);
|
||||
.form_user_unblock input.submit,
|
||||
.form_group_block input.submit,
|
||||
.form_group_unblock input.submit,
|
||||
.entity_nudge p {
|
||||
.entity_nudge p,
|
||||
.form_make_admin input.submit {
|
||||
background-position: 0 40%;
|
||||
background-repeat: no-repeat;
|
||||
background-color:transparent;
|
||||
@ -200,6 +202,9 @@ background-image:url(../../base/images/icons/twotone/green/mail.gif);
|
||||
.form_group_unblock input.submit {
|
||||
background-image:url(../../base/images/icons/twotone/green/shield.gif);
|
||||
}
|
||||
.form_make_admin input.submit {
|
||||
background-image:url(../../base/images/icons/twotone/green/admin.gif);
|
||||
}
|
||||
|
||||
/* NOTICES */
|
||||
.notice .attachment {
|
||||
@ -226,13 +231,11 @@ background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-r
|
||||
}
|
||||
|
||||
.notices div.entry-content,
|
||||
.notices div.notice-options,
|
||||
.notices li.hover .notices div.entry-content,
|
||||
.notices li.hover .notices div.notice-options {
|
||||
.notices div.notice-options {
|
||||
opacity:0.4;
|
||||
}
|
||||
.notices li.hover div.entry-content,
|
||||
.notices li.hover div.notice-options {
|
||||
.notices li:hover div.entry-content,
|
||||
.notices li:hover div.notice-options {
|
||||
opacity:1;
|
||||
}
|
||||
div.entry-content {
|
||||
@ -242,9 +245,12 @@ div.notice-options a,
|
||||
div.notice-options input {
|
||||
font-family:sans-serif;
|
||||
}
|
||||
.notices li.hover {
|
||||
.notices li:hover {
|
||||
background-color:#FCFCFC;
|
||||
}
|
||||
#conversation .notices li:hover {
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
.notices .notices {
|
||||
background-color:rgba(200, 200, 200, 0.050);
|
||||
|
Loading…
Reference in New Issue
Block a user