aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-29 10:23:45 +0200
committerzottel <github@zottel.net>2012-03-29 10:23:45 +0200
commit953840cf822718cba66a0727b576c674c6e44875 (patch)
treea924cf0031d16f6f15b7d84d5f519ca4257042b4
parentfb817a29a934a68f194a42c29d3ed11da2da558f (diff)
parent3ee529d095ac7e83ae1e71d86cbe6d443885d54e (diff)
downloadvolse-hubzilla-953840cf822718cba66a0727b576c674c6e44875.tar.gz
volse-hubzilla-953840cf822718cba66a0727b576c674c6e44875.tar.bz2
volse-hubzilla-953840cf822718cba66a0727b576c674c6e44875.zip
Merge remote branch 'upstream/master'
-rwxr-xr-xboot.php37
-rwxr-xr-xinclude/api.php230
-rw-r--r--include/bbcode.php23
-rwxr-xr-xinclude/contact_widgets.php2
-rwxr-xr-xinclude/dba.php5
-rwxr-xr-xinclude/diaspora.php12
-rwxr-xr-xinclude/email.php6
-rw-r--r--include/html2plain.php86
-rwxr-xr-xinclude/items.php11
-rw-r--r--include/msgclean.php2
-rwxr-xr-xinclude/poller.php7
-rw-r--r--include/quoteconvert.php2
-rw-r--r--include/text.php31
-rwxr-xr-xindex.php4
-rwxr-xr-xmod/dfrn_notify.php19
-rwxr-xr-xmod/filer.php16
-rwxr-xr-xmod/item.php2
-rwxr-xr-xmod/message.php115
-rw-r--r--mod/ping.php5
-rwxr-xr-xmod/profile_photo.php2
-rwxr-xr-xmod/settings.php2
-rwxr-xr-xmod/viewsrc.php7
-rwxr-xr-xview/api_ratelimit_xml.tpl9
-rwxr-xr-xview/api_user_xml.tpl2
-rwxr-xr-xview/contact_head.tpl4
-rwxr-xr-xview/event_head.tpl1
-rw-r--r--view/field_combobox.tpl18
-rw-r--r--view/filer_dialog.tpl4
-rwxr-xr-xview/jot-header.tpl41
-rwxr-xr-xview/mail_conv.tpl12
-rw-r--r--view/mail_display.tpl6
-rw-r--r--view/message_side.tpl10
-rwxr-xr-xview/msg-header.tpl4
-rwxr-xr-xview/profed_head.tpl1
-rwxr-xr-xview/theme/diabook-blue/communityhome.tpl32
-rwxr-xr-xview/theme/diabook-blue/icons/close_box.pngbin0 -> 206 bytes
-rw-r--r--view/theme/diabook-blue/js/jquery.cookie.js47
-rw-r--r--view/theme/diabook-blue/style-network.css25
-rw-r--r--view/theme/diabook-blue/style-profile.css22
-rwxr-xr-xview/theme/diabook-blue/theme.php118
-rwxr-xr-xview/theme/diabook/communityhome.tpl37
-rwxr-xr-xview/theme/diabook/icons/close_box.pngbin0 -> 206 bytes
-rw-r--r--view/theme/diabook/icons/srch_bg.gifbin0 -> 65 bytes
-rw-r--r--view/theme/diabook/icons/srch_l.gifbin0 -> 303 bytes
-rw-r--r--view/theme/diabook/icons/srch_r.gifbin0 -> 227 bytes
-rw-r--r--view/theme/diabook/icons/srch_r_f2.gifbin0 -> 278 bytes
-rw-r--r--view/theme/diabook/js/jquery.cookie.js47
-rw-r--r--view/theme/diabook/nav.tpl6
-rw-r--r--view/theme/diabook/profile_side.tpl2
-rw-r--r--view/theme/diabook/style-network.css72
-rw-r--r--view/theme/diabook/style-profile.css48
-rw-r--r--view/theme/diabook/style.css3
-rwxr-xr-xview/theme/diabook/theme.php138
-rw-r--r--view/theme/dispy-dark/communityhome.tpl41
-rw-r--r--view/theme/dispy-dark/default.php20
-rw-r--r--view/theme/dispy-dark/jot-header.tpl40
-rw-r--r--view/theme/dispy-dark/nav.tpl14
-rw-r--r--view/theme/dispy-dark/style.css62
-rw-r--r--view/theme/dispy-dark/theme.php10
-rw-r--r--view/theme/dispy-dark/wall_item.tpl73
-rw-r--r--view/theme/dispy/communityhome.tpl41
-rw-r--r--view/theme/dispy/default.php20
-rw-r--r--view/theme/dispy/icons/StatusNet.pngbin0 -> 1048 bytes
-rw-r--r--view/theme/dispy/icons/email.pngbin0 -> 853 bytes
-rw-r--r--view/theme/dispy/icons/facebook.pngbin0 -> 1097 bytes
-rw-r--r--view/theme/dispy/icons/livejournal.pngbin0 -> 1571 bytes
-rw-r--r--view/theme/dispy/icons/posterous.pngbin0 -> 1223 bytes
-rw-r--r--view/theme/dispy/icons/tumblr.pngbin0 -> 843 bytes
-rw-r--r--view/theme/dispy/icons/twitter.pngbin0 -> 967 bytes
-rw-r--r--view/theme/dispy/icons/wordpress.pngbin0 -> 1346 bytes
-rw-r--r--view/theme/dispy/jot-header.tpl40
-rw-r--r--view/theme/dispy/nav.tpl14
-rw-r--r--view/theme/dispy/style.css64
-rw-r--r--view/theme/dispy/theme.php11
-rw-r--r--view/theme/dispy/wall_item.tpl73
-rwxr-xr-xview/theme/duepuntozero/style.css1
-rwxr-xr-xview/theme/quattro/colors.less9
-rw-r--r--view/theme/quattro/fileas_widget.tpl12
-rwxr-xr-xview/theme/quattro/mail_conv.tpl60
-rw-r--r--view/theme/quattro/mail_display.tpl12
-rw-r--r--view/theme/quattro/mail_list.tpl8
-rw-r--r--view/theme/quattro/message_side.tpl10
-rwxr-xr-xview/theme/quattro/msg-header.tpl97
-rwxr-xr-xview/theme/quattro/quattro.less124
-rwxr-xr-xview/theme/quattro/style.css149
-rwxr-xr-xview/theme/testbubble/jot-header.tpl35
-rwxr-xr-xview/theme/vier/nav.tpl131
87 files changed, 2071 insertions, 435 deletions
diff --git a/boot.php b/boot.php
index 13a6f0d1d..b02e686ba 100755
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1293' );
+define ( 'FRIENDICA_VERSION', '2.3.1295' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1133 );
@@ -95,8 +95,8 @@ define ( 'PAGE_BLOG', 4 );
* Network and protocol family types
*/
-define ( 'NETWORK_ZOT', 'zot!'); // Zot!
define ( 'NETWORK_DFRN', 'dfrn'); // Friendica, Mistpark, other DFRN implementations
+define ( 'NETWORK_ZOT', 'zot!'); // Zot!
define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations
define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol
define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora
@@ -108,6 +108,28 @@ define ( 'NETWORK_XMPP', 'xmpp'); // XMPP
define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace
define ( 'NETWORK_GPLUS', 'goog'); // Google+
+/*
+ * These numbers are used in stored permissions
+ * and existing allocations MUST NEVER BE CHANGED
+ * OR RE-ASSIGNED! You may only add to them.
+ */
+
+$netgroup_ids = array(
+ NETWORK_DFRN => (-1),
+ NETWORK_ZOT => (-2),
+ NETWORK_OSTATUS => (-3),
+ NETWORK_FEED => (-4),
+ NETWORK_DIASPORA => (-5),
+ NETWORK_MAIL => (-6),
+ NETWORK_MAIL2 => (-7),
+ NETWORK_FACEBOOK => (-8),
+ NETWORK_LINKEDIN => (-9),
+ NETWORK_XMPP => (-10),
+ NETWORK_MYSPACE => (-11),
+ NETWORK_GPLUS => (-12),
+);
+
+
/**
* Maximum number of "people who like (or don't like) this" that we will list by name
*/
@@ -563,6 +585,10 @@ function absurl($path) {
return $path;
}
+function is_ajax() {
+ return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
+}
+
// Primarily involved with database upgrade, but also sets the
// base url for use in cmdline programs which don't have
@@ -1381,6 +1407,11 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
);
}
+
+ $arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
+ call_hooks('profile_tabs', $arr);
+
$tpl = get_markup_template('common_tabs.tpl');
- return replace_macros($tpl,array('$tabs'=>$tabs));
+
+ return replace_macros($tpl,array('$tabs' => $arr['tabs']));
}}
diff --git a/include/api.php b/include/api.php
index 013f4b97a..64772d657 100755
--- a/include/api.php
+++ b/include/api.php
@@ -3,6 +3,7 @@
require_once("datetime.php");
require_once("conversation.php");
require_once("oauth.php");
+ require_once("html2plain.php");
/*
* Twitter-Like API
*
@@ -306,10 +307,10 @@
}
$ret = Array(
+ 'id' => intval($uinfo[0]['cid']),
'self' => intval($uinfo[0]['self']),
'uid' => intval($uinfo[0]['uid']),
- 'id' => intval($uinfo[0]['cid']),
- 'name' => $uinfo[0]['name'],
+ 'name' => (($uinfo[0]['name']) ? $uinfo[0]['name'] : $uinfo[0]['nick']),
'screen_name' => (($uinfo[0]['nick']) ? $uinfo[0]['nick'] : $uinfo[0]['name']),
'location' => ($usr) ? $usr[0]['default-location'] : '',
'profile_image_url' => $uinfo[0]['micro'],
@@ -347,6 +348,8 @@
}
function api_item_get_user(&$a, $item) {
+ global $usercache;
+
// The author is our direct contact, in a conversation with us.
if(link_compare($item['url'],$item['author-link'])) {
return api_get_user($a,$item['cid']);
@@ -362,27 +365,40 @@
list($nick, $name) = array_map("trim",explode("(",$item['author-name']));
$name=str_replace(")","",$name);
-
+
+ if ($name == '')
+ $name = $nick;
+
+ if ($nick == '')
+ $nick = $name;
+
+ // Generating a random ID
+ if (!array_key_exists($nick, $usercache))
+ $usercache[$nick] = mt_rand(2000000, 2100000);
+
$ret = array(
- 'uid' => 0,
- 'id' => 0,
+ 'id' => $usercache[$nick],
'name' => $name,
'screen_name' => $nick,
'location' => '', //$uinfo[0]['default-location'],
+ 'description' => '',
'profile_image_url' => $item['author-avatar'],
'url' => $item['author-link'],
- 'contact_url' => 0,
'protected' => false, #
+ 'followers_count' => 0,
'friends_count' => 0,
'created_at' => '',
+ 'favourites_count' => 0,
'utc_offset' => 0, #XXX: fix me
'time_zone' => '', //$uinfo[0]['timezone'],
- 'geo_enabled' => false,
'statuses_count' => 0,
+ 'following' => 1,
+ 'statusnet_blocking' => false,
+ 'notifications' => false,
+ 'uid' => 0,
+ 'contact_url' => 0,
+ 'geo_enabled' => false,
'lang' => 'en', #XXX: fix me
- 'description' => '',
- 'followers_count' => 0,
- 'favourites_count' => 0,
'contributors_enabled' => false,
'follow_request_sent' => false,
'profile_background_color' => 'cfe8f6',
@@ -393,7 +409,6 @@
'profile_background_image_url' => '',
'profile_background_tile' => false,
'profile_use_background_image' => false,
- 'notifications' => false,
'verified' => true, #XXX: fix me
'followers' => '', #XXX: fix me
'status' => array()
@@ -591,16 +606,16 @@
$in_reply_to_screen_name = $lastwall['reply_author'];
}
$status_info = array(
- 'created_at' => api_date($lastwall['created']),
- 'id' => $lastwall['contact-id'],
- 'text' => strip_tags(bbcode($lastwall['body'])),
- 'source' => (($lastwall['app']) ? $lastwall['app'] : 'web'),
+ 'text' => html2plain(bbcode($lastwall['body']), 0),
'truncated' => false,
+ 'created_at' => api_date($lastwall['created']),
'in_reply_to_status_id' => $in_reply_to_status_id,
+ 'source' => (($lastwall['app']) ? $lastwall['app'] : 'web'),
+ 'id' => $lastwall['contact-id'],
'in_reply_to_user_id' => $in_reply_to_user_id,
- 'favorited' => false,
'in_reply_to_screen_name' => $in_reply_to_screen_name,
'geo' => '',
+ 'favorited' => false,
'coordinates' => $lastwall['coord'],
'place' => $lastwall['location'],
'contributors' => ''
@@ -650,7 +665,7 @@
$user_info['status'] = array(
'created_at' => api_date($lastwall['created']),
'id' => $lastwall['contact-id'],
- 'text' => strip_tags(bbcode($lastwall['body'])),
+ 'text' => html2plain(bbcode($lastwall['body']), 0),
'source' => (($lastwall['app']) ? $lastwall['app'] : 'web'),
'truncated' => false,
'in_reply_to_status_id' => $in_reply_to_status_id,
@@ -686,10 +701,17 @@
$count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
$page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
if ($page<0) $page=0;
- $since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
+ $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
+ $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
+ //$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
$start = $page*$count;
+ //$include_entities = (x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:false);
+
+ if ($max_id > 0)
+ $sql_extra = 'AND `item`.`id` <= '.intval($max_id);
+
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
@@ -722,6 +744,48 @@
api_register_func('api/statuses/home_timeline','api_statuses_home_timeline', true);
api_register_func('api/statuses/friends_timeline','api_statuses_home_timeline', true);
+ /**
+ *
+ */
+ function api_statuses_show(&$a, $type){
+ if (local_user()===false) return false;
+
+ $user_info = api_get_user($a);
+
+ // params
+ $id = intval($a->argv[3]);
+
+ logger('API: api_statuses_show: '.$id);
+
+ //$include_entities = (x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:false);
+
+ $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
+ `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
+ `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
+ `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
+ FROM `item`, `contact`
+ WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
+ AND `contact`.`id` = `item`.`contact-id`
+ AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ $sql_extra
+ AND `item`.`id`=%d",
+ intval($id)
+ );
+
+ $ret = api_format_items($r,$user_info);
+
+ $data = array('$status' => $ret[0]);
+ /*switch($type){
+ case "atom":
+ case "rss":
+ $data = api_rss_extra($a, $data, $user_info);
+ }*/
+ return api_apply_template("status", $type, $data);
+ }
+ api_register_func('api/statuses/show','api_statuses_show', true);
+
+ //api_register_func('api/statuses/mentions','api_statuses_mentions', true);
+ //api_register_func('api/statuses/replies','api_statuses_mentions', true);
function api_statuses_user_timeline(&$a, $type){
@@ -740,7 +804,8 @@
$count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
$page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
if ($page<0) $page=0;
- $since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
+ $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
+ //$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
$start = $page*$count;
@@ -846,33 +911,64 @@
foreach($r as $item) {
localize_item($item);
$status_user = (($item['cid']==$user_info['id'])?$user_info: api_item_get_user($a,$item));
+
+ if ($item['parent']!=$item['id']) {
+ $r = q("select id from item where parent=%s and id<%s order by id desc limit 1",
+ intval($item['parent']), intval($item['id']));
+ if ($r)
+ $in_reply_to_status_id = $r[0]['id'];
+ else
+ $in_reply_to_status_id = $item['parent'];
+
+ $r = q("select `item`.`contact-id`, `contact`.nick, `item`.`author-name` from item, contact
+ where `contact`.`id` = `item`.`contact-id` and `item`.id=%d", intval($in_reply_to_status_id));
+
+ $in_reply_to_screen_name = $r[0]['author-name'];
+ $in_reply_to_user_id = $r[0]['contact-id'];
+
+ } else {
+ $in_reply_to_screen_name = '';
+ $in_reply_to_user_id = 0;
+ $in_reply_to_status_id = 0;
+ }
+
$status = array(
+ 'text' => trim($item['title']." \n".html2plain(bbcode($item['body']), 0)),
+ 'truncated' => False,
'created_at'=> api_date($item['created']),
- 'published' => api_date($item['created']),
- 'updated' => api_date($item['edited']),
- 'id' => intval($item['id']),
- 'message_id' => $item['uri'],
- 'text' => strip_tags(bbcode($item['body'])),
- 'statusnet_html' => bbcode($item['body']),
+ 'in_reply_to_status_id' => $in_reply_to_status_id,
'source' => (($item['app']) ? $item['app'] : 'web'),
- 'url' => ($item['plink']!=''?$item['plink']:$item['author-link']),
- 'truncated' => False,
- 'in_reply_to_status_id' => ($item['parent']!=$item['id']? intval($item['parent']):''),
- 'in_reply_to_user_id' => '',
- 'favorited' => $item['starred'] ? true : false,
- 'in_reply_to_screen_name' => '',
+ 'id' => intval($item['id']),
+ 'in_reply_to_user_id' => $in_reply_to_user_id,
+ 'in_reply_to_screen_name' => $in_reply_to_screen_name,
'geo' => '',
- 'coordinates' => $item['coord'],
- 'place' => $item['location'],
- 'contributors' => '',
- 'annotations' => '',
- 'entities' => '',
+ 'favorited' => $item['starred'] ? true : false,
'user' => $status_user ,
- 'objecttype' => (($item['object-type']) ? $item['object-type'] : ACTIVITY_OBJ_NOTE),
- 'verb' => (($item['verb']) ? $item['verb'] : ACTIVITY_POST),
- 'self' => $a->get_baseurl()."/api/statuses/show/".$item['id'].".".$type,
- 'edit' => $a->get_baseurl()."/api/statuses/show/".$item['id'].".".$type,
+ 'statusnet_html' => bbcode($item['body']),
+ 'statusnet_conversation_id' => 0,
);
+
+ // Seesmic doesn't like the following content
+ if ($_SERVER['HTTP_USER_AGENT'] != 'Seesmic') {
+ $status2 = array(
+ 'updated' => api_date($item['edited']),
+ 'published' => api_date($item['created']),
+ 'message_id' => $item['uri'],
+ 'url' => ($item['plink']!=''?$item['plink']:$item['author-link']),
+ 'coordinates' => $item['coord'],
+ 'place' => $item['location'],
+ 'contributors' => '',
+ 'annotations' => '',
+ 'entities' => '',
+ 'objecttype' => (($item['object-type']) ? $item['object-type'] : ACTIVITY_OBJ_NOTE),
+ 'verb' => (($item['verb']) ? $item['verb'] : ACTIVITY_POST),
+ 'self' => $a->get_baseurl()."/api/statuses/show/".$item['id'].".".$type,
+ 'edit' => $a->get_baseurl()."/api/statuses/show/".$item['id'].".".$type,
+ );
+
+ $status = array_merge($status, $status2);
+ }
+
$ret[]=$status;
};
return $ret;
@@ -882,17 +978,31 @@
function api_account_rate_limit_status(&$a,$type) {
$hash = array(
+ 'reset_time_in_seconds' => strtotime('now + 1 hour'),
'remaining_hits' => (string) 150,
'hourly_limit' => (string) 150,
'reset_time' => datetime_convert('UTC','UTC','now + 1 hour',ATOM_TIME),
- 'reset_time_in_seconds' => strtotime('now + 1 hour')
);
+ if ($type == "xml")
+ $hash['resettime_in_seconds'] = $hash['reset_time_in_seconds'];
return api_apply_template('ratelimit', $type, array('$hash' => $hash));
}
api_register_func('api/account/rate_limit_status','api_account_rate_limit_status',true);
+ function api_help_test(&$a,$type) {
+
+ if ($type == 'xml')
+ $ok = "true";
+ else
+ $ok = "ok";
+
+ return api_apply_template('test', $type, array('$ok' => $ok));
+
+ }
+ api_register_func('api/help/test','api_help_test',true);
+
/**
* https://dev.twitter.com/docs/api/1/get/statuses/friends
* This function is deprecated by Twitter
@@ -1075,7 +1185,7 @@
'recipient_screen_name'=> $recipient['screen_name'],
'recipient'=> $recipient,
- 'text'=> $item['title']."\n".strip_tags(bbcode($item['body'])) ,
+ 'text'=> $item['title']."\n".html2plain(bbcode($item['body']), 0) ,
);
@@ -1144,7 +1254,7 @@
'recipient_screen_name'=> $recipient['screen_name'],
'recipient'=> $recipient,
- 'text'=> $item['title']."\n".strip_tags(bbcode($item['body'])) ,
+ 'text'=> $item['title']."\n".html2plain(bbcode($item['body']), 0) ,
);
@@ -1197,4 +1307,36 @@
api_register_func('api/oauth/request_token', 'api_oauth_request_token', false);
api_register_func('api/oauth/access_token', 'api_oauth_access_token', false);
-
+/*
+Not implemented by now:
+statuses/public_timeline
+statuses/mentions
+statuses/replies
+statuses/retweets_of_me
+statuses/destroy
+statuses/retweet
+friendships/create
+friendships/destroy
+friendships/exists
+friendships/show
+account/update_location
+account/update_profile_background_image
+account/update_profile_image
+favorites
+favorites/create
+favorites/destroy
+blocks/create
+blocks/destroy
+oauth/authorize
+
+Not implemented in status.net:
+statuses/retweeted_to_me
+statuses/retweeted_by_me
+direct_messages/destroy
+account/end_session
+account/update_delivery_device
+notifications/follow
+notifications/leave
+blocks/exists
+blocks/blocking
+*/
diff --git a/include/bbcode.php b/include/bbcode.php
index d69cb263f..9befbd0f7 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -189,8 +189,29 @@ function bbcode($Text,$preserve_nl = false) {
// Check for [code] text
$Text = preg_replace("/\[code\](.*?)\[\/code\]/ism","$CodeLayout", $Text);
+ // Declare the format for [spoiler] layout
+ $SpoilerLayout = '<blockquote class="spoiler">$1</blockquote>';
+
+ // Check for [spoiler] text
+ // handle nested quotes
+ $endlessloop = 0;
+ while ((strpos($Text, "[/spoiler]") !== false) and (strpos($Text, "[spoiler]") !== false) and (++$endlessloop < 20))
+ $Text = preg_replace("/\[spoiler\](.*?)\[\/spoiler\]/ism","$SpoilerLayout", $Text);
+
+ // Check for [spoiler=Author] text
+
+ $t_wrote = t('$1 wrote:');
+
+ // handle nested quotes
+ $endlessloop = 0;
+ while ((strpos($Text, "[/spoiler]")!== false) and (strpos($Text, "[spoiler=") !== false) and (++$endlessloop < 20))
+ $Text = preg_replace("/\[spoiler=[\"\']*(.*?)[\"\']*\](.*?)\[\/spoiler\]/ism",
+ "<br /><strong class=".'"spoiler"'.">" . $t_wrote . "</strong><blockquote class=".'"spoiler"'.">$2</blockquote>",
+ $Text);
+
// Declare the format for [quote] layout
$QuoteLayout = '<blockquote>$1</blockquote>';
+
// Check for [quote] text
// handle nested quotes
$endlessloop = 0;
@@ -205,7 +226,7 @@ function bbcode($Text,$preserve_nl = false) {
$endlessloop = 0;
while ((strpos($Text, "[/quote]")!== false) and (strpos($Text, "[quote=") !== false) and (++$endlessloop < 20))
$Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism",
- "<blockquote><strong>" . $t_wrote . "</strong> $2</blockquote>",
+ "<br /><strong class=".'"author"'.">" . $t_wrote . "</strong><blockquote class=".'"author"'.">$2</blockquote>",
$Text);
// [img=widthxheight]image source[/img]
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index 135a9e4e8..9d7085d20 100755
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -46,7 +46,7 @@ function networks_widget($baseurl,$selected = '') {
return '';
- $r = q("select distinct(network) from contact where uid = %d",
+ $r = q("select distinct(network) from contact where uid = %d and self = 0",
intval(local_user())
);
diff --git a/include/dba.php b/include/dba.php
index 5beea7a3a..138e82b58 100755
--- a/include/dba.php
+++ b/include/dba.php
@@ -207,7 +207,10 @@ function q($sql) {
unset($args[0]);
if($db && $db->connected) {
- $ret = $db->q(vsprintf($sql,$args));
+ $stmt = vsprintf($sql,$args);
+ if($stmt === false)
+ logger('dba: vsprintf error: ' . print_r(debug_bracktrace(),true));
+ $ret = $db->q($stmt);
return $ret;
}
diff --git a/include/diaspora.php b/include/diaspora.php
index 84d28a7ec..104ccadf2 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -688,9 +688,9 @@ function diaspora_post($importer,$xml) {
// don't link tags that are already embedded in links
- if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body))
+ if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body))
continue;
- if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body))
+ if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body))
continue;
$basetag = str_replace('_',' ',substr($tag,1));
@@ -853,9 +853,9 @@ function diaspora_reshare($importer,$xml) {
// don't link tags that are already embedded in links
- if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body))
+ if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body))
continue;
- if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body))
+ if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body))
continue;
@@ -1094,9 +1094,9 @@ function diaspora_comment($importer,$xml,$msg) {
// don't link tags that are already embedded in links
- if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body))
+ if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body))
continue;
- if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body))
+ if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body))
continue;
diff --git a/include/email.php b/include/email.php
index 8ea8145fb..b43ae0dc1 100755
--- a/include/email.php
+++ b/include/email.php
@@ -74,7 +74,7 @@ function email_msg_headers($mbox,$uid) {
}
-function email_get_msg($mbox,$uid) {
+function email_get_msg($mbox,$uid, $reply) {
$ret = array();
$struc = (($mbox && $uid) ? @imap_fetchstructure($mbox,$uid,FT_UID) : null);
@@ -114,7 +114,7 @@ function email_get_msg($mbox,$uid) {
$ret['body'] = removegpg($ret['body']);
$msg = removesig($ret['body']);
$ret['body'] = $msg['body'];
- $ret['body'] = convertquote($ret['body'], false);
+ $ret['body'] = convertquote($ret['body'], $reply);
if (trim($html) != '')
$ret['body'] = removelinebreak($ret['body']);
@@ -250,7 +250,7 @@ function email_header_encode($in_str, $charset) {
// remove trailing spacer and
// add start and end delimiters
- $spacer = preg_quote($spacer);
+ $spacer = preg_quote($spacer,'/');
$out_str = preg_replace("/" . $spacer . "$/", "", $out_str);
$out_str = $start . $out_str . $end;
}
diff --git a/include/html2plain.php b/include/html2plain.php
index 2a4cf6639..fe0e3326e 100644
--- a/include/html2plain.php
+++ b/include/html2plain.php
@@ -1,9 +1,15 @@
<?php
require_once "html2bbcode.php";
-function breaklines($line, $level)
+function breaklines($line, $level, $wraplength = 75)
{
- $wraplen = 75-$level;
+
+ if ($wraplength == 0)
+ $wraplength = 2000000;
+
+ // return($line);
+
+ $wraplen = $wraplength-$level;
$newlines = array();
@@ -37,7 +43,7 @@ function breaklines($line, $level)
return(implode($newlines, "\n"));
}
-function quotelevel($message)
+function quotelevel($message, $wraplength = 75)
{
$lines = explode("\n", $message);
@@ -65,12 +71,31 @@ function quotelevel($message)
}
if (!$startquote or ($line != ''))
- $newlines[] = breaklines($line, $currlevel);
+ $newlines[] = breaklines($line, $currlevel, $wraplength);
}
return(implode($newlines, "\n"));
}
-function html2plain($html)
+function collecturls($message) {
+ $pattern = '/<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
+ preg_match_all($pattern, $message, $result, PREG_SET_ORDER);
+
+ $urls = array();
+ foreach ($result as $treffer) {
+ // A list of some links that should be ignored
+ $list = array("/user/", "/tag/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
+ "//facebook.com/profile.php?id=", "//plus.google.com/");
+ foreach ($list as $listitem)
+ if (strpos($treffer[1], $listitem) !== false)
+ $ignore = true;
+
+ if (!$ignore)
+ $urls[$treffer[1]] = $treffer[1];
+ }
+ return($urls);
+}
+
+function html2plain($html, $wraplength = 75, $compact = false)
{
global $lang;
@@ -93,22 +118,16 @@ function html2plain($html)
$message = str_replace(array("\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"), array("<", ">", "<br>", " ", ""), $message);
$message = preg_replace('= [\s]*=i', " ", $message);
- // nach <a href="...">...</a> suchen, die ... miteinander vergleichen und bei Gleichheit durch ein einzelnes ... ersetzen.
- $pattern = '/<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
- preg_match_all($pattern, $message, $result, PREG_SET_ORDER);
+ // Collecting all links
+ $urls = collecturls($message);
- foreach ($result as $treffer) {
- if ($treffer[1] == $treffer[2]) {
- $search = '<a href="'.$treffer[1].'" target="_blank">'.$treffer[1].'</a>';
- $message = str_replace($search, $treffer[1], $message);
- }
- }
@$doc->loadHTML($message);
node2bbcode($doc, 'html', array(), '', '');
node2bbcode($doc, 'body', array(), '', '');
// MyBB-Auszeichnungen
+ /*
node2bbcode($doc, 'span', array('style'=>'text-decoration: underline;'), '_', '_');
node2bbcode($doc, 'span', array('style'=>'font-style: italic;'), '/', '/');
node2bbcode($doc, 'span', array('style'=>'font-weight: bold;'), '*', '*');
@@ -117,8 +136,12 @@ function html2plain($html)
node2bbcode($doc, 'b', array(), '*', '*');
node2bbcode($doc, 'i', array(), '/', '/');
node2bbcode($doc, 'u', array(), '_', '_');
+ */
- node2bbcode($doc, 'blockquote', array(), '[quote]', "[/quote]\n");
+ if ($compact)
+ node2bbcode($doc, 'blockquote', array(), "»", "«");
+ else
+ node2bbcode($doc, 'blockquote', array(), '[quote]', "[/quote]\n");
node2bbcode($doc, 'br', array(), "\n", '');
@@ -143,16 +166,25 @@ function html2plain($html)
node2bbcode($doc, 'h5', array(), "\n\n*", "*\n");
node2bbcode($doc, 'h6', array(), "\n\n*", "*\n");
- node2bbcode($doc, 'a', array('href'=>'/(.+)/'), ' $1', '', true);
- node2bbcode($doc, 'img', array('alt'=>'/(.+)/'), '$1', '');
- node2bbcode($doc, 'img', array('title'=>'/(.+)/'), '$1', '');
- node2bbcode($doc, 'img', array(), '', '');
- node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '[img]$1', '[/img]');
+ // Problem: there is no reliable way to detect if it is a link to a tag or profile
+ //node2bbcode($doc, 'a', array('href'=>'/(.+)/'), ' $1 ', '', true);
+ node2bbcode($doc, 'a', array('href'=>'/(.+)/', 'rel'=>'oembed'), ' $1 ', '', true);
+ //node2bbcode($doc, 'img', array('alt'=>'/(.+)/'), '$1', '');
+ //node2bbcode($doc, 'img', array('title'=>'/(.+)/'), '$1', '');
+ //node2bbcode($doc, 'img', array(), '', '');
+ if (!$compact)
+ node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '[img]$1', '[/img]');
+ else
+ node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '', '');
+
+ node2bbcode($doc, 'iframe', array('src'=>'/(.+)/'), ' $1 ', '', true);
$message = $doc->saveHTML();
- $message = str_replace("[img]", "", $message);
- $message = str_replace("[/img]", "", $message);
+ if (!$compact) {
+ $message = str_replace("[img]", "", $message);
+ $message = str_replace("[/img]", "", $message);
+ }
// was ersetze ich da?
// Irgendein stoerrisches UTF-Zeug
@@ -168,12 +200,20 @@ function html2plain($html)
$message = html_entity_decode($message, ENT_QUOTES, 'UTF-8');
+ if (!$compact) {
+ $counter = 1;
+ foreach ($urls as $id=>$url)
+ if (strpos($message, $url) == false)
+ $message .= "\n".$url." ";
+ //$message .= "\n[".($counter++)."] ".$url;
+ }
+
do {
$oldmessage = $message;
$message = str_replace("\n\n\n", "\n\n", $message);
} while ($oldmessage != $message);
- $message = quotelevel(trim($message));
+ $message = quotelevel(trim($message), $wraplength);
return(trim($message));
}
diff --git a/include/items.php b/include/items.php
index 2eecadad1..9f7eb84d9 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1090,12 +1090,23 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$postvars = array();
$sent_dfrn_id = hex2bin((string) $res->dfrn_id);
$challenge = hex2bin((string) $res->challenge);
+ $perm = (($res->perm) ? $res->perm : null);
$dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0);
$rino_allowed = ((intval($res->rino) === 1) ? 1 : 0);
$page = (($owner['page-flags'] == PAGE_COMMUNITY) ? 1 : 0);
$final_dfrn_id = '';
+ if($perm) {
+ if((($perm == 'rw') && (! intval($contact['writable'])))
+ || (($perm == 'r') && (intval($contact['writable'])))) {
+ q("update contact set writable = %d where id = %d limit 1",
+ intval(($perm == 'rw') ? 1 : 0),
+ intval($contact['id'])
+ );
+ $contact['writable'] = (string) 1 - intval($contact['writable']);
+ }
+ }
if(($contact['duplex'] && strlen($contact['pubkey']))
|| ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
diff --git a/include/msgclean.php b/include/msgclean.php
index 284ad1ce4..eabb47788 100644
--- a/include/msgclean.php
+++ b/include/msgclean.php
@@ -13,7 +13,7 @@ function savereplace($pattern, $replace, $text)
function unifyattributionline($message)
{
- $quotestr = array('quote', 'collapsed');
+ $quotestr = array('quote', 'spoiler');
foreach ($quotestr as $quote) {
$message = savereplace('/----- Original Message -----\s.*?From: "([^<"].*?)" <(.*?)>\s.*?To: (.*?)\s*?Cc: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message);
diff --git a/include/poller.php b/include/poller.php
index 8262c1d60..90a97867c 100755
--- a/include/poller.php
+++ b/include/poller.php
@@ -504,7 +504,12 @@ function poller_run($argv, $argc){
//$datarray['title'] = notags(trim($meta->subject));
$datarray['created'] = datetime_convert('UTC','UTC',$meta->date);
- $r = email_get_msg($mbox,$msg_uid);
+ // Is it reply?
+ $reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") or
+ (substr(strtolower($datarray['title']), 0, 3) == "re-") or
+ (raw_refs != ""));
+
+ $r = email_get_msg($mbox,$msg_uid, $reply);
if(! $r) {
logger("Mail: can't fetch msg ".$msg_uid);
continue;
diff --git a/include/quoteconvert.php b/include/quoteconvert.php
index 3aee93234..2a6d28370 100644
--- a/include/quoteconvert.php
+++ b/include/quoteconvert.php
@@ -124,7 +124,7 @@ function removetofu($message)
}
if ($quotestart != 0) {
- $message = trim(substr($message, 0, $quotestart))."\n[collapsed]\n".substr($message, $quotestart+7, -8).'[/collapsed]';
+ $message = trim(substr($message, 0, $quotestart))."\n[spoiler]".substr($message, $quotestart+7, -8).'[/spoiler]';
}
return($message);
diff --git a/include/text.php b/include/text.php
index 6f66cef65..6d557ed84 100644
--- a/include/text.php
+++ b/include/text.php
@@ -940,6 +940,36 @@ function prepare_body($item,$attach = false) {
$s .= '<div class="filesavetags"><span>' . t('Filed under:') . ' </span>' . $x . '</div>';
}
+ // Look for spoiler
+ $spoilersearch = '<blockquote class="spoiler">';
+
+ // Remove line breaks before the spoiler
+ while ((strpos($s, "\n".$spoilersearch) !== false))
+ $s = str_replace("\n".$spoilersearch, $spoilersearch, $s);
+ while ((strpos($s, "<br />".$spoilersearch) !== false))
+ $s = str_replace("<br />".$spoilersearch, $spoilersearch, $s);
+
+ while ((strpos($s, $spoilersearch) !== false)) {
+
+ $pos = strpos($s, $spoilersearch);
+ $rnd = random_string(8);
+ $spoilerreplace = '<br /> <span id="spoiler-wrap-'.$rnd.'" style="white-space:nowrap;" class="fakelink" onclick="openClose(\'spoiler-'.$rnd.'\');">'.sprintf(t('Click to open/close')).'</span>'.
+ '<blockquote class="spoiler" id="spoiler-'.$rnd.'" style="display: none;">';
+ $s = substr($s, 0, $pos).$spoilerreplace.substr($s, $pos+strlen($spoilersearch));
+ }
+
+ // Look for quote with author
+ $authorsearch = '<blockquote class="author">';
+
+ while ((strpos($s, $authorsearch) !== false)) {
+
+ $pos = strpos($s, $authorsearch);
+ $rnd = random_string(8);
+ $authorreplace = '<br /> <span id="author-wrap-'.$rnd.'" style="white-space:nowrap;" class="fakelink" onclick="openClose(\'author-'.$rnd.'\');">'.sprintf(t('Click to open/close')).'</span>'.
+ '<blockquote class="author" id="author-'.$rnd.'" style="display: block;">';
+ $s = substr($s, 0, $pos).$authorreplace.substr($s, $pos+strlen($authorsearch));
+ }
+
$prep_arr = array('item' => $item, 'html' => $s);
call_hooks('prepare_body_final', $prep_arr);
@@ -1300,6 +1330,7 @@ function file_tag_save_file($uid,$item,$file) {
$saved = get_pconfig($uid,'system','filetags');
if((! strlen($saved)) || (! stristr($saved,'[' . file_tag_encode($file) . ']')))
set_pconfig($uid,'system','filetags',$saved . '[' . file_tag_encode($file) . ']');
+ info( t('Item filed') );
}
return true;
}
diff --git a/index.php b/index.php
index 5f6d74adb..0916ed8b1 100755
--- a/index.php
+++ b/index.php
@@ -342,13 +342,13 @@ $profile = $a->profile;
header("Content-type: text/html; charset=utf-8");
-$template = 'view/' . $lang . '/'
+$template = 'view/' . current_theme() . '/'
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
if(file_exists($template))
require_once($template);
else
- require_once(str_replace($lang . '/', '', $template));
+ require_once(str_replace(current_theme() . '/', '', $template));
session_write_close();
exit;
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 71860ac3b..8e4ce0671 100755
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -158,6 +158,7 @@ function dfrn_notify_post(&$a) {
);
}
+
logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']);
logger('dfrn_notify: data: ' . $data, LOGGER_DATA);
@@ -174,6 +175,13 @@ function dfrn_notify_post(&$a) {
}
+
+ // If we are setup as a soapbox we aren't accepting input from this person
+
+ if($importer['page-flags'] == PAGE_SOAPBOX)
+ xml_status(0);
+
+
if(strlen($key)) {
$rawkey = hex2bin(trim($key));
logger('rino: md5 raw key: ' . md5($rawkey));
@@ -261,7 +269,7 @@ function dfrn_notify_content(&$a) {
break; // NOTREACHED
}
- $r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
+ $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`page-flags` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `user`.`nickname` = '%s'
AND `user`.`account_expired` = 0 $sql_extra LIMIT 1",
dbesc($a->argv[1])
@@ -299,6 +307,12 @@ function dfrn_notify_content(&$a) {
if(! $rino_enable)
$rino = 0;
+ if((($r[0]['rel']) && ($r[0]['rel'] != CONTACT_IS_SHARING)) || ($r[0]['page-flags'] == PAGE_COMMUNITY)) {
+ $perm = 'rw';
+ }
+ else {
+ $perm = 'r';
+ }
header("Content-type: text/xml");
@@ -306,7 +320,8 @@ function dfrn_notify_content(&$a) {
. '<dfrn_notify>' . "\r\n"
. "\t" . '<status>' . $status . '</status>' . "\r\n"
. "\t" . '<dfrn_version>' . DFRN_PROTOCOL_VERSION . '</dfrn_version>' . "\r\n"
- . "\t" . '<rino>' . $rino . '</rino>' . "\r\n"
+ . "\t" . '<rino>' . $rino . '</rino>' . "\r\n"
+ . "\t" . '<perm>' . $perm . '</perm>' . "\r\n"
. "\t" . '<dfrn_id>' . $encrypted_id . '</dfrn_id>' . "\r\n"
. "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
. '</dfrn_notify>' . "\r\n" ;
diff --git a/mod/filer.php b/mod/filer.php
index a9e213536..82537848b 100755
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -16,8 +16,20 @@ function filer_content(&$a) {
logger('filer: tag ' . $term . ' item ' . $item_id);
- if($item_id && strlen($term))
+ if($item_id && strlen($term)){
+ // file item
file_tag_save_file(local_user(),$item_id,$term);
-
+ } else {
+ // return filer dialog
+ $filetags = get_pconfig(local_user(),'system','filetags');
+ $filetags = explode("][", trim($filetags,"[]"));
+ $tpl = get_markup_template("filer_dialog.tpl");
+ $o = replace_macros($tpl, array(
+ '$field' => array('term', t("File as:"), '', '', $filetags, t('- select -')),
+ '$submit' => t('Save'),
+ ));
+
+ echo $o;
+ }
killme();
}
diff --git a/mod/item.php b/mod/item.php
index 5baae2bde..24730f53e 100755
--- a/mod/item.php
+++ b/mod/item.php
@@ -171,13 +171,13 @@ function item_post(&$a) {
$str_contact_allow = $orig_post['allow_cid'];
$str_group_deny = $orig_post['deny_gid'];
$str_contact_deny = $orig_post['deny_cid'];
- $title = $orig_post['title'];
$location = $orig_post['location'];
$coord = $orig_post['coord'];
$verb = $orig_post['verb'];
$emailcc = $orig_post['emailcc'];
$app = $orig_post['app'];
$categories = $orig_post['file'];
+ $title = notags(trim($_REQUEST['title']));
$body = escape_tags(trim($_REQUEST['body']));
$private = $orig_post['private'];
$pubmail_enable = $orig_post['pubmail'];
diff --git a/mod/message.php b/mod/message.php
index 8991f643d..949e5616c 100755
--- a/mod/message.php
+++ b/mod/message.php
@@ -3,6 +3,35 @@
require_once('include/acl_selectors.php');
require_once('include/message.php');
+function message_init(&$a) {
+ $tabs = array(
+ /*
+ array(
+ 'label' => t('All'),
+ 'url'=> $a->get_baseurl(true) . '/message',
+ 'sel'=> ($a->argc == 1),
+ ),
+ array(
+ 'label' => t('Sent'),
+ 'url' => $a->get_baseurl(true) . '/message/sent',
+ 'sel'=> ($a->argv[1] == 'sent'),
+ ),
+ */
+ );
+ $new = array(
+ 'label' => t('New Message'),
+ 'url' => $a->get_baseurl(true) . '/message/new',
+ 'sel'=> ($a->argv[1] == 'new'),
+ );
+
+ $tpl = get_markup_template('message_side.tpl');
+ $a->page['aside'] = replace_macros($tpl, array(
+ '$tabs'=>$tabs,
+ '$new'=>$new,
+ ));
+
+}
+
function message_post(&$a) {
if(! local_user()) {
@@ -66,25 +95,7 @@ function message_content(&$a) {
$myprofile = $a->get_baseurl(true) . '/profile/' . $a->user['nickname'];
- $tabs = array(
- array(
- 'label' => t('Inbox'),
- 'url'=> $a->get_baseurl(true) . '/message',
- 'sel'=> (($a->argc == 1) ? 'active' : ''),
- ),
- array(
- 'label' => t('Outbox'),
- 'url' => $a->get_baseurl(true) . '/message/sent',
- 'sel'=> (($a->argv[1] == 'sent') ? 'active' : ''),
- ),
- array(
- 'label' => t('New Message'),
- 'url' => $a->get_baseurl(true) . '/message/new',
- 'sel'=> (($a->argv[1] == 'new') ? 'active' : ''),
- ),
- );
- $tpl = get_markup_template('common_tabs.tpl');
- $tab_content = replace_macros($tpl, array('$tabs'=>$tabs));
+
$tpl = get_markup_template('mail_head.tpl');
@@ -186,9 +197,9 @@ function message_content(&$a) {
$o .= $header;
if($a->argc == 2)
- $eq = '='; // I'm not going to bother escaping this.
+ $eq = sprintf( "AND `from-url` = '%s'", dbesc($myprofile));
else
- $eq = '!='; // or this.
+ $eq = '';
$r = q("SELECT count(*) AS `total` FROM `mail`
WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `created` DESC",
@@ -199,11 +210,12 @@ function message_content(&$a) {
$a->set_pager_total($r[0]['total']);
$r = q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`,
- `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`
+ `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`,
+ count( * ) as count
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
- WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
+ WHERE `mail`.`uid` = %d $eq GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
intval(local_user()),
- dbesc($myprofile),
+ //
intval($a->pager['start']),
intval($a->pager['itemspage'])
);
@@ -214,9 +226,15 @@ function message_content(&$a) {
$tpl = get_markup_template('mail_list.tpl');
foreach($r as $rr) {
+ if ($rr['from-url'] == $myprofile){
+ $partecipants = sprintf( t("You and %s"), $rr['name']);
+ } else {
+ $partecipants = sprintf( t("%s and You"), $rr['from-name']);
+ }
+
$o .= replace_macros($tpl, array(
'$id' => $rr['id'],
- '$from_name' =>$rr['from-name'],
+ '$from_name' => $partecipants,
'$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl(true) . '/redir/' . $rr['contact-id'] : $rr['url']),
'$sparkle' => ' sparkle',
'$from_photo' => $rr['thumb'],
@@ -224,7 +242,9 @@ function message_content(&$a) {
'$delete' => t('Delete conversation'),
'$body' => template_escape($rr['body']),
'$to_name' => template_escape($rr['name']),
- '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A'))
+ '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A')),
+ '$seen' => $rr['mailseen'],
+ '$count' => sprintf( tt('%d message', '%d messages', $rr['count']), $rr['count']),
));
}
$o .= paginate($a);
@@ -278,7 +298,8 @@ function message_content(&$a) {
));
- $tpl = get_markup_template('mail_conv.tpl');
+ $mails = array();
+ $seen = 0;
foreach($messages as $message) {
if($message['from-url'] == $myprofile) {
$from_url = $myprofile;
@@ -288,24 +309,35 @@ function message_content(&$a) {
$from_url = $a->get_baseurl(true) . '/redir/' . $message['contact-id'];
$sparkle = ' sparkle';
}
- $o .= replace_macros($tpl, array(
- '$id' => $message['id'],
- '$from_name' => template_escape($message['from-name']),
- '$from_url' => $from_url,
- '$sparkle' => $sparkle,
- '$from_photo' => $message['from-photo'],
- '$subject' => template_escape($message['title']),
- '$body' => template_escape(smilies(bbcode($message['body']))),
- '$delete' => t('Delete message'),
- '$to_name' => template_escape($message['name']),
- '$date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A')
- ));
+ $mails[] = array(
+ 'id' => $message['id'],
+ 'from_name' => template_escape($message['from-name']),
+ 'from_url' => $from_url,
+ 'sparkle' => $sparkle,
+ 'from_photo' => $message['from-photo'],
+ 'subject' => template_escape($message['title']),
+ 'body' => template_escape(smilies(bbcode($message['body']))),
+ 'delete' => t('Delete message'),
+ 'to_name' => template_escape($message['name']),
+ 'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A'),
+ );
+ $seen = $message['seen'];
}
$select = $message['name'] . '<input type="hidden" name="messageto" value="' . $contact_id . '" />';
$parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
- $tpl = get_markup_template('prv_message.tpl');
- $o .= replace_macros($tpl,array(
+
+
+ $tpl = get_markup_template('mail_display.tpl');
+ $o = replace_macros($tpl, array(
+ '$thread_id' => $a->argv[1],
+ '$thread_subject' => $message['title'],
+ '$thread_seen' => $seen,
+ '$delete' => t('Delete conversation'),
+
+ '$mails' => $mails,
+
+ // reply
'$header' => t('Send Reply'),
'$to' => t('To:'),
'$subject' => t('Subject:'),
@@ -318,6 +350,7 @@ function message_content(&$a) {
'$upload' => t('Upload photo'),
'$insert' => t('Insert web link'),
'$wait' => t('Please wait')
+
));
return $o;
diff --git a/mod/ping.php b/mod/ping.php
index 1562254b1..e911aaf1f 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -22,6 +22,7 @@ function ping_init(&$a) {
and seen = 0 order by date desc limit 0, 50",
intval(local_user())
);
+ $sysnotify = $t[0]['total'];
}
else {
$z1 = q("select * from notify where uid = %d
@@ -35,6 +36,7 @@ function ping_init(&$a) {
intval(50 - intval($t[0]['total']))
);
$z = array_merge($z1,$z2);
+ $sysnotify = 0; // we will update this in a moment
}
@@ -147,13 +149,12 @@ function ping_init(&$a) {
$tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
require_once('include/bbcode.php');
- $sysnotify = 0;
if($firehose) {
echo ' <notif count="'.$tot.'">';
}
else {
- if(count($z)) {
+ if(count($z) && (! $sysnotify)) {
foreach($z as $zz) {
if($zz['seen'] == 0)
$sysnotify ++;
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index d1fd08eba..ace8dadd4 100755
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -151,7 +151,7 @@ function profile_photo_content(&$a) {
return;
};
- check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
+// check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
$resource_id = $a->argv[2];
//die(":".local_user());
diff --git a/mod/settings.php b/mod/settings.php
index 99bf8842d..db7330fb5 100755
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -618,7 +618,7 @@ function settings_content(&$a) {
'$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
'$mail_server' => array('mail_server', t('IMAP server name:'), $mail_server, ''),
'$mail_port' => array('mail_port', t('IMAP port:'), $mail_port, ''),
- '$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
+ '$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( 'notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
'$mail_user' => array('mail_user', t('Email login name:'), $mail_user, ''),
'$mail_pass' => array('mail_pass', t('Email password:'), '', ''),
'$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'),
diff --git a/mod/viewsrc.php b/mod/viewsrc.php
index 94847ec7b..3fa4eaed5 100755
--- a/mod/viewsrc.php
+++ b/mod/viewsrc.php
@@ -25,7 +25,12 @@ function viewsrc_content(&$a) {
);
if(count($r))
- $o .= str_replace("\n",'<br />',$r[0]['body']);
+ if(is_ajax()) {
+ echo str_replace("\n",'<br />',$r[0]['body']);
+ killme();
+ } else {
+ $o .= str_replace("\n",'<br />',$r[0]['body']);
+ }
return $o;
}
diff --git a/view/api_ratelimit_xml.tpl b/view/api_ratelimit_xml.tpl
index 42439f8b5..36ec1993d 100755
--- a/view/api_ratelimit_xml.tpl
+++ b/view/api_ratelimit_xml.tpl
@@ -1,5 +1,6 @@
<hash>
- <remaining-hits type="integer">$hash.remaining_hits</remaining-hits>
- <hourly-limit type="integer">$hash.hourly_limit</hourly-limit>
- <reset-time type="datetime">$hash.reset_time</reset-time>
-</hash> \ No newline at end of file
+ <remaining-hits type="integer">$hash.remaining_hits</remaining-hits>
+ <hourly-limit type="integer">$hash.hourly_limit</hourly-limit>
+ <reset-time type="datetime">$hash.reset_time</reset-time>
+ <reset_time_in_seconds type="integer">$hash.resettime_in_seconds</reset_time_in_seconds>
+</hash>
diff --git a/view/api_user_xml.tpl b/view/api_user_xml.tpl
index 78cc1f530..f1e122f3e 100755
--- a/view/api_user_xml.tpl
+++ b/view/api_user_xml.tpl
@@ -43,4 +43,4 @@
<place>$user.status.place</place>
<contributors>$user.status.contributors</contributors>
{{ endif }}</status>
-</user> \ No newline at end of file
+</user>
diff --git a/view/contact_head.tpl b/view/contact_head.tpl
index c7de390af..a76293a68 100755
--- a/view/contact_head.tpl
+++ b/view/contact_head.tpl
@@ -13,8 +13,8 @@ tinyMCE.init({
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
- theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle",
- content_css : "bbcode.css",
+ theme_advanced_styles : "blockquote,code",
+ gecko_spellcheck : true,
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
diff --git a/view/event_head.tpl b/view/event_head.tpl
index 498ac9941..97201e722 100755
--- a/view/event_head.tpl
+++ b/view/event_head.tpl
@@ -74,6 +74,7 @@ tinyMCE.init({
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_blockformats : "blockquote,code",
+ gecko_spellcheck : true,
paste_text_sticky : true,
entity_encoding : "raw",
add_unload_trigger : false,
diff --git a/view/field_combobox.tpl b/view/field_combobox.tpl
new file mode 100644
index 000000000..658133071
--- /dev/null
+++ b/view/field_combobox.tpl
@@ -0,0 +1,18 @@
+
+ <div class='field combobox'>
+ <label for='id_$field.0'>$field.1</label>
+ {# html5 don't work on Chrome, Safari and IE9
+ <input id="id_$field.0" type="text" list="data_$field.0" >
+ <datalist id="data_$field.0" >
+ {{ for $field.4 as $opt=>$val }}<option value="$val">{{ endfor }}
+ </datalist> #}
+
+ <input id="id_$field.0" type="text" value="$field.2">
+ <select id="select_$field.0" onChange="$('#id_$field.0').val($(this).val())">
+ <option value="">$field.5</option>
+ {{ for $field.4 as $opt=>$val }}<option value="$val">$val</option>{{ endfor }}
+ </select>
+
+ <span class='field_help'>$field.3</span>
+ </div>
+
diff --git a/view/filer_dialog.tpl b/view/filer_dialog.tpl
new file mode 100644
index 000000000..ae837d6b7
--- /dev/null
+++ b/view/filer_dialog.tpl
@@ -0,0 +1,4 @@
+{{ inc field_combobox.tpl }}{{ endinc }}
+<div class="settings-submit-wrapper" >
+ <input id="filer_save" type="button" class="settings-submit" value="$submit" />
+</div>
diff --git a/view/jot-header.tpl b/view/jot-header.tpl
index ef760abe0..67e5eb681 100755
--- a/view/jot-header.tpl
+++ b/view/jot-header.tpl
@@ -11,6 +11,7 @@ function initEditor(cb){
if(plaintext == 'none') {
$("#profile-jot-text-loading").hide();
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
+ $("#profile-jot-text").contact_autocomplete(baseurl+"/acl");
editor = true;
$("a#jot-perms-icon").fancybox({
'transitionIn' : 'elastic',
@@ -32,6 +33,7 @@ function initEditor(cb){
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_blockformats : "blockquote,code",
+ gecko_spellcheck : true,
paste_text_sticky : true,
entity_encoding : "raw",
add_unload_trigger : false,
@@ -262,15 +264,36 @@ function enableOnUser(){
}
function itemFiler(id) {
- reply = prompt("$fileas");
- if(reply && reply.length) {
- commentBusy = true;
- $('body').css('cursor', 'wait');
- $.get('filer/' + id + '?term=' + reply);
- if(timer) clearTimeout(timer);
- timer = setTimeout(NavUpdate,3000);
- liking = 1;
- }
+
+ var bordercolor = $("input").css("border-color");
+
+ $.get('filer/', function(data){
+ $.fancybox(data);
+ $("#id_term").keypress(function(){
+ $(this).css("border-color",bordercolor);
+ })
+ $("#select_term").change(function(){
+ $("#id_term").css("border-color",bordercolor);
+ })
+
+ $("#filer_save").click(function(e){
+ e.preventDefault();
+ reply = $("#id_term").val();
+ if(reply && reply.length) {
+ commentBusy = true;
+ $('body').css('cursor', 'wait');
+ $.get('filer/' + id + '?term=' + reply);
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(NavUpdate,3000);
+ liking = 1;
+ $.fancybox.close();
+ } else {
+ $("#id_term").css("border-color","#FF0000");
+ }
+ return false;
+ });
+ });
+
}
function jotClearLocation() {
diff --git a/view/mail_conv.tpl b/view/mail_conv.tpl
index ed36a7bb2..75a4506f6 100755
--- a/view/mail_conv.tpl
+++ b/view/mail_conv.tpl
@@ -1,13 +1,13 @@
<div class="mail-conv-outside-wrapper">
<div class="mail-conv-sender" >
- <a href="$from_url" class="mail-conv-sender-url" ><img class="mframe mail-conv-sender-photo$sparkle" src="$from_photo" heigth="80" width="80" alt="$from_name" /></a>
+ <a href="$mail.from_url" class="mail-conv-sender-url" ><img class="mframe mail-conv-sender-photo$mail.sparkle" src="$mail.from_photo" heigth="80" width="80" alt="$mail.from_name" /></a>
</div>
<div class="mail-conv-detail" >
- <div class="mail-conv-sender-name" >$from_name</div>
- <div class="mail-conv-date">$date</div>
- <div class="mail-conv-subject">$subject</div>
- <div class="mail-conv-body">$body</div>
- <div class="mail-conv-delete-wrapper" id="mail-conv-delete-wrapper-$id" ><a href="message/drop/$id" class="icon drophide delete-icon mail-list-delete-icon" onclick="return confirmDelete();" title="$delete" id="mail-conv-delete-icon-$id" class="mail-conv-delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></div><div class="mail-conv-delete-end"></div>
+ <div class="mail-conv-sender-name" >$mail.from_name</div>
+ <div class="mail-conv-date">$mail.date</div>
+ <div class="mail-conv-subject">$mail.subject</div>
+ <div class="mail-conv-body">$mail.body</div>
+ <div class="mail-conv-delete-wrapper" id="mail-conv-delete-wrapper-$mail.id" ><a href="message/drop/$mail.id" class="icon drophide delete-icon mail-list-delete-icon" onclick="return confirmDelete();" title="$mail.delete" id="mail-conv-delete-icon-$mail.id" class="mail-conv-delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></div><div class="mail-conv-delete-end"></div>
<div class="mail-conv-outside-wrapper-end"></div>
</div>
</div>
diff --git a/view/mail_display.tpl b/view/mail_display.tpl
new file mode 100644
index 000000000..69c7e0722
--- /dev/null
+++ b/view/mail_display.tpl
@@ -0,0 +1,6 @@
+
+{{ for $mails as $mail }}
+ {{ inc mail_conv.tpl }}{{endinc}}
+{{ endfor }}
+
+{{ inc prv_message.tpl }}{{ endinc }}
diff --git a/view/message_side.tpl b/view/message_side.tpl
new file mode 100644
index 000000000..fce771bd5
--- /dev/null
+++ b/view/message_side.tpl
@@ -0,0 +1,10 @@
+<div id="message-sidebar" class="widget">
+ <div id="message-new"><a href="$new.url" class="{{ if $new.sel }}newmessage-selected{{ endif }}">$new.label</a> </div>
+
+ <ul class="message-ul">
+ {{ for $tabs as $t }}
+ <li class="tool"><a href="$t.url" class="message-link{{ if $t.sel }}message-selected{{ endif }}">$t.label</a></li>
+ {{ endfor }}
+ </ul>
+
+</div>
diff --git a/view/msg-header.tpl b/view/msg-header.tpl
index 098333893..2d1ea7a61 100755
--- a/view/msg-header.tpl
+++ b/view/msg-header.tpl
@@ -16,6 +16,7 @@ if(plaintext != 'none') {
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_blockformats : "blockquote,code",
+ gecko_spellcheck : true,
paste_text_sticky : true,
entity_encoding : "raw",
add_unload_trigger : false,
@@ -40,6 +41,9 @@ if(plaintext != 'none') {
}
});
}
+else
+ $("#prvmail-text").contact_autocomplete(baseurl+"/acl");
+
</script>
<script type="text/javascript" src="js/ajaxupload.js" ></script>
diff --git a/view/profed_head.tpl b/view/profed_head.tpl
index e1df2c4ad..a3267d591 100755
--- a/view/profed_head.tpl
+++ b/view/profed_head.tpl
@@ -13,6 +13,7 @@ tinyMCE.init({
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_blockformats : "blockquote,code",
+ gecko_spellcheck : true,
paste_text_sticky : true,
entity_encoding : "raw",
add_unload_trigger : false,
diff --git a/view/theme/diabook-blue/communityhome.tpl b/view/theme/diabook-blue/communityhome.tpl
index 748e6d077..fa8197dd4 100755
--- a/view/theme/diabook-blue/communityhome.tpl
+++ b/view/theme/diabook-blue/communityhome.tpl
@@ -1,17 +1,22 @@
+<div id="close_pages">
{{ if $page }}
<div>$page</div>
{{ endif }}
+</div>
+<div id="close_helpers">
{{ if $lastusers_title }}
-<h3 style="margin-top:0px;">Help or @NewHere ?</h3>
+<h3 style="margin-top:0px;">Help or @NewHere ?<a id="close_helpers_icon" onClick="close_helpers()" class="icon close_box" title="close"></a></h3>
<a href="https://helpers.pyxis.uberspace.de/profile/helpers" style="margin-left: 10px; " title="Friendica Support" target="blank">Friendica Support</a><br>
<a href="https://letstalk.pyxis.uberspace.de/profile/letstalk" style="margin-left: 10px; " title="Let's talk" target="blank">Let's talk</a><br>
<a href="http://newzot.hydra.uberspace.de/profile/newzot" title="Local Friendica" style="margin-left: 10px; " target="blank">Local Friendica</a>
<a href="http://kakste.com/profile/newhere" title="#NewHere" style="margin-left: 10px; " target="blank">NewHere</a>
{{ endif }}
+</div>
+<div id="close_services">
{{ if $lastusers_title }}
-<h3>Connectable Services</h3>
+<h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3>
<div id="right_service_icons" style="margin-left: 11px; margin-top: 5px;">
<a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook-blue/icons/facebook.png" title="Facebook"></a>
<a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook-blue/icons/StatusNet.png?" title="StatusNet"></a>
@@ -23,28 +28,36 @@
<a href="$url/settings/connectors"><img alt="E-Mail" src="view/theme/diabook-blue/icons/email.png?" title="E-Mail"></a>
</div>
{{ endif }}
+</div>
+<div id="close_friends">
{{ if $nv }}
-<h3>Find Friends</h3>
+<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a>
<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nav.invite.3" >$nv.invite.1</a>
{{ endif }}
+</div>
+<div id="close_postit">
{{ if $lastusers_title }}
-<h3>PostIt to Friendica</h3>
+<h3>PostIt to Friendica<a id="close_postit_icon" onClick="close_postit()" class="icon close_box" title="close"></a></h3>
<div style="padding-left: 8px;"><span ><a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking the Link.</span></div>
{{ endif }}
+</div>
+<div id="close_lastusers">
{{ if $lastusers_title }}
-<h3>$lastusers_title</h3>
+<h3>$lastusers_title<a id="close_lastusers_icon" onClick="close_lastusers()" class="icon close_box" title="close"></a></h3>
<div id='lastusers-wrapper' class='items-wrapper'>
{{ for $lastusers_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
+</div>
+
{{ if $activeusers_title }}
<h3>$activeusers_title</h3>
@@ -55,21 +68,24 @@
</div>
{{ endif }}
+<div id="close_lastphotos">
{{ if $photos_title }}
-<h3>$photos_title</h3>
+<h3>$photos_title<a id="close_photos_icon" onClick="close_lastphotos()" class="icon close_box" title="close"></a></h3>
<div id='ra-photos-wrapper' class='items-wrapper'>
{{ for $photos_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
+</div>
-
+<div id="close_lastlikes">
{{ if $like_title }}
-<h3>$like_title</h3>
+<h3>$like_title<a id="close_lastlikes_icon" onClick="close_lastlikes()" class="icon close_box" title="close"></a></h3>
<ul id='likes'>
{{ for $like_items as $i }}
<li id='ra-photos-wrapper'>$i</li>
{{ endfor }}
</ul>
{{ endif }}
+</div>
diff --git a/view/theme/diabook-blue/icons/close_box.png b/view/theme/diabook-blue/icons/close_box.png
new file mode 100755
index 000000000..28e2675b8
--- /dev/null
+++ b/view/theme/diabook-blue/icons/close_box.png
Binary files differ
diff --git a/view/theme/diabook-blue/js/jquery.cookie.js b/view/theme/diabook-blue/js/jquery.cookie.js
new file mode 100644
index 000000000..6d5974a2c
--- /dev/null
+++ b/view/theme/diabook-blue/js/jquery.cookie.js
@@ -0,0 +1,47 @@
+/*!
+ * jQuery Cookie Plugin
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2011, Klaus Hartl
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.opensource.org/licenses/GPL-2.0
+ */
+(function($) {
+ $.cookie = function(key, value, options) {
+
+ // key and at least value given, set cookie...
+ if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
+ options = $.extend({}, options);
+
+ if (value === null || value === undefined) {
+ options.expires = -1;
+ }
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setDate(t.getDate() + days);
+ }
+
+ value = String(value);
+
+ return (document.cookie = [
+ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // key and possibly options given, get cookie...
+ options = value || {};
+ var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
+
+ var pairs = document.cookie.split('; ');
+ for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
+ if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
+ }
+ return null;
+ };
+})(jQuery);
diff --git a/view/theme/diabook-blue/style-network.css b/view/theme/diabook-blue/style-network.css
index d0bcd3209..fc4e4c60c 100644
--- a/view/theme/diabook-blue/style-network.css
+++ b/view/theme/diabook-blue/style-network.css
@@ -1174,8 +1174,8 @@ body .pageheader{
right_aside {
display: table-cell;
vertical-align: top;
- width: 160px;
- padding-right: 10px;
+ width: 170px;
+
/*border-left: 1px solid #D2D2D2;*/
/* background: #F1F1F1; */
@@ -1192,6 +1192,25 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;}
+right_aside .icon {width: 10px; height: 10px;}
+.close_box {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 0.1;
+ }
+.close_box:hover {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 1;
+-webkit-transition: all 0.2s ease-in-out;
+-moz-transition: all 0.2s ease-in-out;
+-o-transition: all 0.2s ease-in-out;
+-ms-transition: all 0.2s ease-in-out;
+transition: all 0.2s ease-in-out;
+ }
+
/* wall item */
.tread-wrapper {
border-bottom: 1px solid #D2D2D2;
@@ -1272,7 +1291,7 @@ right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow:
}
.wall-item-container .wall-item-content img {
- max-width: 400px;
+ max-width: 400px;
}
.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions {
display: table-cell;
diff --git a/view/theme/diabook-blue/style-profile.css b/view/theme/diabook-blue/style-profile.css
index 1296f1647..b3a578680 100644
--- a/view/theme/diabook-blue/style-profile.css
+++ b/view/theme/diabook-blue/style-profile.css
@@ -1173,8 +1173,8 @@ body .pageheader{
right_aside {
display: table-cell;
vertical-align: top;
- width: 160px;
- padding-right: 10px;
+ width: 170px;
+ /*padding-right: 10px;*/
/*border-left: 1px solid #D2D2D2;*/
/* background: #F1F1F1; */
@@ -1191,6 +1191,24 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;}
+right_aside .icon {width: 10px; height: 10px;}
+.close_box {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 0.1;
+ }
+.close_box:hover {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 1;
+-webkit-transition: all 0.2s ease-in-out;
+-moz-transition: all 0.2s ease-in-out;
+-o-transition: all 0.2s ease-in-out;
+-ms-transition: all 0.2s ease-in-out;
+transition: all 0.2s ease-in-out;
+ }
/* wall item */
.tread-wrapper {
border-bottom: 1px solid #D2D2D2;
diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php
index e12d940aa..de3042dbf 100755
--- a/view/theme/diabook-blue/theme.php
+++ b/view/theme/diabook-blue/theme.php
@@ -147,9 +147,10 @@ function diabook_blue_community_info(){
$aside['$nv'] = $nv;
};
//Community Page
+ if(local_user()) {
$page = '<div id="page-sidebar-right_aside" class="widget">
<div class="title tool">
- <h3>'.t("Community Pages").'</h3></div>
+ <h3>'.t("Community Pages").'<a id="close_pages_icon" onClick="close_pages()" class="icon close_box" title="close"></a></h3></div>
<div id="sidebar-page-list"><ul>';
$pagelist = array();
@@ -174,10 +175,10 @@ function diabook_blue_community_info(){
$contact["name"]."</a></li>";
}
$page .= '</ul></div></div>';
- if (sizeof($contacts) > 0)
+ //if (sizeof($contacts) > 0)
$aside['$page'] = $page;
-
+ }
//END Community Page
@@ -211,7 +212,7 @@ if ($a->argv[0] === "network" && local_user()){
$ps['usermenu']['events'] = Array('events/', t('Events'), "", t('Your events'));
$ps['usermenu']['notes'] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
$ps['usermenu']['community'] = Array('community/', t('Community'), "", "");
- $ps['usermenu']['pgroups'] = Array('http://dir.friendika.com/directory/forum', t('Public Groups'), "", "");
+ $ps['usermenu']['pgroups'] = Array('http://dir.friendika.com/directory/forum', t('Community Pages'), "", "");
$tpl = get_markup_template('profile_side.tpl');
@@ -222,31 +223,39 @@ if ($a->argv[0] === "network" && local_user()){
}
+ $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_postit'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes'];
+
+ if($ccCookie != "8") {
// COMMUNITY
diabook_blue_community_info();
// CUSTOM CSS
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css";
-
+ }
}
//right_aside at profile pages
-if ($a->argv[0] === "profile"){
-
+if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
+ if($ccCookie != "8") {
// COMMUNITY
diabook_blue_community_info();
// CUSTOM CSS
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css";
-
+ }
}
// custom css
if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
+//load jquery.cookie.js
+$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.cookie.js";
+$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" />', $cookieJS);
+
+
//js scripts
$a->page['htmlhead'] .= <<< EOT
@@ -254,7 +263,98 @@ $a->page['htmlhead'] .= <<< EOT
<script>
$(function() {
$('a.lightbox').fancybox(); // Select all links with lightbox class
+
});
- </script>
+
+</script>
+
+<script>
+
+$("right_aside").ready(function(){
+
+ if($.cookie('close_pages') == '1')
+ {
+ document.getElementById( "close_pages" ).style.display = "none";
+ };
+
+ if($.cookie('close_helpers') == '1')
+ {
+ document.getElementById( "close_helpers" ).style.display = "none";
+ };
+
+ if($.cookie('close_services') == '1')
+ {
+ document.getElementById( "close_services" ).style.display = "none";
+ };
+
+ if($.cookie('close_friends') == '1')
+ {
+ document.getElementById( "close_friends" ).style.display = "none";
+ };
+
+ if($.cookie('close_postit') == '1')
+ {
+ document.getElementById( "close_postit" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastusers') == '1')
+ {
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastphotos') == '1')
+ {
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastlikes') == '1')
+ {
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ };}
+
+);
+
+function close_pages(){
+ document.getElementById( "close_pages" ).style.display = "none";
+ $.cookie('close_pages','1', { expires: 365, path: '/' });
+ };
+
+function close_helpers(){
+ document.getElementById( "close_helpers" ).style.display = "none";
+ $.cookie('close_helpers','1', { expires: 365, path: '/' });
+ };
+
+function close_services(){
+ document.getElementById( "close_services" ).style.display = "none";
+ $.cookie('close_services','1', { expires: 365, path: '/' });
+ };
+
+function close_friends(){
+ document.getElementById( "close_friends" ).style.display = "none";
+ $.cookie('close_friends','1', { expires: 365, path: '/' });
+ };
+
+function close_postit(){
+ document.getElementById( "close_postit" ).style.display = "none";
+ $.cookie('close_postit','1', { expires: 365, path: '/' });
+ };
+
+function close_lastusers(){
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ $.cookie('close_lastusers','1', { expires: 365, path: '/' });
+ };
+
+function close_lastphotos(){
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ $.cookie('close_lastphotos','1', { expires: 365, path: '/' });
+ };
+
+function close_lastlikes(){
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ $.cookie('close_lastlikes','1', { expires: 365, path: '/' });
+ };
+
+</script>
+
EOT;
diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl
index 7e50423ce..3e840abc4 100755
--- a/view/theme/diabook/communityhome.tpl
+++ b/view/theme/diabook/communityhome.tpl
@@ -1,17 +1,22 @@
+<div id="close_pages">
{{ if $page }}
<div>$page</div>
{{ endif }}
+</div>
+<div id="close_helpers">
{{ if $lastusers_title }}
-<h3 style="margin-top:0px;">Help or @NewHere ?</h3>
+<h3 style="margin-top:0px;">Help or @NewHere ?<a id="close_helpers_icon" onClick="close_helpers()" class="icon close_box" title="close"></a></h3>
<a href="https://helpers.pyxis.uberspace.de/profile/helpers" style="margin-left: 10px; " title="Friendica Support" target="blank">Friendica Support</a><br>
<a href="https://letstalk.pyxis.uberspace.de/profile/letstalk" style="margin-left: 10px; " title="Let's talk" target="blank">Let's talk</a><br>
-<a href="http://newzot.hydra.uberspace.de/profile/newzot" title="Local Friendica" style="margin-left: 10px; " target="blank">Local Friendica</a>
+<a href="http://newzot.hydra.uberspace.de/profile/newzot" title="Local Friendica" style="margin-left: 10px; " target="blank">Local Friendica</a><br>
<a href="http://kakste.com/profile/newhere" title="@NewHere" style="margin-left: 10px; " target="blank">NewHere</a>
{{ endif }}
+</div>
+<div id="close_services">
{{ if $lastusers_title }}
-<h3>Connectable Services</h3>
+<h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3>
<div id="right_service_icons" style="margin-left: 11px; margin-top: 5px;">
<a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook/icons/facebook.png" title="Facebook"></a>
<a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook/icons/StatusNet.png?" title="StatusNet"></a>
@@ -23,28 +28,36 @@
<a href="$url/settings/connectors"><img alt="E-Mail" src="view/theme/diabook/icons/email.png?" title="E-Mail"></a>
</div>
{{ endif }}
+</div>
+<div id="close_friends" style="margin-bottom:53px;">
{{ if $nv }}
-<h3>Find Friends</h3>
+<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
-<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a>
-<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nav.invite.3" >$nv.invite.1</a>
+<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br>
+<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nav.invite.3" >$nv.invite.1</a>
+$nv.search
{{ endif }}
+</div>
+<div id="close_postit">
{{ if $lastusers_title }}
-<h3>PostIt to Friendica</h3>
+<h3>PostIt to Friendica<a id="close_postit_icon" onClick="close_postit()" class="icon close_box" title="close"></a></h3>
<div style="padding-left: 8px;"><span ><a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this Link.</span></div>
{{ endif }}
+</div>
+<div id="close_lastusers">
{{ if $lastusers_title }}
-<h3>$lastusers_title</h3>
+<h3>$lastusers_title<a id="close_lastusers_icon" onClick="close_lastusers()" class="icon close_box" title="close"></a></h3>
<div id='lastusers-wrapper' class='items-wrapper'>
{{ for $lastusers_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
+</div>
{{ if $activeusers_title }}
<h3>$activeusers_title</h3>
@@ -55,20 +68,24 @@
</div>
{{ endif }}
+<div id="close_lastphotos">
{{ if $photos_title }}
-<h3>$photos_title</h3>
+<h3>$photos_title<a id="close_photos_icon" onClick="close_lastphotos()" class="icon close_box" title="close"></a></h3>
<div id='ra-photos-wrapper' class='items-wrapper'>
{{ for $photos_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
+</div>
+<div id="close_lastlikes">
{{ if $like_title }}
-<h3>$like_title</h3>
+<h3>$like_title<a id="close_lastlikes_icon" onClick="close_lastlikes()" class="icon close_box" title="close"></a></h3>
<ul id='likes'>
{{ for $like_items as $i }}
<li id='ra-photos-wrapper'>$i</li>
{{ endfor }}
</ul>
{{ endif }}
+</div>
diff --git a/view/theme/diabook/icons/close_box.png b/view/theme/diabook/icons/close_box.png
new file mode 100755
index 000000000..28e2675b8
--- /dev/null
+++ b/view/theme/diabook/icons/close_box.png
Binary files differ
diff --git a/view/theme/diabook/icons/srch_bg.gif b/view/theme/diabook/icons/srch_bg.gif
new file mode 100644
index 000000000..6a523ba8f
--- /dev/null
+++ b/view/theme/diabook/icons/srch_bg.gif
Binary files differ
diff --git a/view/theme/diabook/icons/srch_l.gif b/view/theme/diabook/icons/srch_l.gif
new file mode 100644
index 000000000..6d95bf35d
--- /dev/null
+++ b/view/theme/diabook/icons/srch_l.gif
Binary files differ
diff --git a/view/theme/diabook/icons/srch_r.gif b/view/theme/diabook/icons/srch_r.gif
new file mode 100644
index 000000000..89833a316
--- /dev/null
+++ b/view/theme/diabook/icons/srch_r.gif
Binary files differ
diff --git a/view/theme/diabook/icons/srch_r_f2.gif b/view/theme/diabook/icons/srch_r_f2.gif
new file mode 100644
index 000000000..6df457bed
--- /dev/null
+++ b/view/theme/diabook/icons/srch_r_f2.gif
Binary files differ
diff --git a/view/theme/diabook/js/jquery.cookie.js b/view/theme/diabook/js/jquery.cookie.js
new file mode 100644
index 000000000..6d5974a2c
--- /dev/null
+++ b/view/theme/diabook/js/jquery.cookie.js
@@ -0,0 +1,47 @@
+/*!
+ * jQuery Cookie Plugin
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2011, Klaus Hartl
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.opensource.org/licenses/GPL-2.0
+ */
+(function($) {
+ $.cookie = function(key, value, options) {
+
+ // key and at least value given, set cookie...
+ if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
+ options = $.extend({}, options);
+
+ if (value === null || value === undefined) {
+ options.expires = -1;
+ }
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setDate(t.getDate() + days);
+ }
+
+ value = String(value);
+
+ return (document.cookie = [
+ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // key and possibly options given, get cookie...
+ options = value || {};
+ var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
+
+ var pairs = document.cookie.split('; ');
+ for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
+ if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
+ }
+ return null;
+ };
+})(jQuery);
diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl
index 5776b6cf7..9acf1032c 100644
--- a/view/theme/diabook/nav.tpl
+++ b/view/theme/diabook/nav.tpl
@@ -68,13 +68,11 @@
{{ if $nav.help }} <li><a class="$nav.help.2" target="friendika-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a></li>{{ endif }}
-
- <li ><a class="$nav.community.2" href="$nav.community.0" title="$nav.community.3" >$nav.community.1</a></li>
-
-
<li><a class="$nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a></li>
<li><a class="$nav.search.2" href="friendica" title="Site Info / Impressum" >Info/Impressum</a></li>
+
+ <li><a class="$nav.search.2" onClick="restore_boxes()" title="restore third column" style="cursor: pointer;">Restore right-hand column</a></li>
{{ if $nav.settings }}<li><a class="menu-sep $nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
{{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
diff --git a/view/theme/diabook/profile_side.tpl b/view/theme/diabook/profile_side.tpl
index fc949639e..0762dbe44 100644
--- a/view/theme/diabook/profile_side.tpl
+++ b/view/theme/diabook/profile_side.tpl
@@ -9,7 +9,7 @@
<ul id="profile-side-menu" class="menu-profile-side">
<li id="profile-side-status" class="menu-profile-list home"><a class="menu-profile-list-item" href="$ps.usermenu.status.0">$ps.usermenu.status.1</a></li>
<li id="profile-side-photos" class="menu-profile-list photos"><a class="menu-profile-list-item" href="$ps.usermenu.photos.0">$ps.usermenu.photos.1</a></li>
- <li id="profile-side-photos" class="menu-profile-list pscontacts"><a class="menu-profile-list-item" href="$ps.usermenu.contacts.0">$ps.usermenu.contacts.1</a></li>
+ <li id="profile-side-photos" class="menu-profile-list pscontacts"><a class="menu-profile-list-item" href="$ps.usermenu.contacts.0">$ps.usermenu.contacts.1</a></li>
<li id="profile-side-events" class="menu-profile-list events"><a class="menu-profile-list-item" href="$ps.usermenu.events.0">$ps.usermenu.events.1</a></li>
<li id="profile-side-notes" class="menu-profile-list notes"><a class="menu-profile-list-item" href="$ps.usermenu.notes.0">$ps.usermenu.notes.1</a></li>
<li id="profile-side-foren" class="menu-profile-list foren"><a class="menu-profile-list-item" href="$ps.usermenu.pgroups.0" target="blanc">$ps.usermenu.pgroups.1</a></li>
diff --git a/view/theme/diabook/style-network.css b/view/theme/diabook/style-network.css
index 20c273ec3..74ab3c233 100644
--- a/view/theme/diabook/style-network.css
+++ b/view/theme/diabook/style-network.css
@@ -909,25 +909,25 @@ ul.menu-popup .empty {
}
/*http://prothemedesign.com/circular-icons/*/
.menu-profile-list.home{
- background: url("../../../view/theme/diabook-blue/icons/home.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/home.png") no-repeat;
}
.menu-profile-list.photos{
- background: url("../../../view/theme/diabook-blue/icons/mess_side.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/mess_side.png") no-repeat;
}
.menu-profile-list.events{
- background: url("../../../view/theme/diabook-blue/icons/events.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/events.png") no-repeat;
}
.menu-profile-list.notes{
- background: url("../../../view/theme/diabook-blue/icons/notes.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/notes.png") no-repeat;
}
.menu-profile-list.foren{
- background: url("../../../view/theme/diabook-blue/icons/pubgroups.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/pubgroups.png") no-repeat;
}
.menu-profile-list.com_side{
- background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/com_side.png") no-repeat;
}
.menu-profile-list.pscontacts{
- background: url("../../../view/theme/diabook-blue/icons/pscontacts.png") no-repeat;
+ background: url("../../../view/theme/diabook/icons/pscontacts.png") no-repeat;
}
/* aside */
@@ -1095,6 +1095,32 @@ aside #side-peoplefind-url {
background: url("../../../view/theme/diabook/icons/selected.png") no-repeat left center;
}
/* widget: search */
+span.sbox_l {
+ background: white url('../../../view/theme/diabook/icons/srch_l.gif') no-repeat top left;
+ float: left;
+ width: 19px; height: 19px;
+ margin-left: 10px;
+ margin-top: 5px;
+
+}
+
+span.sbox_r {
+ background: white url('../../../view/theme/diabook/icons/srch_r.gif') no-repeat top left;
+ float: left;
+ width: 19px; height: 19px;
+ margin-top: 5px;
+}
+
+span.sbox input {
+ background: white url('../../../view/theme/diabook/icons/srch_bg.gif') repeat-x top left;
+ float: left;
+ margin-top: 5px;
+ border: 0;
+ height: 13px; width: 100px;
+ padding: 3px;
+ font: 11px/13px arial;
+ color: #000;
+}
#add-search-popup {
width: 200px;
top: 18px;
@@ -1156,8 +1182,7 @@ body .pageheader{
right_aside {
display: table-cell;
vertical-align: top;
- width: 160px;
- padding-right: 10px;
+ width: 170px;
/*border-left: 1px solid #D2D2D2;*/
/* background: #F1F1F1; */
@@ -1173,10 +1198,22 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;}
-.icon.expand {
- background-image: url("../../../view/theme/diabook/icons/expand.png");
+right_aside .icon {width: 10px; height: 10px;}
+.close_box {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ opacity: 0.1;
+ }
+.close_box:hover {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
float: right;
cursor: pointer;
+ opacity: 1;
+-webkit-transition: all 0.2s ease-in-out;
+-moz-transition: all 0.2s ease-in-out;
+-o-transition: all 0.2s ease-in-out;
+-ms-transition: all 0.2s ease-in-out;
+transition: all 0.2s ease-in-out;
}
/* wall item */
@@ -1714,12 +1751,13 @@ right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow:
margin-left: 5px;
}
/*input[type="submit"] {
- border: 0px;
- background-color: @ButtonBackgroundColor;
- color: @ButtonColor;
- padding: 0px 10px;
- .rounded(5px);
- height: 18px;
+ background-color: #33ACFF;
+ background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
+ border: 1px solid #777777;
+ color: white;
+ border-radius: 3px 3px 3px 3px;
+ box-shadow: 0 1px 1px #CFCFCF;
+ margin-left: 5px;
}*/
/** acl **/
#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper {
diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css
index 0f05bf6c1..9bd67da8d 100644
--- a/view/theme/diabook/style-profile.css
+++ b/view/theme/diabook/style-profile.css
@@ -1090,6 +1090,32 @@ aside #side-peoplefind-url {
background: url("../../../view/theme/diabook/icons/selected.png") no-repeat left center;
}
/* widget: search */
+span.sbox_l {
+ background: white url('../../../view/theme/diabook/icons/srch_l.gif') no-repeat top left;
+ float: left;
+ width: 19px; height: 19px;
+ margin-left: 10px;
+ margin-top: 5px;
+
+}
+
+span.sbox_r {
+ background: white url('../../../view/theme/diabook/icons/srch_r.gif') no-repeat top left;
+ float: left;
+ width: 19px; height: 19px;
+ margin-top: 5px;
+}
+
+span.sbox input {
+ background: white url('../../../view/theme/diabook/icons/srch_bg.gif') repeat-x top left;
+ float: left;
+ margin-top: 5px;
+ border: 0;
+ height: 13px; width: 100px;
+ padding: 3px;
+ font: 11px/13px arial;
+ color: #000;
+}
#add-search-popup {
width: 200px;
top: 18px;
@@ -1151,8 +1177,8 @@ body .pageheader{
right_aside {
display: table-cell;
vertical-align: top;
- width: 160px;
- padding-right: 10px;
+ width: 170px;
+
/*border-left: 1px solid #D2D2D2;*/
/* background: #F1F1F1; */
@@ -1168,6 +1194,24 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;}
+right_aside .icon {width: 10px; height: 10px;}
+.close_box {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 0.1;
+ }
+.close_box:hover {
+ background-image: url("../../../view/theme/diabook-blue/icons/close_box.png");
+ float: right;
+ cursor: pointer;
+ opacity: 1;
+-webkit-transition: all 0.2s ease-in-out;
+-moz-transition: all 0.2s ease-in-out;
+-o-transition: all 0.2s ease-in-out;
+-ms-transition: all 0.2s ease-in-out;
+transition: all 0.2s ease-in-out;
+ }
/* wall item */
.tread-wrapper {
border-bottom: 1px solid #D2D2D2;
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 5154459d3..d964243a9 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -924,6 +924,9 @@ ul.menu-popup .empty {
.menu-profile-list.com_side{
background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat;
}
+.menu-profile-list.pscontacts{
+ background: url("../../../view/theme/diabook/icons/pscontacts.png") no-repeat;
+ }
/* aside */
aside {
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 6eb623d95..5d6173918 100755
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -147,13 +147,21 @@ function diabook_community_info(){
$nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", "");
$nv['invite'] = Array('invite', t('Invite Friends'), "", "");
+ $nv['search'] = '<form name="simple_bar" method="get" action="http://dir.friendika.com/directory">
+ <span class="sbox_l"></span>
+ <span class="sbox">
+ <input type="text" name="search" size="13" maxlength="50">
+ </span>
+ <span class="sbox_r" id="srch_clear"></span>';
+
$aside['$nv'] = $nv;
};
//Community Page
+ if(local_user()) {
$page = '<div id="page-sidebar-right_aside" class="widget">
<div class="title tool">
- <h3>'.t("Community Pages").'</h3></div>
+ <h3>'.t("Community Pages").'<a id="close_pages_icon" onClick="close_pages()" class="icon close_box" title="close"></a></h3></div>
<div id="sidebar-page-list"><ul>';
$pagelist = array();
@@ -178,9 +186,10 @@ function diabook_community_info(){
$contact["name"]."</a></li>";
}
$page .= '</ul></div></div>';
- if (sizeof($contacts) > 0)
+ //if (sizeof($contacts) > 0)
- $aside['$page'] = $page;
+ $aside['$page'] = $page;
+ }
//END Community Page
@@ -216,7 +225,7 @@ if ($a->argv[0] === "network" && local_user()){
$ps['usermenu']['events'] = Array('events/', t('Events'), "", t('Your events'));
$ps['usermenu']['notes'] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
$ps['usermenu']['community'] = Array('community/', t('Community'), "", "");
- $ps['usermenu']['pgroups'] = Array('http://dir.friendica.com/directory/forum', t('Public Groups'), "", "");
+ $ps['usermenu']['pgroups'] = Array('http://dir.friendica.com/directory/forum', t('Community Pages'), "", "");
$tpl = get_markup_template('profile_side.tpl');
@@ -227,31 +236,39 @@ if ($a->argv[0] === "network" && local_user()){
}
+ $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_postit'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes'];
+
+ if($ccCookie != "8") {
// COMMUNITY
diabook_community_info();
// CUSTOM CSS
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network.css";
-
+ }
}
//right_aside at profile pages
-if ($a->argv[0] === "profile"){
-
+if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
+ if($ccCookie != "8") {
// COMMUNITY
diabook_community_info();
// CUSTOM CSS
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile.css";
+
+ }
}
-
// custom css
if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
+//load jquery.cookie.js
+$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.cookie.js";
+$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" />', $cookieJS);
+
//js scripts
$a->page['htmlhead'] .= <<< EOT
@@ -262,5 +279,110 @@ $a->page['htmlhead'] .= <<< EOT
});
</script>
+
+<script>
+
+$("right_aside").ready(function(){
+
+ if($.cookie('close_pages') == '1')
+ {
+ document.getElementById( "close_pages" ).style.display = "none";
+ };
+
+ if($.cookie('close_helpers') == '1')
+ {
+ document.getElementById( "close_helpers" ).style.display = "none";
+ };
+
+ if($.cookie('close_services') == '1')
+ {
+ document.getElementById( "close_services" ).style.display = "none";
+ };
+
+ if($.cookie('close_friends') == '1')
+ {
+ document.getElementById( "close_friends" ).style.display = "none";
+ };
+
+ if($.cookie('close_postit') == '1')
+ {
+ document.getElementById( "close_postit" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastusers') == '1')
+ {
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastphotos') == '1')
+ {
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ };
+
+ if($.cookie('close_lastlikes') == '1')
+ {
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ };}
+
+);
+
+function close_pages(){
+ document.getElementById( "close_pages" ).style.display = "none";
+ $.cookie('close_pages','1', { expires: 365, path: '/' });
+ };
+
+function close_helpers(){
+ document.getElementById( "close_helpers" ).style.display = "none";
+ $.cookie('close_helpers','1', { expires: 365, path: '/' });
+ };
+
+function close_services(){
+ document.getElementById( "close_services" ).style.display = "none";
+ $.cookie('close_services','1', { expires: 365, path: '/' });
+ };
+
+function close_friends(){
+ document.getElementById( "close_friends" ).style.display = "none";
+ $.cookie('close_friends','1', { expires: 365, path: '/' });
+ };
+
+function close_postit(){
+ document.getElementById( "close_postit" ).style.display = "none";
+ $.cookie('close_postit','1', { expires: 365, path: '/' });
+ };
+
+function close_lastusers(){
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ $.cookie('close_lastusers','1', { expires: 365, path: '/' });
+ };
+
+function close_lastphotos(){
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ $.cookie('close_lastphotos','1', { expires: 365, path: '/' });
+ };
+
+function close_lastlikes(){
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ $.cookie('close_lastlikes','1', { expires: 365, path: '/' });
+ };
+
+
+
+function restore_boxes(){
+ $.cookie('close_pages','2', { expires: 365, path: '/' });
+ $.cookie('close_helpers','2', { expires: 365, path: '/' });
+ $.cookie('close_services','2', { expires: 365, path: '/' });
+ $.cookie('close_friends','2', { expires: 365, path: '/' });
+ $.cookie('close_postit','2', { expires: 365, path: '/' });
+ $.cookie('close_lastusers','2', { expires: 365, path: '/' });
+ $.cookie('close_lastphotos','2', { expires: 365, path: '/' });
+ $.cookie('close_lastlikes','2', { expires: 365, path: '/' });
+ alert('Right-hand column was restored');
+ };
+
+
+</script>
+
+
EOT;
diff --git a/view/theme/dispy-dark/communityhome.tpl b/view/theme/dispy-dark/communityhome.tpl
index dfc0467f7..2876f936e 100644
--- a/view/theme/dispy-dark/communityhome.tpl
+++ b/view/theme/dispy-dark/communityhome.tpl
@@ -2,8 +2,43 @@
<div>$page</div>
{{ endif }}
-<h3>PostIt to Friendica</h3>
-<div style="padding-left: 8px;">
-<span><a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this Link.</span>
+{{ if $lastusers_title }}
+<h3 id="extra-help-header">Help or '@NewHere'?</h3>
+<div id="extra-help">
+<a href="https://helpers.pyxis.uberspace.de/profile/helpers"
+ title="Friendica Support" target="_blank">Friendica Support</a><br />
+<a href="https://letstalk.pyxis.uberspace.de/profile/letstalk"
+ title="Let's talk" target="_blank">Let's talk</a><br />
+<a href="http://newzot.hydra.uberspace.de/profile/newzot"
+ title="Local Friendica" target="_blank">Local Friendica</a><br />
+<a href="http://kakste.com/profile/newhere" title="@NewHere" target="_blank">NewHere</a>
</div>
{{ endif }}
+
+{{ if $lastusers_title }}
+<h3 id="connect-services-header">Connectable Services</h3>
+<div id="connect-services">
+<a href="$url/facebook"><img alt="Facebook"
+ src="view/theme/dispy/icons/facebook.png" title="Facebook" /></a>
+<a href="$url/settings/connectors"><img
+ alt="StatusNet" src="view/theme/dispy/icons/StatusNet.png?" title="StatusNet" /></a>
+<a href="$url/settings/connectors"><img
+ alt="LiveJournal" src="view/theme/dispy/icons/livejournal.png?" title="LiveJournal" /></a>
+<a href="$url/settings/connectors"><img
+ alt="Posterous" src="view/theme/dispy/icons/posterous.png?" title="Posterous" /></a><br />
+<a href="$url/settings/connectors"><img
+ alt="Tumblr" src="view/theme/dispy/icons/tumblr.png?" title="Tumblr" /></a>
+<a href="$url/settings/connectors"><img
+ alt="Twitter" src="view/theme/dispy/icons/twitter.png?" title="Twitter" /></a>
+<a href="$url/settings/connectors"><img
+ alt="WordPress" src="view/theme/dispy/icons/wordpress.png?" title="WordPress" /></a>
+<a href="$url/settings/connectors"><img
+ alt="E-Mail" src="view/theme/dispy/icons/email.png?" title="E-Mail" /></a>
+</div>
+{{ endif }}
+
+<h3 id="postit-header">PostIt to Friendica</h3>
+<div id="postit">
+<a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this link.
+</div>
+
diff --git a/view/theme/dispy-dark/default.php b/view/theme/dispy-dark/default.php
new file mode 100644
index 000000000..e74ec1a4f
--- /dev/null
+++ b/view/theme/dispy-dark/default.php
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title><?php if(x($page,'title')) echo $page['title'] ?></title>
+ <script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
+ <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
+</head>
+<body>
+ <?php if(x($page,'nav')) echo $page['nav']; ?>
+ <aside>
+ <?php if(x($page,'aside')) echo $page['aside']; ?>
+ <?php if(x($page,'aside_bottom')) echo $page['aside_bottom']; ?>
+ </aside>
+ <section><?php if(x($page,'content')) echo $page['content']; ?>
+ <div id="page-footer"></div>
+ </section>
+ <footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
+</body>
+</html>
+
diff --git a/view/theme/dispy-dark/jot-header.tpl b/view/theme/dispy-dark/jot-header.tpl
index 4c8f59d79..92eccf740 100644
--- a/view/theme/dispy-dark/jot-header.tpl
+++ b/view/theme/dispy-dark/jot-header.tpl
@@ -264,17 +264,39 @@ function enableOnUser(){
}
function itemFiler(id) {
- reply = prompt("$fileas");
- if(reply && reply.length) {
- commentBusy = true;
- $('body').css('cursor', 'wait');
- $.get('filer/' + id + '?term=' + reply);
- if(timer) clearTimeout(timer);
- timer = setTimeout(NavUpdate,3000);
- liking = 1;
- }
+
+ var bordercolor = $("input").css("border-color");
+
+ $.get('filer/', function(data){
+ $.fancybox(data);
+ $("#id_term").keypress(function(){
+ $(this).css("border-color",bordercolor);
+ })
+ $("#select_term").change(function(){
+ $("#id_term").css("border-color",bordercolor);
+ })
+
+ $("#filer_save").click(function(e){
+ e.preventDefault();
+ reply = $("#id_term").val();
+ if(reply && reply.length) {
+ commentBusy = true;
+ $('body').css('cursor', 'wait');
+ $.get('filer/' + id + '?term=' + reply);
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(NavUpdate,3000);
+ liking = 1;
+ $.fancybox.close();
+ } else {
+ $("#id_term").css("border-color","#FF0000");
+ }
+ return false;
+ });
+ });
+
}
+
function jotClearLocation() {
$('#jot-coord').val('');
$('#profile-nolocation-wrapper').hide();
diff --git a/view/theme/dispy-dark/nav.tpl b/view/theme/dispy-dark/nav.tpl
index 589d68352..e38b2bbe2 100644
--- a/view/theme/dispy-dark/nav.tpl
+++ b/view/theme/dispy-dark/nav.tpl
@@ -45,13 +45,7 @@ works -->
{{ endif }}
</div>
- <div class="search-box">
- <form method="get" action="$nav.search.0">
- <input id="search-text" class="nav-menu-search" type="search" placeholder="Search" value="" id="search" name="search" />
- </form>
- </div>
-
- <div id="user-menu">
+ <div id="user-menu">
<a id="user-menu-label" onclick="openClose('user-menu-popup'); return false" href="$nav.home.0">$sitelocation</a>
<ul id="user-menu-popup"
onmouseover="if (typeof tmenu != 'undefined') clearTimeout(tmenu); openMenu('user-menu-popup')"
@@ -125,6 +119,12 @@ works -->
$langselector
</div>
+<div class="search-box">
+ <form method="get" action="$nav.search.0">
+ <input id="search-text" class="nav-menu-search" type="search" placeholder="Search" value="" id="search" name="search" />
+ </form>
+</div>
+
<ul id="nav-notifications-template" style="display:none;" rel="template">
<li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul>
diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css
index 8be441c8b..361648999 100644
--- a/view/theme/dispy-dark/style.css
+++ b/view/theme/dispy-dark/style.css
@@ -251,7 +251,7 @@ input[type=submit] {
* nav
*/
nav {
- height: 85px;
+ height: 60px;
display: block;
background-color: #1d1f1d;
color: #eeeeec;
@@ -469,7 +469,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
width: 170px;
position: absolute;
top: -19px;
- left: 15px;
+ left: 7px;
}
#nav-floater {
position: fixed;
@@ -480,13 +480,14 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
color: transparent;
border-radius: 5px;
z-index: 100;
- width: 28%;
- height: 80px;
+ width: 300px;
+ height: 60px;
}
#nav-buttons {
clear: both;
list-style: none;
padding: 0px;
+ margin: 0 7px 0 0;
height: 25px;
}
#nav-buttons li {
@@ -506,18 +507,24 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
}
.search-box {
display: inline-block;
- height: 20px;
- margin: 0;
- position: relative;
- left: 7px;
- top: 5px;
- /*width: 210px;*/
+ margin: 5px;
+ position: fixed;
+ right: 0px;
+ bottom: 0px;
+ z-index: 100;
+ background: #1d1f1d;
+ border-radius: 5px;
}
#search-text {
border: 1px #eec solid;
background: #2e2f2e;
color: #eec;
}
+.search-box #search-text {
+ margin: 8px;
+ width: 10em;
+ color: #eec;
+}
nav #user-menu {
display: block;
width: 75%;
@@ -529,8 +536,8 @@ nav #user-menu {
border-radius: 5px;
background: #555753 url("menu-user-pin.jpg") 98% center no-repeat;
clear: both;
- top: 12px;
- left: 7px;
+ top: 4px;
+ left: 10px;
}
nav #user-menu-label {
font-size: 12px;
@@ -641,6 +648,7 @@ nav #user-menu-label {
background: #ddd;
}
+
/** sysmsg **/
#sysmsg_info {
position: fixed;
@@ -752,6 +760,7 @@ aside #viewcontacts {
margin: 0px 0px 0px 0px;
}
+
/**
* contacts block
*/
@@ -1018,7 +1027,7 @@ aside #viewcontacts {
* section
*/
section {
- margin: 20px 8% 0 4%;
+ margin: 20px 9% 0 4%;
font-size: 0.8em;
padding-right: 230px;
min-width: 475px;
@@ -1057,6 +1066,7 @@ section {
text-decoration: none;
}
+
/**
* items
*/
@@ -1129,7 +1139,7 @@ section {
border-radius: 5px;
}
[class^="wall-item-tools"] > *, [class^="wall-item-tools"] > * > * {
- margin: 0 0 5px 0;
+ /*margin: 0 0 5px 0;*/
}
.wall-item-tools {
float: right;
@@ -1150,6 +1160,12 @@ section {
-ms-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
+.wall-item-subtools1 {
+ list-style: none;
+}
+.wall-item-subtools2 {
+ list-style: none;
+}
.wall-item-title {
font-size: 1.2em;
font-weight: bold;
@@ -1260,6 +1276,24 @@ section {
overflow: auto;
width: 100%;
}
+#connect-services-header {
+
+}
+#connect-services {
+ margin: 5px 0 0 0;
+}
+#extra-help-header {
+
+}
+#extra-help {
+ margin: 5px 0 0 0;
+}
+#postit-header {
+
+}
+#postit {
+ margin: 5px 0 0 0;
+}
/**
diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php
index 4c938997b..cebe9eb4f 100644
--- a/view/theme/dispy-dark/theme.php
+++ b/view/theme/dispy-dark/theme.php
@@ -91,11 +91,13 @@ $(document).ready(function() {
$('.floaterflip').css({
backgroundPosition: '-210px -60px'
});
+ $('.search-box').slideUp('fast');
} else {
$('#nav-floater').slideDown('fast');
$('.floaterflip').css({
backgroundPosition: '-190px -60px'
});
+ $('.search-box').slideDown('fast');
}
};
// our trigger for the toolbar button
@@ -144,13 +146,17 @@ function dispydark_community_info() {
} else {
a_funct();
}
- })();" ;
+ })();";
$aside['$fostitJS'] = $fostitJS;
$url = $a->get_baseurl($ssl_state);
$aside['$url'] = $url;
$tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
- $a->page['aside'] = replace_macros($tpl, $aside);
+ $a->page['aside_bottom'] = replace_macros($tpl, $aside);
}
+// aside on profile page
+if ($a->argv[0] === "profile") {
+ dispydark_community_info();
+}
diff --git a/view/theme/dispy-dark/wall_item.tpl b/view/theme/dispy-dark/wall_item.tpl
index c9ac20c89..4b973bf93 100644
--- a/view/theme/dispy-dark/wall_item.tpl
+++ b/view/theme/dispy-dark/wall_item.tpl
@@ -15,44 +15,45 @@
<div class="wall-item-photo-end"></div>
<div class="wall-item-location" id="wall-item-location-$item.id">{{ if $item.location }}<span class="icon globe"></span>$item.location {{ endif }}</div>
</div>
- <div class="wall-item-lock-wrapper">
- {{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
- {{ else }}<div class="wall-item-lock"></div>{{ endif }}
- </div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
- {{ if $item.star }}
- <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
- <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
- {{ endif }}
-
- {{ if $item.vote }}
- <div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
- <a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
- <a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
- {{ if $item.vote.share }}
- <a href="#" id="share-$item.id"
- class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
- <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
- </div>
- {{ endif }}
-
- {{ if $item.filer }}
- <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item icon file-as" title="$item.star.filer"></a>
- {{ endif }}
-
- {{ if $item.plink }}
- <div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></div>
- {{ endif }}
- {{ if $item.edpost }}
- <a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>
- {{ endif }}
-
- <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
- {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
- </div>
- {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
+ <ul class="wall-item-subtools1">
+ <li class="wall-item-lock-wrapper">
+ {{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
+ {{ else }}<div class="wall-item-lock"></div>{{ endif }}
+ </li>
+ {{ if $item.star }}
+ <li>
+ <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
+ <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+ </li>
+ {{ endif }}
+ {{ if $item.vote }}
+ <li class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
+ <a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
+ <a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+ {{ if $item.vote.share }}
+ <a href="#" id="share-$item.id"
+ class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
+ <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
+ </li>
+ {{ endif }}
+ </ul>
+ <ul class="wall-item-subtools2">
+ {{ if $item.filer }}
+ <li><a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item icon file-as" title="$item.star.filer"></a></li>
+ {{ endif }}
+ {{ if $item.plink }}
+ <li class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></li>
+ {{ endif }}
+ {{ if $item.edpost }}
+ <li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li>
+ {{ endif }}
+ <li class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id">
+ {{ if $item.drop.dropping }}<div><a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></div>{{ endif }}
+ {{ if $item.drop.dropping }}<div><input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" /></div>{{ endif }}
+ </li>
+ </ul>
<div class="wall-item-delete-end"></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/theme/dispy/communityhome.tpl b/view/theme/dispy/communityhome.tpl
index dfc0467f7..2876f936e 100644
--- a/view/theme/dispy/communityhome.tpl
+++ b/view/theme/dispy/communityhome.tpl
@@ -2,8 +2,43 @@
<div>$page</div>
{{ endif }}
-<h3>PostIt to Friendica</h3>
-<div style="padding-left: 8px;">
-<span><a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this Link.</span>
+{{ if $lastusers_title }}
+<h3 id="extra-help-header">Help or '@NewHere'?</h3>
+<div id="extra-help">
+<a href="https://helpers.pyxis.uberspace.de/profile/helpers"
+ title="Friendica Support" target="_blank">Friendica Support</a><br />
+<a href="https://letstalk.pyxis.uberspace.de/profile/letstalk"
+ title="Let's talk" target="_blank">Let's talk</a><br />
+<a href="http://newzot.hydra.uberspace.de/profile/newzot"
+ title="Local Friendica" target="_blank">Local Friendica</a><br />
+<a href="http://kakste.com/profile/newhere" title="@NewHere" target="_blank">NewHere</a>
</div>
{{ endif }}
+
+{{ if $lastusers_title }}
+<h3 id="connect-services-header">Connectable Services</h3>
+<div id="connect-services">
+<a href="$url/facebook"><img alt="Facebook"
+ src="view/theme/dispy/icons/facebook.png" title="Facebook" /></a>
+<a href="$url/settings/connectors"><img
+ alt="StatusNet" src="view/theme/dispy/icons/StatusNet.png?" title="StatusNet" /></a>
+<a href="$url/settings/connectors"><img
+ alt="LiveJournal" src="view/theme/dispy/icons/livejournal.png?" title="LiveJournal" /></a>
+<a href="$url/settings/connectors"><img
+ alt="Posterous" src="view/theme/dispy/icons/posterous.png?" title="Posterous" /></a><br />
+<a href="$url/settings/connectors"><img
+ alt="Tumblr" src="view/theme/dispy/icons/tumblr.png?" title="Tumblr" /></a>
+<a href="$url/settings/connectors"><img
+ alt="Twitter" src="view/theme/dispy/icons/twitter.png?" title="Twitter" /></a>
+<a href="$url/settings/connectors"><img
+ alt="WordPress" src="view/theme/dispy/icons/wordpress.png?" title="WordPress" /></a>
+<a href="$url/settings/connectors"><img
+ alt="E-Mail" src="view/theme/dispy/icons/email.png?" title="E-Mail" /></a>
+</div>
+{{ endif }}
+
+<h3 id="postit-header">PostIt to Friendica</h3>
+<div id="postit">
+<a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this link.
+</div>
+
diff --git a/view/theme/dispy/default.php b/view/theme/dispy/default.php
new file mode 100644
index 000000000..e74ec1a4f
--- /dev/null
+++ b/view/theme/dispy/default.php
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title><?php if(x($page,'title')) echo $page['title'] ?></title>
+ <script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
+ <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
+</head>
+<body>
+ <?php if(x($page,'nav')) echo $page['nav']; ?>
+ <aside>
+ <?php if(x($page,'aside')) echo $page['aside']; ?>
+ <?php if(x($page,'aside_bottom')) echo $page['aside_bottom']; ?>
+ </aside>
+ <section><?php if(x($page,'content')) echo $page['content']; ?>
+ <div id="page-footer"></div>
+ </section>
+ <footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
+</body>
+</html>
+
diff --git a/view/theme/dispy/icons/StatusNet.png b/view/theme/dispy/icons/StatusNet.png
new file mode 100644
index 000000000..1b5f9a677
--- /dev/null
+++ b/view/theme/dispy/icons/StatusNet.png
Binary files differ
diff --git a/view/theme/dispy/icons/email.png b/view/theme/dispy/icons/email.png
new file mode 100644
index 000000000..b9d64cb93
--- /dev/null
+++ b/view/theme/dispy/icons/email.png
Binary files differ
diff --git a/view/theme/dispy/icons/facebook.png b/view/theme/dispy/icons/facebook.png
new file mode 100644
index 000000000..ff5129f94
--- /dev/null
+++ b/view/theme/dispy/icons/facebook.png
Binary files differ
diff --git a/view/theme/dispy/icons/livejournal.png b/view/theme/dispy/icons/livejournal.png
new file mode 100644
index 000000000..5ba5f7f7d
--- /dev/null
+++ b/view/theme/dispy/icons/livejournal.png
Binary files differ
diff --git a/view/theme/dispy/icons/posterous.png b/view/theme/dispy/icons/posterous.png
new file mode 100644
index 000000000..d0ae6face
--- /dev/null
+++ b/view/theme/dispy/icons/posterous.png
Binary files differ
diff --git a/view/theme/dispy/icons/tumblr.png b/view/theme/dispy/icons/tumblr.png
new file mode 100644
index 000000000..9d5fcd045
--- /dev/null
+++ b/view/theme/dispy/icons/tumblr.png
Binary files differ
diff --git a/view/theme/dispy/icons/twitter.png b/view/theme/dispy/icons/twitter.png
new file mode 100644
index 000000000..4a068451e
--- /dev/null
+++ b/view/theme/dispy/icons/twitter.png
Binary files differ
diff --git a/view/theme/dispy/icons/wordpress.png b/view/theme/dispy/icons/wordpress.png
new file mode 100644
index 000000000..6a4e36d45
--- /dev/null
+++ b/view/theme/dispy/icons/wordpress.png
Binary files differ
diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl
index 4c8f59d79..92eccf740 100644
--- a/view/theme/dispy/jot-header.tpl
+++ b/view/theme/dispy/jot-header.tpl
@@ -264,17 +264,39 @@ function enableOnUser(){
}
function itemFiler(id) {
- reply = prompt("$fileas");
- if(reply && reply.length) {
- commentBusy = true;
- $('body').css('cursor', 'wait');
- $.get('filer/' + id + '?term=' + reply);
- if(timer) clearTimeout(timer);
- timer = setTimeout(NavUpdate,3000);
- liking = 1;
- }
+
+ var bordercolor = $("input").css("border-color");
+
+ $.get('filer/', function(data){
+ $.fancybox(data);
+ $("#id_term").keypress(function(){
+ $(this).css("border-color",bordercolor);
+ })
+ $("#select_term").change(function(){
+ $("#id_term").css("border-color",bordercolor);
+ })
+
+ $("#filer_save").click(function(e){
+ e.preventDefault();
+ reply = $("#id_term").val();
+ if(reply && reply.length) {
+ commentBusy = true;
+ $('body').css('cursor', 'wait');
+ $.get('filer/' + id + '?term=' + reply);
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(NavUpdate,3000);
+ liking = 1;
+ $.fancybox.close();
+ } else {
+ $("#id_term").css("border-color","#FF0000");
+ }
+ return false;
+ });
+ });
+
}
+
function jotClearLocation() {
$('#jot-coord').val('');
$('#profile-nolocation-wrapper').hide();
diff --git a/view/theme/dispy/nav.tpl b/view/theme/dispy/nav.tpl
index 589d68352..e38b2bbe2 100644
--- a/view/theme/dispy/nav.tpl
+++ b/view/theme/dispy/nav.tpl
@@ -45,13 +45,7 @@ works -->
{{ endif }}
</div>
- <div class="search-box">
- <form method="get" action="$nav.search.0">
- <input id="search-text" class="nav-menu-search" type="search" placeholder="Search" value="" id="search" name="search" />
- </form>
- </div>
-
- <div id="user-menu">
+ <div id="user-menu">
<a id="user-menu-label" onclick="openClose('user-menu-popup'); return false" href="$nav.home.0">$sitelocation</a>
<ul id="user-menu-popup"
onmouseover="if (typeof tmenu != 'undefined') clearTimeout(tmenu); openMenu('user-menu-popup')"
@@ -125,6 +119,12 @@ works -->
$langselector
</div>
+<div class="search-box">
+ <form method="get" action="$nav.search.0">
+ <input id="search-text" class="nav-menu-search" type="search" placeholder="Search" value="" id="search" name="search" />
+ </form>
+</div>
+
<ul id="nav-notifications-template" style="display:none;" rel="template">
<li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul>
diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css
index 74a7809a1..c2c746767 100644
--- a/view/theme/dispy/style.css
+++ b/view/theme/dispy/style.css
@@ -251,7 +251,7 @@ input[type=submit] {
* nav
*/
nav {
- height: 85px;
+ height: 60px;
display: block;
background-color: #2e3436;
color: #eeeeec;
@@ -469,7 +469,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
width: 170px;
position: absolute;
top: -19px;
- left: 15px;
+ left: 7px;
}
#nav-floater {
position: fixed;
@@ -480,13 +480,14 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
color: transparent;
border-radius: 5px;
z-index: 100;
- width: 28%;
- height: 80px;
+ width: 300px;
+ height: 60px;
}
#nav-buttons {
clear: both;
list-style: none;
padding: 0px;
+ margin: 0 7px 0 0;
height: 25px;
}
#nav-buttons li {
@@ -506,18 +507,24 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
}
.search-box {
display: inline-block;
- height: 20px;
- margin: 0;
- position: relative;
- left: 7px;
- top: 5px;
- /*width: 210px;*/
+ margin: 5px;
+ position: fixed;
+ right: 0px;
+ bottom: 0px;
+ z-index: 100;
+ background: #1d1f1d;
+ border-radius: 5px;
}
#search-text {
border: 1px #eec solid;
background: #2e3436;
color: #eec;
}
+.search-box #search-text {
+ margin: 8px;
+ width: 10em;
+ color: #eec;
+}
nav #user-menu {
display: block;
width: 75%;
@@ -529,8 +536,8 @@ nav #user-menu {
border-radius: 5px;
background: #555753 url("menu-user-pin.jpg") 98% center no-repeat;
clear: both;
- top: 12px;
- left: 7px;
+ top: 4px;
+ left: 10px;
}
nav #user-menu-label {
font-size: 12px;
@@ -641,6 +648,7 @@ nav #user-menu-label {
background: #ddd;
}
+
/** sysmsg **/
#sysmsg_info {
position: fixed;
@@ -752,6 +760,7 @@ aside #viewcontacts {
margin: 0px 0px 0px 0px;
}
+
/**
* contacts block
*/
@@ -1018,7 +1027,7 @@ aside #viewcontacts {
* section
*/
section {
- margin: 20px 8% 0 4%;
+ margin: 20px 9% 0 4%;
font-size: 0.8em;
padding-right: 230px;
min-width: 475px;
@@ -1057,6 +1066,7 @@ section {
text-decoration: none;
}
+
/**
* items
*/
@@ -1129,7 +1139,7 @@ section {
border-radius: 5px;
}
[class^="wall-item-tools"] > *, [class^="wall-item-tools"] > * > * {
- margin: 0 0 5px 0;
+ /*margin: 0 0 5px 0;*/
}
.wall-item-tools {
float: right;
@@ -1150,6 +1160,12 @@ section {
-ms-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
+.wall-item-subtools1 {
+ list-style: none;
+}
+.wall-item-subtools2 {
+ list-style: none;
+}
.wall-item-title {
font-size: 1.2em;
font-weight: bold;
@@ -1260,6 +1276,24 @@ section {
overflow: auto;
width: 100%;
}
+#connect-services-header {
+
+}
+#connect-services {
+ margin: 5px 0 0 0;
+}
+#extra-help-header {
+
+}
+#extra-help {
+ margin: 5px 0 0 0;
+}
+#postit-header {
+
+}
+#postit {
+ margin: 5px 0 0 0;
+}
/**
@@ -2328,7 +2362,7 @@ div[id$="wrapper"] br {
.field {
/*margin-bottom: 10px;*/
/*padding-bottom: 10px;*/
- /*overflow: auto;*/
+ overflow: auto;
width: 100%;
}
.field label, label {
diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php
index db8cf5ccd..9789fd0fa 100644
--- a/view/theme/dispy/theme.php
+++ b/view/theme/dispy/theme.php
@@ -91,11 +91,13 @@ $(document).ready(function() {
$('.floaterflip').css({
backgroundPosition: '-210px -60px'
});
+ $('.search-box').slideUp('fast');
} else {
$('#nav-floater').slideDown('fast');
$('.floaterflip').css({
backgroundPosition: '-190px -60px'
});
+ $('.search-box').slideDown('fast');
}
};
// our trigger for the toolbar button
@@ -131,7 +133,7 @@ function dispy_community_info() {
$a = get_app();
$fostitJS = "javascript: (function() {
- the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy/fpostit/fpostit.php?url=' +
+ the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' +
encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' +
encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ?
document.getSelection() : document.selection.createRange().text));
@@ -144,18 +146,17 @@ function dispy_community_info() {
} else {
a_funct();
}
- })();" ;
+ })();";
$aside['$fostitJS'] = $fostitJS;
$url = $a->get_baseurl($ssl_state);
$aside['$url'] = $url;
$tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
- $a->page['aside'] = replace_macros($tpl, $aside);
+ $a->page['aside_bottom'] = replace_macros($tpl, $aside);
}
-//right_aside at profile pages
+// aside on profile page
if ($a->argv[0] === "profile") {
- // COMMUNITY
dispy_community_info();
}
diff --git a/view/theme/dispy/wall_item.tpl b/view/theme/dispy/wall_item.tpl
index c9ac20c89..4b973bf93 100644
--- a/view/theme/dispy/wall_item.tpl
+++ b/view/theme/dispy/wall_item.tpl
@@ -15,44 +15,45 @@
<div class="wall-item-photo-end"></div>
<div class="wall-item-location" id="wall-item-location-$item.id">{{ if $item.location }}<span class="icon globe"></span>$item.location {{ endif }}</div>
</div>
- <div class="wall-item-lock-wrapper">
- {{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
- {{ else }}<div class="wall-item-lock"></div>{{ endif }}
- </div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
- {{ if $item.star }}
- <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
- <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
- {{ endif }}
-
- {{ if $item.vote }}
- <div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
- <a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
- <a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
- {{ if $item.vote.share }}
- <a href="#" id="share-$item.id"
- class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
- <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
- </div>
- {{ endif }}
-
- {{ if $item.filer }}
- <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item icon file-as" title="$item.star.filer"></a>
- {{ endif }}
-
- {{ if $item.plink }}
- <div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></div>
- {{ endif }}
- {{ if $item.edpost }}
- <a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>
- {{ endif }}
-
- <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
- {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
- </div>
- {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
+ <ul class="wall-item-subtools1">
+ <li class="wall-item-lock-wrapper">
+ {{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
+ {{ else }}<div class="wall-item-lock"></div>{{ endif }}
+ </li>
+ {{ if $item.star }}
+ <li>
+ <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
+ <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+ </li>
+ {{ endif }}
+ {{ if $item.vote }}
+ <li class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
+ <a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
+ <a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+ {{ if $item.vote.share }}
+ <a href="#" id="share-$item.id"
+ class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
+ <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
+ </li>
+ {{ endif }}
+ </ul>
+ <ul class="wall-item-subtools2">
+ {{ if $item.filer }}
+ <li><a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item icon file-as" title="$item.star.filer"></a></li>
+ {{ endif }}
+ {{ if $item.plink }}
+ <li class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></li>
+ {{ endif }}
+ {{ if $item.edpost }}
+ <li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li>
+ {{ endif }}
+ <li class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id">
+ {{ if $item.drop.dropping }}<div><a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></div>{{ endif }}
+ {{ if $item.drop.dropping }}<div><input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" /></div>{{ endif }}
+ </li>
+ </ul>
<div class="wall-item-delete-end"></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/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index 33be8b359..c86df75f5 100755
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -275,7 +275,6 @@ div.wall-item-content-wrapper.shiny {
float: left;
}
-
#jot-title {
border: 0px;
margin: 0px;
diff --git a/view/theme/quattro/colors.less b/view/theme/quattro/colors.less
index 9183b2e77..b6d487f92 100755
--- a/view/theme/quattro/colors.less
+++ b/view/theme/quattro/colors.less
@@ -96,3 +96,12 @@
@JotPermissionLockBackgroundColor: @Grey4;
@JotLoadingBackgroundColor: @Grey1;
@JotPreviewBackgroundColor: @Yellow1;
+
+@MessageNewBackgroundColor: @Blue1;
+@MessageNewBorderColor: @Blue3;
+@MessageNewColor: @Grey1;
+
+@MailListBackgroundColor: #f6f7f8;
+
+@MailDisplaySubjectColor: @Grey5;
+@MailDisplaySubjectBackgroundColor: #f6f7f8;
diff --git a/view/theme/quattro/fileas_widget.tpl b/view/theme/quattro/fileas_widget.tpl
new file mode 100644
index 000000000..1e5a76044
--- /dev/null
+++ b/view/theme/quattro/fileas_widget.tpl
@@ -0,0 +1,12 @@
+<div id="fileas-sidebar" class="widget">
+ <h3>$title</h3>
+ <div id="nets-desc">$desc</div>
+
+ <ul class="fileas-ul">
+ <li class="tool {{ if $sel_all }}selected{{ endif }}"><a href="$base" class="fileas-link fileas-all">$all</a></li>
+ {{ for $terms as $term }}
+ <li class="tool {{ if $term.selected }}selected{{ endif }}"><a href="$base?f=&file=$term.name" class="fileas-link">$term.name</a></li>
+ {{ endfor }}
+ </ul>
+
+</div>
diff --git a/view/theme/quattro/mail_conv.tpl b/view/theme/quattro/mail_conv.tpl
new file mode 100755
index 000000000..989f17878
--- /dev/null
+++ b/view/theme/quattro/mail_conv.tpl
@@ -0,0 +1,60 @@
+<div class="wall-item-container $item.indent">
+ <div class="wall-item-item">
+ <div class="wall-item-info">
+ <div class="contact-photo-wrapper"
+ <a href="$mail.profile_url" target="redir" title="$mail.from_name" class="contact-photo-link" id="wall-item-photo-link-$mail.id">
+ <img src="$mail.from_photo" class="contact-photo$mail.sparkle" id="wall-item-photo-$mail.id" alt="$mail.from_name" />
+ </a>
+ </div>
+ </div>
+ <div class="wall-item-content">
+ $mail.body
+ </div>
+ </div>
+ <div class="wall-item-bottom">
+ <div class="wall-item-links">
+ </div>
+ <div class="wall-item-tags">
+ </div>
+ </div>
+ <div class="wall-item-bottom">
+ <div class="">
+ </div>
+ <div class="wall-item-actions">
+ <div class="wall-item-actions-author">
+ <a href="$mail.from_url" target="redir" class="wall-item-name-link"><span class="wall-item-name$mail.sparkle">$mail.from_name</span></a> <span class="wall-item-ago">$mail.date</span>
+ </div>
+
+ <div class="wall-item-actions-social">
+ </div>
+
+ <div class="wall-item-actions-tools">
+ <a href="message/drop/$mail.id" onclick="return confirmDelete();" class="icon delete s16" title="$mail.delete">$mail.delete</a>
+ </div>
+
+ </div>
+ </div>
+ <div class="wall-item-bottom">
+ </div>
+</div>
+
+
+{#
+
+
+<div class="mail-conv-outside-wrapper">
+ <div class="mail-conv-sender" >
+ <a href="$mail.from_url" class="mail-conv-sender-url" ><img class="mframe mail-conv-sender-photo$mail.sparkle" src="$mail.from_photo" heigth="80" width="80" alt="$mail.from_name" /></a>
+ </div>
+ <div class="mail-conv-detail" >
+ <div class="mail-conv-sender-name" >$mail.from_name</div>
+ <div class="mail-conv-date">$mail.date</div>
+ <div class="mail-conv-subject">$mail.subject</div>
+ <div class="mail-conv-body">$mail.body</div>
+ <div class="mail-conv-delete-wrapper" id="mail-conv-delete-wrapper-$mail.id" ><a href="message/drop/$mail.id" class="icon drophide delete-icon mail-list-delete-icon" onclick="return confirmDelete();" title="$mail.delete" id="mail-conv-delete-icon-$mail.id" class="mail-conv-delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></div><div class="mail-conv-delete-end"></div>
+ <div class="mail-conv-outside-wrapper-end"></div>
+</div>
+</div>
+<hr class="mail-conv-break" />
+
+#}
diff --git a/view/theme/quattro/mail_display.tpl b/view/theme/quattro/mail_display.tpl
new file mode 100644
index 000000000..8b82e95c6
--- /dev/null
+++ b/view/theme/quattro/mail_display.tpl
@@ -0,0 +1,12 @@
+<div id="mail-display-subject">
+ <span class="{{if $thread_seen}}seen{{else}}unseen{{endif}}">$thread_subject</span>
+ <a href="message/dropconv/$thread_id" onclick="return confirmDelete();" title="$delete" class="mail-delete icon s22 delete"></a>
+</div>
+
+{{ for $mails as $mail }}
+ <div id="tread-wrapper-$mail.id" class="tread-wrapper">
+ {{ inc mail_conv.tpl }}{{endinc}}
+ </div>
+{{ endfor }}
+
+{{ inc prv_message.tpl }}{{ endinc }}
diff --git a/view/theme/quattro/mail_list.tpl b/view/theme/quattro/mail_list.tpl
new file mode 100644
index 000000000..6bc6c84f6
--- /dev/null
+++ b/view/theme/quattro/mail_list.tpl
@@ -0,0 +1,8 @@
+<div class="mail-list-wrapper">
+ <span class="mail-subject {{if $seen}}seen{{else}}unseen{{endif}}"><a href="message/$id" class="mail-link">$subject</a></span>
+ <span class="mail-from">$from_name</span>
+ <span class="mail-date">$date</span>
+ <span class="mail-count">$count</span>
+
+ <a href="message/dropconv/$id" onclick="return confirmDelete();" title="$delete" class="mail-delete icon s22 delete"></a>
+</div>
diff --git a/view/theme/quattro/message_side.tpl b/view/theme/quattro/message_side.tpl
new file mode 100644
index 000000000..9f1587096
--- /dev/null
+++ b/view/theme/quattro/message_side.tpl
@@ -0,0 +1,10 @@
+<div id="message-sidebar" class="widget">
+ <div id="message-new" class="{{ if $new.sel }}selected{{ endif }}"><a href="$new.url">$new.label</a> </div>
+
+ <ul class="message-ul">
+ {{ for $tabs as $t }}
+ <li class="tool {{ if $t.sel }}selected{{ endif }}"><a href="$t.url" class="message-link">$t.label</a></li>
+ {{ endfor }}
+ </ul>
+
+</div>
diff --git a/view/theme/quattro/msg-header.tpl b/view/theme/quattro/msg-header.tpl
new file mode 100755
index 000000000..2d1ea7a61
--- /dev/null
+++ b/view/theme/quattro/msg-header.tpl
@@ -0,0 +1,97 @@
+
+<script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
+<script language="javascript" type="text/javascript">
+
+var plaintext = '$editselect';
+
+if(plaintext != 'none') {
+ tinyMCE.init({
+ theme : "advanced",
+ mode : "specific_textareas",
+ editor_selector: /(profile-jot-text|prvmail-text)/,
+ plugins : "bbcode,paste",
+ theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
+ theme_advanced_buttons2 : "",
+ theme_advanced_buttons3 : "",
+ theme_advanced_toolbar_location : "top",
+ theme_advanced_toolbar_align : "center",
+ theme_advanced_blockformats : "blockquote,code",
+ gecko_spellcheck : true,
+ paste_text_sticky : true,
+ entity_encoding : "raw",
+ add_unload_trigger : false,
+ remove_linebreaks : false,
+ force_p_newlines : false,
+ force_br_newlines : true,
+ forced_root_block : '',
+ convert_urls: false,
+ content_css: "$baseurl/view/custom_tinymce.css",
+ //Character count
+ theme_advanced_path : false,
+ setup : function(ed) {
+ ed.onInit.add(function(ed) {
+ ed.pasteAsPlainText = true;
+ var editorId = ed.editorId;
+ var textarea = $('#'+editorId);
+ if (typeof(textarea.attr('tabindex')) != "undefined") {
+ $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
+ textarea.attr('tabindex', null);
+ }
+ });
+ }
+ });
+}
+else
+ $("#prvmail-text").contact_autocomplete(baseurl+"/acl");
+
+
+</script>
+<script type="text/javascript" src="js/ajaxupload.js" ></script>
+<script>
+ $(document).ready(function() {
+ var uploader = new window.AjaxUpload(
+ 'prvmail-upload',
+ { action: 'wall_upload/$nickname',
+ name: 'userfile',
+ onSubmit: function(file,ext) { $('#profile-rotator').show(); },
+ onComplete: function(file,response) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,response);
+ $('#profile-rotator').hide();
+ }
+ }
+ );
+
+ });
+
+ function jotGetLink() {
+ reply = prompt("$linkurl");
+ if(reply && reply.length) {
+ $('#profile-rotator').show();
+ $.get('parse_url?url=' + reply, function(data) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ $('#profile-rotator').hide();
+ });
+ }
+ }
+
+ function linkdropper(event) {
+ var linkFound = event.dataTransfer.types.contains("text/uri-list");
+ if(linkFound)
+ event.preventDefault();
+ }
+
+ function linkdrop(event) {
+ var reply = event.dataTransfer.getData("text/uri-list");
+ event.target.textContent = reply;
+ event.preventDefault();
+ if(reply && reply.length) {
+ $('#profile-rotator').show();
+ $.get('parse_url?url=' + reply, function(data) {
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ $('#profile-rotator').hide();
+ });
+ }
+ }
+
+</script>
+
diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less
index fca65c907..c6352cfe9 100755
--- a/view/theme/quattro/quattro.less
+++ b/view/theme/quattro/quattro.less
@@ -319,41 +319,6 @@ aside {
img { width: 48px; height: 48px; }
}
}
-/* mail view */
-.mail-conv-sender,
-.mail-conv-detail {
- float: left;
-}
-.mail-conv-detail {
- margin-left: 20px;
- width: 500px;
-}
-
-.mail-conv-subject {
- font-size: 1.4em;
- margin: 10px 0;
-}
-
-.mail-conv-outside-wrapper-end {
- clear: both;
-}
-
-.mail-conv-outside-wrapper {
- margin-top: 30px;
-}
-
-.mail-conv-delete-wrapper {
- float: right;
- margin-right: 30px;
- margin-top: 15px;
-}
-.mail-conv-break {
- clear: both;
-}
-
-.mail-conv-delete-icon {
- border: none;
-}
/* group member */
#contact-edit-drop-link,
@@ -938,6 +903,10 @@ ul.tabs {
textarea {
width: 400px;
}
+ input[type="checkbox"], input[type="radio"]{
+ width: auto;
+ }
+
textarea { height: 100px; }
.field_help {
display: block;
@@ -981,6 +950,7 @@ ul.tabs {
&.radio .field_help { margin-left: 0px; }
}
+
#profile-edit-links li {
list-style: none;
margin-top: 10px;
@@ -1085,6 +1055,90 @@ ul.tabs {
}
}
+/* messages */
+#message-new {
+ background: @MessageNewBackgroundColor;
+ border: 1px solid @MessageNewBorderColor;
+ width: 150px;
+ a {
+ color: @MessageNewColor;
+ text-align: center;
+ display: block;
+ font-weight: bold;
+ padding: 1em 0px;
+ }
+}
+
+.mail-list-wrapper {
+ background-color: @MailListBackgroundColor;
+ margin-bottom: 5px;
+ width: 100%; height: auto; overflow: hidden;
+
+ span { display: block; float: left; width: 20%; overflow: hidden;}
+
+ .mail-subject {
+ width: 30%;
+ padding:4px 0px 0px 4px;
+ a { display: block; }
+ &.unseen a { font-weight: bold; }
+ }
+ .mail-date { padding: 4px 4px 0px 4px; }
+ .mail-from { padding: 4px 4px 0px 4px; }
+ .mail-count { padding: 4px 4px 0px 4px; text-align: right;}
+
+ .mail-delete { float: right; }
+}
+
+#mail-display-subject {
+ background-color: @MailDisplaySubjectBackgroundColor;
+ color: @MailDisplaySubjectColor;
+ margin-bottom: 10px;
+ width: 100%; height: auto; overflow: hidden;
+ span { float: left; overflow: hidden; padding: 4px 0px 0px 10px;}
+ .mail-delete { float: right; .opaque(0.5);}
+ &:hover .mail-delete { .opaque(1); }
+
+}
+
+/* mail view */
+/*
+.mail-conv-sender,
+.mail-conv-detail {
+ float: left;
+}
+.mail-conv-detail {
+ margin-left: 20px;
+ width: 500px;
+}
+
+.mail-conv-subject {
+ font-size: 1.4em;
+ margin: 10px 0;
+}
+
+.mail-conv-outside-wrapper-end {
+ clear: both;
+}
+
+.mail-conv-outside-wrapper {
+ margin-top: 30px;
+}
+
+.mail-conv-delete-wrapper {
+ float: right;
+ margin-right: 30px;
+ margin-top: 15px;
+}
+.mail-conv-break {
+ clear: both;
+}
+
+.mail-conv-delete-icon {
+ border: none;
+}
+
+*/
+
/* page footer */
footer { height: 100px; display: table-row; }
diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css
index 8f0abe86d..7d7444e48 100755
--- a/view/theme/quattro/style.css
+++ b/view/theme/quattro/style.css
@@ -626,35 +626,6 @@ aside #profiles-menu {
width: 48px;
height: 48px;
}
-/* mail view */
-.mail-conv-sender, .mail-conv-detail {
- float: left;
-}
-.mail-conv-detail {
- margin-left: 20px;
- width: 500px;
-}
-.mail-conv-subject {
- font-size: 1.4em;
- margin: 10px 0;
-}
-.mail-conv-outside-wrapper-end {
- clear: both;
-}
-.mail-conv-outside-wrapper {
- margin-top: 30px;
-}
-.mail-conv-delete-wrapper {
- float: right;
- margin-right: 30px;
- margin-top: 15px;
-}
-.mail-conv-break {
- clear: both;
-}
-.mail-conv-delete-icon {
- border: none;
-}
/* group member */
#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper {
float: right;
@@ -1355,6 +1326,9 @@ ul.tabs li .active {
.field input, .field textarea {
width: 400px;
}
+.field input[type="checkbox"], .field input[type="radio"] {
+ width: auto;
+}
.field textarea {
height: 100px;
}
@@ -1503,6 +1477,123 @@ ul.tabs li .active {
left: 0px;
top: 63px;
}
+/* messages */
+#message-new {
+ background: #19aeff;
+ border: 1px solid #005c94;
+ width: 150px;
+}
+#message-new a {
+ color: #ffffff;
+ text-align: center;
+ display: block;
+ font-weight: bold;
+ padding: 1em 0px;
+}
+.mail-list-wrapper {
+ background-color: #f6f7f8;
+ margin-bottom: 5px;
+ width: 100%;
+ height: auto;
+ overflow: hidden;
+}
+.mail-list-wrapper span {
+ display: block;
+ float: left;
+ width: 20%;
+ overflow: hidden;
+}
+.mail-list-wrapper .mail-subject {
+ width: 30%;
+ padding: 4px 0px 0px 4px;
+}
+.mail-list-wrapper .mail-subject a {
+ display: block;
+}
+.mail-list-wrapper .mail-subject.unseen a {
+ font-weight: bold;
+}
+.mail-list-wrapper .mail-date {
+ padding: 4px 4px 0px 4px;
+}
+.mail-list-wrapper .mail-from {
+ padding: 4px 4px 0px 4px;
+}
+.mail-list-wrapper .mail-count {
+ padding: 4px 4px 0px 4px;
+ text-align: right;
+}
+.mail-list-wrapper .mail-delete {
+ float: right;
+}
+#mail-display-subject {
+ background-color: #f6f7f8;
+ color: #2d2d2d;
+ margin-bottom: 10px;
+ width: 100%;
+ height: auto;
+ overflow: hidden;
+}
+#mail-display-subject span {
+ float: left;
+ overflow: hidden;
+ padding: 4px 0px 0px 10px;
+}
+#mail-display-subject .mail-delete {
+ float: right;
+ opacity: 0.5;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -ms-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+#mail-display-subject:hover .mail-delete {
+ opacity: 1;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -ms-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+/* mail view */
+/*
+.mail-conv-sender,
+.mail-conv-detail {
+ float: left;
+}
+.mail-conv-detail {
+ margin-left: 20px;
+ width: 500px;
+}
+
+.mail-conv-subject {
+ font-size: 1.4em;
+ margin: 10px 0;
+}
+
+.mail-conv-outside-wrapper-end {
+ clear: both;
+}
+
+.mail-conv-outside-wrapper {
+ margin-top: 30px;
+}
+
+.mail-conv-delete-wrapper {
+ float: right;
+ margin-right: 30px;
+ margin-top: 15px;
+}
+.mail-conv-break {
+ clear: both;
+}
+
+.mail-conv-delete-icon {
+ border: none;
+}
+
+*/
/* page footer */
footer {
height: 100px;
diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl
index b44ea78fd..0d11da271 100755
--- a/view/theme/testbubble/jot-header.tpl
+++ b/view/theme/testbubble/jot-header.tpl
@@ -304,6 +304,41 @@ function initEditor(cb) {
}
}
}
+
+ function itemFiler(id) {
+
+ var bordercolor = $("input").css("border-color");
+
+ $.get('filer/', function(data){
+ $.fancybox(data);
+ $("#id_term").keypress(function(){
+ $(this).css("border-color",bordercolor);
+ })
+ $("#select_term").change(function(){
+ $("#id_term").css("border-color",bordercolor);
+ })
+
+ $("#filer_save").click(function(e){
+ e.preventDefault();
+ reply = $("#id_term").val();
+ if(reply && reply.length) {
+ commentBusy = true;
+ $('body').css('cursor', 'wait');
+ $.get('filer/' + id + '?term=' + reply);
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(NavUpdate,3000);
+ liking = 1;
+ $.fancybox.close();
+ } else {
+ $("#id_term").css("border-color","#FF0000");
+ }
+ return false;
+ });
+ });
+
+ }
+
+
function jotClearLocation() {
$('#jot-coord').val('');
diff --git a/view/theme/vier/nav.tpl b/view/theme/vier/nav.tpl
new file mode 100755
index 000000000..8c872864c
--- /dev/null
+++ b/view/theme/vier/nav.tpl
@@ -0,0 +1,131 @@
+<header>
+ {# $langselector #}
+
+ <div id="site-location">$sitelocation</div>
+ <div id="banner">$banner</div>
+</header>
+<nav>
+ <ul>
+ {{ if $userinfo }}
+ <li id="nav-user-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-user-menu" title="$sitelocation"><img src="$userinfo.icon" alt="$userinfo.name"></a>
+ <ul id="nav-user-menu" class="menu-popup">
+ {{ for $nav.usermenu as $usermenu }}
+ <li><a class="$usermenu.2" href="$usermenu.0" title="$usermenu.3">$usermenu.1</a></li>
+ {{ endfor }}
+
+ {{ if $nav.notifications }}<li><a class="$nav.notifications.2" href="$nav.notifications.0" title="$nav.notifications.3" >$nav.notifications.1</a></li>{{ endif }}
+ {{ if $nav.messages }}<li><a class="$nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a></li>{{ endif }}
+ {{ if $nav.contacts }}<li><a class="$nav.contacts.2" href="$nav.contacts.0" title="$nav.contacts.3" >$nav.contacts.1</a></li>{{ endif }}
+ </ul>
+ </li>
+ {{ endif }}
+
+ {{ if $nav.community }}
+ <li id="nav-community-link" class="nav-menu $sel.community">
+ <a class="$nav.community.2" href="$nav.community.0" title="$nav.community.3" >$nav.community.1</a>
+ </li>
+ {{ endif }}
+
+ {{ if $nav.network }}
+ <li id="nav-network-link" class="nav-menu $sel.network">
+ <a class="$nav.network.2" href="$nav.network.0" title="$nav.network.3" >$nav.network.1</a>
+ <span id="net-update" class="nav-notify"></span>
+ </li>
+ {{ endif }}
+ {{ if $nav.home }}
+ <li id="nav-home-link" class="nav-menu $sel.home">
+ <a class="$nav.home.2" href="$nav.home.0" title="$nav.home.3" >$nav.home.1</a>
+ <span id="home-update" class="nav-notify"></span>
+ </li>
+ {{ endif }}
+
+ {{ if $nav.notifications }}
+ <li id="nav-notifications-linkmenu" class="nav-menu-icon"><a href="$nav.notifications.0" rel="#nav-notifications-menu" title="$nav.notifications.1"><span class="icon s22 notify">$nav.notifications.1</span></a>
+ <span id="notify-update" class="nav-notify"></span>
+ <ul id="nav-notifications-menu" class="menu-popup">
+ <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">$nav.notifications.mark.1</a></li>
+ <li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>
+ <li class="empty">$emptynotifications</li>
+ </ul>
+ </li>
+ {{ endif }}
+
+ <li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
+ <ul id="nav-site-menu" class="menu-popup">
+ {{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}
+
+ {{ if $nav.settings }}<li><a class="$nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
+ {{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
+
+ {{ if $nav.logout }}<li><a class="menu-sep $nav.logout.2" href="$nav.logout.0" title="$nav.logout.3" >$nav.logout.1</a></li>{{ endif }}
+ {{ if $nav.login }}<li><a class="$nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a><li>{{ endif }}
+ </ul>
+ </li>
+
+ {{ if $nav.help }}
+ <li id="nav-help-link" class="nav-menu $sel.help">
+ <a class="$nav.help.2" target="friendika-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a>
+ </li>
+ {{ endif }}
+
+ <li id="nav-search-link" class="nav-menu $sel.search">
+ <a class="$nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a>
+ </li>
+ <li id="nav-directory-link" class="nav-menu $sel.directory">
+ <a class="$nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a>
+ </li>
+
+ {{ if $nav.apps }}
+ <li id="nav-apps-link" class="nav-menu $sel.apps">
+ <a class=" $nav.apps.2" href="#" rel="#nav-apps-menu" title="$nav.apps.3" >$nav.apps.1</a>
+ <ul id="nav-apps-menu" class="menu-popup">
+ {{ for $apps as $ap }}
+ <li>$ap</li>
+ {{ endfor }}
+ </ul>
+ </li>
+ {{ endif }}
+ </ul>
+
+</nav>
+<ul id="nav-notifications-template" style="display:none;" rel="template">
+ <li><a href="{0}"><img src="{1}">{2} <span class="notif-when">{3}</span></a></li>
+</ul>
+
+{#
+
+{{ if $nav.logout }}<a id="nav-logout-link" class="nav-link $nav.logout.2" href="$nav.logout.0" title="$nav.logout.3" >$nav.logout.1</a> {{ endif }}
+{{ if $nav.login }}<a id="nav-login-link" class="nav-login-link $nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a> {{ endif }}
+
+<span id="nav-link-wrapper" >
+
+{{ if $nav.register }}<a id="nav-register-link" class="nav-commlink $nav.register.2" href="$nav.register.0" title="$nav.register.3" >$nav.register.1</a>{{ endif }}
+
+<a id="nav-help-link" class="nav-link $nav.help.2" target="friendika-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a>
+
+{{ if $nav.apps }}<a id="nav-apps-link" class="nav-link $nav.apps.2" href="$nav.apps.0" title="$nav.apps.3" >$nav.apps.1</a>{{ endif }}
+
+<a id="nav-search-link" class="nav-link $nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a>
+<a id="nav-directory-link" class="nav-link $nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a>
+
+{{ if $nav.admin }}<a id="nav-admin-link" class="nav-link $nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a>{{ endif }}
+
+{{ if $nav.notifications }}
+<a id="nav-notify-link" class="nav-commlink $nav.notifications.2" href="$nav.notifications.0" title="$nav.notifications.3" >$nav.notifications.1</a>
+<span id="notify-update" class="nav-ajax-left"></span>
+{{ endif }}
+{{ if $nav.messages }}
+<a id="nav-messages-link" class="nav-commlink $nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a>
+<span id="mail-update" class="nav-ajax-left"></span>
+{{ endif }}
+
+{{ if $nav.manage }}<a id="nav-manage-link" class="nav-commlink $nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a>{{ endif }}
+
+{{ if $nav.settings }}<a id="nav-settings-link" class="nav-link $nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a>{{ endif }}
+{{ if $nav.profiles }}<a id="nav-profiles-link" class="nav-link $nav.profiles.2" href="$nav.profiles.0" title="$nav.profiles.3" >$nav.profiles.1</a>{{ endif }}
+
+
+</span>
+<span id="nav-end"></span>
+<span id="banner">$banner</span>
+#}