Merge remote-tracking branch 'friendica/master'

This commit is contained in:
Fabio Comuni 2012-01-06 09:10:21 +01:00
commit a9670cbb7d
36 changed files with 396 additions and 262 deletions

View File

@ -38,7 +38,7 @@ with the Diaspora network and improved security.
- PHP *command line* access with register_argc_argv set to true in the - PHP *command line* access with register_argc_argv set to true in the
php.ini file [or see 'poormancron' in section 8] php.ini file [or see 'poormancron' in section 8]
- curl, gd, mysql, mbstring, mcrypt, and openssl extensions - curl, gd (with at least jpeg support), mysql, mbstring, mcrypt, and openssl extensions
- some form of email server or email gateway such that PHP mail() works - some form of email server or email gateway such that PHP mail() works

View File

@ -4,14 +4,14 @@ require_once('include/config.php');
require_once('include/network.php'); require_once('include/network.php');
require_once('include/plugin.php'); require_once('include/plugin.php');
require_once('include/text.php'); require_once('include/text.php');
require_once("include/pgettext.php"); require_once('include/pgettext.php');
require_once('include/nav.php'); require_once('include/nav.php');
require_once('include/cache.php'); require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1214' ); define ( 'FRIENDICA_VERSION', '2.3.1217' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1114 ); define ( 'DB_UPDATE_VERSION', 1115 );
define ( 'EOL', "<br />\r\n" ); define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -103,7 +103,7 @@ define ( 'NETWORK_MAIL', 'mail'); // IMAP/POP
define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API
define ( 'NETWORK_LINKEDIN', 'lnkd'); // LinkedIn define ( 'NETWORK_LINKEDIN', 'lnkd'); // LinkedIn
define ( 'NETWORK_XMPP', 'xmpp'); // XMPP define ( 'NETWORK_XMPP', 'xmpp'); // XMPP
define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace
/** /**
* Maximum number of "people who like (or don't like) this" that we will list by name * Maximum number of "people who like (or don't like) this" that we will list by name
@ -127,6 +127,9 @@ define ( 'NOTIFY_CONFIRM', 0x0002 );
define ( 'NOTIFY_WALL', 0x0004 ); define ( 'NOTIFY_WALL', 0x0004 );
define ( 'NOTIFY_COMMENT', 0x0008 ); define ( 'NOTIFY_COMMENT', 0x0008 );
define ( 'NOTIFY_MAIL', 0x0010 ); define ( 'NOTIFY_MAIL', 0x0010 );
define ( 'NOTIFY_SUGGEST', 0x0020 );
define ( 'NOTIFY_PROFILE', 0x0040 );
/** /**
* various namespaces we may need to parse * various namespaces we may need to parse

View File

@ -751,3 +751,20 @@ INDEX ( `uid` ),
INDEX ( `seen` ), INDEX ( `seen` ),
INDEX ( `date` ) INDEX ( `date` )
) ENGINE = MyISAM DEFAULT CHARSET=utf8; ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `item_id` (
`iid` INT NOT NULL ,
`uid` INT NOT NULL ,
`face` CHAR( 255 ) NOT NULL ,
`dspr` CHAR( 255 ) NOT NULL ,
`twit` CHAR( 255 ) NOT NULL ,
`stat` CHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `iid` ),
INDEX ( `uid` ),
INDEX ( `face` ),
INDEX ( `dspr` ),
INDEX ( `twit` ),
INDEX ( `stat` )
) ENGINE = MyISAM DEFAULT CHARSET=utf8;

BIN
images/smiley-Oo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -910,26 +910,36 @@ function conv_sort($arr,$order) {
elseif(stristr($order,'commented')) elseif(stristr($order,'commented'))
usort($parents,'sort_thr_commented'); usort($parents,'sort_thr_commented');
if(count($parents))
foreach($parents as $x) foreach($parents as $x)
$x['children'] = array(); $x['children'] = array();
foreach($arr as $x) { foreach($arr as $x) {
if($x['id'] != $x['parent']) { if($x['id'] != $x['parent']) {
$p = find_thread_parent_index($parents,$x); $p = find_thread_parent_index($parents,$x);
if($p !== false)
$parents[$p]['children'][] = $x; $parents[$p]['children'][] = $x;
} }
} }
foreach($parents as $x) if(count($parents)) {
if(count($x['children'])) foreach($parents as $k => $v) {
usort($x['children'],'sort_thr_created_rev'); if(count($parents[$k]['children'])) {
$y = $parents[$k]['children'];
usort($y,'sort_thr_created_rev');
$parents[$k]['children'] = $y;
}
}
}
$ret = array(); $ret = array();
if(count($parents)) {
foreach($parents as $x) { foreach($parents as $x) {
$ret[] = $x; $ret[] = $x;
if(count($x['children'])) if(count($x['children']))
foreach($x['children'] as $y) foreach($x['children'] as $y)
$ret[] = $y; $ret[] = $y;
} }
}
return $ret; return $ret;
} }
@ -951,4 +961,5 @@ function find_thread_parent_index($arr,$x) {
foreach($arr as $k => $v) foreach($arr as $k => $v)
if($v['id'] == $x['parent']) if($v['id'] == $x['parent'])
return $k; return $k;
return false;
} }

View File

@ -464,7 +464,7 @@ function diaspora_request($importer,$xml) {
intval($importer['uid']) intval($importer['uid'])
); );
if((count($r)) && ($r[0]['hide-friends'] == 0)) { if((count($r)) && (! $r[0]['hide-friends']) && (! $contact['hidden'])) {
require_once('include/items.php'); require_once('include/items.php');
$self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
@ -527,6 +527,8 @@ function diaspora_request($importer,$xml) {
$batch = (($ret['batch']) ? $ret['batch'] : implode('/', array_slice(explode('/',$ret['url']),0,3)) . '/receive/public'); $batch = (($ret['batch']) ? $ret['batch'] : implode('/', array_slice(explode('/',$ret['url']),0,3)) . '/receive/public');
$r = q("INSERT INTO `contact` (`uid`, `network`,`addr`,`created`,`url`,`nurl`,`batch`,`name`,`nick`,`photo`,`pubkey`,`notify`,`poll`,`blocked`,`priority`) $r = q("INSERT INTO `contact` (`uid`, `network`,`addr`,`created`,`url`,`nurl`,`batch`,`name`,`nick`,`photo`,`pubkey`,`notify`,`poll`,`blocked`,`priority`)
VALUES ( %d, '%s', '%s', '%s', '%s','%s','%s','%s','%s','%s','%s','%s','%s',%d,%d) ", VALUES ( %d, '%s', '%s', '%s', '%s','%s','%s','%s','%s','%s','%s','%s','%s',%d,%d) ",
intval($importer['uid']), intval($importer['uid']),
@ -550,9 +552,15 @@ function diaspora_request($importer,$xml) {
$contact_record = diaspora_get_contact_by_handle($importer['uid'],$sender_handle); $contact_record = diaspora_get_contact_by_handle($importer['uid'],$sender_handle);
if(! $contact_record) {
logger('diaspora_request: unable to locate newly created contact record.');
return;
}
if($importer['page-flags'] == PAGE_NORMAL) {
$hash = random_string() . (string) time(); // Generate a confirm_key $hash = random_string() . (string) time(); // Generate a confirm_key
if($contact_record) {
$ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime` ) $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime` )
VALUES ( %d, %d, %d, %d, '%s', '%s', '%s' )", VALUES ( %d, %d, %d, %d, '%s', '%s', '%s' )",
intval($importer['uid']), intval($importer['uid']),
@ -564,6 +572,49 @@ function diaspora_request($importer,$xml) {
dbesc(datetime_convert()) dbesc(datetime_convert())
); );
} }
else {
// automatic friend approval
require_once('include/Photo.php');
$photos = import_profile_photo($contact_record['photo'],$importer['uid'],$contact_record['id']);
// technically they are sharing with us (CONTACT_IS_SHARING),
// but if our page-type is PAGE_COMMUNITY or PAGE_SOAPBOX
// we are going to change the relationship and make them a follower.
if($importer['page-flags'] == PAGE_FREELOVE)
$new_relation = CONTACT_IS_FRIEND;
else
$new_relation = CONTACT_IS_FOLLOWER;
$r = q("UPDATE `contact` SET
`photo` = '%s',
`thumb` = '%s',
`micro` = '%s',
`rel` = %d,
`name-date` = '%s',
`uri-date` = '%s',
`avatar-date` = '%s',
`blocked` = 0,
`pending` = 0,
WHERE `id` = %d LIMIT 1
",
dbesc($photos[0]),
dbesc($photos[1]),
dbesc($photos[2]),
intval($new_relation),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($contact_record['id'])
);
$u = q("select * from user where id = %d limit 1",intval($importer['uid']));
if($u)
$ret = diaspora_share($u[0],$contact_record);
}
return; return;
} }
@ -1235,6 +1286,8 @@ function diaspora_conversation($importer,$xml,$msg) {
'source_name' => $person['name'], 'source_name' => $person['name'],
'source_link' => $person['url'], 'source_link' => $person['url'],
'source_photo' => $person['thumb'], 'source_photo' => $person['thumb'],
'verb' => ACTIVITY_POST,
'otype' => 'mail'
)); ));
} }
@ -1732,27 +1785,6 @@ function diaspora_profile($importer,$xml) {
} }
function diaspora_share($me,$contact) { function diaspora_share($me,$contact) {
$a = get_app(); $a = get_app();
$myaddr = $me['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); $myaddr = $me['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);

View File

@ -65,6 +65,19 @@ function notification($params) {
$itemlink = $params['link']; $itemlink = $params['link'];
} }
if($params['type'] == NOTIFY_SUGGEST) {
$subject = sprintf( t('Friend suggestion received at %s'), $sitename);
$preamble = sprintf( t('You\'ve received a friend suggestion from \'%s\' at %s'), $params['source_name'], $sitename);
$body = t('Name:') . ' ' . $params['item']['name'] . "\n";
$body .= t('Photo:') . ' ' . $params['item']['photo'] . "\n";
$body .= sprintf( t('You may visit their profile at %s'),$params['item']['url']);
$sitelink = t('Please visit %s to approve or reject the suggestion.');
$tsitelink = sprintf( $sitelink, $siteurl );
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
$itemlink = $params['link'];
}
if($params['type'] == NOTIFY_CONFIRM) { if($params['type'] == NOTIFY_CONFIRM) {
} }

View File

@ -945,10 +945,15 @@ function tgroup_deliver($uid,$item_id) {
$link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']); $link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']);
$cnt = preg_match_all('/\@\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER); // Diaspora uses their own hardwired link URL in @-tags
// instead of the one we supply with webfinger
$dlink = normalise_link($a->get_baseurl() . '/u/' . $u[0]['nickname']);
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
if($cnt) { if($cnt) {
foreach($matches as $mtch) { foreach($matches as $mtch) {
if(link_compare($link,$mtch[1])) { if(link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) {
$deliver_to_tgroup = true; $deliver_to_tgroup = true;
logger('tgroup_deliver: local group mention found: ' . $mtch[2]); logger('tgroup_deliver: local group mention found: ' . $mtch[2]);
} }
@ -1788,7 +1793,20 @@ function local_delivery($importer,$data) {
intval(0) intval(0)
); );
// TODO - send email notify (which may require a new notification preference) notification(array(
'type' => NOTIFY_SUGGEST,
'notify_flags' => $importer['notify-flags'],
'language' => $importer['language'],
'to_name' => $importer['username'],
'to_email' => $importer['email'],
'item' => $fsugg,
'link' => $a->get_baseurl() . '/notifications/intros',
'source_name' => $importer['name'],
'source_link' => $importer['url'],
'source_photo' => $importer['photo'],
'verb' => ACTIVITY_REQ_FRIEND,
'otype' => 'intro'
));
return 0; return 0;
} }
@ -1836,6 +1854,8 @@ function local_delivery($importer,$data) {
'source_name' => $msg['from-name'], 'source_name' => $msg['from-name'],
'source_link' => $importer['url'], 'source_link' => $importer['url'],
'source_photo' => $importer['thumb'], 'source_photo' => $importer['thumb'],
'verb' => ACTIVITY_POST,
'otype' => 'mail'
); );
notification($notif_params); notification($notif_params);
@ -2107,7 +2127,10 @@ function local_delivery($importer,$data) {
'source_name' => stripslashes($datarray['author-name']), 'source_name' => stripslashes($datarray['author-name']),
'source_link' => $datarray['author-link'], 'source_link' => $datarray['author-link'],
'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) 'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
? $importer['thumb'] : $datarray['author-avatar']) ? $importer['thumb'] : $datarray['author-avatar']),
'verb' => ACTIVITY_POST,
'otype' => 'item'
)); ));
} }
@ -2223,7 +2246,10 @@ function local_delivery($importer,$data) {
'source_name' => stripslashes($datarray['author-name']), 'source_name' => stripslashes($datarray['author-name']),
'source_link' => $datarray['author-link'], 'source_link' => $datarray['author-link'],
'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) 'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
? $importer['thumb'] : $datarray['author-avatar']) ? $importer['thumb'] : $datarray['author-avatar']),
'verb' => ACTIVITY_POST,
'otype' => 'item'
)); ));
break; break;

View File

@ -678,7 +678,7 @@ function smilies($s) {
$a = get_app(); $a = get_app();
$s = str_replace( $s = str_replace(
array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o',
'~friendika', '~friendica', 'Diaspora*' ), '~friendika', '~friendica', 'Diaspora*' ),
array( array(
'<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />', '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
@ -698,6 +698,8 @@ function smilies($s) {
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />', '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />', '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />', '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
'<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>', '<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>',
'<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendica" /></a>', '<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendica" /></a>',
'<a href="http://diasporafoundation.org">Diaspora<img src="' . $a->get_baseurl() . '/images/diaspora.png" alt="Diaspora*" /></a>', '<a href="http://diasporafoundation.org">Diaspora<img src="' . $a->get_baseurl() . '/images/diaspora.png" alt="Diaspora*" /></a>',

View File

@ -580,7 +580,9 @@ function dfrn_request_content(&$a) {
'link' => $a->get_baseurl() . '/notifications/intros', 'link' => $a->get_baseurl() . '/notifications/intros',
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')), 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
'source_link' => $r[0]['url'], 'source_link' => $r[0]['url'],
'source_photo' => $r[0]['photo'] 'source_photo' => $r[0]['photo'],
'verb' => ACTIVITY_REQ_FRIEND,
'otype' => 'intro'
)); ));
} }

View File

@ -54,6 +54,8 @@ function item_post(&$a) {
$parid = 0; $parid = 0;
$r = false; $r = false;
$preview = ((x($_POST,'preview')) ? intval($_POST['preview']) : 0);
if($parent || $parent_uri) { if($parent || $parent_uri) {
if(! x($_POST,'type')) if(! x($_POST,'type'))
@ -280,7 +282,7 @@ function item_post(&$a) {
$match = null; $match = null;
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) { if((! $preview) && preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
$images = $match[1]; $images = $match[1];
if(count($images)) { if(count($images)) {
foreach($images as $image) { foreach($images as $image) {
@ -323,7 +325,7 @@ function item_post(&$a) {
$match = false; $match = false;
if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match)) { if((! $preview) && preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match)) {
$attaches = $match[1]; $attaches = $match[1];
if(count($attaches)) { if(count($attaches)) {
foreach($attaches as $attach) { foreach($attaches as $attach) {
@ -351,13 +353,6 @@ function item_post(&$a) {
$bookmark = 0; $bookmark = 0;
if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",$body,$match,PREG_SET_ORDER)) { if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",$body,$match,PREG_SET_ORDER)) {
$bookmark = 1; $bookmark = 1;
// foreach($match as $mtch) {
// $body = str_replace(
// '[bookmark=' . $mtch[1] . ']' . $mtch[2] . '[/bookmark]',
// '[url=' . $mtch[1] . ']' . $mtch[2] . '[/url]',
// $body
// );
// }
} }
$body = bb_translate_video($body); $body = bb_translate_video($body);
@ -588,6 +583,17 @@ function item_post(&$a) {
else else
$datarray['guid'] = get_guid(); $datarray['guid'] = get_guid();
// preview mode - prepare the body for display and send it via json
if($preview) {
$b = prepare_body($datarray,true);
require_once('include/conversation.php');
$o = conversation(&$a,array(array_merge($datarray,$contact_record)),'search',false);
$json = array('preview' => $o);
echo json_encode($json);
killme();
}
call_hooks('post_local',$datarray); call_hooks('post_local',$datarray);
@ -691,7 +697,9 @@ function item_post(&$a) {
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id, 'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
'source_name' => $datarray['author-name'], 'source_name' => $datarray['author-name'],
'source_link' => $datarray['author-link'], 'source_link' => $datarray['author-link'],
'source_photo' => $datarray['author-avatar'] 'source_photo' => $datarray['author-avatar'],
'verb' => ACTIVITY_POST,
'otype' => 'item'
)); ));
} }
@ -731,7 +739,9 @@ function item_post(&$a) {
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id, 'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
'source_name' => $datarray['author-name'], 'source_name' => $datarray['author-name'],
'source_link' => $datarray['author-link'], 'source_link' => $datarray['author-link'],
'source_photo' => $datarray['author-avatar'] 'source_photo' => $datarray['author-avatar'],
'verb' => ACTIVITY_POST,
'otype' => 'item'
)); ));
} }
} }

View File

@ -8,7 +8,6 @@ function ping_init(&$a) {
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<result>"; <result>";
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">"; $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
if(local_user()){ if(local_user()){
@ -18,11 +17,10 @@ function ping_init(&$a) {
$dislikes = array(); $dislikes = array();
$friends = array(); $friends = array();
$posts = array(); $posts = array();
$cit = array();
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`,
`item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`, `item`.`body`, `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`,
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent` FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
@ -31,8 +29,6 @@ function ping_init(&$a) {
intval(local_user()) intval(local_user())
); );
$network = count($r); $network = count($r);
foreach ($r as $it) { foreach ($r as $it) {
switch($it['verb']){ switch($it['verb']){
@ -53,11 +49,8 @@ function ping_init(&$a) {
$friends[] = $it; $friends[] = $it;
break; break;
default: default:
$reg = "|@\[url=".$a->get_baseurl()."/profile/".$a->user['nickname']."|";
if ($it['parent']!=$it['id']) { if ($it['parent']!=$it['id']) {
$comments[] = $it; $comments[] = $it;
} else if(preg_match( $reg, $it['body'])){
$cit[] = $it;
} else { } else {
$posts[] = $it; $posts[] = $it;
} }
@ -93,9 +86,6 @@ function ping_init(&$a) {
break; break;
default: default:
if ($it['parent']!=$it['id']) $comments[] = $it; if ($it['parent']!=$it['id']) $comments[] = $it;
if(preg_match("/@\[[^]]*\]".$a->user['username']."/", $it['body'])){
$cit[] = $it;
}
} }
} }
@ -150,12 +140,12 @@ function ping_init(&$a) {
<home>$home</home>"; <home>$home</home>";
if ($register!=0) echo "<register>$register</register>"; if ($register!=0) echo "<register>$register</register>";
$tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags)+count($cit); $tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
echo ' <notif count="'.$tot.'">'; echo ' <notif count="'.$tot.'">';
if ($intro>0){ 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']), t("{0} wants to be your friend") ); echo xmlize( $a->get_baseurl().'/notifications/'.$i['id'], $i['name'], $i['url'], $i['photo'], relative_date($i['datetime']), t("{0} wants to be your friend") );
}; };
} }
if ($mail>0){ if ($mail>0){
@ -191,7 +181,7 @@ function ping_init(&$a) {
} }
if (count($posts)){ if (count($posts)){
foreach ($posts as $i) { foreach ($posts as $i) {
echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), t("{0} posted") ); echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), sprintf( t("{0} posted") ) );
}; };
} }
if (count($tags)){ if (count($tags)){
@ -199,11 +189,6 @@ function ping_init(&$a) {
echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), sprintf( t("{0} tagged %s's post with #%s"), $i['pname'], $i['tname'] ) ); echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), sprintf( t("{0} tagged %s's post with #%s"), $i['pname'], $i['tname'] ) );
}; };
} }
if (count($cit)){
foreach ($cit as $i) {
echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), t("{0} mentioned you in a post") );
};
}
echo " </notif>"; echo " </notif>";
} }

View File

@ -255,6 +255,10 @@ function settings_post(&$a) {
$notify += intval($_POST['notify4']); $notify += intval($_POST['notify4']);
if(x($_POST,'notify5')) if(x($_POST,'notify5'))
$notify += intval($_POST['notify5']); $notify += intval($_POST['notify5']);
if(x($_POST,'notify6'))
$notify += intval($_POST['notify6']);
if(x($_POST,'notify7'))
$notify += intval($_POST['notify7']);
$email_changed = false; $email_changed = false;
@ -807,7 +811,7 @@ function settings_content(&$a) {
'$notify3' => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''), '$notify3' => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''),
'$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''), '$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''),
'$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''), '$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''),
'$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''),
'$h_advn' => t('Advanced Page Settings'), '$h_advn' => t('Advanced Page Settings'),

View File

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1114 ); define( 'UPDATE_VERSION' , 1115 );
/** /**
* *
@ -972,3 +972,21 @@ function update_1113() {
q("ALTER TABLE `notify` ADD `verb` CHAR( 255 ) NOT NULL , q("ALTER TABLE `notify` ADD `verb` CHAR( 255 ) NOT NULL ,
ADD `otype` CHAR( 16 ) NOT NULL"); ADD `otype` CHAR( 16 ) NOT NULL");
} }
function update_1114() {
q("CREATE TABLE IF NOT EXISTS `item_id` (
`iid` INT NOT NULL ,
`uid` INT NOT NULL ,
`face` CHAR( 255 ) NOT NULL ,
`dspr` CHAR( 255 ) NOT NULL ,
`twit` CHAR( 255 ) NOT NULL ,
`stat` CHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `iid` ),
INDEX ( `uid` ),
INDEX ( `face` ),
INDEX ( `dspr` ),
INDEX ( `twit` ),
INDEX ( `stat` )
) ENGINE = MYISAM ");
}

View File

@ -12,7 +12,7 @@
<id>$feed_id</id> <id>$feed_id</id>
<title>$feed_title</title> <title>$feed_title</title>
<generator uri="http://friendika.com" version="$version">Friendika</generator> <generator uri="http://friendica.com" version="$version">Friendica</generator>
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" /> <link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
$hub $hub
$salmon $salmon

View File

@ -239,11 +239,11 @@ $a->strings["Automatically expire posts after days:"] = "Einträge verfallen aut
$a->strings["If empty, posts will not expire. Expired posts will be deleted"] = "Wenn leer verfallen Einträge nie automatisch. Verfallene Einträge werden gelöscht."; $a->strings["If empty, posts will not expire. Expired posts will be deleted"] = "Wenn leer verfallen Einträge nie automatisch. Verfallene Einträge werden gelöscht.";
$a->strings["Notification Settings"] = "Benachrichtigungseinstellungen"; $a->strings["Notification Settings"] = "Benachrichtigungseinstellungen";
$a->strings["Send a notification email when:"] = "Benachrichtigungs-Email senden wenn:"; $a->strings["Send a notification email when:"] = "Benachrichtigungs-Email senden wenn:";
$a->strings["You receive an introduction"] = "Du eine Vorstellung erhälst"; $a->strings["You receive an introduction"] = "Du eine Vorstellung erhältst";
$a->strings["Your introductions are confirmed"] = "Eine deiner Vorstellungen angenommen wurde"; $a->strings["Your introductions are confirmed"] = "Eine deiner Vorstellungen angenommen wurde";
$a->strings["Someone writes on your profile wall"] = "Jemand etwas auf deiner Pinnwand postet"; $a->strings["Someone writes on your profile wall"] = "Jemand etwas auf deiner Pinnwand postet";
$a->strings["Someone writes a followup comment"] = "Jemand auch einen Kommentar verfasst"; $a->strings["Someone writes a followup comment"] = "Jemand auch einen Kommentar verfasst";
$a->strings["You receive a private message"] = "Du eine private Nachricht erhälst"; $a->strings["You receive a private message"] = "Du eine private Nachricht erhältst";
$a->strings["Advanced Page Settings"] = "Erweiterte Seiten Einstellungen"; $a->strings["Advanced Page Settings"] = "Erweiterte Seiten Einstellungen";
$a->strings["Saved Searches"] = "Gespeicherte Suchen"; $a->strings["Saved Searches"] = "Gespeicherte Suchen";
$a->strings["Remove term"] = "Begriff entfernen"; $a->strings["Remove term"] = "Begriff entfernen";
@ -822,7 +822,7 @@ $a->strings["Post to Twitter"] = "Nach Twitter senden";
$a->strings["Twitter settings updated."] = "Twitter Einstellungen aktualisiert."; $a->strings["Twitter settings updated."] = "Twitter Einstellungen aktualisiert.";
$a->strings["Twitter Posting Settings"] = "Twitter Posting Einstellungen"; $a->strings["Twitter Posting Settings"] = "Twitter Posting Einstellungen";
$a->strings["No consumer key pair for Twitter found. Please contact your site administrator."] = "Kein Consumer Schlüsselpaar für Twitter gefunden. Bitte wende dich an den Administrator der Seite."; $a->strings["No consumer key pair for Twitter found. Please contact your site administrator."] = "Kein Consumer Schlüsselpaar für Twitter gefunden. Bitte wende dich an den Administrator der Seite.";
$a->strings["At this Friendika instance the Twitter plugin was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to Twitter."] = "Auf dieser Friendika Instanz wurde das Twitter Plugin aktiviert dein Account ist allerdings noch nicht mit einem Twitter Account verbunden. Um deinen Account mit Twitter zu verbinden, klick auf den Button weiter unten und gib die PIN die du auf Twitter erhälst hier ein. Es werden ausschließlich deine <strong>öffentlichen</strong> Nachrichten auf Twitter veröffentlicht."; $a->strings["At this Friendika instance the Twitter plugin was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to Twitter."] = "Auf dieser Friendika Instanz wurde das Twitter Plugin aktiviert dein Account ist allerdings noch nicht mit einem Twitter Account verbunden. Um deinen Account mit Twitter zu verbinden, klick auf den Button weiter unten und gib die PIN die du auf Twitter erhältst hier ein. Es werden ausschließlich deine <strong>öffentlichen</strong> Nachrichten auf Twitter veröffentlicht.";
$a->strings["Log in with Twitter"] = "bei Twitter anmelden"; $a->strings["Log in with Twitter"] = "bei Twitter anmelden";
$a->strings["Copy the PIN from Twitter here"] = "Kopiere die Twitter PIN hier her"; $a->strings["Copy the PIN from Twitter here"] = "Kopiere die Twitter PIN hier her";
$a->strings["Currently connected to: "] = "Momentan verbunden mit: "; $a->strings["Currently connected to: "] = "Momentan verbunden mit: ";

View File

@ -1,18 +0,0 @@
Dear $username,
'$from' commented on an item/conversation which you have been following.
-----
$body
-----
Please login at $siteurl to view the complete conversation:
$display
Thank you,
$sitename administrator

View File

@ -1,25 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendica Message</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<table style="border:1px solid #ccc">
<tbody>
<tr><td colspan="2" style="background:#084769; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px; float:left;" src='$siteurl/images/friendica-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">Friendica</div><div style="clear: both;"></div></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from commented on an item/conversation which you have been following.</td></tr>
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$url"><img style="border:0px;width:48px;height:48px;" src="$thumb"></a></td>
<td style="padding-top:22px;"><a href="$url">$from</a></td></tr>
<tr><td style="padding-bottom:5px;"></td></tr>
<tr><td style="padding-right:22px;">$body</td></tr>
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">Please login to <a href="$display">view the complete conversation</a>.</td></tr>
<tr><td></td><td>Thank You,</td></tr>
<tr><td></td><td>$sitename Administrator</td></tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,14 +0,0 @@
Dear $username,
'$from' commented on an item/conversation which you have been following.
-----
$body
-----
Please login at $siteurl to view the complete conversation:
$display
Thank you,
$sitename administrator

View File

@ -1,26 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendica Message</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<table style="border:1px solid #ccc">
<tbody>
<tr><td colspan="2" style="background:#084769; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px; float:left;" src='$siteurl/images/friendica-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">Friendica</div><div style="clear: both;"></div></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from sent you a new private message at $siteName.</td></tr>
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$url"><img style="border:0px;width:48px;height:48px;" src="$thumb"></a></td>
<td style="padding-top:22px;"><a href="$url">$from</a></td></tr>
<tr><td style="font-weight:bold;padding-bottom:5px;">$title</td></tr>
<tr><td style="padding-right:22px;">$htmlversion</td></tr>
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">Please login at <a href="$siteurl/message">$siteurl/message</a> to read and reply to your private messages.</td></tr>
<tr><td></td><td>Thank You,</td></tr>
<tr><td></td><td>$siteName Administrator</td></tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,10 +0,0 @@
$from sent you a new private message at $siteName.
$title
$textversion
Please login at $siteurl to read and reply to your private messages.
Thank you,
$siteName administrator

View File

@ -1,18 +0,0 @@
Dear $username,
'$from' posted something to your profile wall.
-----
$body
-----
Please login at $siteurl to view or delete the item:
$display
Thank you,
$sitename administrator

View File

@ -1,24 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<title>Friendica Message</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<table style="border:1px solid #ccc">
<tbody>
<tr><td colspan="2" style="background:#084769; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px; float:left;" src='$siteurl/images/friendica-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">Friendica</div><div style="clear: both;"></div></td></tr>
<tr><td style="padding-top:22px;" colspan="2">$from posted something to your profile wall.</td></tr>
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$url"><img style="border:0px;width:48px;height:48px;" src="$thumb"></a></td>
<td style="padding-top:22px;"><a href="$url">$from</a></td></tr>
<tr><td style="padding-right:22px;">$body</td></tr>
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">Please login at <a href="$siteurl">$siteurl</a> to <a href="$display">view or delete the post</a>.</td></tr>
<tr><td></td><td>Thank You,</td></tr>
<tr><td></td><td>$sitename Administrator</td></tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,18 +0,0 @@
Dear $username,
'$from' posted something to your profile wall.
-----
$body
-----
Please login at $siteurl to view or delete the item:
$display
Thank you,
$sitename administrator

View File

@ -7,6 +7,7 @@ var textlen = 0;
function initEditor(cb){ function initEditor(cb){
if (editor==false){ if (editor==false){
$("#profile-jot-text-loading").show(); $("#profile-jot-text-loading").show();
$("#jot-title-desc").show();
tinyMCE.init({ tinyMCE.init({
theme : "advanced", theme : "advanced",
mode : "specific_textareas", mode : "specific_textareas",
@ -108,11 +109,46 @@ function enableOnUser(){
<script type="text/javascript" src="js/ajaxupload.js" ></script> <script type="text/javascript" src="js/ajaxupload.js" ></script>
<script> <script>
var ispublic = '$ispublic'; var ispublic = '$ispublic';
var addtitle = '$addtitle';
$(document).ready(function() { $(document).ready(function() {
<<<<<<< HEAD
/* enable tinymce on focus and click */ /* enable tinymce on focus and click */
$("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").focus(enableOnUser);
$("#profile-jot-text").click(enableOnUser); $("#profile-jot-text").click(enableOnUser);
=======
/* enable tinymce on focus */
$("#profile-jot-text").focus(function(){
if (editor) return;
$(this).val("");
initEditor();
});
$("#jot-title").mouseout(function() {
$("#jot-title").hide();
var ttl = $("#jot-title").val();
$('#jot-title-display').html(ttl);
if(ttl.length) {
$("#jot-title-display").show();
}
else {
$("#jot-title-desc").show();
}
});
$("#jot-title-display").hover(function() {
$("#jot-title-display").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
$("#jot-title-desc").click(function() {
$("#jot-title-desc").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
>>>>>>> friendica/master
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(
'wall-image-upload', 'wall-image-upload',

View File

@ -10,6 +10,7 @@
<input type="hidden" name="location" id="jot-location" value="$defloc" /> <input type="hidden" name="location" id="jot-location" value="$defloc" />
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }} {{ if $content }}<script>initEditor();</script>{{ endif }}

View File

@ -107,6 +107,7 @@ $suggestme
{{inc field_intcheckbox.tpl with $field=$notify3 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify3 }}{{endinc}}
{{inc field_intcheckbox.tpl with $field=$notify4 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify4 }}{{endinc}}
{{inc field_intcheckbox.tpl with $field=$notify5 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify5 }}{{endinc}}
{{inc field_intcheckbox.tpl with $field=$notify6 }}{{endinc}}
</div> </div>

View File

@ -8,6 +8,7 @@ var textlen = 0;
function initEditor(cb) { function initEditor(cb) {
if (editor==false) { if (editor==false) {
$("#profile-jot-text-loading").show(); $("#profile-jot-text-loading").show();
$("#jot-title-desc").show();
tinyMCE.init({ tinyMCE.init({
theme : "advanced", theme : "advanced",
mode : "specific_textareas", mode : "specific_textareas",
@ -100,6 +101,31 @@ function initEditor(cb) {
$(this).val(""); $(this).val("");
initEditor(); initEditor();
}); });
$("#jot-title").mouseout(function() {
$("#jot-title").hide();
var ttl = $("#jot-title").val();
$('#jot-title-display').html(ttl);
if(ttl.length) {
$("#jot-title-display").show();
}
else {
$("#jot-title-desc").show();
}
});
$("#jot-title-display").hover(function() {
$("#jot-title-display").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
$("#jot-title-desc").click(function() {
$("#jot-title-desc").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(
'wall-image-upload', 'wall-image-upload',
{ action: 'wall_upload/$nickname', { action: 'wall_upload/$nickname',

View File

@ -14,8 +14,13 @@
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="location" id="jot-location" value="$defloc" /> <input type="hidden" name="location" id="jot-location" value="$defloc" />
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="title" id="jot-title" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<div id="jot-title-wrapper">
<span id="jot-title-desc" style="display: none;">$addtitle</span>
<span id="jot-title-display" style="display: none;"></span>
<input type="text" name="title" id="jot-title" value="" style="display: none;" />
</div>
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
@ -49,9 +54,6 @@
<div id="profile-nolocation-wrapper" class="jot-tool" style="display: none;" > <div id="profile-nolocation-wrapper" class="jot-tool" style="display: none;" >
<a id="profile-nolocation" class="icon border noglobe" title="$noloc" onclick="jotClearLocation(); return false;"></a> <a id="profile-nolocation" class="icon border noglobe" title="$noloc" onclick="jotClearLocation(); return false;"></a>
</div> </div>
<div id="profile-title-wrapper" class="jot-tool" style="display: none;" >
<a id="profile-title" class="icon border article" title="$title" onclick="jotTitle(); return false;"></a>
</div>
<div id="profile-jot-plugin-wrapper" style="display: none;"> <div id="profile-jot-plugin-wrapper" style="display: none;">
$jotplugins $jotplugins

View File

@ -342,6 +342,22 @@ aside #viewcontacts { text-align: right;}
#acl-deny-text-end { clear: both; } #acl-deny-text-end { clear: both; }
#jot-title-desc {
color: #cccccc;
}
#jot-title-wrapper {
margin-bottom: 5px;
}
#jot-title {
border: 1px solid #cccccc;
width: 530px;
}
#jot-title-display {
font-weight: bold;
}
/** /**
* section * section

View File

@ -12,41 +12,47 @@
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="location" id="jot-location" value="$defloc" /> <input type="hidden" name="location" id="jot-location" value="$defloc" />
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="title" id="jot-title" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<div id="jot-title-wrapper">
<span id="jot-title-desc" style="display: none;">$addtitle</span>
<span id="jot-title-display" style="display: none;"></span>
<input type="text" name="title" id="jot-title" value="" style="display: none;" />
</div>
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }} {{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-jot-submit-wrapper" style="display:none" class="jothidden"> <div id="profile-jot-submit-wrapper" style="display:none">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
<div id="profile-upload-wrapper" style="display: $visitor;" > <div id="profile-upload-wrapper" style="display: $visitor;" >
<div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div> <div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="camera" title="$upload">image upload</a></div>
</div> </div>
<div id="profile-attach-wrapper" style="display: $visitor;" > <div id="profile-attach-wrapper" style="display: $visitor;" >
<div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div> <div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="attach" title="$attach">attach file</a></div>
</div> </div>
<div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" > <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >
<a id="profile-link" class="icon link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;"></a> <a id="profile-link" class="link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">enter link</a>
</div> </div>
<div id="profile-video-wrapper" style="display: $visitor;" > <div id="profile-video-wrapper" style="display: $visitor;" >
<a id="profile-video" class="icon video" title="$video" onclick="jotVideoURL();return false;"></a> <a id="profile-video" class="video" title="$video" onclick="jotVideoURL();return false;">video url</a>
</div> </div>
<div id="profile-audio-wrapper" style="display: $visitor;" > <div id="profile-audio-wrapper" style="display: $visitor;" >
<a id="profile-audio" class="icon audio" title="$audio" onclick="jotAudioURL();return false;"></a> <a id="profile-audio" class="audio" title="$audio" onclick="jotAudioURL();return false;">audio url</a>
</div> </div>
<div id="profile-location-wrapper" style="display: $visitor;" > <div id="profile-location-wrapper" style="display: $visitor;" >
<a id="profile-location" class="icon globe" title="$setloc" onclick="jotGetLocation();return false;"></a> <a id="profile-location" class="globe" title="$setloc" onclick="jotGetLocation();return false;">set location</a>
</div> </div>
<div id="profile-nolocation-wrapper" style="display: none;" > <div id="profile-nolocation-wrapper" style="display: none;" >
<a id="profile-nolocation" class="icon noglobe" title="$noloc" onclick="jotClearLocation();return false;"></a> <a id="profile-nolocation" class="noglobe" title="$noloc" onclick="jotClearLocation();return false;">no location</a>
</div> </div>
<div id="profile-title-wrapper" style="display: $visitor;" > <div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" >
<a id="profile-title" class="icon article" title="$title" onclick="jotTitle();return false;"></a> <a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="$lockstate" title="$permset" >permissions</a>$bang
</div> </div>
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
<div id="profile-jot-perms-end"></div>
<div id="profile-jot-plugin-wrapper"> <div id="profile-jot-plugin-wrapper">
$jotplugins $jotplugins
@ -55,10 +61,6 @@
<div id="profile-rotator-wrapper" style="display: $visitor;" > <div id="profile-rotator-wrapper" style="display: $visitor;" >
<img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div> </div>
<div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" >
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon $lockstate" title="$permset" ></a>$bang
</div>
<div id="profile-jot-perms-end"></div>
<div style="display: none;"> <div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;"> <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">

View File

@ -269,6 +269,22 @@ div.wall-item-content-wrapper.shiny {
float: left; float: left;
} }
#jot-title-desc {
color: #cccccc;
}
#jot-title-wrapper {
margin-bottom: 5px;
}
#jot-title-display {
font-weight: bold;
}
#jot-title {
border: 1px solid #cccccc;
width: 530px;
}
.fakelink, .fakelink:visited, .fakelink:link { .fakelink, .fakelink:visited, .fakelink:link {
color: #3465a4; color: #3465a4;
text-decoration: none; text-decoration: none;

View File

@ -131,6 +131,23 @@ blockquote:before {
float: left; float: left;
} }
#jot-title-desc {
color: #cccccc;
}
#jot-title-wrapper {
margin-bottom: 5px;
}
#jot-title {
border: 1px solid #cccccc;
width: 530px;
}
#jot-title-display {
font-weight: bold;
}
.fakelink, .fakelink:visited { .fakelink, .fakelink:visited {
color: #15607B; color: #15607B;
text-decoration: none; text-decoration: none;

View File

@ -8,6 +8,7 @@ var textlen = 0;
function initEditor(cb) { function initEditor(cb) {
if (editor==false) { if (editor==false) {
$("#profile-jot-text-loading").show(); $("#profile-jot-text-loading").show();
$("#jot-title-desc").show();
tinyMCE.init({ tinyMCE.init({
theme : "advanced", theme : "advanced",
mode : "specific_textareas", mode : "specific_textareas",
@ -122,6 +123,32 @@ function initEditor(cb) {
$(this).val(""); $(this).val("");
initEditor(); initEditor();
}); });
$("#jot-title").mouseout(function() {
$("#jot-title").hide();
var ttl = $("#jot-title").val();
$('#jot-title-display').html(ttl);
if(ttl.length) {
$("#jot-title-display").show();
}
else {
$("#jot-title-desc").show();
}
});
$("#jot-title-display").hover(function() {
$("#jot-title-display").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
$("#jot-title-desc").click(function() {
$("#jot-title-desc").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(
'wall-image-upload', 'wall-image-upload',
{ action: 'wall_upload/$nickname', { action: 'wall_upload/$nickname',

View File

@ -14,8 +14,14 @@
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="location" id="jot-location" value="$defloc" /> <input type="hidden" name="location" id="jot-location" value="$defloc" />
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="title" id="jot-title" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<div id="jot-title-wrapper">
<span id="jot-title-desc" style="display: none;">$addtitle</span>
<span id="jot-title-display" style="display: none;"></span>
<input type="text" name="title" id="jot-title" value="" style="display: none;" />
</div>
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
@ -42,9 +48,6 @@
<div id="profile-nolocation-wrapper" class="jot-tool" style="display: none;" > <div id="profile-nolocation-wrapper" class="jot-tool" style="display: none;" >
<a id="profile-nolocation" class="icon border noglobe" title="$noloc" onclick="jotClearLocation(); return false;"></a> <a id="profile-nolocation" class="icon border noglobe" title="$noloc" onclick="jotClearLocation(); return false;"></a>
</div> </div>
<div id="profile-title-wrapper" class="jot-tool" style="display: none;" >
<a id="profile-title" class="icon border article" title="$title" onclick="jotTitle(); return false;"></a>
</div>
<div id="profile-jot-submit-wrapper" style="display:none;padding-left: 400px;"> <div id="profile-jot-submit-wrapper" style="display:none;padding-left: 400px;">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" /> <input type="submit" id="profile-jot-submit" name="submit" value="$share" />

View File

@ -744,6 +744,23 @@ ul .sidebar-group-li .icon{
#profile-jot-submit-wrapper { #profile-jot-submit-wrapper {
} }
#jot-title-desc {
color: #cccccc;
}
#jot-title-wrapper {
margin-bottom: 5px;
}
#jot-title {
border: 1px solid #cccccc;
width: 460px;
}
#jot-title-display {
font-weight: bold;
}
#profile-jot-perms, #profile-jot-submit { #profile-jot-perms, #profile-jot-submit {
width: 60px; width: 60px;
font-size: 12px; font-size: 12px;