//$sql_nets = (($nets) ? sprintf(" and `contact`.`network` = '%s' ", dbesc($nets)) : '');
$sql_nets = (($nets) ? sprintf(" and `item`.`network` = '%s' ", dbesc($nets)) : '');
- $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $sql_options ) ";
+ if ($star OR $bmark) {
+ $sql_table = "`item` INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options and deleted = 0 ORDER BY `commented` DESC) AS `temp1` ON item.parent = `temp1`.parent ";
+ $sql_extra = "";
+ } else
+ $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $sql_options ) ";
if($group) {
$r = q("SELECT `name`, `id` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
return login();
$notif_tpl = get_markup_template('notifications.tpl');
-
+
$not_tpl = get_markup_template('notify.tpl');
require_once('include/bbcode.php');
$r = q("SELECT * from notify where uid = %d and seen = 0 order by date desc",
intval(local_user())
);
-
+
if (count($r) > 0) {
foreach ($r as $it) {
$notif_content .= replace_macros($not_tpl,array(
} else {
$notif_content .= t('No more system notifications.');
}
-
+
$o .= replace_macros($notif_tpl, array(
'$notif_header' => t('System Notifications'),
'$tabs' => '', // $tabs,
if($url && $title && $text) {
+ $title = str_replace(array("\r","\n"),array('',''),$title);
+
if($textmode)
$text = '[quote]' . trim($text) . '[/quote]' . $br;
- else
- $text = '<blockquote>' . trim($text) . '</blockquote><br />';
-
- $title = str_replace(array("\r","\n"),array('',''),$title);
+ else {
+ $text = '<blockquote>' . htmlspecialchars(trim($text)) . '</blockquote><br />';
+ $title = htmlspecialchars($title);
+ }
$result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags;
if($textmode)
$text = '[quote]'.trim($text).'[/quote]';
else
- $text = '<blockquote>'.trim($text).'</blockquote>';
+ $text = '<blockquote>'.htmlspecialchars(trim($text)).'</blockquote>';
}
if($image) {
function ping_init(&$a) {
header("Content-type: text/xml");
-
+
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<result>";
intval(local_user())
);
- if(count($r)) {
+ if(count($r)) {
$arr = array('items' => $r);
call_hooks('network_ping', $arr);
break;
case ACTIVITY_FRIEND:
$obj = parse_xml_string($xmlhead.$it['object']);
- $it['fname'] = $obj->title;
+ $it['fname'] = $obj->title;
$friends[] = $it;
break;
default:
- if ($it['parent']!=$it['id']) {
+ if ($it['parent']!=$it['id']) {
$comments[] = $it;
} else {
if(! $it['wall'])
WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`contact-id`!=0",
intval(local_user())
);
-
+
$intro = count($intros1) + count($intros2);
$intros = $intros1+$intros2;
);
if($mails)
$mail = $mails[0]['total'];
-
+
if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()){
$regs = q("SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`, COUNT(*) as `total` FROM `contact` RIGHT JOIN `register` ON `register`.`uid`=`contact`.`uid` WHERE `contact`.`self`=1");
if($regs)
xmlify($href), xmlify($name), xmlify($url), xmlify($photo), xmlify($date), xmlify($seen), xmlify($message)
);
}
-
+
echo "<intro>$intro</intro>
<mail>$mail</mail>
<net>$network</net>
<events-today>$events_today</events-today>
<birthdays>$birthdays</birthdays>
<birthdays-today>$birthdays_today</birthdays-today>\r\n";
-
+
$tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
require_once('include/bbcode.php');
if($zz['seen'] == 0)
$sysnotify ++;
}
- }
+ }
echo ' <notif count="'. $sysnotify .'">';
if(count($z)) {
if($firehose) {
if ($intro>0){
- foreach ($intros as $i) {
+ foreach ($intros as $i) {
echo xmlize( $a->get_baseurl().'/notifications/intros/'.$i['id'], $i['name'], $i['url'], $i['photo'], relative_date($i['datetime']), 'notify-unseen',t("{0} wants to be your friend") );
};
}
line-height: 17px;
position: fixed;
/* overflow: auto; */
+ height: 100%;
height: calc(100% - 42px);
/* overflow: scroll; */
box-shadow: 1px 1px 6px -3px #666;
border-right: 1px solid lightgray;
border-left: 1px solid lightgray; */
position: absolute;
- /*left: 215px;*/
+ left: 215px;
left: calc(215px + (100% - (215px + 766px)) / 6);
/* left: calc(215px + (100% - 215px) / 10); */
}
}
.wall-item-decor {
position: absolute;
-/* left: 755px; */
+ left: 755px;
left: calc(100% - 7px);
/* top: -10px; */
width: 16px;
}
.wall-item-container {
display: table;
-/* width: 745px; */
+ width: 745px;
width: calc(100% - 10px);
}
margin-top: 5px;
margin-bottom: 5px;
margin-left: 80px;
-/* width: 665px; */
+ width: 665px;
width: calc(100% - 90px);
border-bottom: 1px solid hsl(198, 21%, 79%);
}
}
.comment-edit-preview {
- width: 660px;
+ /* width: 660px; */
+ width: 100%;
border: 1px solid #2d2d2d;
margin-top: 10px;
top: 15px !important;
padding-left: 12px;
}
.comment-edit-preview .wall-item-container {
- width: 700px;
+ /* width: 700px; */
+ width: 100%;
}
.comment-edit-preview .tread-wrapper {
- width: 700px;
+ /* width: 700px; */
+ width: 100%;
padding: 0;
margin: 10px 0;
border-bottom: 0px;
#profile-jot-form #profile-jot-text {
height: 2.0em;
/* width: 99%; */
- /* width: 752px; */
+ width: 752px;
width: calc(100% - 10px);
font-size: 15px;
color: #999999;