aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--assets/diamondlattice.pngbin0 -> 534585 bytes
-rw-r--r--assets/home.html206
-rw-r--r--assets/logo_antiprism.pngbin0 -> 62321 bytes
-rw-r--r--assets/narrow.css218
-rw-r--r--assets/redmatrixlogo.pngbin0 -> 105403 bytes
-rw-r--r--assets/wide.css396
-rwxr-xr-xboot.php15
-rw-r--r--include/contact_widgets.php3
-rw-r--r--include/crypto.php4
-rw-r--r--include/nav.php2
-rw-r--r--include/widgets.php132
-rw-r--r--mod/allfriends.php60
-rw-r--r--mod/directory.php10
-rw-r--r--mod/home.php100
-rw-r--r--mod/magic.php37
-rw-r--r--mod/message.php23
-rw-r--r--mod/settings.php4
-rwxr-xr-xmod/setup.php2
-rw-r--r--mod/sources.php21
-rw-r--r--mod/zfinger.php32
-rw-r--r--version.inc2
-rw-r--r--view/css/mod_profiles.css6
-rw-r--r--view/js/mod_sources.js4
-rw-r--r--view/pdl/mod_message.pdl3
-rw-r--r--view/pdl/mod_settings.pdl4
-rwxr-xr-xview/tpl/peoplefind.tpl4
-rwxr-xr-xview/tpl/profile_edit.tpl2
-rw-r--r--view/tpl/sources_edit.tpl2
-rw-r--r--view/tpl/sources_new.tpl2
29 files changed, 1125 insertions, 169 deletions
diff --git a/assets/diamondlattice.png b/assets/diamondlattice.png
new file mode 100644
index 000000000..f1ed7dbd0
--- /dev/null
+++ b/assets/diamondlattice.png
Binary files differ
diff --git a/assets/home.html b/assets/home.html
new file mode 100644
index 000000000..cbeae1fd2
--- /dev/null
+++ b/assets/home.html
@@ -0,0 +1,206 @@
+<style>section { position: relative; } nav { z-index: 9999; position: fixed; width: 100%; top: 0; left: 0; } header { z-index: 10000; }</style>
+<script>
+// Scroll backgrounds at different rates to achieve the parallax effect
+$(window).scroll(function(e){
+ parallax();
+ });
+ function parallax(){
+ var scrolled = $(window).scrollTop();
+ $('.bg').css('top',-(scrolled*0.4)+'px');
+ $('.bg2').css('top',-(scrolled*0.5)+'px');
+
+}
+</script>
+<link rel='stylesheet' media='screen and (max-width: 830px)' href='assets/narrow.css' />
+<link rel='stylesheet' media='screen and (min-width: 831px)' href='assets/wide.css' />
+
+
+ <div id="header" align="center"><h1>Red Matrix</h1>
+ <div id="menubutton1"><p style="margin-top:2px;"><a href="#decentralise" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">decentralised</a></p></div>
+ <div id="menubutton2"><p style="margin-top:2px;"><a href="#identity" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">identity</a></p></div>
+ <div id="menubutton3"><p style="margin-top:2px;"><a href="#control" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">control</a></p></div>
+ <div id="menubutton4"><p style="margin-top:2px;"><a href="#freedom" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">freedom</a></p></div>
+ <div id="menubutton6"><p style="margin-top:2px;"><a href="#privacy" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">privacy</a></p></div>
+ </div>
+
+<body>
+<div class="bg"></div>
+<div class="bg2"></div>
+<div class="bg-mask"></div>
+<div id="bg-narrow"></div>
+
+
+<div class="section-heading" style="margin-top: 32px;">
+The internet is broken. We're fixing it.</div>
+
+<div>
+<div id="tagline">
+<img style="float:center;width:175px;padding:5px;" src="assets/logo_antiprism.png"><br>
+<span style="color:#808080;font-weight:bold;font-size:1.5em;">ma&middot;trix:</span><span style="color:#808080;font-weight:light;font-size:1.2em;"><i> something within or from which something else originates, develops, or takes form </i></span>
+</div>
+</div>
+
+<div id="intro-text">
+<p>Imagine an internet slightly different than what we have today. The internet of the future won't require logging in with passwords on every site you wish to access. It will just know who you are. An internet where you need to keep track of hundreds/thousands of passwords on hundreds/thousands of websites is fundamentally broken. But an internet with no privacy and where all your online activities are monitored and tracked is likewise broken.
+</p>
+<p>Imagine if you had an internet where the people using it could <b>create new services</b> and <b>communicate freely and privately</b> - and where you didn't need a different account on every website in the network in order to use each website. Where you had your own space and could <b>share anything you wanted</b> with anybody you wanted, any time you wanted. Where the <b>things you share in private stay private</b> instead of being under constant surveillance from advertising corporations and government intelligence agencies.
+</p>
+</div>
+
+<div class="summary-menu-container">
+<a class="summary-menu-item" href="#decentralise" >Decentralise</a>
+<a class="summary-menu-item" href="#identity" >Identity</a>
+<a class="summary-menu-item" href="#freedom" >Freedom</a>
+<a class="summary-menu-item" href="#control" >Access Control</a>
+<a class="summary-menu-item" href="#privacy" >Privacy</a>
+<a class="summary-menu-item" href="#identity" >Got Zot?</a>
+</div>
+
+<div class="summary-nodes-container">
+<div class="summary-node-1">
+<div class="summary-node-1-text">
+<div class="summary-node-header"><a href="#decentralise" style="color:#FFFFFF;text-decoration:none;margin-top:0px;font-size: 1.2em;">Decentralised</a></div>
+<div class="summary-node-text">
+<p id=menutrigger1><a href="#decentralise" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">No centralised servers means no one can censor your content or disable the network.</a></p>
+</div>
+</div>
+</div>
+<div class="summary-node-2">
+<div class="summary-node-2-text">
+<div class="summary-node-header"><a href="#identity" style="color:#FFFFFF;text-decoration:none;margin-top:0px;font-size: 1.2em;">Nomadic Identity</a></div>
+<div class="summary-node-text">
+<p id=menutrigger2><a href="#identity" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">You own and control your identity, and it can move freely inside the matrix.</a></p>
+</div>
+</div>
+</div>
+
+<div class="summary-node-3">
+<div class="summary-node-3-text">
+<div class="summary-node-header"><a href="#freedom" style="color:#FFFFFF;text-decoration:none;margin-top:0px;font-size: 1.2em;">Freedom</a></div>
+<div class="summary-node-text">
+<p id=menutrigger3><a href="#freedom" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">Use a trusted hub, or run your own server. Move where you want and take your data and connections with you. The choices are yours.</p>
+</div>
+</div>
+</div>
+<div class="summary-node-4">
+<div class="summary-node-4-text">
+<div class="summary-node-header"><a href="#control" style="color:#FFFFFF;text-decoration:none;margin-top:0px;font-size: 1.2em;">Access Control</a></div>
+<div class="summary-node-text">
+<p id=menutrigger4><a href="#control" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">Share what you want with whom you want. Permissions extend to the entire matrix.</a></p>
+</div>
+</div>
+</div>
+<div class="summary-node-5">
+<div class="summary-node-5-text">
+<div class="summary-node-header"></div>
+<div class="summary-node-text">
+<p><a href="#identity" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">Got Zot?</a></p>
+</div>
+</div>
+</div>
+<div class="summary-node-6">
+<div class="summary-node-6-text">
+<div class="summary-node-header"><a href="#privacy" style="color:#FFFFFF;text-decoration:none;margin-top:0px;font-size: 1.2em;">Privacy</a></div>
+<p class="summary-node-text"><a href="#privacy" style="color:#FFFFFF;text-decoration:none;margin-top:0px;">Privacy and encryption to suit your needs.</a></p>
+</div>
+</div>
+</div>
+
+
+<div id="menutrigger"></div>
+<section id="decentralise">
+
+<div class="section-heading">Decentralise. Build a more robust network.</div>
+<div class="section-text">
+<p>
+Now open your eyes. We've done some amazing things with decentralisation technology over the last few years and have created a different kind of network. We call it the Red Matrix. Forget the old internet - it's hopelessly broken and increasingly being choked off in order to take your money and spy on you. We're building tomorrow's internet today. And we're doing things a bit differently than what you may be used to. We could wait for this new internet to be built, but we don't really trust the typical corporations and governmental bodies to do it right. So we're building it on top of the old internet. And we're building privacy into its DNA. And it's <strong>here now</strong>.
+</p>
+<p>
+The Red Matrix is a decentralised network where <strong>people</strong> are in charge and the size of your server farm and wealth do not offer any comparable advantage. Anybody may participate on a level playing field. Cloud storage, file sharing, communications, content creation and management belong to <strong>everybody</strong> and can be shared with <strong>anybody</strong> (or <strong>somebody</strong>, or <strong>nobody</strong>). This is only a representative sample of the services we plan to offer. In an internet where creativity is allowed to flourish and corporate overlords have no power, the door is open to entirely new forms of expression and applications. The Red Matrix software is free and open source; created by volunteers and distributed under the MIT license.
+</p>
+<p>
+And the Red Matrix has <strong>Got Zot.</strong>
+</p>
+<p>
+So what the heck is <strong><em>Zot</em></strong>? I'm glad you asked...
+</div>
+</section>
+
+<br />
+<section id="identity">
+
+<div class="section-heading">Your identity is your own. One identity across the network.</div>
+<div class="section-text">
+
+<p>
+Zot is a revolutionary protocol which provides <strong>decentralised communications and identity</strong> management across the matrix. The resulting platform can provide web services comparable to those offered by large corporate providers, but without the large corporate provider and their associated privacy issues. Communications and social networking are an integral part of the matrix. Any channel (and any services provided by that channel) can make full use of feature-rich social communications on a global scale.
+</p>
+<p>
+We use the full power of the matrix to offer friend suggestions and directory services. You can also perform other things which would typically only be possibly on a centralised provider - such as "wall to wall" posts and private/multiple profiles and web content which can be tailored to the viewer. You won't find these features at all on other decentralised communication services. The difference is that Zot also provides decentralised <strong>identity services</strong>. This is what separates the men from the boys, and what makes life in the matrix so awesome.
+</p>
+</div>
+
+<div class="section-text">
+<p>
+Zot's identity layer is unique. It's like OpenID on steroids. It provides invisible single sign-on across all sites in the matrix; as well as nomadic identity so that your communications with friends, family, and business partners won't be affected by the loss of your primary communication node - either temporarily or permanently. The important bits of your identity and relationships can be backed up to a thumb drive and may appear at any node in the matrix at any time - with all your friends and preferences intact. These nomadic instances are kept in sync so any instance can take over if another one is compromised or damaged. This protects you against not only major system failure, but also temporary site overloads and governmental manipulation. You cannot be silenced. You cannot be removed from the matrix.
+</p>
+<p>
+As you browse the matrix viewing channels and their unique content, you are seamlessly authenticated as you go, even across completely different server hubs. No password dialogues. Nothing to type. You're just greeted by name on every new site you visit. How does Zot do that? We call it "magic-auth" because it really is technology that is so advanced as to be indistinguishable from magic. You login only once on your home hub (or any nomadic backup hub you have chosen). This allows you to access any authenticated services provided anywhere in the matrix - such as shopping and access to private information. This is just like the services offered by large corporate providers with huge user databases; however you can be a member of this community and a server on this network using a "plug computer" like a Rasberry Pi. Your password isn't stored on a thousand different sites where it can be stolen and used to clean out your bank accounts.
+</p>
+</div>
+</section>
+<section id="control">
+
+<div class="section-heading">You control your data. Red Matrix enforces your permissions.</div>
+<div class="section-text">
+
+<p>
+Zot's identity layer allows you to provide fine-grained permissions to any content you wish to publish - and these permissions extend across the Red Matrix. This is like having one super huge website made up of an army of small individual websites - and where each channel in the matrix can completely control their privacy and sharing preferences for any web resources they create.
+</p>
+<p>
+Example: you want a photo to be visible to your family and three select friends, but not your work colleagues. In the matrix this is easy. <strong>Even if your family members, work colleagues, and friends all have accounts on different hubs.</strong>
+</p>
+<p>
+Currently the matrix supports communications, photo albums, events, and files. This will be extended in the future to provide content management services (web pages) and cloud storage facilities such as WebDAV and multi-media libraries. Every object and how it is shared and with whom is completely <strong>under your control</strong>.
+</p>
+<p>
+Again, this type of control is available on large corporate providers, because they own the user database. Within the matrix, there is no need for a huge user database on your machine - because <strong>the matrix is your user database</strong> and for all intents and purposes has infinite capacity and is spread amongst hundreds, and potentially millions of computers. Access can be granted or denied for any resource, to any channel or any group of channels; anywhere within the matrix. They do not need to have an account on your hub.
+</p>
+</div>
+</section>
+<div class="clear"></div>
+
+<section id="privacy">
+
+<div class="section-heading">Reclaim your privacy. Red Matrix is built for <i>you</i>, not governments and corporations.</div>
+<div class="section-text">
+<p>
+Your communications may be public or private - and we allow your private communications to be as private as you wish them to be. Private communications comprise not only fully encrypted transport, but also encrypted storage to help protect against accidental snooping and disclosure by rogue system administrators and internet service providers.
+</p>
+<p>
+Want more? You can fully encrypt your messages "end to end" using your choice of encryption ciphers and using a passphrase that only you and the recipient(s) know - <strong>in addition to</strong> our standard multi-layer encryption.
+</p>
+<p>
+Want more? Our end to end encryption is pluggable. You can define your own chain of multiple encryption steps with multiple keys, and include algorithms known only to you and the recipient. At some point even the US National Security Agency will have to throw up their hands. There won't be enough computational power available in the universe to decode your private message.
+</p>
+<p>
+We also provide optional message expiration as a standard feature. When the expiration date/time passes, your message is removed from the network.
+</p>
+</div>
+</section>
+<div class="clear"></div>
+
+
+
+<section id="freedom">
+<a href="https://github.com/friendica/red"><img style="float:center;width:125px;" src="assets/logo_antiprism.png"></a>
+</section>
+
+<br>
+<br>
+</div>
+
+
+ <div id="footer" align="center"> <a href="http://redmatrix.me">redmatrix.me</a> &#149; <a href="https://github.com/friendica/red"><b>Get Zot now!</b></a> &#149; <a href="https://github.com/friendica/red/wiki">Wiki</a> &#149; <a href="http://zothub.com/pubsites">Public Server Directory</a> </div>
+
+
diff --git a/assets/logo_antiprism.png b/assets/logo_antiprism.png
new file mode 100644
index 000000000..b72e2a211
--- /dev/null
+++ b/assets/logo_antiprism.png
Binary files differ
diff --git a/assets/narrow.css b/assets/narrow.css
new file mode 100644
index 000000000..dc47c6984
--- /dev/null
+++ b/assets/narrow.css
@@ -0,0 +1,218 @@
+body {
+ font-family: 'Ubuntu',Tahoma,Helvetica,Arial,sans-serif;
+ color: #111111;
+ text-align: center;
+ padding:0 0 22px 0;
+}
+
+ div#header{
+ position:absolute;
+ z-index: 100;
+ top:0;
+ left:0;
+ width:100%;
+ height: 55px;
+ background: rgba(100, 0, 0, 0.8);
+ background-size:3000px 55px;
+ color: #fff;
+ display:none;
+ }
+
+ @media screen{
+ body>div#header{
+ position: fixed;
+ }
+ body>div#footer{
+ position:fixed;
+ }
+
+ }
+
+
+ div#footer{
+ position:absolute;
+ bottom:0;
+ left:0;
+ width:100%;
+ height:22px;
+ background: #AD002C;
+ color: #fff;
+}
+
+#intro-text {
+color:#c60032;font-size:1.2em;width:70%;margin-right:auto;margin-left:auto;text-align:justify;
+}
+div.section-text {
+color:#c60032;font-size:1.2em;width:80%;margin-right:auto;margin-left:auto;text-align:justify;
+}
+
+#tagline {
+ color: #c60032;
+ width:80%;
+ margin-top:0px;
+ margin-bottom:20px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+div.red-button {
+ width:150px;
+ margin-left: auto;
+ margin-right: auto;
+ font-weight: 500;
+ font-size: larger;
+ background-color: #c60032;
+ border: 2px solid lightgray;
+ border-radius: 5px;
+ padding: 12px;
+}
+div.red-button a {
+ text-decoration: none;
+ color:#FFFFFF;
+}
+div.red-button a:hover {
+ text-decoration: none;
+ font-weight:600;
+
+}
+
+#footer {
+ font-size: 12px;
+ color:#fff;
+ padding-top: 4px;
+}
+
+#footer a {
+ text-decoration: none;
+ color:#fff;
+}
+.bg {
+ display:none;
+}
+.bg2 {
+ display:none;
+}
+.bg-mask {
+ display:none;
+}
+
+#bg-narrow {
+ background: url('diamondlattice.png') center center no-repeat ;
+ opacity: 0.05;
+ position:absolute;
+ top:0;
+ left:0;
+ z-index: -1;
+ width:100%;
+ height:300%;
+ display:none;
+}
+
+div.summary-nodes-container {
+ display:none;
+}
+div.summary-menu-container {
+ display:block;
+}
+a.summary-menu-item {
+ display: block;
+ width:70%;
+ margin-left:auto;margin-right:auto;
+ border-radius:10px;
+ color:#FFFFFF;
+ font-size:1.2em;
+ text-align:center;
+ background:#c60032;
+ margin-bottom:5px;
+}
+a.summary-menu-item:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+
+
+div#menubutton1 {
+ position: fixed;
+ top:10px;
+ left:200px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#c60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton1:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div#menubutton2 {
+ position: fixed;
+ top:10px;
+ left:350px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#c60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton2:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div#menubutton3 {
+ position: fixed;
+ top:10px;
+ right:350px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#c60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton3:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div#menubutton4 {
+ position: fixed;
+ top:10px;
+ right:200px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#c60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton4:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.section-heading {
+ font-size:2.0em;
+ color:#c60032;
+}
+div.section-subtitle {
+ font-size:1.5em;
+ color:#c60032;
+} \ No newline at end of file
diff --git a/assets/redmatrixlogo.png b/assets/redmatrixlogo.png
new file mode 100644
index 000000000..6929ae14f
--- /dev/null
+++ b/assets/redmatrixlogo.png
Binary files differ
diff --git a/assets/wide.css b/assets/wide.css
new file mode 100644
index 000000000..84dbc47a2
--- /dev/null
+++ b/assets/wide.css
@@ -0,0 +1,396 @@
+body {
+ font-family: 'Ubuntu',Tahoma,Helvetica,Arial,sans-serif;
+ color: #111111;
+ /*color: rgba(0,0,0,0.0); */
+ text-align: center;
+ /* background-image: url("redmatrixbkgd.jpg"); */
+ /*background: #ececec;*/
+ padding:0 0 22px 0;
+ /* background: url(redmatrixbkgd.jpg) no-repeat center center scroll; */
+ /*
+ -webkit-background-size: cover;
+ -moz-background-size: cover;
+ -o-background-size: cover;
+ background-size: cover;
+ */
+}
+
+#intro-text {
+color:#C60032;font-size:1.2em;width:700px;margin-right:auto;margin-left:auto;text-align:justify;
+}
+div.section-text {
+color:#C60032;font-size:1.2em;width:700px;margin-right:auto;margin-left:auto;text-align:justify;
+}
+
+
+ div#header{
+ display:none;
+ position:absolute;
+ z-index: 100;
+ top:0;
+ left:0;
+ width:100%;
+ height: 55px;
+ /* background-image: url("redmatrixbkgd.jpg"); */
+ background: rgba(198, 0, 50, 0.8);
+ background-size:3000px 55px;
+ /* background: #afafaf;*/
+ color: #fff;
+ }
+ @media screen{
+ body>div#header{
+ position: fixed;
+ }
+ body>div#footer{
+ position:fixed;
+ }
+
+ }
+
+ div#footer{
+ position:absolute;
+ bottom:0;
+ left:0;
+ width:100%;
+ height:22px;
+ background: #AD002C;
+ color: #fff;
+ }
+
+
+
+#tagline {
+ color: #880000;
+ width:600px;
+ margin-top:0px;
+ margin-bottom:20px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+
+.clear {
+ clear: both;
+}
+
+div.red-button {
+ width:150px;
+ margin-left: auto;
+ margin-right: auto;
+ font-weight: 500;
+ font-size: larger;
+ background-color: #C60032;
+ border: 2px solid lightgray;
+ border-radius: 5px;
+ padding: 12px;
+}
+div.red-button a {
+ text-decoration: none;
+ color:#FFFFFF;
+}
+div.red-button a:hover {
+ text-decoration: none;
+ font-weight:600;
+}
+
+#footer {
+ font-size: 12px;
+ color:#fff;
+ padding-top: 4px;
+}
+
+#footer a {
+ text-decoration: none;
+ color:#fff;
+}
+
+.bg {
+ background: url('diamondlattice.png') center center no-repeat ;
+ position: fixed;
+ width: 100%;
+ height: 1350px;
+
+ top:0px;
+ left:0px;
+ opacity: 1.0;
+ z-index: -1;
+}
+.bg2 {
+ background: url('diamondlattice.png') center center no-repeat;
+ position: fixed;
+
+ width: 100%;
+ height: 1350px;
+ top:0px;
+ left:0px;
+ opacity: 1.0;
+ z-index: -1;
+}
+.bg-mask {
+ background: rgba(255, 255, 255, 0.95) center center no-repeat;
+ position: fixed;
+ width: 100%;
+ height: 1350px;
+ top:0;
+ left:0px;
+ z-index: -1;
+
+}
+.bg-narrow {
+ display:none;
+}
+div.summary-menu-container {
+ display:none;
+}
+div.summary-node {
+ position: fixed;
+ width: 50px;
+ text-align: center ;
+ font-size:1.2em;
+
+
+}
+div.summary-node-header {
+ font-size: 1.2em;
+ color:#FFFFFF;
+ font-weight:bold;
+}
+div.summary-node-1 {
+ position: absolute;
+ top:0px;
+ left:0px;
+ width:200px;
+ height:200px;
+ border-radius:100px;
+ color:#CCCCCC;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+}
+div.summary-node-1:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.summary-node-1-text {
+ margin-top:25%;
+ width: 150px;
+ margin-left:auto;
+ margin-right:auto;
+}
+div.summary-node-2 {
+ position: absolute;
+ top:50px;
+ left:170px;
+ width:220px;
+ height:220px;
+ border-radius:200px;
+ color:#CCCCCC;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+}
+div.summary-node-2:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.summary-node-2-text {
+ margin-top:30%;
+ width: 150px;
+ margin-left:auto;
+ margin-right:auto;
+}
+div.summary-node-3 {
+ position: absolute;
+ top:0px;
+ right:20px;
+ width:250px;
+ height:250px;
+ border-radius:200px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+}
+div.summary-node-3:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.summary-node-3-text {
+ margin-top:25%;
+ width: 200px;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+div.summary-node-4 {
+ position: absolute;
+ top:200px;
+ right:180px;
+ width:200px;
+ height:200px;
+ border-radius:200px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+}
+div.summary-node-4:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.summary-node-4-text {
+ margin-top:25%;
+ width: 150px;
+ margin-left:auto;
+ margin-right:auto;
+}
+div.summary-node-5 {
+ position: absolute;
+ top:250px;
+ left:120px;
+ width:150px;
+ height:150px;
+ border-radius:150px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+}
+div.summary-node-5:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.summary-node-5-text {
+ margin-top:55px;
+ width: 150px;
+ margin-left:auto;
+ margin-right:auto;
+ font-size:2.0em;
+
+}
+div.summary-node-6 {
+ position: absolute;
+ top:20px;
+ right:270px;
+ width:150px;
+ height:150px;
+ border-radius:150px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+}
+div.summary-node-6:hover{
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.summary-node-6-text {
+ margin-top:30px;
+ width: 100px;
+ margin-left:auto;
+ margin-right:auto;
+}
+div.summary-nodes-container {
+ position: relative;
+ margin-left: auto ;
+ margin-right: auto ;
+ margin-top:30px;
+ margin-bottom:30px;
+ width: 800px;
+ height: 400px;
+ text-align: center ;
+}
+div#menubutton1 {
+ position: fixed;
+ top:10px;
+ left:200px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton1:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div#menubutton2 {
+ position: fixed;
+ top:10px;
+ left:350px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton2:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div#menubutton3 {
+ position: fixed;
+ top:10px;
+ right:350px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton3:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div#menubutton4 {
+ position: fixed;
+ top:10px;
+ right:200px;
+ width:150px;
+ height:30px;
+ border-radius:10px;
+ color:#FFFFFF;
+ /* line-height:100px; */
+ text-align:center;
+ background:#C60032;
+ display: none;
+ z-index:200;
+}
+div#menubutton4:hover {
+ color:#FFFFFF;
+ text-decoration:none;
+ background:#550000
+}
+div.section-heading {
+ font-size:2.0em;
+ color:#C60032;
+ width:700px;
+ margin-bottom: 1em;
+ margin-left:auto;
+ margin-right:auto;
+}
+div.section-subtitle {
+ font-size:1.5em;
+ color:#BB0000;
+} \ No newline at end of file
diff --git a/boot.php b/boot.php
index 4134ce3fa..9c0fb8919 100755
--- a/boot.php
+++ b/boot.php
@@ -205,6 +205,7 @@ define ( 'PAGE_DIRECTORY_CHANNEL', 0x0008 ); // system channel used for director
define ( 'PAGE_PREMIUM', 0x0010 );
define ( 'PAGE_ADULT', 0x0020 );
+define ( 'PAGE_SYSTEM', 0x1000 );
define ( 'PAGE_REMOVED', 0x8000 );
@@ -367,6 +368,7 @@ define ( 'XCHAN_FLAGS_HIDDEN', 0x0001);
define ( 'XCHAN_FLAGS_ORPHAN', 0x0002);
define ( 'XCHAN_FLAGS_CENSORED', 0x0004);
define ( 'XCHAN_FLAGS_SELFCENSORED', 0x0008);
+define ( 'XCHAN_FLAGS_SYSTEM', 0x0010);
define ( 'XCHAN_FLAGS_DELETED', 0x1000);
/*
* Traficlights for Administration of HubLoc
@@ -478,8 +480,10 @@ define ( 'ACCOUNT_PENDING', 0x0010 );
* Account roles
*/
-define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 );
define ( 'ACCOUNT_ROLE_ALLOWCODE', 0x0001 );
+define ( 'ACCOUNT_ROLE_SYSTEM', 0x0002 );
+
+define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 );
/**
* Item visibility
@@ -1388,7 +1392,14 @@ function fix_system_urls($oldurl,$newurl) {
dbesc($rr['xchan_hash']),
dbesc($oldurl)
);
-
+
+
+ $z = q("update profile set photo = '%s', thumb = '%s' where uid = %d",
+ dbesc(str_replace($oldurl,$newurl,$rr['xchan_photo_l'])),
+ dbesc(str_replace($oldurl,$newurl,$rr['xchan_photo_m'])),
+ intval($rr['channel_id'])
+ );
+
proc_run('php', 'include/notifier.php', 'refresh_all', $rr['channel_id']);
}
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index cc0a3d617..482bbed78 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -25,7 +25,8 @@ function findpeople_widget() {
'$suggest' => t('Channel Suggestions'),
'$similar' => '', // FIXME and uncomment when mod/match working // t('Similar Interests'),
'$random' => t('Random Profile'),
- '$inv' => t('Invite Friends')
+ '$inv' => t('Invite Friends'),
+ '$loggedin' => local_user()
));
}
diff --git a/include/crypto.php b/include/crypto.php
index e9372fbb4..33cdc10c0 100644
--- a/include/crypto.php
+++ b/include/crypto.php
@@ -4,6 +4,8 @@ function rsa_sign($data,$key,$alg = 'sha256') {
if(! $key)
return 'no key';
$sig = '';
+ if(intval(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
+ $alg = OPENSSL_ALGO_SHA256;
openssl_sign($data,$sig,$key,$alg);
return $sig;
}
@@ -13,6 +15,8 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
if(! $key)
return false;
+ if(intval(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
+ $alg = OPENSSL_ALGO_SHA256;
$verify = openssl_verify($data,$sig,$key,$alg);
return $verify;
}
diff --git a/include/nav.php b/include/nav.php
index f89de2de0..7e99c782e 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -196,7 +196,7 @@ EOT;
$banner = get_config('system','banner');
if($banner === false)
- $banner = 'red';
+ $banner = get_config('system','sitename');
$x = array('nav' => $nav, 'usermenu' => $userinfo );
call_hooks('nav', $x);
diff --git a/include/widgets.php b/include/widgets.php
index f53998b23..888da37a2 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -362,4 +362,136 @@ function widget_affinity($arr) {
return $arr['html'];
}
return '';
+}
+
+
+function widget_settings_menu($arr) {
+
+ if(! local_user())
+ return;
+
+ $a = get_app();
+ $channel = $a->get_channel();
+
+ $abook_self_id = 0;
+
+ // Retrieve the 'self' address book entry for use in the auto-permissions link
+
+ $abk = q("select abook_id from abook where abook_channel = %d and ( abook_flags & %d ) limit 1",
+ intval(local_user()),
+ intval(ABOOK_FLAG_SELF)
+ );
+ if($abk)
+ $abook_self_id = $abk[0]['abook_id'];
+
+
+ $tabs = array(
+ array(
+ 'label' => t('Account settings'),
+ 'url' => $a->get_baseurl(true).'/settings/account',
+ 'selected' => ((argv(1) === 'account') ? 'active' : ''),
+ ),
+
+ array(
+ 'label' => t('Channel settings'),
+ 'url' => $a->get_baseurl(true).'/settings/channel',
+ 'selected' => ((argv(1) === 'channel') ? 'active' : ''),
+ ),
+
+ array(
+ 'label' => t('Additional features'),
+ 'url' => $a->get_baseurl(true).'/settings/features',
+ 'selected' => ((argv(1) === 'features') ? 'active' : ''),
+ ),
+
+ array(
+ 'label' => t('Feature settings'),
+ 'url' => $a->get_baseurl(true).'/settings/featured',
+ 'selected' => ((argv(1) === 'featured') ? 'active' : ''),
+ ),
+
+ array(
+ 'label' => t('Display settings'),
+ 'url' => $a->get_baseurl(true).'/settings/display',
+ 'selected' => ((argv(1) === 'display') ? 'active' : ''),
+ ),
+
+ array(
+ 'label' => t('Connected apps'),
+ 'url' => $a->get_baseurl(true) . '/settings/oauth',
+ 'selected' => ((argv(1) === 'oauth') ? 'active' : ''),
+ ),
+
+ array(
+ 'label' => t('Export channel'),
+ 'url' => $a->get_baseurl(true) . '/uexport/basic',
+ 'selected' => ''
+ ),
+
+// array(
+// 'label' => t('Export account'),
+// 'url' => $a->get_baseurl(true) . '/uexport/complete',
+// 'selected' => ''
+// ),
+
+ array(
+ 'label' => t('Automatic Permissions (Advanced)'),
+ 'url' => $a->get_baseurl(true) . '/connections/' . $abook_self_id,
+ 'selected' => ''
+ ),
+
+
+ );
+
+ if(feature_enabled(local_user(),'premium_channel')) {
+ $tabs[] = array(
+ 'label' => t('Premium Channel Settings'),
+ 'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'],
+ 'selected' => ''
+ );
+
+ }
+
+ if(feature_enabled(local_user(),'channel_sources')) {
+ $tabs[] = array(
+ 'label' => t('Channel Sources'),
+ 'url' => $a->get_baseurl(true) . '/sources',
+ 'selected' => ''
+ );
+
+ }
+
+
+
+ $tabtpl = get_markup_template("generic_links_widget.tpl");
+ return replace_macros($tabtpl, array(
+ '$title' => t('Settings'),
+ '$class' => 'settings-widget',
+ '$items' => $tabs,
+ ));
+
+}
+
+
+function widget_mailmenu($arr) {
+ if (! local_user())
+ return;
+
+ $a = get_app();
+ return replace_macros(get_markup_template('message_side.tpl'), array(
+ '$tabs'=> array(),
+
+ '$check'=>array(
+ 'label' => t('Check Mail'),
+ 'url' => $a->get_baseurl(true) . '/message',
+ 'sel' => (argv(1) == ''),
+ ),
+ '$new'=>array(
+ 'label' => t('New Message'),
+ 'url' => $a->get_baseurl(true) . '/message/new',
+ 'sel'=> (argv(1) == 'new'),
+ )
+
+ ));
+
} \ No newline at end of file
diff --git a/mod/allfriends.php b/mod/allfriends.php
deleted file mode 100644
index bb4df30be..000000000
--- a/mod/allfriends.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-require_once('include/socgraph.php');
-
-function allfriends_content(&$a) {
-
- $o = '';
-
- if(! local_user()) {
- notice( t('Permission denied.') . EOL);
- return;
- }
-
- if(argc() > 1)
- $cid = intval(argv(1));
- if(! $cid)
- return;
-
- $c = q("select name, url, photo from contact where id = %d and uid = %d limit 1",
- intval($cid),
- intval(local_user())
- );
-
- $a->page['aside'] .= '<div class="vcard">'
- . '<div class="fn label">' . $c[0]['name'] . '</div>'
- . '<div id="profile-photo-wrapper">'
- . '<a href="/contacts/' . $cid . '"><img class="photo" width="175" height="175"
- src="' . $c[0]['photo'] . '" alt="' . $c[0]['name'] . '" /></div>'
- . '</div>';
-
-
- if(! count($c))
- return;
-
- $o .= '<h2>' . sprintf( t('Friends of %s'), $c[0]['name']) . '</h2>';
-
-
- $r = all_friends(local_user(),$cid);
-
- if(! count($r)) {
- $o .= t('No friends to display.');
- return $o;
- }
-
- $tpl = get_markup_template('common_friends.tpl');
-
- foreach($r as $rr) {
-
- $o .= replace_macros($tpl,array(
- '$url' => $rr['url'],
- '$name' => $rr['name'],
- '$photo' => $rr['photo'],
- '$tags' => ''
- ));
- }
-
- $o .= cleardiv();
-// $o .= paginate($a);
- return $o;
-}
diff --git a/mod/directory.php b/mod/directory.php
index 616035339..92fb36ea7 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -11,15 +11,13 @@ function directory_init(&$a) {
function directory_aside(&$a) {
- if(local_user()) {
- require_once('include/contact_widgets.php');
- $a->set_widget('find_people',findpeople_widget());
- }
-
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return;
}
-
+
+ require_once('include/contact_widgets.php');
+ $a->set_widget('find_people',findpeople_widget());
+
$a->set_widget('safe_search',dir_safe_mode());
$a->set_widget('dir_sort_order',dir_sort_links());
diff --git a/mod/home.php b/mod/home.php
index edcaa938d..05626dcb5 100644
--- a/mod/home.php
+++ b/mod/home.php
@@ -1,6 +1,9 @@
<?php
-if(! function_exists('home_init')) {
+require_once('include/items.php');
+require_once('include/conversation.php');
+
+
function home_init(&$a) {
$ret = array();
@@ -20,10 +23,9 @@ function home_init(&$a) {
goaway(z_root() . '/new_channel');
}
-}}
+}
-if(! function_exists('home_content')) {
function home_content(&$a) {
$o = '';
@@ -33,56 +35,62 @@ function home_content(&$a) {
if(x($_SESSION,'mobile_theme'))
unset($_SESSION['mobile_theme']);
-$channel_address = get_config("system", "site_channel" );
+ $channel_address = get_config("system", "site_channel" );
if ($channel_address){
-require_once('include/items.php');
-require_once('include/conversation.php');
-
-
-//We can do better, but until we figure out auto-linkification, let's keep things simple
- $page_id = 'home';
-
- $u = q("select channel_id from channel where channel_address = '%s' limit 1",
- dbesc($channel_address)
- );
+ // We can do better, but until we figure out auto-linkification, let's keep things simple
+
+ $page_id = 'home';
+
+ $u = q("select channel_id from channel where channel_address = '%s' limit 1",
+ dbesc($channel_address)
+ );
+
+ if(! $u) {
+ notice( t('Channel not found.') . EOL);
+ return;
+ }
+
+ $r = q("select item.* from item left join item_id on item.id = item_id.iid
+ where item.uid = %d and sid = '%s' and service = 'WEBPAGE' and
+ item_restrict = %d limit 1",
+ intval($u[0]['channel_id']),
+ dbesc($page_id),
+ intval(ITEM_WEBPAGE)
+ );
+
+ if(! $r) {
+ notice( t('Item not found.') . EOL);
+ return;
+ }
+
+ xchan_query($r);
+ $r = fetch_post_tags($r,true);
+ $a->profile = array('profile_uid' => $u[0]['channel_id']);
+ $o .= prepare_page($r[0]);
+ return $o;
+ }
- if(! $u) {
- notice( t('Channel not found.') . EOL);
- return;
+ if(get_config('system','projecthome')) {
+ $o .= file_get_contents('assets/home.html');
+ $a->page['template'] = 'full';
+ return $o;
}
- $r = q("select item.* from item left join item_id on item.id = item_id.iid
- where item.uid = %d and sid = '%s' and service = 'WEBPAGE' and
- item_restrict = %d limit 1",
- intval($u[0]['channel_id']),
- dbesc($page_id),
- intval(ITEM_WEBPAGE)
- );
-
- if(! $r) {
- notice( t('Item not found.') . EOL);
- return;
+ if(file_exists('home.html')) {
+ $o .= file_get_contents('home.html');
}
+ else {
- xchan_query($r);
- $r = fetch_post_tags($r,true);
- $a->profile = array('profile_uid' => $u[0]['channel_id']);
- $o .= prepare_page($r[0]);
+ // If there's no site channel or home contents configured, fallback to the old behaviour
-}
-
-// If there's no site channel specified, fallback to the old behaviour
- else { $o .= '<h1>' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '</h1>';
- if(file_exists('home.html'))
- $o .= file_get_contents('home.html');
-}
-
- if (!$a->config['system']['no_login_on_homepage'])
- $o .= login(($a->config['system']['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
-
- call_hooks("home_content",$o);
- return $o;
-}
+ $sitename = get_config('system','sitename');
+ if($sitename)
+ $o .= '<h1>' . sprintf( t("Welcome to %s") ,$sitename) . '</h1>';
+ if (! $a->config['system']['no_login_on_homepage'])
+ $o .= login(($a->config['system']['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
+ }
+ call_hooks('home_content',$o);
+ return $o;
}
diff --git a/mod/magic.php b/mod/magic.php
index 03d09e70d..aead559a7 100644
--- a/mod/magic.php
+++ b/mod/magic.php
@@ -33,21 +33,28 @@ function magic_init(&$a) {
if(! $x) {
- // Somebody new? Finger them if they've never been seen here before
-
- if($addr) {
- $ret = zot_finger($addr,null);
- if($ret['success']) {
- $j = json_decode($ret['body'],true);
- if($j)
- import_xchan($j);
-
- // Now try again
-
- $x = q("select * from hubloc where hubloc_url = '%s' order by hubloc_connected desc limit 1",
- dbesc($basepath)
- );
- }
+ /*
+ * We have no records for, or prior communications with this hub.
+ * If an address was supplied, let's finger them to create a hub record.
+ * Otherwise we'll use the special address '[system]' which will return
+ * either a system channel or the first available normal channel. We don't
+ * really care about what channel is returned - we need the hub information
+ * from that response so that we can create signed auth packets destined
+ * for that hub.
+ *
+ */
+
+ $ret = zot_finger((($addr) ? $addr : '[system]@' . $parsed['host']),null);
+ if($ret['success']) {
+ $j = json_decode($ret['body'],true);
+ if($j)
+ import_xchan($j);
+
+ // Now try again
+
+ $x = q("select * from hubloc where hubloc_url = '%s' order by hubloc_connected desc limit 1",
+ dbesc($basepath)
+ );
}
}
diff --git a/mod/message.php b/mod/message.php
index b5420e5b3..6a33f1db7 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -7,29 +7,6 @@ require_once("include/bbcode.php");
require_once('include/Contact.php');
-function message_aside(&$a) {
-
- if (! local_user())
- return;
-
- $a->set_widget('msgaside',replace_macros(get_markup_template('message_side.tpl'), array(
- '$tabs'=> array(),
-
- '$check'=>array(
- 'label' => t('Check Mail'),
- 'url' => $a->get_baseurl(true) . '/message',
- 'sel' => (argv(1) == ''),
- ),
- '$new'=>array(
- 'label' => t('New Message'),
- 'url' => $a->get_baseurl(true) . '/message/new',
- 'sel'=> (argv(1) == 'new'),
- )
-
- )));
-
-}
-
function message_post(&$a) {
if(! local_user())
diff --git a/mod/settings.php b/mod/settings.php
index 4d95f75b3..c2a540063 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -32,7 +32,7 @@ if (! local_user())
$a->argc = 2;
$a->argv[] = 'channel';
}
-
+/*
$channel = $a->get_channel();
$abook_self_id = 0;
@@ -132,7 +132,7 @@ if (! local_user())
'$class' => 'settings-widget',
'$items' => $tabs,
));
-
+*/
}
diff --git a/mod/setup.php b/mod/setup.php
index 0198f1f09..245508683 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -577,6 +577,8 @@ function load_database($db) {
function what_next() {
$a = get_app();
+ // install the standard theme
+ set_config('system','allowed_themes','redbasic');
$baseurl = $a->get_baseurl();
return
t('<h1>What next</h1>')
diff --git a/mod/sources.php b/mod/sources.php
index 125184d47..87bab60df 100644
--- a/mod/sources.php
+++ b/mod/sources.php
@@ -9,11 +9,25 @@ function sources_post(&$a) {
$source = intval($_REQUEST['source']);
$xchan = $_REQUEST['xchan'];
+ $abook = intval($_REQUEST['abook']);
$words = $_REQUEST['words'];
$frequency = $_REQUEST['frequency'];
$channel = $a->get_channel();
+ if($abook) {
+ $r = q("select abook_xchan from abook where abook_id = %d and abook_channel = %d limit 1",
+ intval($abook),
+ intval(local_user())
+ );
+ if($r)
+ $xchan = $r[0]['abook_xchan'];
+ }
+
+ if(! $xchan) {
+ notice ( t('Failed to create source. No channel selected.') . EOL);
+ return;
+ }
if(! $source) {
$r = q("insert into source ( src_channel_id, src_channel_xchan, src_xchan, src_patt )
@@ -92,6 +106,12 @@ function sources_content(&$a) {
intval(argv(1)),
intval(local_user())
);
+ if($r) {
+ $x = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
+ dbesc($r[0]['src_xchan']),
+ intval(local_user())
+ );
+ }
if(! $r) {
notice( t('Source not found.') . EOL);
return '';
@@ -106,6 +126,7 @@ function sources_content(&$a) {
'$desc' => t('Import all or selected content from the following channel into this channel and distribute it according to your channel settings.'),
'$words' => array( 'words', t('Only import content with these words (one per line)'),$r[0]['src_patt'],t('Leave blank to import all public content')),
'$xchan' => $r[0]['src_xchan'],
+ '$abook' => $x[0]['abook_id'],
'$name' => array( 'name', t('Channel Name'), $r[0]['xchan_name'], ''),
'$submit' => t('Submit')
));
diff --git a/mod/zfinger.php b/mod/zfinger.php
index 0827f3424..aad8e224d 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -52,11 +52,33 @@ function zfinger_init(&$a) {
);
}
elseif(strlen($zaddr)) {
- $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash
- where ( channel_address = '%s' or xchan_addr = '%s' ) limit 1",
- dbesc($zaddr),
- dbesc($zaddr)
- );
+ if(strpos($zaddr,'[system]') === false) { /* normal address lookup */
+ $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash
+ where ( channel_address = '%s' or xchan_addr = '%s' ) limit 1",
+ dbesc($zaddr),
+ dbesc($zaddr)
+ );
+ }
+
+ else {
+
+ /**
+ * The special address '[system]' will return a system channel if one has been defined,
+ * Or the first valid channel we find if there are no system channels.
+ *
+ * This is used by magic-auth if we have no prior communications with this site - and
+ * returns an identity on this site which we can use to create a valid hub record so that
+ * we can exchange signed messages. The precise identity is irrelevant. It's the hub
+ * information that we really need at the other end - and this will return it.
+ *
+ */
+
+ $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash
+ where (( channel_pageflags & %d ) or not ( channel_pageflags & %d )) order by channel_id limit 1",
+ intval(PAGE_SYSTEM),
+ intval(PAGE_REMOVED)
+ );
+ }
}
else {
$ret['message'] = 'Invalid request';
diff --git a/version.inc b/version.inc
index 3c6be6e54..663647728 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-12-13.526
+2013-12-16.529
diff --git a/view/css/mod_profiles.css b/view/css/mod_profiles.css
index 8378245d2..6d935ee4d 100644
--- a/view/css/mod_profiles.css
+++ b/view/css/mod_profiles.css
@@ -35,9 +35,11 @@
margin-top: 10px;
}
-#profile-edit-with-label {
+#profile-edit-with-label, #profile-edit-howlong-label {
+
width: 175px;
- margin-left: 20px;
+ margin-left: 50px;
+ margin-bottom: 20px;
}
#profile-edit-profile-name-label,
diff --git a/view/js/mod_sources.js b/view/js/mod_sources.js
index fda952cae..49880b38f 100644
--- a/view/js/mod_sources.js
+++ b/view/js/mod_sources.js
@@ -6,8 +6,10 @@ $(document).ready(function() {
width: 250,
id: 'id-name-ac',
onSelect: function(value,data) {
- $("#id_xchan").val(data);
+ $("#id_abook").val(data);
}
});
+ a.setOptions({ params: { type: 'a' }});
+
});
diff --git a/view/pdl/mod_message.pdl b/view/pdl/mod_message.pdl
new file mode 100644
index 000000000..2efb3de79
--- /dev/null
+++ b/view/pdl/mod_message.pdl
@@ -0,0 +1,3 @@
+[region=aside]
+[widget=mailmenu][/widget]
+[/region]
diff --git a/view/pdl/mod_settings.pdl b/view/pdl/mod_settings.pdl
new file mode 100644
index 000000000..0b0a99638
--- /dev/null
+++ b/view/pdl/mod_settings.pdl
@@ -0,0 +1,4 @@
+[region=aside]
+[widget=settings_menu][/widget]
+[/region]
+
diff --git a/view/tpl/peoplefind.tpl b/view/tpl/peoplefind.tpl
index aef341d41..45b3d7d4b 100755
--- a/view/tpl/peoplefind.tpl
+++ b/view/tpl/peoplefind.tpl
@@ -7,8 +7,8 @@
</form>
<br />
{{if $similar}}<a href="match" >{{$similar}}</a><br />{{/if}}
- <a href="suggest" >{{$suggest}}</a><br />
+ {{if $loggedin}}<a href="suggest" >{{$suggest}}</a><br />{{/if}}
<a href="randprof" >{{$random}}</a><br />
- {{if $inv}}<a href="invite" >{{$inv}}</a>{{/if}}
+ {{if $loggedin}}{{if $inv}}<a href="invite" >{{$inv}}</a>{{/if}}{{/if}}
</div>
diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl
index 183389b9b..196b3ac6d 100755
--- a/view/tpl/profile_edit.tpl
+++ b/view/tpl/profile_edit.tpl
@@ -108,8 +108,10 @@
<label id="profile-edit-marital-label" for="profile-edit-marital" >{{$lbl_marital}} </label>
{{$marital}}
</div>
+<div class="clear"></div>
<label id="profile-edit-with-label" for="profile-edit-with" > {{$lbl_with}} </label>
<input type="text" size="32" name="with" id="profile-edit-with" title="{{$lbl_ex1}}" value="{{$with}}" />
+<div class="clear"></div>
<label id="profile-edit-howlong-label" for="profile-edit-howlong" > {{$lbl_howlong}} </label>
<input type="text" size="32" name="howlong" id="profile-edit-howlong" title="{{$lbl_howlong}}" value="{{$howlong}}" />
diff --git a/view/tpl/sources_edit.tpl b/view/tpl/sources_edit.tpl
index 6e9cee32b..34023e03f 100644
--- a/view/tpl/sources_edit.tpl
+++ b/view/tpl/sources_edit.tpl
@@ -4,7 +4,7 @@
<form action="sources" method="post">
<input type="hidden" name="source" value="{{$id}}" />
-<input type="hidden" id="id_xchan" name="xchan" value="{{$xchan}}" />
+<input type="hidden" id="id_abook" name="abook" value="{{$abook}}" />
{{include file="field_input.tpl" field=$name}}
{{include file="field_textarea.tpl" field=$words}}
diff --git a/view/tpl/sources_new.tpl b/view/tpl/sources_new.tpl
index 267245ae4..3c6a4be30 100644
--- a/view/tpl/sources_new.tpl
+++ b/view/tpl/sources_new.tpl
@@ -3,7 +3,7 @@
<div class="descriptive-text">{{$desc}}</div>
<form action="sources" method="post">
-<input type="hidden" id="id_xchan" name="xchan" value="{{$xchan}}" />
+<input type="hidden" id="id_abook" name="abook" value="{{$abook}}" />
{{include file="field_input.tpl" field=$name}}
{{include file="field_textarea.tpl" field=$words}}