diff options
-rw-r--r-- | doc/roadmap.bb | 4 | ||||
-rw-r--r-- | include/bbcode.php | 2 | ||||
-rw-r--r-- | include/features.php | 1 | ||||
-rw-r--r-- | include/follow.php | 23 | ||||
-rwxr-xr-x | include/oembed.php | 2 | ||||
-rw-r--r-- | include/photos.php | 17 | ||||
-rw-r--r-- | include/socgraph.php | 2 | ||||
-rw-r--r-- | mod/connedit.php | 15 | ||||
-rw-r--r-- | mod/viewconnections.php | 2 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rw-r--r-- | view/js/mod_connedit.js | 8 | ||||
-rwxr-xr-x | view/tpl/abook_edit.tpl | 30 |
12 files changed, 58 insertions, 50 deletions
diff --git a/doc/roadmap.bb b/doc/roadmap.bb index 54dbdc96b..fb4b83bb4 100644 --- a/doc/roadmap.bb +++ b/doc/roadmap.bb @@ -47,6 +47,10 @@ Zot API extensions More, more, more. +Evangelism + More documentation. More, more, more. + Libzot + DNS abstraction for V3 Allow a channel to live in an arbitrary "DNS" namespace, for instance "mike@core.redmatrix". Use our directories and zot to find the actual DNS location via redirection. This could potentially allow hubs to be hidden behind tor or alt-roots and accessible only via the matrix.
\ No newline at end of file diff --git a/include/bbcode.php b/include/bbcode.php index 33017c011..5504dce7a 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -746,7 +746,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace_callback("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", 'tryzrlvideo', $Text); } if (strpos($Text,'[/audio]') !== false) { - $Text = preg_replace_callback("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3))\[\/audio\]/ism", 'tryzrlaudio', $Text); + $Text = preg_replace_callback("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3|opus))\[\/audio\]/ism", 'tryzrlaudio', $Text); } // Try to Oembed diff --git a/include/features.php b/include/features.php index 1a4b2654f..6b4bc34c6 100644 --- a/include/features.php +++ b/include/features.php @@ -57,6 +57,7 @@ function get_features() { t('Post Composition Features'), // array('richtext', t('Richtext Editor'), t('Enable richtext editor'),false), array('markdown', t('Use Markdown'), t('Allow use of "Markdown" to format posts'),false), + array('large_photos', t('Large Photos'), t('Include large (640px) photo thumbnails in posts. If not enabled, use small (320px) photo thumbnails'),false), array('channel_sources', t('Channel Sources'), t('Automatically import channel content from other channels or feeds'),false), array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false), array('adult_photo_flagging', t('Flag Adult Photos'), t('Provide photo edit option to hide adult photos from default album view'),false), diff --git a/include/follow.php b/include/follow.php index 1abd0e3b9..06c0c5c62 100644 --- a/include/follow.php +++ b/include/follow.php @@ -66,14 +66,15 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $my_perms = get_channel_default_perms($uid); - if($is_red && $j) { + $role = get_pconfig($uid,'system','permissions_role'); + if($role) { + $x = get_role_perms($role); + if($x['perms_follow']) + $my_perms = $x['perms_follow']; + } - $role = get_pconfig($uid,'system','permissions_role'); - if($role) { - $x = get_role_perms($role); - if($x['perms_follow']) - $my_perms = $x['perms_follow']; - } + + if($is_red && $j) { logger('follow: ' . $url . ' ' . print_r($j,true), LOGGER_DEBUG); @@ -105,7 +106,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $xchan_hash = $x['hash']; - $their_perms = 0; $global_perms = get_perms(); @@ -163,12 +163,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) if($r) { $xchan_hash = $r[0]['xchan_hash']; $their_perms = 0; - $role = get_pconfig($uid,'system','permissions_role'); - if($role) { - $x = get_role_perms($role); - if($x['perms_follow']) - $my_perms = $x['perms_follow']; - } } } @@ -198,6 +192,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) } if($is_http) { + if(! intval(get_config('system','feed_contacts'))) { $result['message'] = t('Protocol disabled.'); return $result; diff --git a/include/oembed.php b/include/oembed.php index e08b287d1..38c433e99 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -21,7 +21,7 @@ function oembed_fetch_url($embedurl){ // These media files should now be caught in bbcode.php // left here as a fallback in case this is called from another source - $noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm"); + $noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm","opus"); $ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION); diff --git a/include/photos.php b/include/photos.php index 2e5e22968..ee94bac60 100644 --- a/include/photos.php +++ b/include/photos.php @@ -251,19 +251,24 @@ function photo_upload($channel, $observer, $args) { $arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid']; - if ($width_x_height) - $tag = '[zmg=' . $width_x_height. ']'; - else - $tag = '[zmg]'; + // We should also put a width_x_height on large photos. Left as an exercise for + // devs looking fo simple stuff to fix. - $preferred = intval(get_pconfig($channel['channel_id'],'system','post_photores')); - if($preferred == 1) { + $larger = feature_enabled($channel['channel_id'],'large_photos'); + if($larger) { $tag = '[zmg]'; if($r2) $smallest = 1; else $smallest = 0; } + else { + if ($width_x_height) + $tag = '[zmg=' . $width_x_height. ']'; + else + $tag = '[zmg]'; + } + $arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']' . $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]' diff --git a/include/socgraph.php b/include/socgraph.php index 15ef480f6..5aa72f0be 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -119,7 +119,7 @@ function poco_load($xchan = '',$url = null) { $name = $entry['displayName']; $hash = $entry['hash']; - $rating = ((array_key_exists('rating',$entry)) ? intval($entry['rating']) : 0); + $rating = ((array_key_exists('rating',$entry) && (! is_array($entry['rating']))) ? intval($entry['rating']) : 0); $rating_text = ((array_key_exists('rating_text',$entry)) ? escape_tags($entry['rating_text']) :''); if(x($entry,'urls') && is_array($entry['urls'])) { diff --git a/mod/connedit.php b/mod/connedit.php index c27f4588a..8270fa981 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -131,6 +131,7 @@ function connedit_post(&$a) { if(($_REQUEST['pending']) && ($abook_flags & ABOOK_FLAG_PENDING)) { $abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING ); $new_friend = true; + } $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_rating = %d, abook_rating_text = '%s', abook_flags = %d @@ -273,27 +274,19 @@ function connedit_content(&$a) { $sort_type = 0; $o = ''; - // this triggers some javascript to set Full Sharing by default after - // completing a "follow" - which can be changed to something else before - // form submission, but this gives us something useable - - if($_GET['follow'] == 1) { - $o .= '<script>var after_following = 1;</script>'; - } if(! local_user()) { notice( t('Permission denied.') . EOL); return login(); } - $my_perms = 0; + $my_perms = get_channel_default_perms(local_user()); $role = get_pconfig(local_user(),'system','permissions_role'); if($role) { $x = get_role_perms($role); if($x['perms_accept']) $my_perms = $x['perms_accept']; - else - $my_perms = get_channel_default_perms(local_user()); } + if($my_perms) { $o .= "<script>function connectDefaultShare() { \$('.abook-edit-me').each(function() { @@ -580,6 +573,7 @@ function connedit_content(&$a) { '$autolbl' => t('Apply the permissions indicated on this page to all new connections.'), '$buttons' => (($self) ? '' : $buttons), '$viewprof' => t('View Profile'), + '$clickme' => t('Click to open/close'), '$lbl_slider' => t('Slide to adjust your degree of friendship'), '$lbl_rating' => t('Rating (this information may be public)'), '$lbl_rating_txt' => t('Optionally explain your rating (this information may be public)'), @@ -627,6 +621,7 @@ function connedit_content(&$a) { '$lblrecent' => t('View conversations'), '$lblsuggest' => $lblsuggest, '$delete' => t('Delete contact'), + '$poll_interval' => contact_poll_interval($contact['priority'],(! $poll_enabled)), '$poll_enabled' => $poll_enabled, '$lastupdtext' => t('Last update:'), diff --git a/mod/viewconnections.php b/mod/viewconnections.php index 40d26c823..aab136c43 100644 --- a/mod/viewconnections.php +++ b/mod/viewconnections.php @@ -83,7 +83,7 @@ function viewconnections_content(&$a) { $tpl = get_markup_template("viewcontact_template.tpl"); $o .= replace_macros($tpl, array( - '$title' => t('View Connnections'), + '$title' => t('View Connections'), '$contacts' => $contacts, '$paginate' => paginate($a), )); diff --git a/version.inc b/version.inc index 27408b584..2574e9160 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-01-23.925 +2015-01-25.927 diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 765cbcc30..ee34f0508 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -1,13 +1,13 @@ function abook_perms_msg() { - $('.abook-permsmsg').show(); +// $('.abook-permsmsg').show(); // $('.abook-permschange').html(aStr['permschange']); - $('.abook-permssave').show(); +// $('.abook-permssave').show(); } function abook_perms_new() { - $('.abook-permsnew').show(); - $('.abook-permssave').show(); +// $('.abook-permsnew').show(); +// $('.abook-permssave').show(); } diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 7c75bfac4..fb02ff8ed 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -30,12 +30,18 @@ <input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" /> </div> - - {{if $last_update}} {{$lastupdtext}} {{$last_update}} {{/if}} + +{{if $is_pending}} +<div class="abook-pending-contact"> +{{include file="field_checkbox.tpl" field=$unapproved}} +</div> +{{/if}} + + {{if $notself}} {{if $slide}} <h3>{{$lbl_slider}}</h3> @@ -55,7 +61,6 @@ {{/if}} - {{if $self}} <div class="abook-autotext"> <div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div> @@ -63,19 +68,11 @@ </div> {{/if}} - <input type="hidden" name="contact_id" value="{{$contact_id}}"> <input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" /> <input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" /> - -{{if $is_pending}} -<div class="abook-pending-contact"> -{{include file="field_checkbox.tpl" field=$unapproved}} -</div> -{{/if}} - {{if $rating}} {{if $notself}} <h3 class="abook-rating-text-desc">{{$lbl_rating_txt}}</h3> @@ -83,6 +80,7 @@ {{/if}} {{/if}} +{{if $notself}} {{if $multiprofs }} <div> <h3>{{$lbl_vis1}}</h3> @@ -91,8 +89,15 @@ {{$profile_select}} </div> {{/if}} +{{/if}} <h3>{{$permlbl}}</h3> + +{{if $notself}} +<div id="connedit-perms-wrap" class="fakelink" onclick="openClose('connedit-perms');">{{$clickme}}</div> +<div id="connedit-perms" style="display: none;" > +{{/if}} + <div id="perm-desc" class="descriptive-text">{{$permnote}}</div> <table> <tr><td></td><td class="abook-them">{{$them}}</td><td colspan="2" class="abook-me">{{$me}}</td><td></td></tr> @@ -105,6 +110,9 @@ </div> +{{if $notself}} +</div> +{{/if}} <input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" /> |