From c5cb208cb8ac0968bebb416bad5b37b029ccd239 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 30 Mar 2012 08:17:40 -0400 Subject: [PATCH 01/39] Merge branch 'master', remote-tracking branch 'remotes/upstream/master' * remotes/upstream/master: quattro-green: adopted quattro option for centered display string update add themes diabook-red & diabook-aerith rename "file as" to "save to folder" bug #352 - qcomment plugin disabled, qcomments still allowed quattro-greey: apply theming to private mail zrl into people searches another silly mistake silly mistake zrl on mentions use zrl to get home again provide a way to specify an admin account for siteinfo if more than one have admin email address * master: From 8c928e67ba9f122343f53400cf0f4dae8104ffd7 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 30 Mar 2012 23:18:46 -0700 Subject: [PATCH 02/39] warning cleanup --- include/text.php | 1 - mod/search.php | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/text.php b/include/text.php index 0b825cc399..f758c37ee6 100644 --- a/include/text.php +++ b/include/text.php @@ -205,7 +205,6 @@ function hex2bin($s) { return ''; if(! ctype_xdigit($s)) { - logger('hex2bin: illegal input: ' . print_r(debug_backtrace(), true)); return($s); } diff --git a/mod/search.php b/mod/search.php index 50e7a6abc7..6495fc8e5f 100755 --- a/mod/search.php +++ b/mod/search.php @@ -97,19 +97,16 @@ function search_content(&$a) { // OR your own posts if you are a logged in member // No items will be shown if the member has a blocked profile wall. - $s_regx = sprintf("AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )", - dbesc(preg_quote($search)), dbesc('\\]' . preg_quote($search) . '\\[')); - - $search_alg = $s_regx; - $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0) OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - $search_alg ", - intval(local_user()) + AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )", + intval(local_user()), + dbesc(preg_quote($search)), + dbesc('\\]' . preg_quote($search) . '\\[') ); if(count($r)) @@ -131,9 +128,11 @@ function search_content(&$a) { AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 ) OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - $search_alg + AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' ) ORDER BY `received` DESC LIMIT %d , %d ", intval(local_user()), + dbesc(preg_quote($search)), + dbesc('\\]' . preg_quote($search) . '\\['), intval($a->pager['start']), intval($a->pager['itemspage']) From b88a452c6b90b8ee1aafe4f2a4f1bd905f767893 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 31 Mar 2012 03:56:06 -0400 Subject: [PATCH 03/39] theme fixes; fix qcomment (finally) Signed-off-by: Simon L'nu --- view/theme/dispy-dark/comment_item.tpl | 13 ++++--- view/theme/dispy-dark/style.css | 52 ++++++++++++++++++-------- view/theme/dispy/comment_item.tpl | 13 ++++--- view/theme/dispy/style.css | 52 ++++++++++++++++++-------- 4 files changed, 86 insertions(+), 44 deletions(-) diff --git a/view/theme/dispy-dark/comment_item.tpl b/view/theme/dispy-dark/comment_item.tpl index 85176732b7..adf2772af0 100644 --- a/view/theme/dispy-dark/comment_item.tpl +++ b/view/theme/dispy-dark/comment_item.tpl @@ -12,14 +12,15 @@
- {{ if $qcomment }} -
    - {{ for $qcomment as $qc }} - +
    + +
    {{ endif }}
    diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 5dc0776e03..f5788ef82d 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -54,10 +54,14 @@ select { border: 1px #555 dotted; padding: 3px; margin: 2px; + color: #eec; + background: #2e2f2e; } option { padding: 3px; vertical-align: middle; + color: #eec; + background: #2e2f2e; } li { padding: 0 0 0 2px; @@ -211,39 +215,51 @@ input[type=submit] { /** * login */ +aside .field { + overflow: hidden; + width: 200px; +} #login-extra-links { - overflow: auto; - padding-top: 140px !important; - width: 100%; + overflow: auto !important; + padding-top: 60px !important; + width: 100% !important; } #login-extra-links a { margin-right: 20px; } #login_standard { - display: block; - float: none; - height: 100px; - position: absolute; - width: 100%; + display: block !important; + float: none !important; + height: 100% !important; + position: relative !important; + width: 100% !important; } #login_standard .field label { - width: 200px; + width: 200px !important; } #login_standard input, #login_standard input[type="text"] { - margin: 0 0 8px; - width: 210px; + margin: 0 0 8px !important; + width: 210px !important; } #login-submit-wrapper { - margin: 0; + margin: 0 !important; } #login-submit-button { margin-left: 0px !important; } +aside #login_openid { + position: relative !important; + float: none !important; + margin-left: 0px !important; + height: auto !important; + width: 200px !important; +} #login_openid #id_openid_url { - width: 200px; + width: 180px !important; + overflow: hidden !important; } #login_openid label { - width: 208px; + width: 180px !important; } @@ -525,7 +541,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link width: 10em; color: #eec; } -nav #user-menu { +#user-menu { display: block; width: 75%; margin: 3px 0 0 0; @@ -538,8 +554,12 @@ nav #user-menu { clear: both; top: 4px; left: 10px; + padding: 2px; } -nav #user-menu-label { +#user-menu > a { + vertical-align: top; +} +#user-menu-label { font-size: 12px; padding: 3px 20px 9px 5px; height: 10px; diff --git a/view/theme/dispy/comment_item.tpl b/view/theme/dispy/comment_item.tpl index 85176732b7..adf2772af0 100644 --- a/view/theme/dispy/comment_item.tpl +++ b/view/theme/dispy/comment_item.tpl @@ -12,14 +12,15 @@
    - {{ if $qcomment }} -
      - {{ for $qcomment as $qc }} - +
      + +
      {{ endif }}
      diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 1d6bba738d..fdcceab0c9 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -54,10 +54,14 @@ select { border: 1px #555 dotted; padding: 3px; margin: 2px; + color: #222; + background: #efefef; } option { padding: 3px; vertical-align: middle; + color: #222; + background: #efefef; } li { padding: 0 0 0 2px; @@ -211,39 +215,51 @@ input[type=submit] { /** * login */ +aside .field { + overflow: hidden; + width: 200px; +} #login-extra-links { - overflow: auto; - padding-top: 140px !important; - width: 100%; + overflow: auto !important; + padding-top: 60px !important; + width: 100% !important; } #login-extra-links a { margin-right: 20px; } #login_standard { - display: block; - float: none; - height: 100px; - position: absolute; - width: 100%; + display: block !important; + float: none !important; + height: 100% !important; + position: relative !important; + width: 100% !important; } #login_standard .field label { - width: 200px; + width: 200px !important; } #login_standard input, #login_standard input[type="text"] { - margin: 0 0 8px; - width: 210px; + margin: 0 0 8px !important; + width: 210px !important; } #login-submit-wrapper { - margin: 0; + margin: 0 !important; } #login-submit-button { margin-left: 0px !important; } +aside #login_openid { + position: relative !important; + float: none !important; + margin-left: 0px !important; + height: auto !important; + width: 200px !important; +} #login_openid #id_openid_url { - width: 200px; + width: 180px !important; + overflow: hidden !important; } #login_openid label { - width: 208px; + width: 180px !important; } @@ -525,7 +541,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link width: 10em; color: #eec; } -nav #user-menu { +#user-menu { display: block; width: 75%; margin: 3px 0 0 0; @@ -538,8 +554,12 @@ nav #user-menu { clear: both; top: 4px; left: 10px; + padding: 2px; } -nav #user-menu-label { +#user-menu > a { + vertical-align: top; +} +#user-menu-label { font-size: 12px; padding: 3px 20px 9px 5px; height: 10px; From b4b1055b502c317513bf5c57794c004ced43a0de Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 31 Mar 2012 00:57:59 -0700 Subject: [PATCH 04/39] settings for unknown private mail acceptance --- boot.php | 2 +- database.sql | 10 ++++++++-- mod/settings.php | 40 ++++++++++++++++++++++++++-------------- update.php | 7 ++++++- view/settings.tpl | 4 ++++ 5 files changed, 45 insertions(+), 18 deletions(-) diff --git a/boot.php b/boot.php index 2a8dc3d047..ec1ffbbf48 100755 --- a/boot.php +++ b/boot.php @@ -11,7 +11,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1297' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1133 ); +define ( 'DB_UPDATE_VERSION', 1134 ); define ( 'EOL', "
      \r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 327b482c06..a271e5491c 100755 --- a/database.sql +++ b/database.sql @@ -289,9 +289,10 @@ CREATE TABLE IF NOT EXISTS `mail` ( `convid` int(10) unsigned NOT NULL, `title` char(255) NOT NULL, `body` mediumtext NOT NULL, - `seen` tinyint(1) NOT NULL, + `seen` tinyint(1) NOT NULL DEFAULT '0', `reply` tinyint(1) NOT NULL DEFAULT '0', - `replied` tinyint(1) NOT NULL, + `replied` tinyint(1) NOT NULL DEFAULT '0', + `unknown` tinyint(1) NOT NULL DEFAULT '0', `uri` char(255) NOT NULL, `parent-uri` char(255) NOT NULL, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -300,6 +301,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( KEY `guid` (`guid`), KEY `convid` (`convid`), KEY `reply` (`reply`), + KEY `unknown` (`unknown`), KEY `uri` (`uri`), KEY `parent-uri` (`parent-uri`), KEY `created` (`created`) @@ -453,6 +455,8 @@ CREATE TABLE IF NOT EXISTS `user` ( `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0', `hidewall` tinyint(1) unsigned NOT NULL DEFAULT '0', `blocktags` tinyint(1) unsigned NOT NULL DEFAULT '0', + `unkmail` tinyint(1) unsigned NOT NULL DEFAULT '0', + `cntunkmail` int(11) unsigned NOT NULL DEFAULT '10', `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535', `page-flags` int(11) unsigned NOT NULL DEFAULT '0', `prvnets` tinyint(1) NOT NULL DEFAULT '0', @@ -472,6 +476,8 @@ CREATE TABLE IF NOT EXISTS `user` ( KEY `account_expired` (`account_expired`), KEY `hidewall` (`hidewall`), KEY `blockwall` (`blockwall`), + KEY `unkmail` (`unkmail`), + KEY `cntunkmail` (`cntunkmail`), KEY `blocked` (`blocked`), KEY `verified` (`verified`), KEY `login_date` (`login_date`) diff --git a/mod/settings.php b/mod/settings.php index ce5ceea825..ce2d64851b 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -303,7 +303,8 @@ function settings_post(&$a) { $page_flags = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0); $blockwall = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted! $blocktags = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted! - + $unkmail = (((x($_POST,'unkmail')) && (intval($_POST['unkmail']) == 1)) ? 1: 0); + $cntunkmail = ((x($_POST,'cntunkmail')) ? intval($_POST['cntunkmail']) : 0); $suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0); $hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0); $hidewall = (($_POST['hidewall'] == 1) ? 1: 0); @@ -391,7 +392,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','suggestme', $suggestme); - $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d WHERE `uid` = %d LIMIT 1", + $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %d WHERE `uid` = %d LIMIT 1", dbesc($username), dbesc($email), dbesc($openid), @@ -410,6 +411,8 @@ function settings_post(&$a) { intval($blockwall), intval($hidewall), intval($blocktags), + intval($unkmail), + intval($cntunkmail), intval(local_user()) ); if($r) @@ -760,17 +763,19 @@ function settings_content(&$a) { if(count($p)) $profile = $p[0]; - $username = $a->user['username']; - $email = $a->user['email']; - $nickname = $a->user['nickname']; - $timezone = $a->user['timezone']; - $notify = $a->user['notify-flags']; - $defloc = $a->user['default-location']; - $openid = $a->user['openid']; - $maxreq = $a->user['maxreq']; - $expire = ((intval($a->user['expire'])) ? $a->user['expire'] : ''); - $blockwall = $a->user['blockwall']; - $blocktags = $a->user['blocktags']; + $username = $a->user['username']; + $email = $a->user['email']; + $nickname = $a->user['nickname']; + $timezone = $a->user['timezone']; + $notify = $a->user['notify-flags']; + $defloc = $a->user['default-location']; + $openid = $a->user['openid']; + $maxreq = $a->user['maxreq']; + $expire = ((intval($a->user['expire'])) ? $a->user['expire'] : ''); + $blockwall = $a->user['blockwall']; + $blocktags = $a->user['blocktags']; + $unkmail = $a->user['unkmail']; + $cntunkmail = $a->user['cntunkmail']; $expire_items = get_pconfig(local_user(), 'expire','items'); $expire_items = (($expire_items===false)? '1' : $expire_items); // default if not set: 1 @@ -870,6 +875,12 @@ function settings_content(&$a) { )); + $unkmail = replace_macros($opt_tpl,array( + '$field' => array('unkmail', t('Permit unknown people to send you private messages?'), $unkmail, '', array(t('No'),t('Yes'))), + + )); + + $invisible = (((! $profile['publish']) && (! $profile['net-publish'])) ? true : false); @@ -946,7 +957,8 @@ function settings_content(&$a) { '$profile_in_net_dir' => $profile_in_net_dir, '$hide_friends' => $hide_friends, '$hide_wall' => $hide_wall, - + '$unkmail' => $unkmail, + '$cntunkmail' => array('cntunkmail', t('Maximum private messages per day from unknown people:'), $cntunkmail ,t("\x28to prevent spam abuse\x29")), '$h_not' => t('Notification Settings'), diff --git a/update.php b/update.php index a69742a949..d38e39f8b1 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ $expire.label From f5e3ec9a56f4f9aabe6c1d52831bf62a5bb61eb5 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 31 Mar 2012 04:02:51 -0400 Subject: [PATCH 05/39] forgot the css changes for last push Signed-off-by: Simon L'nu --- view/theme/dispy-dark/style.css | 8 +------- view/theme/dispy/style.css | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index f5788ef82d..6f5544a1cb 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -2894,13 +2894,7 @@ footer { } .qcomment-wrapper { padding: 0px; - margin: 2px; - list-style-type: none; -} -.qcomment, .qcomment:hover { - display: inline; - padding: 5px; - margin: 5px; + margin: 5px 5px 5px 81%; } .qcomment { opacity: 0.5; diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index fdcceab0c9..66f3cc47e0 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -2894,13 +2894,7 @@ footer { } .qcomment-wrapper { padding: 0px; - margin: 2px; - list-style-type: none; -} -.qcomment, .qcomment:hover { - display: inline; - padding: 5px; - margin: 5px; + margin: 5px 5px 5px 81%; } .qcomment { opacity: 0.5; From 6b086cd266f5e93c5b254f7a661747d889169505 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 31 Mar 2012 04:05:19 -0400 Subject: [PATCH 06/39] Merge branch 'master', remote-tracking branch 'remotes/upstream/master' * remotes/upstream/master: * master: From 0b4165493558a7084dab057c1c2784c7b4872332 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 31 Mar 2012 11:09:57 +0200 Subject: [PATCH 07/39] bug-fixes in diabook-derivates --- .../theme/diabook-aerith/icons/photo-menu.jpg | Bin 0 -> 459 bytes view/theme/diabook-aerith/jot.tpl | 12 +- view/theme/diabook-aerith/style-network.css | 9 +- view/theme/diabook-aerith/style.css | 95 ++++++++++++++++ view/theme/diabook-aerith/theme.php | 8 +- view/theme/diabook-blue/jot.tpl | 12 +- view/theme/diabook-blue/style-network.css | 1 + view/theme/diabook-blue/style-profile.css | 1 + view/theme/diabook-red/icons/photo-menu.jpg | Bin 0 -> 459 bytes view/theme/diabook-red/jot.tpl | 12 +- view/theme/diabook-red/style-network.css | 8 +- view/theme/diabook-red/style-profile.css | 4 +- view/theme/diabook-red/style.css | 105 +++++++++++++++++- view/theme/diabook-red/theme.php | 8 +- view/theme/diabook/jot.tpl | 12 +- view/theme/diabook/style-network.css | 1 + view/theme/diabook/style-profile.css | 1 + 17 files changed, 249 insertions(+), 40 deletions(-) create mode 100755 view/theme/diabook-aerith/icons/photo-menu.jpg create mode 100755 view/theme/diabook-red/icons/photo-menu.jpg diff --git a/view/theme/diabook-aerith/icons/photo-menu.jpg b/view/theme/diabook-aerith/icons/photo-menu.jpg new file mode 100755 index 0000000000000000000000000000000000000000..fde5eb53524ddb12ec5642f33d0d34e14e256193 GIT binary patch literal 459 zcmex=&g!NbMF!_CFb&C4ewz{@Ad$IUGuCLky*A}T7%!!Ir&CL$pu zA}RthgpnDjhlQ1sm6cP3mz!6FWbpq0gCGZk0D}NCqY?v?AS1IN>UQrQGDKoE6M2QoDc3G+f#K-Lz&!r^Qc^B##H0%WszGMCU1W znAE#pe4KOt&Ml**OEy0VoUS}?d3@zno#;NjlP3257arA~E4nCar)(9G=iXTV|0V#| C@@!oI literal 0 HcmV?d00001 diff --git a/view/theme/diabook-aerith/jot.tpl b/view/theme/diabook-aerith/jot.tpl index 387eb1f91a..5ef723d727 100755 --- a/view/theme/diabook-aerith/jot.tpl +++ b/view/theme/diabook-aerith/jot.tpl @@ -21,26 +21,26 @@
      -
      +
      -
      +
      -
    {{ endif }} @@ -81,4 +80,3 @@ $contact_block - diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 6f5544a1cb..5f9b38f8c4 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -1062,6 +1062,8 @@ section { } .tabs li { display: inline; + font-size: smaller; + font-weight: bold; } .tab { border: 1px solid #729fcf; @@ -1120,6 +1122,7 @@ section { } .wall-item-content { overflow-x: auto; + margin: 0px 15px 0px 5px; } /* removing it from here, vs. putting it in .wall-item-content * might break things for people. we shall see ;) */ @@ -1203,6 +1206,7 @@ section { .wall-item-body { margin: 20px 20px 10px 0px; text-align: left; + overflow-x: auto; } .wall-item-lock-wrapper { float: right; @@ -2072,6 +2076,9 @@ div[id$="wrapper"] br { float:left; font-size:20px; } +.event { + background: #2e2f2e; +} .vevent { border:1px solid #ccc; } @@ -2083,15 +2090,14 @@ div[id$="wrapper"] br { margin-left: 10px; margin-right: 10px; } - #new-event-link { margin-bottom: 10px; } .edit-event-link, .plink-event-link { - float: left; - margin-top: 4px; - margin-right: 4px; - margin-bottom: 15px; + /*float: left; */ + /*margin-top: 4px; */ + /*margin-right: 4px;*/ + /*margin-bottom: 15px;*/ } .event-description:before { content: url('../../../images/calendar.png'); @@ -2100,6 +2106,7 @@ div[id$="wrapper"] br { .event-start, .event-end { margin-left: 10px; width: 330px; + font-size: smaller; } .event-start .dtstart, .event-end .dtend { float: right; @@ -2200,6 +2207,10 @@ div[id$="wrapper"] br { #item-delete-selected-desc:hover { text-decoration: underline; } +.fc-state-highlight { + background: #eec; + color: #2e2f2e; +} /** diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index 7115faca15..17d31feda2 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -113,6 +113,10 @@ EOT; function dispydark_community_info() { $a = get_app(); + $aside['$lastusers_title'] = t('Last users'); + $aside['$lastusers_items'] = array(); + $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); + $fostitJS = "javascript: (function() { the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + @@ -138,6 +142,7 @@ function dispydark_community_info() { } // aside on profile page -if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) { +//if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) { dispydark_community_info(); -} +//} + diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 66f3cc47e0..49148eed4b 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -146,7 +146,7 @@ a:hover { } .required { display: inline; - color: #ff0; + color: #f00; font-size: 16px; font-weight: bold; margin: 3px; @@ -1062,6 +1062,8 @@ section { } .tabs li { display: inline; + font-size: smaller; + font-weight: bold; } .tab { border: 1px solid #729fcf; @@ -1120,6 +1122,7 @@ section { } .wall-item-content { overflow-x: auto; + margin: 0px 15px 0px 5px; } /* removing it from here, vs. putting it in .wall-item-content * might break things for people. we shall see ;) */ @@ -1203,6 +1206,7 @@ section { .wall-item-body { margin: 20px 20px 10px 0px; text-align: left; + overflow-x: auto; } .wall-item-lock-wrapper { float: right; From 5c2fdc795fc5273176a7f81d989ad06e16945f1c Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 1 Apr 2012 00:59:35 -0700 Subject: [PATCH 20/39] send unverified private mail using zrl --- boot.php | 7 ++ include/message.php | 85 +++++++++++++++++ mod/message.php | 19 +++- mod/settings.php | 2 +- mod/wallmessage.php | 149 ++++++++++++++++++++++++++++++ view/mail_display.tpl | 4 + view/profile_vcard.tpl | 3 + view/theme/duepuntozero/style.css | 10 ++ view/wallmessage.tpl | 32 +++++++ view/wallmsg-header.tpl | 82 ++++++++++++++++ 10 files changed, 387 insertions(+), 6 deletions(-) create mode 100644 mod/wallmessage.php create mode 100755 view/wallmessage.tpl create mode 100755 view/wallmsg-header.tpl diff --git a/boot.php b/boot.php index bdd8d4f962..683daf4016 100755 --- a/boot.php +++ b/boot.php @@ -984,6 +984,12 @@ function profile_sidebar($profile, $block = 0) { if((remote_user()) && ($_SESSION['visitor_visiting'] == $profile['uid'])) $connect = False; + if(get_my_url() && $profile['unkmail']) + $wallmessage = t('Message'); + else + $wallmessage = false; + + // show edit profile to yourself if ($profile['uid'] == local_user()) { @@ -1066,6 +1072,7 @@ function profile_sidebar($profile, $block = 0) { $o .= replace_macros($tpl, array( '$profile' => $profile, '$connect' => $connect, + '$wallmessage' => $wallmessage, '$location' => template_escape($location), '$gender' => $gender, '$pdesc' => $pdesc, diff --git a/include/message.php b/include/message.php index 7ad80ae9c6..377d7c715b 100755 --- a/include/message.php +++ b/include/message.php @@ -1,4 +1,5 @@ get_baseurl() . ':' . local_user() . ':' . $hash ; + + $convid = 0; + $reply = false; + + require_once('include/Scrape.php'); + + $me = probe_url($replyto); + + if(! $me['name']) + return -2; + + $conv_guid = get_guid(); + + $recip_handle = $recipient['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); + + $sender_nick = basename($replyto); + $sender_host = substr($replyto,strpos($replyto,'://')+3); + $sender_host = substr($sender_host,0,strpos($sender_host,'/')); + $sender_handle = $sender_nick . '@' . $sender_host; + + $handles = $recip_handle . ';' . $sender_handle; + + $r = q("insert into conv (uid,guid,creator,created,updated,subject,recips) values(%d, '%s', '%s', '%s', '%s', '%s', '%s') ", + intval(local_user()), + dbesc($conv_guid), + dbesc($sender_handle), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc($subject), + dbesc($handles) + ); + + $r = q("select * from conv where guid = '%s' and uid = %d limit 1", + dbesc($conv_guid), + intval($recipient['uid']) + ); + if(count($r)) + $convid = $r[0]['id']; + + if(! $convid) { + logger('send message: conversation not found.'); + return -4; + } + + $r = q("INSERT INTO `mail` ( `uid`, `guid`, `convid`, `from-name`, `from-photo`, `from-url`, + `contact-id`, `title`, `body`, `seen`, `reply`, `replied`, `uri`, `parent-uri`, `created`, `unknown`) + VALUES ( %d, '%s', %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d, '%s', '%s', '%s', %d )", + intval($recipient['uid']), + dbesc(get_guid()), + intval($convid), + dbesc($me['name']), + dbesc($me['photo']), + dbesc($me['url']), + 0, + dbesc($subject), + dbesc($body), + 0, + 0, + 0, + dbesc($uri), + dbesc($replyto), + datetime_convert(), + 1 + ); + + return 0; + +} diff --git a/mod/message.php b/mod/message.php index c347468d1a..1369fde2e2 100755 --- a/mod/message.php +++ b/mod/message.php @@ -223,9 +223,13 @@ function message_content(&$a) { $tpl = get_markup_template('mail_list.tpl'); foreach($r as $rr) { - if (link_compare($rr['from-url'],$myprofile)){ + if($rr['unknown']) { + $partecipants = sprintf( t("Unknown sender - %s"),$rr['from-name']); + } + elseif (link_compare($rr['from-url'],$myprofile)){ $partecipants = sprintf( t("You and %s"), $rr['name']); - } else { + } + else { $partecipants = sprintf( t("%s and You"), $rr['from-name']); } @@ -234,7 +238,7 @@ function message_content(&$a) { '$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'], + '$from_photo' => (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']), '$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . '')), '$delete' => t('Delete conversation'), '$body' => template_escape($rr['body']), @@ -297,7 +301,11 @@ function message_content(&$a) { $mails = array(); $seen = 0; + $unknown = false; + foreach($messages as $message) { + if($message['unknown']) + $unknown = true; if($message['from-url'] == $myprofile) { $from_url = $myprofile; $sparkle = ''; @@ -323,7 +331,7 @@ function message_content(&$a) { } $select = $message['name'] . ''; $parent = ''; - + $tpl = get_markup_template('mail_display.tpl'); $o = replace_macros($tpl, array( @@ -331,7 +339,8 @@ function message_content(&$a) { '$thread_subject' => $message['title'], '$thread_seen' => $seen, '$delete' => t('Delete conversation'), - + '$canreply' => (($unknown) ? false : '1'), + '$unknown_text' => t("No secure communications available. You may be able to respond from the sender's profile page."), '$mails' => $mails, // reply diff --git a/mod/settings.php b/mod/settings.php index ce2d64851b..926d1faa5b 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -876,7 +876,7 @@ function settings_content(&$a) { $unkmail = replace_macros($opt_tpl,array( - '$field' => array('unkmail', t('Permit unknown people to send you private messages?'), $unkmail, '', array(t('No'),t('Yes'))), + '$field' => array('unkmail', t('Permit unknown people to send you private mail?'), $unkmail, '', array(t('No'),t('Yes'))), )); diff --git a/mod/wallmessage.php b/mod/wallmessage.php new file mode 100644 index 0000000000..1a4882b643 --- /dev/null +++ b/mod/wallmessage.php @@ -0,0 +1,149 @@ +argc > 1) ? notags($a->argv[1]) : ''); + if((! $recipient) || (! $body)) { + return; + } + + $r = q("select * from user where nickname = '%s' limit 1", + dbesc($recipient) + ); + + if(! count($r)) { + logger('wallmessage: no recipient'); + return; + } + + $user = $r[0]; + + if(! intval($user['unkmail'])) { + notice( t('Permission denied.') . EOL); + return; + } + + $r = q("select count(*) as total from mail where uid = %d and created > UTC_TIMESTAMP() - INTERVAL 1 day and unknown = 1", + intval($user['uid']) + ); + + if($r[0]['total'] > $user['cntunkmail']) { + notice( sprintf( t('Number of daily wall messages for %s exceeded. Message failed.', $user['username']))); + return; + } + + // Work around doubled linefeeds in Tinymce 3.5b2 +dbg(1); + $body = str_replace("\r\n","\n",$body); + $body = str_replace("\n\n","\n",$body); + + + $ret = send_wallmessage($user, $body, $subject, $replyto); + + switch($ret){ + case -1: + notice( t('No recipient selected.') . EOL ); + break; + case -2: + notice( t('Unable to check your home location.') . EOL ); + break; + case -3: + notice( t('Message could not be sent.') . EOL ); + break; + case -4: + notice( t('Message collection failure.') . EOL ); + break; + default: + info( t('Message sent.') . EOL ); + } +dbg(0); +// goaway($a->get_baseurl() . '/profile/' . $user['nickname']); + +} + + +function wallmessage_content(&$a) { + + if(! get_my_url()) { + notice( t('Permission denied.') . EOL); + return; + } + + $recipient = (($a->argc > 1) ? $a->argv[1] : ''); + + if(! $recipient) { + notice( t('No recipient.') . EOL); + return; + } + + $r = q("select * from user where nickname = '%s' limit 1", + dbesc($recipient) + ); + + if(! count($r)) { + notice( t('No recipient.') . EOL); + logger('wallmessage: no recipient'); + return; + } + + $user = $r[0]; + + if(! intval($user['unkmail'])) { + notice( t('Permission denied.') . EOL); + return; + } + + $r = q("select count(*) as total from mail where uid = %d and created > UTC_TIMESTAMP() - INTERVAL 1 day and unknown = 1", + intval($user['uid']) + ); + + if($r[0]['total'] > $user['cntunkmail']) { + notice( sprintf( t('Number of daily wall messages for %s exceeded. Message failed.', $user['username']))); + return; + } + + + + $tpl = get_markup_template('wallmsg-header.tpl'); + + $a->page['htmlhead'] .= replace_macros($tpl, array( + '$baseurl' => $a->get_baseurl(true), + '$editselect' => '/(profile-jot-text|prvmail-text)/', + '$nickname' => $user['nickname'], + '$linkurl' => t('Please enter a link URL:') + )); + + + + $tpl = get_markup_template('wallmessage.tpl'); + $o .= replace_macros($tpl,array( + '$header' => t('Send Private Message'), + '$subheader' => sprintf( t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.'), $user['username']), + '$to' => t('To:'), + '$subject' => t('Subject:'), + '$recipname' => $user['username'], + '$nickname' => $user['nickname'], + '$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''), + '$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''), + '$readonly' => '', + '$yourmessage' => t('Your message:'), + '$select' => $select, + '$parent' => '', + '$upload' => t('Upload photo'), + '$insert' => t('Insert web link'), + '$wait' => t('Please wait') + )); + + return $o; + } diff --git a/view/mail_display.tpl b/view/mail_display.tpl index 69c7e07222..8fbc129299 100644 --- a/view/mail_display.tpl +++ b/view/mail_display.tpl @@ -3,4 +3,8 @@ {{ inc mail_conv.tpl }}{{endinc}} {{ endfor }} +{{ if $canreply }} {{ inc prv_message.tpl }}{{ endinc }} +{{ else }} +$unknown_text +{{endif }} \ No newline at end of file diff --git a/view/profile_vcard.tpl b/view/profile_vcard.tpl index 154f22363c..d1e6847951 100755 --- a/view/profile_vcard.tpl +++ b/view/profile_vcard.tpl @@ -38,6 +38,9 @@ {{ if $connect }}
  • $connect
  • {{ endif }} + {{ if $wallmessage }} +
  • $wallmessage
  • + {{ endif }}
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 8a8fac662b..23db84c2c8 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -194,6 +194,16 @@ aside { font-weight: bold; background: #3465a4 url('friendika-16.png') no-repeat 95% center; } +#wallmessage-link { + display: block; + color: #FFFFFF; + -webkit-border-radius: 5px ; + -moz-border-radius: 5px; + border-radius: 5px; + padding: 5px; + font-weight: bold; + background-color: #3465a4; +} /* section */ section { diff --git a/view/wallmessage.tpl b/view/wallmessage.tpl new file mode 100755 index 0000000000..66b2bc3a05 --- /dev/null +++ b/view/wallmessage.tpl @@ -0,0 +1,32 @@ + +

$header

+ +

$subheader

+ +
+
+ +$parent + +
$to
+$recipname + +
$subject
+ + +
$yourmessage
+ + + +
+ + +
+ +
+
+
+
+
diff --git a/view/wallmsg-header.tpl b/view/wallmsg-header.tpl new file mode 100755 index 0000000000..cb39225725 --- /dev/null +++ b/view/wallmsg-header.tpl @@ -0,0 +1,82 @@ + + + + + From f0b8d016154e274f5bfe4d3ec5ac3950621cc2ce Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 1 Apr 2012 03:19:37 -0700 Subject: [PATCH 21/39] try slightly better detection of html in feeds --- include/items.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index 9f7eb84d96..e09b888cab 100755 --- a/include/items.php +++ b/include/items.php @@ -416,7 +416,7 @@ function get_atom_elements($feed,$item) { // the wild, by sanitising it and converting supported tags to bbcode before we rip out any remaining // html. - if((strpos($res['body'],'<') !== false) || (strpos($res['body'],'>') !== false)) { + if((strpos($res['body'],'<') !== false) && (strpos($res['body'],'>') !== false)) { $res['body'] = reltoabs($res['body'],$base_url); @@ -429,13 +429,14 @@ function get_atom_elements($feed,$item) { // we shouldn't need a whitelist, because the bbcode converter // will strip out any unsupported tags. - // $config->set('HTML.Allowed', 'p,b,a[href],i'); $purifier = new HTMLPurifier($config); $res['body'] = $purifier->purify($res['body']); - $res['body'] = html2bbcode($res['body']); + $res['body'] = @html2bbcode($res['body']); } + else + $res['body'] = escape_tags($res['body']); $allow = $item->get_item_tags(NAMESPACE_DFRN,'comment-allow'); if($allow && $allow[0]['data'] == 1) From bc283f7c5df4b848a6a96db07450af011f03c515 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 1 Apr 2012 03:37:41 -0700 Subject: [PATCH 22/39] qcomment overflow --- view/theme/duepuntozero/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 23db84c2c8..1f897f3b05 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2989,6 +2989,14 @@ div.jGrowl div.info { padding: 3px; margin-top: 15px; margin-left: 25px; + width: 125px; + overflow-y: auto; +} + + +.qcomment option { + width: 125px; + overflow-x: hidden; } .qcomment { From 15ba0ef5d0bbfed0174c9b9360ebf6f912c90e80 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 1 Apr 2012 13:12:15 +0200 Subject: [PATCH 23/39] various bugfixes and css-fixes --- view/theme/diabook-aerith/jot.tpl | 2 +- view/theme/diabook-aerith/nav.tpl | 22 ++++++++++++---------- view/theme/diabook-aerith/theme.php | 5 ++++- view/theme/diabook-blue/nav.tpl | 22 ++++++++++++---------- view/theme/diabook-blue/theme.php | 5 ++++- view/theme/diabook-red/nav.tpl | 22 ++++++++++++---------- view/theme/diabook-red/theme.php | 5 ++++- view/theme/diabook/nav.tpl | 22 ++++++++++++---------- view/theme/diabook/photo-menu.jpg | Bin 0 -> 459 bytes view/theme/diabook/style.css | 2 +- view/theme/diabook/theme.php | 8 +++++++- 11 files changed, 69 insertions(+), 46 deletions(-) create mode 100755 view/theme/diabook/photo-menu.jpg diff --git a/view/theme/diabook-aerith/jot.tpl b/view/theme/diabook-aerith/jot.tpl index 5ef723d727..59066a19c5 100755 --- a/view/theme/diabook-aerith/jot.tpl +++ b/view/theme/diabook-aerith/jot.tpl @@ -34,7 +34,7 @@
-
+
diff --git a/view/theme/diabook-aerith/nav.tpl b/view/theme/diabook-aerith/nav.tpl index c344361031..f84b902d5b 100644 --- a/view/theme/diabook-aerith/nav.tpl +++ b/view/theme/diabook-aerith/nav.tpl @@ -11,16 +11,16 @@ {{ if $nav.network }} {{ endif }} {{ if $nav.contacts }}
- Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)

Account ID:
Password:

diff --git a/view/theme/diabook-aerith/theme.php b/view/theme/diabook-aerith/theme.php index e9fe8e0f0e..4900107507 100755 --- a/view/theme/diabook-aerith/theme.php +++ b/view/theme/diabook-aerith/theme.php @@ -139,7 +139,8 @@ function diabook_aerith_community_info(){ //nav FIND FRIENDS if(local_user()) { $nv = array(); - $nv['directory'] = Array('directory', t('Directory'), "", ""); + $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", ""); + $nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", ""); diff --git a/view/theme/diabook-blue/communityhome.tpl b/view/theme/diabook-blue/communityhome.tpl index cff75cd40a..3b95b376e2 100755 --- a/view/theme/diabook-blue/communityhome.tpl +++ b/view/theme/diabook-blue/communityhome.tpl @@ -34,6 +34,7 @@ {{ if $nv }}

Find Friends

$nv.directory.1
+$nv.global_directory.1
$nv.match.1
$nv.suggest.1
$nv.invite.1 diff --git a/view/theme/diabook-blue/fpostit/fpostit.php b/view/theme/diabook-blue/fpostit/fpostit.php index 65c43a2b9f..4505c99469 100644 --- a/view/theme/diabook-blue/fpostit/fpostit.php +++ b/view/theme/diabook-blue/fpostit/fpostit.php @@ -113,12 +113,12 @@ function showForm($error, $content) { echo <<

- Friendika Bookmarklet

+ Friendica Bookmarklet
- Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)

Account ID:
Password:

diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 3d54ba9efc..891c13cbf3 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -139,7 +139,8 @@ function diabook_blue_community_info(){ //nav FIND FRIENDS if(local_user()) { $nv = array(); - $nv['directory'] = Array('directory', t('Directory'), "", ""); + $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", ""); + $nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", ""); diff --git a/view/theme/diabook-red/communityhome.tpl b/view/theme/diabook-red/communityhome.tpl index 326c766b25..91935a9d35 100755 --- a/view/theme/diabook-red/communityhome.tpl +++ b/view/theme/diabook-red/communityhome.tpl @@ -34,6 +34,7 @@ {{ if $nv }}

Find Friends

$nv.directory.1
+$nv.global_directory.1
$nv.match.1
$nv.suggest.1
$nv.invite.1 diff --git a/view/theme/diabook-red/fpostit/fpostit.php b/view/theme/diabook-red/fpostit/fpostit.php index 65c43a2b9f..4505c99469 100644 --- a/view/theme/diabook-red/fpostit/fpostit.php +++ b/view/theme/diabook-red/fpostit/fpostit.php @@ -113,12 +113,12 @@ function showForm($error, $content) { echo <<

- Friendika Bookmarklet

+ Friendica Bookmarklet
- Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)

Account ID:
Password:

diff --git a/view/theme/diabook-red/theme.php b/view/theme/diabook-red/theme.php index b091295b7d..44a76a5e45 100755 --- a/view/theme/diabook-red/theme.php +++ b/view/theme/diabook-red/theme.php @@ -139,7 +139,8 @@ function diabook_red_community_info(){ //nav FIND FRIENDS if(local_user()) { $nv = array(); - $nv['directory'] = Array('directory', t('Directory'), "", ""); + $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", ""); + $nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", ""); diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 91871a7b96..d344cad31a 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -34,6 +34,7 @@ {{ if $nv }}

Find Friends

$nv.directory.1
+$nv.global_directory.1
$nv.match.1
$nv.suggest.1
$nv.invite.1 diff --git a/view/theme/diabook/fpostit/fpostit.php b/view/theme/diabook/fpostit/fpostit.php index 65c43a2b9f..4505c99469 100644 --- a/view/theme/diabook/fpostit/fpostit.php +++ b/view/theme/diabook/fpostit/fpostit.php @@ -113,12 +113,12 @@ function showForm($error, $content) { echo <<

- Friendika Bookmarklet

+ Friendica Bookmarklet
- Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)

Account ID:
Password:

diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 6ac64bedac..d6ee57316a 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -143,7 +143,8 @@ function diabook_community_info(){ //right_aside FIND FRIENDS if(local_user()) { $nv = array(); - $nv['directory'] = Array('directory', t('Directory'), "", ""); + $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", ""); + $nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", ""); From 1457d6e90f36a6a7bb07df3579b6e5c0475b121d Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 2 Apr 2012 01:26:45 +0100 Subject: [PATCH 35/39] Modified peopleyouknow to handle sites without Facebook better --- doc/peopleyouknow.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/peopleyouknow.md b/doc/peopleyouknow.md index 07a22e58d4..143c492176 100644 --- a/doc/peopleyouknow.md +++ b/doc/peopleyouknow.md @@ -1,8 +1,10 @@ This is your connector settings page. If you get lost, you can click this link to bring yourself back here. -This is the bit that makes Friendica unique. You can connect to anybody on the internet from your Friendica account using this page! The available connectors varies depending on which plugins you have installed, but for now, we'll walk you through Facebook. If you need help with the rest, you can always ask at Friendica Support or see the instructions here. +This is the bit that makes Friendica unique. You can connect to anybody on the internet from your Friendica account using this page! The available connectors varies depending on which plugins you have installed, but for now, we'll walk you through Facebook. Note that not all servers have the Facebook connector installed. If you can't find it in the list below, don't worry, we'll look at ways of connecting to more people in the following pages. -The biggest of them all is Facebook. Fortunately, this connector is really easy. Scroll down the page, and click Facebook Connector Settings. Enter your Facebook user name and password and let the application (the connector) do everything the options suggest. You can fine tune this later, but for now, we'll move on to making new friends. +The biggest of all social networks is Facebook. Fortunately, this connector is really easy. Scroll down the page, and click Facebook Connector Settings. Enter your Facebook user name and password and let the application (the connector) do everything the options suggest. You can fine tune this or experiment with the other connectors too. If you need help, you can always ask at Friendica Support or see the instructions here. + +When you're ready, we can move on to making new friends. From 581b54c974a9b9a050a8a0b9a17a19bd41b1f2f5 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Sun, 1 Apr 2012 21:28:31 -0400 Subject: [PATCH 36/39] allow users to set categories on their posts --- boot.php | 5 ++ include/contact_widgets.php | 28 ++++++++ include/conversation.php | 2 + include/text.php | 112 ++++++++++++++++++++++++++++++ mod/editpost.php | 2 + mod/item.php | 30 ++++++-- mod/profile.php | 21 +++++- view/categories_widget.tpl | 13 ++++ view/jot.tpl | 1 + view/theme/darkzero/style.css | 8 ++- view/theme/duepuntozero/style.css | 22 +++--- 11 files changed, 226 insertions(+), 18 deletions(-) create mode 100755 view/categories_widget.tpl diff --git a/boot.php b/boot.php index 2f2e28cebd..c2690f6ef0 100755 --- a/boot.php +++ b/boot.php @@ -293,6 +293,8 @@ class App { public $nav_sel; + public $category; + private $scheme; private $hostname; private $baseurl; @@ -377,6 +379,9 @@ class App { $this->argc = count($this->argv); if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) { $this->module = str_replace(".", "_", $this->argv[0]); + if(array_key_exists('2',$this->argv)) { + $this->category = $this->argv[2]; + } } else { $this->argc = 1; diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 7346b95afa..e0f37f078f 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -103,3 +103,31 @@ function fileas_widget($baseurl,$selected = '') { )); } +function categories_widget($baseurl,$selected = '') { + $a = get_app(); + + $saved = get_pconfig($a->profile['profile_uid'],'system','filetags'); + if(! strlen($saved)) + return; + + $matches = false; + $terms = array(); + $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $unescaped = xmlify(file_tag_decode($mtch[1])); + $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : '')); + } + } + + return replace_macros(get_markup_template('categories_widget.tpl'),array( + '$title' => t('Categories'), + '$desc' => '', + '$sel_all' => (($selected == '') ? 'selected' : ''), + '$all' => t('Everything'), + '$terms' => $terms, + '$base' => $baseurl, + + )); +} + diff --git a/include/conversation.php b/include/conversation.php index 5a922b2b52..df92a40ed0 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -974,6 +974,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$shortnoloc' => t('clear location'), '$title' => "", '$placeholdertitle' => t('Set title'), + '$category' => "", + '$placeholdercategory' => t('Categories (comma-separated list)'), '$wait' => t('Please wait'), '$permset' => t('Permission settings'), '$shortpermset' => t('permissions'), diff --git a/include/text.php b/include/text.php index 191f4fca8a..f204e3f9b9 100644 --- a/include/text.php +++ b/include/text.php @@ -1314,6 +1314,118 @@ function file_tag_file_query($table,$s,$type = 'file') { return " AND " . (($table) ? dbesc($table) . '.' : '') . "file regexp '" . dbesc($str) . "' "; } +// ex. given music,video return