Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Haakon Meland Eriksen 2014-06-24 19:34:36 +02:00
commit b8dc9e855a
3685 changed files with 543468 additions and 93089 deletions

17
.gitignore vendored Normal file → Executable file
View File

@ -2,18 +2,24 @@ favicon.*
.htconfig.php
\#*
include/jquery-1.4.2.min.js
*.gz
*.log
*.out
*.version*
favicon.*
home.html
addon
*~
.*.swp
compiled/
custom/
/store/
# patch attempts
*.orig
*.rej
# composer files (for fetching sabre)
composer.*
#ignore documentation, it should be newly built
doc/api
@ -26,3 +32,12 @@ report/
.buildpath
.externalToolBuilders
.settings
#ignore OSX .DS_Store files
.DS_Store
#netbeans project folder
nbproject
#Kdevelop project files
*.kdev4

View File

@ -1,8 +1,10 @@
Options -Indexes
AddType application/x-java-archive .jar
AddType audio/ogg .oga
#SSLCipherSuite HIGH:AES256-SHA:AES128-SHA:RC4:!aNULL:!eNULL:!EDH
<FilesMatch "\.(out|log)$">
# don't allow any web access to logfiles, even after rotation/compression
<FilesMatch "\.(out|log|gz)$">
Deny from all
</FilesMatch>
@ -10,6 +12,8 @@ Deny from all
RewriteEngine on
# Protect repository directory from browsing
RewriteRule "(^|/)\.git" - [F]
RewriteRule "(^|/)store" - [F]
# Rewrite current-style URLs of the form 'index.php?q=x'.
# Also place auth information into REMOTE_USER for sites running

View File

@ -1,4 +1,4 @@
Copyright (c) 2010-2012 the Friendica Project
Copyright (c) 2010-2014 RedMatrix
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy

11
README
View File

@ -1,11 +0,0 @@
Friendica RED Interaction Engine
================================
Red is a new concept in electronic communications which is based on our earlier work with Friendica and our pioneering developments in decentralised, federated social networking.
Red is prototype code and has limited functionality at the present time. This message will be changed when it approaches stability.
At its heart, Red is a decentralised collection of location agnostic info streams (e.g. "channels") which are attached to permission controlled web resources, and which have the ability to discover each other and interact. You could call it a type of social network, but that would be degrading. This is a different concept in online communications, starting where social networks leave off and extending those somewhat primitive types of interactions in new ways - particularly when it comes to privacy.
Social networking emulation is one form that these streams can take, but they can take many other forms - limited only by your imagination.

11
README.md Normal file
View File

@ -0,0 +1,11 @@
![the Red Matrix](images/rm-480x115.png)
The RedMatrix (aka "red") is an open source webapp platform providing a complete **decentralised** publishing, sharing, and communications system. It combines communications (private messaging, chat and social networking), and media management (photos, events, files, web pages, app distribution) with enough features to make your head spin.
What makes the RedMatrix unique is what we call "magic authentication" - which is based on our groundbreaking work in decentralised identity services. This ties all RedMatrix sites and channels together into a single super-network where the boundaries between different websites are blurred or seemingly non-existent; where "who you are" has nothing to do with "what computer you're connected to", and where website content can adapt itself according to who is viewing it.
Warning: After experiencing magic authentication and nomadic identity, you may find it disconcerting and a bit "primitive" to go back to the old internet. You shouldn't need hundreds of different passwords to use the web ... or be totally isolated from your friends and family because a server or router in another country is having "*issues*".
For the average person, the biggest advantage of decentralised identity is that you decide who you want to share your stuff with, and if somebody isn't on your list, they're not going to see it. It's all under your control (we're big on privacy). Use the RedMatrix as a social network or a business website or for personal cloud storage or media publishing - or any number of other uses; limited only by your imagination.
The Red Matrix is free and open source distributed under the MIT license.

View File

@ -1,2 +0,0 @@
alter table `group` add hash char(255) not null default '' after id, add index (hash);
alter table photo add size int(10) unsigned not null default '0' after width, add index (size);

4
app/admin.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/admin
requires: admin
name: Site Admin
photo: $baseurl/app/admin.png

BIN
app/admin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

4
app/bookmarks.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/bookmarks
requires: local_user
name: Bookmarks
photo: $baseurl/app/bookmarks.png

BIN
app/bookmarks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

4
app/channel.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/channel/$nick
requires: local_user
name: Channel Home
photo: $baseurl/app/home.png

4
app/chat.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/chat/$nick
requires: local_user
name: Chat
photo: $baseurl/app/chat.png

BIN
app/chat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

4
app/connections.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/connections
requires: local_user
name: Address Book
photo: $baseurl/app/connections.png

BIN
app/connections.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

3
app/directory.apd Normal file
View File

@ -0,0 +1,3 @@
url: $baseurl/directory
name: Directory
photo: $baseurl/app/directory.png

BIN
app/directory.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

4
app/events.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/events
requires: local_user
name: Events
photo: $baseurl/app/events.png

BIN
app/events.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

4
app/features.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/settings/features
requires: local_user
name: Features
photo: $baseurl/app/features.png

BIN
app/features.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

3
app/help.apd Normal file
View File

@ -0,0 +1,3 @@
url: $baseurl/help
name: Help
photo: $baseurl/app/help.png

BIN
app/help.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
app/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

3
app/lang.apd Normal file
View File

@ -0,0 +1,3 @@
url: $baseurl/lang
name: Language
photo: $baseurl/app/lang.png

BIN
app/lang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

4
app/login.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/login
requires: nologin
name: Login
photo: $baseurl/app/login.png

BIN
app/login.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

4
app/mail.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/message
requires: local_user
name: Mail
photo: $baseurl/app/mail.png

BIN
app/mail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

4
app/manage.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/manage
requires: local_user
name: Channel Select
photo: $baseurl/app/manage.png

BIN
app/manage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

4
app/matrix.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/network
requires: local_user
name: Matrix
photo: $baseurl/app/matrix.png

BIN
app/matrix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

4
app/mood.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/mood
requires: local_user
name: Mood
photo: $baseurl/app/mood.png

BIN
app/mood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

4
app/photos.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/photos/$nick
requires: local_user
name: Photos
photo: $baseurl/app/photos.png

BIN
app/photos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

4
app/poke.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/poke
requires: local_user
name: Poke
photo: $baseurl/app/poke.png

BIN
app/poke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

4
app/post.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/rpost?f=&body=%0A
requires: observer
name: Post
photo: $baseurl/app/post.png

BIN
app/post.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

4
app/pphoto.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/profile_photo
requires: local_user
name: Profile Photo
photo: $baseurl/app/pphoto.png

BIN
app/pphoto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

4
app/probe.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/probe
requires: local_user
name: Probe
photo: $baseurl/app/probe.png

BIN
app/probe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

4
app/profile.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/profile/$nick
requires: local_user
name: Profile

6
app/randprof.apd Normal file
View File

@ -0,0 +1,6 @@
url: $baseurl/randprof
name: Random Channel
target: randprof
photo: $baseurl/app/randprof.png

BIN
app/randprof.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

3
app/search.apd Normal file
View File

@ -0,0 +1,3 @@
url: $baseurl/search
name: Search
photo: $baseurl/app/search.png

BIN
app/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

4
app/settings.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/settings
requires: local_user
name: Settings
photo: $baseurl/app/settings.png

BIN
app/settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

4
app/storage.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/cloud/$nick
requires: local_user
name: Files
photo: $baseurl/app/storage.png

BIN
app/storage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

4
app/suggest.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/suggest
requires: local_user
name: Suggest
photo: $baseurl/app/suggest.png

BIN
app/suggest.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

4
app/webpages.apd Normal file
View File

@ -0,0 +1,4 @@
url: $baseurl/webpages/$nick
requires: local_user
name: Webpages
photo: $baseurl/app/webpages.png

BIN
app/webpages.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/hashlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

132
assets/hashlogo.svg Normal file
View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="215.94055"
height="50"
id="svg3877"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="hashlogo.svg"
inkscape:export-filename="/run/user/1000/gvfs/sftp:host=jeroenpraat.nl,port=69,user=root/var/www/redmatrix/assets/hashlogo2.png"
inkscape:export-xdpi="156.42857"
inkscape:export-ydpi="156.42857">
<defs
id="defs3" />
<sodipodi:namedview
inkscape:document-units="mm"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.7759502"
inkscape:cx="84.10176"
inkscape:cy="24.800256"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1533"
inkscape:window-height="656"
inkscape:window-x="49"
inkscape:window-y="171"
inkscape:window-maximized="0"
units="px"
fit-margin-top="4"
fit-margin-left="4"
fit-margin-right="4"
fit-margin-bottom="4" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-240.69473,-715.93361)">
<path
transform="matrix(0.94,0,0,0.9075862,138.86175,379.85869)"
sodipodi:type="arc"
id="path3028-4-5-3"
sodipodi:cx="195.74467"
sodipodi:cy="397.84091"
sodipodi:rx="22.340425"
sodipodi:ry="23.138298"
d="m 218.0851,397.84091 c 0,12.77893 -10.00215,23.1383 -22.34043,23.1383 -12.33827,0 -22.34042,-10.35937 -22.34042,-23.1383 0,-12.77893 10.00215,-23.1383 22.34042,-23.1383 12.33828,0 22.34043,10.35937 22.34043,23.1383 z"
style="fill:#c60032;fill-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path2998"
style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#3c3c3c;fill-opacity:1;stroke:none;font-family:Designosaur;-inkscape-font-specification:Designosaur"
d="m 248.69473,755.61224 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-12.24 c 0,-2.51999 1.32001,-3.88 3.8,-3.88 0.76,0 1.64,0.44 1.64,-0.6 l 0,-3 c 0,-0.56 -0.16,-0.6 -0.72,-0.6 -1.72,0.04 -3.72,10e-6 -5.44,2.64 l -0.08,0 -0.4,-1.52 c -0.24,-0.52 -0.24,-0.8 -0.8,-0.8 l -2,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,19.2 c 0,0.56 0.24,0.8 0.8,0.8 l 3.2,0" />
<path
inkscape:connector-curvature="0"
id="path3000"
style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#3c3c3c;fill-opacity:1;stroke:none;font-family:Designosaur;-inkscape-font-specification:Designosaur"
d="m 272.47473,751.81224 c -0.12,-0.16 -0.24,-0.32 -1.04,-0.08 -1.64,0.52 -3.16,1 -4.72,1 -3.51999,0 -4.72,-2.48 -5.04,-5.84 l 8.2,0 c 3.32,0 4.36,-0.92 4.36,-4 0,-5.79999 -3.72,-8.6 -8.56,-8.6 -6.47999,0 -8.88,4.96001 -8.88,11.12 0,5.6 2.00001,10.68 9.4,10.68 3.4,0 6.32,-1.08 7.08,-1.96 0.32,-0.36 0.28,-0.68 0.04,-1.04 l -0.84,-1.28 m -10.8,-8.28 c 0.24,-3.15999 1.28001,-5.88 4.2,-5.88 2.12,0 3.52,2.16001 3.52,4.52 0,1.2 -0.32,1.36 -1.56,1.36 l -6.16,0" />
<path
inkscape:connector-curvature="0"
id="path3002"
style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#3c3c3c;fill-opacity:1;stroke:none;font-family:Designosaur;-inkscape-font-specification:Designosaur"
d="m 296.25973,755.61224 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-28 c 0,-0.56 -0.24,-0.8 -0.8,-0.8 l -3.2,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,10.44 -0.08,0 c -1,-1.51999 -2.76,-2.92 -6.16,-2.92 -4.63999,0 -8.6,2.64001 -8.6,10.96 0,8.24 3.92001,10.84 8.48,10.84 3.04,0 5.44,-0.92 7.08,-3 l 0.08,0 0.4,1.68 c 0.12,0.56 0.24,0.8 0.8,0.8 l 2,0 m -9.52,-2.84 c -2.91999,0 -4.52,-1.44 -4.52,-7.48 0,-6.23999 1.72001,-7.6 4.48,-7.6 3.52,0 5.56,2.16001 5.56,7.6 0,5.32 -1.96,7.48 -5.52,7.48" />
<g
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#3c3c3c;fill-opacity:1;stroke:none;font-family:Sans"
id="text3016">
<path
d="m 375.14875,755.65222 c 0.52,0 0.76,-0.24 0.76,-0.8 l 0,-12.64 c 0,-4.99999 -3.28001,-7.84 -7.24,-7.84 -1.92,0 -4.04,1.2 -5.12,3.28 -1.28,-2.12 -3.44,-3.28 -5.92,-3.28 -1.72,0 -3.72,1.04 -4.52,2.92 l -0.08,0 -0.4,-1.64 c -0.12,-0.56 -0.24,-0.8 -0.8,-0.8 l -2,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,19.2 c 0,0.56 0.24,0.8 0.8,0.8 l 3.2,0 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-10.88 c 0,-4.11999 1.12,-6.24 3.4,-6.24 2.12,0 2.84,2.76 2.84,5.84 l 0,11.28 c 0,0.56 0.24,0.8 0.76,0.8 l 3.28,0 c 0.52,0 0.76,-0.24 0.76,-0.8 l 0,-11.16 c 0.04,-3.91999 1.2,-5.96 3.4,-5.96 2.12,0 2.84,2.76 2.84,5.84 l 0,11.28 c 0,0.56 0.24,0.8 0.76,0.8 l 3.28,0"
style="font-variant:normal;font-stretch:normal;fill:#3c3c3c;font-family:Designosaur;-inkscape-font-specification:Designosaur"
id="path3011"
inkscape:connector-curvature="0" />
<path
d="m 396.04812,755.65222 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-9.84 c 0,-5.71999 -1.76,-10.68 -8.68,-10.68 -3.19999,0 -6.12,1.08 -6.92,1.96 -0.32,0.36 -0.28,0.68 -0.04,1.04 l 0.84,1.28 c 0.12,0.16 0.28,0.32 1.04,0.08 1.8,-0.56 3.24,-1 4.52,-1 3.32,0 4.16,3 4.36,4.68 l -4.12,0 c -4.55999,0 -8.36,1.36001 -8.36,6.52 0,4.92 3.48001,7.24 7.52,7.24 2.68,0 4.72,-1 5.76,-2.92 l 0.08,0 0.4,1.64 c 0.12,0.56 0.24,0.8 0.8,0.8 l 2,0 m -4,-8.76 c 0,4.08 -1.48,5.88 -3.92,5.88 -2.83999,0 -3.8,-2.4 -3.8,-4 0,-1.92 1.4,-3.04 3.52,-3.04 l 4.2,0 0,1.16"
style="font-variant:normal;font-stretch:normal;fill:#3c3c3c;font-family:Designosaur;-inkscape-font-specification:Designosaur"
id="path3013"
inkscape:connector-curvature="0" />
<path
d="m 408.715,755.65222 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-1.76 c 0,-0.56 -0.24,-0.8 -0.8,-0.8 l -0.28,0 c -0.92,0 -1.92,-0.8 -1.92,-2.76 l 0,-11.52 2.52,0 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-1.56 c 0,-0.56 -0.24,-0.8 -0.8,-0.8 l -2.52,0 0,-4.28 c 0,-0.56 -0.28,-1 -0.8,-0.8 l -3.2,1.2 c -0.52,0.2 -0.8,0.24 -0.8,0.8 l 0,3.08 -2.08,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,1.56 c 0,0.56 0.24,0.8 0.8,0.8 l 2.08,0 0,11.4 c 0,4.2 1.92,6.24 5.52,6.24 l 1.48,0"
style="font-variant:normal;font-stretch:normal;fill:#3c3c3c;font-family:Designosaur;-inkscape-font-specification:Designosaur"
id="path3015"
inkscape:connector-curvature="0" />
<path
d="m 417.01312,755.65222 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-12.24 c 0,-2.52 1.32001,-3.88 3.8,-3.88 0.76,0 1.64,0.44 1.64,-0.6 l 0,-3 c 0,-0.56 -0.16,-0.6 -0.72,-0.6 -1.72,0.04 -3.72,0 -5.44,2.64 l -0.08,0 -0.4,-1.52 c -0.24,-0.52 -0.24,-0.8 -0.8,-0.8 l -2,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,19.2 c 0,0.56 0.24,0.8 0.8,0.8 l 3.2,0"
style="font-variant:normal;font-stretch:normal;fill:#3c3c3c;font-family:Designosaur;-inkscape-font-specification:Designosaur"
id="path3017"
inkscape:connector-curvature="0" />
<path
d="m 430.06,730.85222 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-3.2 c 0,-0.56 -0.24,-0.8 -0.8,-0.8 l -3.2,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,3.2 c 0,0.56 0.24,0.8 0.8,0.8 l 3.2,0 m 0,24.8 c 0.56,0 0.8,-0.24 0.8,-0.8 l 0,-19.2 c 0,-0.56 -0.24,-0.8 -0.8,-0.8 l -3.2,0 c -0.56,0 -0.8,0.24 -0.8,0.8 l 0,19.2 c 0,0.56 0.24,0.8 0.8,0.8 l 3.2,0"
style="font-variant:normal;font-stretch:normal;fill:#3c3c3c;font-family:Designosaur;-inkscape-font-specification:Designosaur"
id="path3019"
inkscape:connector-curvature="0" />
<path
d="m 452.12812,755.65222 c 0.56,0 0.64,-0.2 0.32,-0.64 l -6.72,-10 6.4,-9.52 c 0.32,-0.44 0.32,-0.64 -0.32,-0.64 l -4.16,0 c -0.52,0 -0.96,0.2 -1.24,0.68 l -3.44,6.8 -3.24,-6.8 c -0.28,-0.48 -0.64,-0.68 -1.2,-0.68 l -4.4,0 c -0.56,0 -0.64,0.2 -0.32,0.64 l 6.4,9.52 -6.72,10 c -0.32,0.44 -0.16,0.64 0.32,0.64 l 4.16,0 c 0.52,0 0.96,-0.2 1.24,-0.68 l 3.76,-7.08 3.56,7.08 c 0.28,0.48 0.64,0.68 1.2,0.68 l 4.4,0"
style="font-variant:normal;font-stretch:normal;fill:#3c3c3c;font-family:Designosaur;-inkscape-font-specification:Designosaur"
id="path3021"
inkscape:connector-curvature="0" />
</g>
<g
style="font-size:46px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
id="text3003-0-4-0">
<path
d="m 322.85053,756.03406 4.7355,0 1.3079,-7.9827 4.8708,0 0,-4.4649 -4.1492,0 1.0373,-6.4944 4.9159,0 0,-4.4649 -4.1492,0 1.1275,-7.0356 -4.7355,0 -1.1275,7.0356 -5.1865,0 1.1275,-7.0356 -4.7355,0 -1.1275,7.0356 -5.0963,0 0,4.4649 4.3296,0 -1.0373,6.4944 -5.0963,0 0,4.4649 4.3747,0 -1.3079,7.9827 4.7355,0 1.3079,-7.9827 5.1865,0 -1.3079,7.9827 m 2.0295,-12.4476 -5.1865,0 1.0373,-6.4944 5.1865,0 -1.0373,6.4944"
style="font-size:45.09999847px;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:generic;-inkscape-font-specification:generic Bold"
id="path3008"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
assets/hashlogo.xcf Normal file

Binary file not shown.

192
assets/home.html Normal file
View File

@ -0,0 +1,192 @@
<style>
section { position: relative; margin-left: 15px;}
nav { z-index: 9999; position: fixed; width: 100%; top: 0; left: 0; }
header { z-index: 10000; }
.tr {
clear: both;
}
.tab {
float: left;
width: 25px;
}
.td {
float: left;
width: 200px;
font-size: 1.8em;
margin-bottom: 5px;
margin-right: 25px;
color: #808080;
}
body::after {
content: '';
background-position: 50% 50%;
background-repeat: no-repeat;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
opacity: 0.5;
z-index: -1;
}
</style>
<script>
var terms = new Array(
"Internet-scale Privacy",
"Social Networking",
"Single Sign-On",
"Photo Albums",
"Decentralised",
"Cloud Storage",
"Own Your Content",
"Blogging",
"End-to-end Encryption",
"Chatrooms",
"Shareable Apps",
"Cross-Site Access Control",
"Unsend Private Mail",
"Webpage Creation",
"Content Management",
"Message Expiration",
"Games and Utilities",
"Unincorporated",
"Forums",
"Like + Dislike",
"Share Anything Digital",
"Communications",
"Identity-Aware Content",
"Pseudonyms",
"Multiple Identities",
"No Advertising",
"Rich Text Post/Comment",
"Event Calendar",
"Bookmarking",
"Community Tagging",
"Mirrored Directory",
"Nomadic Identity",
"Derivative Channels",
"Customised Encryption",
"Multiple Profiles",
"Privacy Groups",
"File Sharing",
"MIT license",
"Autonomy",
"Affinity Filtering",
"Friend Suggestions",
"Cross-Site Auth",
"Themes",
"Plugins",
"External API",
"3rd Party Apps",
"Open Source",
null
);
var r = 0;
var g = 0;
var b = 0;
var speed = 3;
var delay = 450;
var timer = null;
var holdid = 0;
var element = 'word-flasher';
var custom = '';
var seq = 0;
var nindex = 0;
var firstTime = 1;
var curr = null;
function update_element() {
if(firstTime) {
firstTime = 0;
fadeout();
return;
}
curr = terms[nindex];
nindex ++;
if(terms[nindex] == null)
nindex = 0;
var id = document.getElementById(element);
id.innerHTML = curr;
timer = setTimeout('fadein();',3);
}
function fadeout() {
var id = document.getElementById(element);
r = (((r + speed) < 255) ? r + speed : 255);
g = (((g + speed) < 255) ? g + speed : 255);
b = (((b + speed) < 255) ? b + speed : 255);
if((r != 255) && (g != 255) && (b != 255)) {
timer = setTimeout('fadeout();',5);
}
else {
update_element();
}
id.style.color = "rgb(" + r + "," + g + "," + b + ")";
}
function fadein() {
var id = document.getElementById(element);
r = (((r - speed) > 0) ? r - speed : 0);
g = (((g - speed) > 0) ? g - speed : 0);
b = (((b - speed) > 0) ? b - speed : 0);
if(r && g && b) {
timer = setTimeout('fadein();',5);
}
else {
timer = setTimeout('fadeout();',delay);
}
id.style.color = "rgb(" + r + "," + g + "," + b + ")";
}
$(document).ready(function() {
timer = setTimeout('update_element();',2000);
});
</script>
<div style="margin-top: 50px;"></div>
<center>
<img style="width: 330px; margin-top: 30px; margin-bottom: 30px;" src="assets/hashlogo.png" >
<div id="word-flasher" style="font-size: 3.0em; font-weight: bold; margin-bottom: 30px;">&quot;The Network&quot;</div>
<div class="tr" style="font-size: 1.6em; color: #666; margin-left: 75px; margin-right: 75px;">
The RedMatrix (aka "<span style="color: #c60032;">red</span>") is an open source webapp providing a complete <strong>decentralised</strong> publishing, sharing, and communications system. It combines communications (private messaging, chat and social networking), and media management (photos, events, files, web pages, shareable apps) with enough features to make your head spin.
</div>
<br />
<div class="tr" style="font-size: 1.6em; color: #666; margin-left: 75px; margin-right: 75px;">
What makes the RedMatrix unique is what we call "magic authentication" - which is based on our groundbreaking work in decentralised identity services. This ties all RedMatrix sites and channels together into a single super-network where the boundaries between different websites are blurred or seemingly non-existent; where "who you are" has nothing to do with "what computer you're connected to", and where website content can adapt itself according to who is viewing it.
</div>
<br />
<div class="tr" style="font-size: 1.6em; color: #666; margin-left: 75px; margin-right: 75px;">
Warning: After experiencing magic authentication and nomadic identity, you may find it disconcerting and a bit "primitive" to go back to the old internet. You shouldn't need hundreds of different passwords to use the web ... or be totally isolated from your friends and family because a server or router in another country is having "<em>issues</em>".
</div>
<br />
<div class="tr" style="font-size: 1.6em; color: #666; margin-left: 75px; margin-right: 75px;">
For the average person, the biggest advantage of decentralised identity is that you decide who you want to share your stuff with, and if somebody isn't on your list, they're not going to see it. It's all under your control (we're big on privacy). Use the RedMatrix as a social network or a business website or for personal cloud storage or media publishing - or any number of other uses; limited only by your imagination.<br />
</div>
<br />
<div style="margin-bottom: 15px; color: #808080; font-size: 1.8em;"><strong>RedMatrix - &quot;The Network&quot;</strong></div>
<div style="font-size: 1.4em;"><a href="pubsites" style="color: white; padding:10px; background-color: #c60032; border-radius: 10px;">Sign up now!</a></div>
<div style="margin-top: 15px; margin-bottom: 15px;"><a href="pubsites">Public Sites</a> | <a href="https://redmatrix.me">Project Home</a> | <a href="https://github.com/friendica/red">Code</a> | <a href="https://zothub.com/channel/one">Developers</a></div></center>

2610
boot.php Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@ -6,67 +6,36 @@ Account Basics
**Registration**
Not all Friendica sites allow open registration. If registration is allowed, you will see a "Register" link immediately below the login prompts on the site home page. Following this link will take you to the site registration page. The strength of our network is that lots of different sites are all completely compatible with each other. If the site you're visting doesn't allow registration, or you think you might prefer another one, you can find a <a href="http://dir.friendica.com/siteinfo">list of public servers here</a>, and find one that meets your needs.
Not all Red Matrix sites allow open registration. If registration is allowed, you will see a "Register" link immediately below the login prompts on the site home page. Following this link will take you to the site Registration page. On some sites it may redirect you to another site which allow registrations. As all Red Matrix sites are linked, it does not matter where your account resides.
If you'd like to have your own server, you can do that too. Visit <a href="http://friendica.com/download">the Friendica website</a> to download the code with setup instructions. It's a very simple install process that anybody experienced in hosting websites, or with basic Linux experience can handle easily.
*Your Email Address*
Please provide a valid email address. Your email address is **never** published. This address will be used to (optionally) send email notifications for incoming messages or items, and used to recover lost passwords.
*OpenID*
*Password*
The first field on the Registration page is for an OpenID address. If you do not have an OpenID address or do not wish to use OpenID, leave this field blank. If you have an OpenID account elsewhere and wish to use it, enter the address into this field and click 'Register'. Friendica will attempt to extract as much information as possible from your OpenID provider and return to this page with those items already filled in.
Enter a password of your choice, and repeat it in the second box to ensure it was typed correctly. As the Red Matrix offers a decentralised identity, your account can log you in to many other websites.
*Terms Of Service*
*Your Full Name*
Please provide your full name **as you would like it to be displayed on this system**. Most people use their real name for this, but you're under no obligation to do so yourself.
*Email Address*
Please provide a valid email address. Your email address is **never** published. We need this to send you account information and your login details. You may also occasionally receive notifications of incoming messages or items requiring your attention, but you have the ability to completely disable these from your Settings page once you have logged in. This doesn't have to be your primary email address, but it does need to be a real email address. You can't get your initial password, or reset a lost password later without it. This is the only bit of personal information that has to be accurate.
*Nickname*
A nickname is used to generate web addresses for many of your personal pages, and is also treated like an email address when establishing communications with others. Due to the way that the nickname is used, it has some limitations. It must contain only US-ASCII text characters and numbers, and must also start with a text character. It also must be unique on this system. This is used in many places to identify your account, and once set - cannot be changed.
*Directory Publishing*
The Registration form also allows you to choose whether or not to list your account in the online directory. This is like a "phone book" and you may choose to be unlisted. We recommend that you select 'Yes' so that other people (friends, family, etc.) will be able to find you. If you choose 'No', you will essentially be invisible and have few opportunities for interaction. Whichever you choose, this can be changed any time from your Settings page after you login.
Click the link to read the site's terms of service. Once you've read them, tick the box in the register form to confirm.
*Register*
Once you have provided the necessary details, click the 'Register' button. An email will be sent to you providing your account login details. Please watch your email (including spam folders) for your registration details and initial password.
Once you have provided the necessary details, click the 'Register' button. Some sites may require administrator approval before the registration is processed, and you will be alerted if this is the case. Please watch your email (including spam folders) for your registration approval.
*Create a Channel*
**Login Page**
On the 'Login' page, please enter your login information that was provided during registration. You may use either your nickname or email address as a Login Name.
If you use your account to manage multiple '[Pages](help/Pages)' and these all have the same email address, please enter the nickname for the account you wish to manage.
*If* your account has been OpenID enabled, you may use your OpenID address as a login name and leave the password blank. You will be redirected to your OpenID provider to complete your authorisation.
Otherwise, enter your password. This will have been initially provided in your registration email message. Your password is case-sensitive, so please check your 'Caps Lock' key if you are having difficulty logging in.
**Changing Your Password**
After your first login, please visit the 'Settings' page from the top menu bar and change your password to something that you will remember.
**Retrieving Personal Data**
You can export a copy of your personal data in XML format from the "Export personal data" link at the top of your settings page.
Next, you will be presented with the "Add a channel" screen. Normally, your first channel will be one that represents you - so using your own name (or psuedonym) as the channel name is a good idea. The channel name should be thought of as a title, or brief description of your channel. The "choose a short nickname" box is similar to a "username" field. We will use whatever you enter here to create a channel address, which other people will use to connect to you, and you will use to log in to other sites. This looks like an email address, and takes the form nickname@siteyouregisteredat.xyz
When your channel is created you will be taken straight to your settings page where you can define permissions, enable features, etc. All these things are covered in the appropriate section of the helpfiles.
**See Also**
* [Profiles](help/Profiles)
* [Permissions](help/Permissions)
* [Groups and Privacy](help/Groups-and-Privacy)
* [Profiles](help/Profiles)
* [Remove Account](help/Remove-Account)

57
doc/AdvancedSearch.md Normal file
View File

@ -0,0 +1,57 @@
Advanced Directory Search
=========================
Advanced Directory Search is enabled in "Expert Mode" from your Settings => Additional features page.
On the Directory page an option named "Advanced" will apear in the "Find Channels" widget (typically in the sidebar). Clicking "Advanced" will open another search box for entering advanced search requests.
Advanced requests include
* name=xxx
[Channel name contains xxx]
* address=xxx
[Channel address (webbie) contains xxx]
* locale=xxx
[Locale (typically 'city') contains xxx]
* region=xxx
[Region (state/territory) contains xxx]
* postcode=xxx
[Postcode or zip code contains xxx]
* country=xxx
[Country name contains xxx]
* gender=xxx
[Gender contains xxx]
* marital=xxx
[Marital status contains xxx]
* sexual=xxx
[Sexual preference contains xxx]
* keywords=xxx
[Keywords contain xxx]
There are many reasons why a match may not return what you're looking for, as many channels do not provide detailed information in their default (public) profile, and many of these fields allow free-text input in several languages - and this may be difficult to match precisely. For instance you may have better results finding somebody in the USA with 'country=u' (along with some odd channels from Deutschland and Bulgaria and Australia) because this could be represented in a profile as US, U.S.A, USA, United States, etc...
Future revisions of this tool may try to smooth over some of these difficulties.
Requests may be joined together with 'and', 'or', and 'and not'.
Terms containing spaces must be quoted.
Example:
name="charlie brown" and country=canada and not gender=female

View File

@ -1,31 +0,0 @@
Bugs and Issues
===============
* [Home](help)
If your server has a support page, you should report any bugs/issues you encounter there first. Reporting to your support page before reporting to the developers makes their job easier, as they don't have to deal with bug reports that might not have anything to do with them, and that helps us get new features faster.
If you're a technical user, or your site doesn't have a support page, you'll need to use the <a href="http://bugs.friendica.com/">Bug Tracker</a>. Please perform a search to see if there's already an open bug that matches yours before submitting anything.
Try to provide as much information as you can about the bug, including the **full** text of any error messages or notices, and any steps required to replicate the problem in as much detail as possible. It's generally better to provide too much information than not enough.
<a href="http://www.chiark.greenend.org.uk/~sgtatham/bugs.html">See this article</a> to learn more about submitting **good** bug reports.
**Bug Sponsorship**
If you find a bug, and it is caused by a problem in main branch (ie, is not specific to our site), you may sponsor it.
The bug/issue database allows you to sponsor issues. This provides an incentive for developers to work on your issue. This isn't necessary - we don't like bugs and will try to fix them. This has more importance for future development projects and feature requests.
Bug sponsorship works on the honour system. If you agree to pay $10 to fix a bug, when the fix has been checked in and verified you should send a paypal payment to the developer assigned to the bug. Don't ever think you can get away with not paying a developer for work performed. Some of these guys could hack into your credit card account if you make them mad.
At the present time, one has to be approved as a "developer" to be able to assign themselves to a sponsored bug. This requires the developer to have some history fixing Friendica bugs. This is for everybody's assurance that the bug fix will work well with Friendica. If you wish to become approved as a developer, work on and check in some non-sponsored issues or your own projects and we will move you up the ladder.
If you truly feel you have the solution to a sponsored bug but aren't an approved developer, you risk a sponsored developer assigning the bug to themselves before you check it in, but if they haven't done so - include a short note with your pull request. Assuming that it meets our code standards, we'll see that you get credit.
If you sponsor a project at greater than a $50 level, you may be requested by the developer for payment up front before work has begun (typically half). Again this is on the honour system - and is mostly to avoid payment issues and disagreements later. You should also expect to see some progress updates or demonstrations if the work takes more than a week or two. If the work is not completed within a reasonable time (as decided by those involved), you are entitled to get your money back.
Friendica is not involved in these transactions. It is purely a personal agreement between sponsors and developers. If there are any issues, the parties will need to work it out between themselves. We're just providing some guidelines to help avoid potential problems.

27
doc/Channels.md Normal file
View File

@ -0,0 +1,27 @@
**Channels**
Channels are simply collections of content stored in one place. A channel can represent anything. It could represent you, a website, a forum, photo albums, anything. For most people, their first channel with be "Me".
The most important features for a channel that represents "me" are:
- Secure and private "spam free" communications
- Identity and "single-signon" across the entire network
- Privacy controls and permissions which extend to the entire network
- Directory services (like a phone book)
In short, a channel that represents yourself is "me, on the internet".
You will be required to create your first channel as part of the sign up process. You can also create additonal channels from the "Select channel" link.
You will be asked to provide a channel name, and a short nick name. For a channel that represents yourself, it is a good idea to use your real name here to ensure your friends can find you, and connect to your channel. The short nickname will be used to generate a "webbie". This is a bit like a username, and will look like an email address, taking the form nickname@domain. You should put a little thought into what you want to use here. Imagine somebody asking for your webbie and having to tell them it is "llamas-are_kewl.123". "llamasarecool" would be a much better choice.
Once you have created your channel, you will be taken to the settings page, where you can configure your channel, and set your default permissions.
Once you have done this, your channel is ready to use. At https://yourdomain/channel/username you will find your channel "stream". This is where your recent activity will appear, in reverse chronological order. If you post in the box marked "share", the entry will appear at the top of your stream. You will also find links to all the other communication areas for this channel here. The "About" tab contains your "profile", the photos page contain photo albums, and the events page contains events share by both yourself and your contacts.
The "Matrix" page contains all recent posts from across the matrix, again in reverse chronologial order. The exact posts that appear here depend largely on your permissions. At their most permissive, you will receive posts from complete strangers. At the other end of the scale, you may see posts from only your friends - or if you're feeling really anti-social, only your own posts.
As mentioned at the start, many other kinds of channel are possible, however, the creation procedure is the same. The difference between channels lies primarily in the permissions assigned. For example, a channel for sharing documents with colleagues at work would probably want more permissive settings for "Can write to my "public" file storage" than a personal account. For more information, see the permissions section.

53
doc/Cloud.md Normal file
View File

@ -0,0 +1,53 @@
Personal Cloud Storage
======================
The Red Matrix provides an ability to store privately and/or share arbitrary files with friends.
You may either upload files from your computer into your storage area, or copy them directly from the operating system using the WebDAV protocol.
On many public servers there may be limits on disk usage.
**File Attachments**
The quickest and easiest way to share files is through file attachments. In the row of icons below the status post editor is a tool to upload attachments. Click the tool, select a file and submit. After the file is uploaded, you will see an attachment code placed inside the text region. Do not edit this line or it may break the ability for your friends to see the attachment. You can use the post permissions dialogue box or privacy hashtags to restrict the visibility of the file - which will be set to match the permissions of the post your are sending.
To delete attachments or change the permissions on the stored files, visit "filestorage/$channel_nickname" replacing $channel_nickname with the nickname you provided during channel creation.
**Web Access**
Your files are visible on the web at the location "cloud/$channel_nickname" to anybody who is allowed to view them. If the viewer has sufficient privileges, they may also have the ability to create new files and folders/directories.
**WebDAV access**
This varies by operating system.
*Windows*
In Windows, open the Windows Explorer (file manager) and type "$yoursite\cloud\$channel_nickname" into the address bar. Replace $yoursite with the URL to your Red Matrix hub and $channel_nickname with the nickname for your channel.
You will be prompted for a username and password. For the username, you may supply either your account email address (which will select the default channel), or a channel nickname for the channel you wish to authenticate as. In either case use your account password for the password field. You will then be able to copy, drag/drop, edit, delete and otherwise work with files as if they were an attached disk drive.
*Linux KDE*
Simply log in to your hub as normal using Konqueror. Once logged in, visit webdavs://$yoursite/cloud. No further authentication is required.
*Linux GNOME*
Open a File browsing window (that's Nautilus), Select File > Connect to server from the menu. Type davs://$yoursite/cloud/$channel_nickname and click Connect. You will be prompted for your username and password. For the username, you may supply either your account email address (which will select the default channel) or a channel nickname.
*See Also*
- [Linux - Mounting the cloud as a file system](help/dav_davfs2)
**Permissions**
When using WebDAV, the file is created with your channel's default file permissions and this cannot be changed from within the operating system. It also may not be as restrictive as you would like. What we've found is that the preferred method of making files private is to first create folders or directories; then visit "filestorage/$channel_nickname"; select the directory and change the permissions. Do this before you put anything into the directory. The directory permissions take precedence so you can then put files or other folders into that container and they will be protected from unwanted viewers by the directory permissions. It is common for folks to create a "personal" or "private" folder which is restricted to themselves. You can use this as a personal cloud to store anything from anywhere on the web or any computer and it is protected from others. You might also create folders for "family" and "friends" with permission granted to appropriate collections of channels.

169
doc/Comanche.md Normal file
View File

@ -0,0 +1,169 @@
Comanche Page Description Language
==================================
Comanche is a markup language similar to bbcode with which to create elaborate and complex web pages by assembling them from a series of components - some of which are pre-built and others which can be defined on the fly. Comanche uses a Page Decription Language to create these pages.
Comanche primarily chooses what content will appear in various regions of the page. The various regions have names and these names can change depending on what layout template you choose.
Currently there are three layout templates, unless your site provides additional layouts.
default
The default template defines a "nav" region across the top, "aside" as a fixed width sidebar,
"content" for the main content region, and "footer" for a page footer.
full
The full template defines the same as the default template with the exception that there is no "aside" region.
choklet
The choklet template provides a number of fluid layout styles which can be specified by flavour:
(default flavour) - a two column layout similar to the "default" template, but more fluid
bannertwo - a two column layout with a banner region, compatible with the "default" template on small displays
three - three column layout (adds a "right_aside" region to the default template)
edgestwo - two column layout with fixed side margins
edgesthree - three column layout with fixed side margins
full - three column layout with fixed side margins and adds a "header" region beneath the navigation bar
To choose a layout template, use the "template" tag.
[template]full[/template]
To choose the "choklet" template with the "three" flavour:
[template=three]choklet[/template]
The default template will be used if no other template is specified. The template can use any names it desires for content regions. You will be using 'region' tags to decide what content to place in the respective regions.
Two "macros" have been defined for your use.
$nav - replaced with the site navigation bar content.
$content - replaced with the main page content.
By default, $nav is placed in the "nav" page region and $content is placed in the "content" region. You only need to use these macros if you wish to re-arrange where these items appear, either to change the order or to move them to other regions.
To select a theme for your page, use the 'theme' tag.
[theme]apw[/theme]
This will select the theme named "apw". By default your channel's preferred theme will be used.
[theme=dark]redbasic[/theme]
This will select the theme named "redbasic" and load the "dark" theme schema for this theme.
**Regions**
Each region has a name, as noted above. You will specify the region of interest using a 'region' tag, which includes the name. Any content you wish placed in this region should be placed between the opening region tag and the closing tag.
[region=aside]....content goes here....[/region]
[region=nav]....content goes here....[/region]
**Menus and Blocks**
Your webpage creation tools allow you to create menus and blocks, in addition to page content. These provide a chunk of existing content to be placed in whatever regions and whatever order you specify. Each of these has a name which you define when the menu or block is created.
[menu]mymenu[/menu]
This places the menu called "mymenu" at this location on the page, which must be inside a region.
[menu=horizontal-menu]mymenu[/menu]
This places the menu called "mymenu" at this location on the page, which must be inside a region. Additionally it adds the CSS class "horizontal-menu" to this menu. This *may* result in a menu that looks different than the default menu style, *if* the css for the current theme defines a "horizontal-menu" class.
[block]contributors[/block]
This places a block named "contributors" in this region.
**Widgets**
Widgets are executable apps provided by the system which you can place on your page. Some widgets take arguments which allows you to tailor the widget to your purpose. (TODO: list available widgets and arguments). The base system provides
profile - widget which duplicates the profile sidebar of your channel page. This widget takes no arguments
tagcloud - provides a tag cloud of categories
count - maximum number of category tags to list
Widgets and arguments are specified with the 'widget' and 'var' tags.
[widget=recent_visitors][var=count]24[/var][/widget]
This loads the "recent_visitors" widget and supplies it with the argument "count" set to "24".
**Comments**
The 'comment' tag is used to delimit comments. These comments will not appear on the rendered page.
[comment]This is a comment[/comment]
**Complex Example**
Please note that pasting this example into a layout page is not likely to do anything useful as the chosen names (template, theme, regions, etc.) may not correspond to any existing webpage components.
[comment]use an existing page template which provides a banner region plus 3 columns beneath it[/comment]
[template]3-column-with-header[/template]
[comment]Use the "darknight" theme[/comment]
[theme]darkknight[/theme]
[comment]Use the existing site navigation menu[/comment]
[region=nav]$nav[/region]
[region=side]
[comment]Use my chosen menu and a couple of widgets[/comment]
[menu]myfavouritemenu[/menu]
[widget=recent_visitors]
[var=count]24[/var]
[var=names_only]1[/var]
[/widget]
[widget=tagcloud][/widget]
[block]donate[/block]
[/region]
[region=middle]
[comment]Show the normal page content[/comment]
$content
[/region]
[region=right]
[comment]Show my condensed channel "wall" feed and allow interaction if the observer is allowed to interact[/comment]
[widget]channel[/widget]
[/region]

View File

@ -1,67 +0,0 @@
Connectors
==========
* [Home](help)
Connectors allow you to connect with external social networks and services. Connectors are only required for posting to existing accounts on Facebook, Twitter, and StatusNet. There is also a connector for accessing your email INBOX.
If the following network connectors are installed on your system, select the following links to visit the appropriate settings page and configure them for your account:
* [Facebook](/settings/addon)
* [Twitter](/settings/addon)
* [StatusNet](/settings/addon)
* [Email](/settings)
Instructions For Connecting To People On Specific Services
==========================================================
**Friendica**
You may connect by providing your Identity Address on the 'Connect' page of any Friendica member. You may also put their Identity Address into the Connect box on your [Contacts](contacts) page.
**Diaspora**
Add the Diaspora 'handle' to the 'Connect/Follow' text box on your [Contacts](contacts) page.
**Identi.ca/StatusNet/GNU-Social**
These are described as the "federated social web" or OStatus contacts.
Please note that there are **no** privacy provisions on the OStatus network. Any message which is delivered to **any** OStatus member is visible to anybody in the world and will negate any privacy settings that you have in effect. These messages will also turn up in public searches.
Since OStatus communications do not use authentication, if you select the profile privacy option to hide your profile and messages from unknown viewers, OStatus members will **not** be able to receive your communications.
To connect with an OStatus member insert their profile URL or Identity address into the Connect box on your [Contacts](contacts) page.
The StatusNet connector may be used if you wish posts to appear on an OStatus site using an existing OStatus account.
It is not necessary to do this, as you may 'follow' OStatus members from Friendica and they may follow you (by placing their own Identity Address into your 'Connect' page).
**Blogger, Wordpress, RSS feeds, arbitrary web pages**
Put the URL into the Connect box on your [Contacts](contacts) page. You will not be able to reply to these contacts.
This will allow you to _connect_ with millions of pages on the internet. All that we require to do this is that the page use a discoverable feed using either the RSS or Atom syndication format, and which provides an author name and a site image in a form which we can extract.
**Twitter**
To follow a Twitter member, put the URL of the Twitter member's main page into the Connect box on your [Contacts](contacts) page. To reply, you must have the Twitter connector installed, and reply using your own status editor. Begin the message with @twitterperson replacing with the Twitter username.
**Email**
Configure the email connector from your [Settings](settings) page. Once this has been done, you may enter an email addres to connect with using the Connect box on your [Contacts](contacts) page. They must be the sender of a message which is currently in your INBOX for the connect to succeed. You may include email contacts in private conversations.
**Facebook**
The Facebook connector is a plugin/addon which allows you to interact with friends on Facebook from within Friendica. If enabled, your Facebook friend list will be imported, and you will see and be able to respond to Facebook posts. Facebook members may also be added to private conversation groups. You will not be able to connect with individual Facebook accounts - but will have your entire friend list imported and updated if new friends are added.
Assuming the Facebook plugin/addon has been installed on your system, it can be enabled by going to your [Plugin Settings](settings/addon) page, and then select "Facebook Connector Settings" on that page. This will only appear if the Facebook plugin/addon has been installed. Follow the instruction to install or remove the Facebook connector.
You may also choose whether your public postings are posted to Facebook by default. You may toggle this setting at any time from the Permissions settings of the status post editor (click the lock icon). This setting has no effect on private conversations - which will always be delivered to Facebook friends who are included in the permissions.
(Note: At this time, Facebook contacts will not be able to view any private photos. This will be resolved in a future release. Facebook contacts may however see any public photos you have uploaded.)

91
doc/Creating-Templates.md Normal file
View File

@ -0,0 +1,91 @@
Creating Page Templates
=======================
A page template for use with Comanche requires two files - a PHP template and a CSS file. Page templates will need to be installed by the system administrator of your site.
First choose a name. Here we'll create a template and call it "demo".
You will need to create the files "view/php/demo.php" and "view/css/demo.css" to hold the PHP template and CSS respectively.
To get a better idea of this process, let's look at an existing template - the "default" template. This is used by default throughout the application.
view/php/default.php
====================
<!DOCTYPE html >
<html>
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
<?php if(x($page,'nav')) echo $page['nav']; ?>
<aside id="region_1"><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
<div id="pause"></div>
</section>
<aside id="region_3"><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></aside>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
</body>
</html>
Here's is the corresponding CSS file
view/php/default.css
====================
aside#region_1 {
display: block;
width: 210px;
position: absolute;
top: 65px;
left: 0;
margin-left: 10px;
}
aside input[type='text'] {
width: 174px;
}
section {
position: absolute;
top: 65px;
left: 250px;
display: block;
right: 15px;
padding-bottom: 350px;
}
Some things you may notice when looking at these definitions:
* We have not specified any CSS for the "nav", "right_aside", or "footer" regions. In this template "nav" and "footer" will be the full page width and we will let the size and placement of these elements be controlled by the theme. "right_aside" is not currently used.
* There are elements on the page such as "page-footer" and "pause" for which there is no apparent content. This content will come from Javascript elements.
* Our default template uses absolute positioning. Modern web design often uses "float" div containers so that scrollbars aren't typically needed when viewing on small-screen devices.
To design a new template, it is best to start with an existing template, and modify it as desired. That is what we will do here.
The way that Comanche provides content inside a specific region is by using a region tag.
[region=aside][widget=profile][/widget][/region]
This example will place a "profile" widget in the "aside" region. But what it actually does is place the HTML for the widget into a code variable **$page['aside']**. Our default page template defines a region on the page (the CSS positions this as an absolute sidebar) and then inserts the contents of $page['aside'] (if it exists).
So if you wanted to create a template with a region named "foo", you would provide a place for it on the page, then include the contents of $page['foo'] wherever you wanted to use it, and then using Comanche, you could specify
[region=foo][widget=profile][/widget][/region]
and this would place a profile widget into the "foo" region you created.
Use the CSS file to position the region on the page where desired and optionally control its size.
[To be continued]

78
doc/DerivedTheme1.md Normal file
View File

@ -0,0 +1,78 @@
Creating a Derived Theme
========================
**Lesson 1**
A derived theme takes most of the settings from its "parent" theme and lets you change a few things to your liking without creating an entire theme package.
To create a derived theme, first choose a name. For our example we'll call our theme 'mytheme'. Hopefully you'll be a bit more creative. But throughout this document, wherever you see 'mytheme', replace that with the name you chose.
**Directory Structure**
First you need to create a theme directory structure. We'll keep it simple. We need a php directory and a css directory. Here are the Unix/Linux commands to do this. Assume that 'mywebsite' is your top level Red Matrix folder.
cd mywebsite
mkdir view/theme/mytheme
mkdir view/theme/mytheme/css
mkdir view/theme/mytheme/php
Great. Now we need a couple of files. The first one is your theme info file, which describes the theme.
It will be called view/theme/mytheme/php/theme.php (clever name huh?)
Inside it, put the following information - edit as needed
<?php
/**
* * Name: Mytheme
* * Description: Sample Derived theme
* * Version: 1.0
* * Author: Your Name
* * Compat: Red [*]
*
*/
function mytheme_init(&$a) {
$a->theme_info['extends'] = 'redbasic';
}
Remember to rename the mytheme_init function with your theme name. In this case we will be extending the theme 'redbasic'.
Now create another file. We call this a PCSS file, but it's really a PHP file.
The file is called view/theme/mytheme/php/style.php
In it, put the following:
<?php
require_once('view/theme/redbasic/php/style.php');
echo @file_get_contents('view/theme/mytheme/css/style.css');
That's it. This tells the software to read the PCSS information for the redbasic theme first, and then read our CSS file which will just consist of changes we want to make from our parent theme (redbasic).
Now create the actual CSS file for your theme. Put it in view/theme/mytheme/css/style.css (where we just told the software to look for it). For our example, we'll just change the body background color so you can see that it works. You can use any CSS you'd like.
body {
background-color: #DDD;
}
You've just successfully created a derived theme. This needs to be enabled in the admin "themes" panel, and then anybody on the site can use it by selecting it in Settings->Display Settings as their default theme.

View File

@ -1,13 +1,14 @@
Friendica Developer Guide
Red Developer Guide
===================
Here is how you can join us.
**Here is how you can join us.**
First, get yourself a working git package on the system where you will be
doing development.
Create your own github account.
You may fork/clone the Friendica repository from [https://github.com/friendica/friendica.git](https://github.com/friendica/friendica.git).
You may fork/clone the Red repository from [https://github.com/friendica/red.git](https://github.com/friendica/red.git).
Follow the instructions provided here: [http://help.github.com/fork-a-repo/](http://help.github.com/fork-a-repo/)
to create and use your own tracking fork on github
@ -15,8 +16,40 @@ to create and use your own tracking fork on github
Then go to your github page and create a "Pull request" when you are ready
to notify us to merge your work.
**Translations**
Our translations are managed through Transifex. If you wish to help out translating the Red Matrix to another language, sign up on transifex.com, visit [https://www.transifex.com/projects/p/red-matrix/](https://www.transifex.com/projects/p/red-matrix/) and request to join one of the existing language teams or create a new one. Notify one of the core developers when you have a translation update which requires merging, or ask about merging it yourself if you're comfortable with git and PHP. We have a string file called 'messages.po' which is gettext compliant and a handful of email templates, and from there we automatically generate the application's language files.
[Translations - More Info](help/Translations)
**Important**
Please pull in any changes from the project repository and merge them with your work **before** issuing a pull request. We reserve the right to reject any patch which results in a large number of merge conflicts. This is especially true in the case of language translations - where we may not be able to understand the subtle differences between conflicting versions.
Also - **test your changes**. Don't assume that a simple fix won't break something else. If possible get an experienced Friendica developer to review the code.
Also - **test your changes**. Don't assume that a simple fix won't break something else. If possible get an experienced Red developer to review the code.
Further documentation can be found at the Github wiki pages at: [https://github.com/friendica/red/wiki](https://github.com/friendica/red/wiki).
**Licensing**
All code contributed to the project falls under the MIT license, unless otherwise specified. We will accept third-party code which falls under MIT, BSD and LGPL, but copyleft licensing (GPL, and AGPL) is only permitted in addons. It must be possible to completely remove the GPL (copyleft) code from the main project without breaking anything.
**Coding Style**
In the interests of consistency we adopt the following code styling. We may accept patches using other styles, but where possible please try to provide a consistent code style. We aren't going to argue or debate the merits of this style, and it is irrelevant what project 'xyz' uses. This is not project 'xyz'. This is a baseline to try and keep the code readable now and in the future.
* All comments should be in English.
* We use doxygen to generate documentation. This hasn't been consistently applied, but learning it and using it are highly encouraged.
* Indentation is accomplished primarily with tabs using a tab-width of 4.
* String concatenation and operators should be separated by whitespace. e.g. "$foo = $bar . 'abc';" instead of "$foo=$bar.'abc';"
* Generally speaking, we use single quotes for string variables and double quotes for SQL statements. "Here documents" should be avoided. Sometimes using double quoted strings with variable replacement is the most efficient means of creating the string. In most cases, you should be using single quotes.
* Use whitespace liberally to enhance readability. When creating arrays with many elements, we will often set one key/value pair per line, indented from the parent line appropriately. Lining up the assignment operators takes a bit more work, but also increases readability.
* Generally speaking, opening braces go on the same line as the thing which opens the brace. They are the last character on the line. Closing braces are on a line by themselves.

27
doc/External-Resources.md Normal file
View File

@ -0,0 +1,27 @@
External Resources
==================
**Third-Party Themes**
* [APW](https://github.com/beardy-unixer/apw)
* [Redstrap](https://github.com/omigeot/redstrap3)
* [Pluto](https://github.com/23n/Pluto)
* [clean](https://bitbucket.org/tobiasd/red-clean)
**Third-Party Addons**
* [BBCode Extensions for Webpages/Wikis](https://github.com/beardy-unixer/red-addons-extra)
* [ABCjs integration - display scores in posts (WIP)](https://abcentric.net/git/abcjsplugin.git)
**Related projects**
* [Redshare for Firefox](https://addons.mozilla.org/en-US/firefox/addon/redshare/)
* [Red for Android](https://github.com/cvogeley/red-for-android)
* [feed2red.pl (posts Atom/RSS feeds to channels)](https://github.com/zzottel/feed2red)
**Utilities**
* [Debian Install Script](https://github.com/beardy-unixer/lowendscript-ng)

107
doc/Features.md Normal file
View File

@ -0,0 +1,107 @@
Extra Features
==============
The default interface of the Red Matrix was designed to be uncluttered. There are a huge number of extra features (some of which are extremely useful) which you can turn on and get the most of the application. These are found under the [Extra Features](settings/features) link of your [Settings](settings) page.
**Content Expiration**
Remove posts/comments and/or private messages at a future time. An extra button is added to the post editor which asks you for an expiration. Typically this in "yyyy-mm-dd hh:mm" format, but in the English language you have a bit more freedom and can use most any recognisable date reference such as "next Thursday" or "+1 day". At the specified time (give or take approximately ten minutes based on the remote system's checking frequency) the post is removed.
**Multiple Profiles**
The ability to create multiple profiles which are visible only to specific persons or groups. Your default profile may be visible to anybody, but secondary profiles can all contain different or additional information and can only be seen by those to whom that profile is assigned.
**Web Pages**
Provides the ability to use web page design feaures and create custom webpages from your own content and also to design the pages with page layouts, custom menus, and content blocks.
**Private Notes**
On pages where it is available (your matrix page and personal web pages) provide a "widget" to create and store personal reminders and notes.
**Enhanced Photo Albums**
Provides a photo album viewer that is a bit prettier than the normal interface.
**Extended Identity Sharing**
By default your identity travels with you as you browse the matrix to remote sites - and they know who you are and can show you content that only you can see. With Extended Identity Sharing you can provide this information to any website you visit from within the matrix.
**Expert Mode**
This allows you to see some advanced configuration options that would confuse some people or cause support issues. In particular this can give you full control over theme features and colours - so that you can tweak a large number of settings of the display theme to your liking.
**Premium Channel**
This allows you to set restrictions and terms on those that connect with your channel. This may be used by celebrities or anybody else who wishes to describe their channel to people who wish to connect with it. In certain cases you may be asked for payment in order to connect.
**Richtext Editor**
The status post editor is plaintext, but the matrix allows a wide range of markup using BBcode. The visual editor provides "what you see is what you get" for many of the most frequently used markup tags.
**Post Preview**
Allows previewing posts and comments exactly as they would look on the page before publishing them.
**Channel Sources**
Automatically import and re-publish channel content from other channels or feeds. This allows you to create sub-channels and super-channels from content provided elsewhere. The rules are that the content must be public, and the channel owner must give you permission to source their channel.
**Even More Encryption**
Private messages are encrypted during transport and storage. In this day and age, this encyption may not be enough if your communications are extremely sensitive. This options lets you provide optional encryption of content "end-to-end" with a shared secret key. How the recipient learns the secret key is completely up to you. You can provide a hint such as "the name of aunt Claire's first dog".
**Search by Date**
This provides the ability to select posts by date ranges
**Collections Filter**
Enable widget to display stream posts only from selected collections. This also toggles the outbound permissions while you are viewing a collection. This is analogous to Google "circles" or Disapora "aspects".
**Saved Searches**
Provides a search widget on your matrix page which can save selected search terms for re-use.
**Personal Tab**
Enable tab to display only matrix posts that you've interacted with in some way, as an author or a contributor to the conversation.
**New Tab**
Enables a tab to display all new matrix activity as a firehose or timeline.
**Affinity Tool**
Filter matrix stream activity by the depth of your relationships
**Edit Sent Posts**
Edit and correct posts and comments after sending
**Tagging**
Ability to tag existing posts, including those written by others.
**Post Categories**
Add categories to your channel posts
**Saved Folders**
Ability to file posts under folders or tags for later recall
**Dislike Posts**
Ability to dislike posts/comments
**Star Posts**
Ability to mark special posts with a star indicator
**Tag Cloud**
Provide a personal tag cloud on your channel page

View File

@ -1,53 +0,0 @@
Groups and Privacy
==================
* [Home](help)
Groups are merely collections of friends. But Friendica uses these to unlock some very powerful features.
To create a group, visit your Friendica "Contacts" page and select "Create a new group". Give the group a name.
This brings you to a page where you can select the group members.
You will have two boxes on this page. The top box is the roster of current group members. Below that is another box containing all of your friends who are *not* members of the group.
If you click on a photo of a person who isn't in the group, they will be put into the group. If you click on a photo of a person who is in the group, they will be removed from it.
Once you have created a group, you may use it in any access control list. This is the little lock icon beneath the status update box on your home page. If you click this you can select who can see and who can *not* see the post you are about to make. These can be individual people or groups.
On your "Network" page you will find posts and conversation from everybody in your network. You may select an individual group on this page to show conversations pertaining only to members of that group.
But wait, there's more...
If you look carefully when visiting a group from your Network page, the lock icon under the status update box has an exclamation mark next to it. This is meant to draw attention to that lock. Click the lock. You will see that since you are only viewing a certain group of people, your status updates while on that screen default to only being seen by that same group of people. This is how you keep your future employers from seeing what you write to your drinking buddies. You can over-ride this setting, but this makes it easy to separate your conversations into different friend circles.
These private conversations work best when your friends are Friendica members. We know who else can see the conversations - nobody, *unless* your friends cut and paste the messages and send them to others.
This is a trust issue you need to be aware of. No software in the world can prevent your friends from leaking your confidential and trusted communications. Only a wise choice of friends.
But it isn't as clear cut when dealing with status.net, identi.ca and other network providers. You are encouraged to be **very** cautious when other network members are in a group because it's entirely possible for your private messages to end up in a public newsfeed. If you look at the Contact Edit page for any person, we will tell you whether or not they are members of an insecure network where you should exercise caution.
On your "Settings" page, you may create a set of default permissions which apply to every post that you create.
Once you have created a post, you can not change the permissions assigned. Within seconds it has been delivered to lots of people - and perhaps everybody it was addressed to. If you mistakenly created a message and wish you could take it back, the best you can do is to delete it. We will send out a delete notification to everybody who received the message - and this should wipe out the message with the same speed it was initially propagated. In most cases it will be completely wiped from the Internet - in under a minute. Again, this applies to Friendica networks. Once a message spreads to other networks, it may not be removed quickly and in some cases it may not be removed at all.
In case you haven't yet figured this out, we are encouraging you to encourage your friends to use Friendica - because all these privacy features work much better within a privacy-aware network. Many of the other social networks Friendica can connect to have no privacy controls.
Profiles, Privacy, and Photos
=============================
The decentralised nature of Friendica (many websites exchanging information rather than one website which controls everything) has some implications with privacy as it relates to people on other sites. There are things you should be aware of, so you can decide best how to interact privately.
Sharing photos privately is a problem. We can only share them __privately__ with Friendica members. In order to share with other people, we need to prove who they are. We can prove the identity of Friendica members, as we have a mechanism to do so. Your friends on other networks will be blocked from viewing these private photos because we cannot prove that they should be allowed to see them.
Our developers are working on solutions to allow access to your friends - no matter what network they are on. However we take privacy seriously and don't behave like some networks that __pretend__ your photos are private, but make them available to others without proof of identity.
Your profile and "wall" may also be visited by your friends from other networks, and you can block access to these by web visitors that Friendica doesn't know. Be aware that this could include some of your friends on other networks.
This may produce undesired results when posting a long status message to (for instance) Twitter and even Facebook. When Friendica sends a post to these networks which exceeds the service length limit, we truncate it and provide a link to the original. The original is a link back to your Friendica profile. As Friendica cannot prove who they are, it may not be possible for these people to view your post in full.
For people in this situation we would recommend providing a "Twitter-length" summary, with more detail for friends that can see the post in full.
Blocking your profile or entire Friendica site from unknown web visitors also has serious implications for communicating with StatusNet/identi.ca members. These networks communicate with others via public protocols that are not authenticated. In order to view your posts, these networks have to access them as an "unknown web visitor". If we allowed this, it would mean anybody could in fact see your posts, and you've instructed Friendica not to allow this. So be aware that the act of blocking your profile to unknown visitors also has the effect of blocking outbound communication with public networks (such as identi.ca) and feed readers such as Google Reader.

View File

@ -1,37 +1,43 @@
Friendica Documentation and Resources
=====================================
Red Matrix Documentation and Resources
======================================
**Contents**
* [Account Basics](help/Account-Basics)
* [New User Quick Start](help/guide)
* [Profiles](help/Profiles)
* [Connectors](help/Connectors)
* [Making Friends](help/Making-Friends)
* [Groups and Privacy](help/Groups-and-Privacy)
* [Channels](help/Channels)
* [Connecting to Channels](help/Connecting-to-Channels)
* [Permissions](help/Permissions)
* [Cloud Storage](help/Cloud)
* [But Wait - There's More. MUCH More...](help/Features)
* [Tags and Mentions](help/Tags-and-Mentions)
* [Pages](help/Pages)
* [Web Pages](help/Webpages)
* [Remove Account](help/Remove-Account)
* [Bugs and Issues](help/Bugs-and-Issues)
* [BBcode reference for posts and comments](help/bbcode)
* [Help With Addons](help/addons)
**Technical Documentation**
* [Install](help/Install)
* [Settings](help/Settings)
* [Comanche Page Descriptions](help/Comanche)
* [Plugins](help/Plugins)
* [Installing Connectors (Facebook/Twitter/StatusNet)](help/Installing-Connectors)
* [Message Flow](help/Message-Flow)
* [Schemas](help/Schema-development)
* [Developers](help/Developers)
* [Intro for Developers](help/Intro-for-Developers)
* [API functions](help/api_functions)
* [Red Functions 101](help/dev-function-overview)
* [Code Reference (doxygen generated)](doc/html)
* [To-Do list for the Red Documentation Project](help/To-Do)
* [To-Do list for Developers](help/To-Do-Code)
**External Resources**
* [Main Website](http://friendica.com)
* [Forums](http://groups.google.com/group/friendica)
* [Developer Forums](http://groups.google.com/group/friendica-dev)
* [External Resource Links](help/External-Resources)
* [Main Website](https://github.com/friendica/red)
* [Plugin/Addon Website](https://github.com/friendica/red-addons)
* [Assets Website](https://github.com/friendica/red-assets)
* [Development Channel](http://zothub.com/channel/one)
**About**
* [Site/Version Info](friendica)
* [Site/Version Info](siteinfo)

135
doc/Hooks.md Normal file
View File

@ -0,0 +1,135 @@
Hooks - Complete List
=====================
* 'about_hook'
* 'account_settings'
* 'app_menu'
* 'atom_author'
* 'atom_entry'
* 'atom_feed'
* 'atom_feed_end'
* 'authenticate'
* 'avatar_lookup'
* 'bb2diaspora'
* 'bbcode'
* 'channel_remove'
* 'check_account_email'
* 'check_account_invite'
* 'check_account_password'
* 'connect_premium'
* 'connector_settings'
* 'contact_block_end'
* 'contact_edit'
* 'contact_edit_post'
* 'contact_photo_menu'
* 'contact_select_options'
* 'conversation_start'
* 'cron'
* 'directory_item'
* 'display_item'
* 'display_item'
* 'display_settings'
* 'display_settings_post'
* 'enotify'
* 'enotify_mail'
* 'enotify_store'
* 'event_created'
* 'event_updated'
* 'feature_enabled'
* 'feature_settings'
* 'feature_settings_post'
* 'follow'
* 'gender_selector'
* 'get_all_perms'
* 'get_features'
* 'get_widgets'
* 'global_permissions'
* 'home_content'
* 'home_init'
* 'html2bbcode'
* 'import_directory_profile'
* 'init_1'
* 'item_photo_menu'
* 'item_translate'
* 'jot_networks'
* 'jot_tool'
* 'logged_in'
* 'login_hook'
* 'logging_out'
* 'magic_auth'
* 'magic_auth_success'
* 'main_slider'
* 'marital_selector'
* 'mood_verbs'
* 'network_content_init'
* 'network_ping'
* 'network_tabs'
* 'network_to_name'
* 'notifier_end'
* 'notifier_normal'
* 'obj_verbs'
* 'oembed_probe'
* 'page_content_top'
* 'page_end'
* 'page_header'
* 'parse_atom'
* 'parse_link'
* 'pdl_selector'
* 'perm_is_allowed'
* 'personal_xrd'
* 'photo_post_end'
* 'photo_post_end'
* 'photo_upload_begin'
* 'photo_upload_end'
* 'photo_upload_file'
* 'photo_upload_form'
* 'poke_verbs'
* 'post_local'
* 'post_local_end'
* 'post_local_start'
* 'post_mail'
* 'post_mail_end'
* 'post_remote'
* 'post_remote_end'
* 'post_remote_update'
* 'post_remote_update_end'
* 'prepare_body'
* 'prepare_body_final'
* 'prepare_body_init'
* 'proc_run'
* 'profile_advanced'
* 'profile_edit'
* 'profile_post'
* 'profile_sidebar'
* 'profile_sidebar_enter'
* 'profile_tabs'
* 'register_account'
* 'render_location'
* 'settings_account'
* 'settings_form'
* 'settings_post'
* 'sexpref_selector'
* 'smilie'
* 'validate_channelname'
* 'webfinger'
* 'zid'
* 'zid_init'
***General Module Hooks***
* $a->module . '_mod_aftercontent'
* $a->module . '_mod_aside'
* $a->module . '_mod_content'
* $a->module . '_mod_init'
* $a->module . '_mod_post'
***General Selector Hooks***
* $a->module . '_post_' . $selname
* $a->module . '_post_' . $selname
* $a->module . '_post_' . $selname
* $a->module . '_pre_' . $selname
* $a->module . '_pre_' . $selname
* $a->module . '_pre_' . $selname

View File

@ -1,17 +1,24 @@
Friendica Installation
We've tried very hard to ensure that Friendica will run on commodity hosting platforms - such as those used to host Wordpress blogs and Drupal websites. But be aware that Friendica is more than a simple web application. It is a complex communications system which more closely resembles an email server than a web server. For reliability and performance, messages are delivered in the background and are queued for later delivery when sites are down. This kind of functionality requires a bit more of the host system than the typical blog. Not every PHP/MySQL hosting provider will be able to support Friendica. Many will. But **please** review the requirements and confirm these with your hosting provider prior to installation.
Red Installation
===============
Also if you encounter installation issues, please let us know via the forums at http://groups.google.com/group/friendica or file an issue at http://bugs.friendica.com . Please be as clear as you can about your operating environment and provide as much detail as possible about any error messages you may see, so that we can prevent it from happening in the future. Due to the large variety of operating systems and PHP platforms in existence we may have only limited ability to debug your PHP installation or acquire any missing modules - but we will do our best to solve any general code issues.
Red should run on commodity hosting platforms - such as those used to host Wordpress blogs and Drupal websites. But be aware that Red is more than a simple web application. The kind of functionality offered by Red requires a bit more of the host system than the typical blog. Not every PHP/MySQL hosting provider will be able to support Red. Many will. But **please** review the requirements and confirm these with your hosting provider prior to installation.
Before you begin: Choose a domain name or subdomain name for your server. Put some thought into this - because changing it after installation is currently not-supported. Things will break, and some of your friends may have difficulty communicating with you. We plan to address this limitation in a future release.
Also if you encounter installation issues, please let us know via the Github issue tracker (https://github.com/friendica/red/issues). Please be as clear as you can about your operating environment and provide as much detail as possible about any error messages you may see, so that we can prevent it from happening in the future. Due to the large variety of operating systems and PHP platforms in existence we may have only limited ability to debug your PHP installation or acquire any missing modules - but we will do our best to solve any general code issues.
Before you begin: Choose a domain name or subdomain name for your server. Put some thought into this - because changing it is currently not-supported. Things will break, and some of your friends may have difficulty communicating with you. We plan to address this limitation in a future release.
Decide if you will use SSL and obtain an SSL certificate before software installation. You SHOULD use SSL. If you use SSL, you MUST use a "browser-valid" certificate. You MUST NOT use self-signed certificates!
Please test your certificate prior to installation. A web tool for testing your certificate is available at "http://www.digicert.com/help/". When visiting your site for the first time, please use the SSL ("https://") URL if SSL is available. This will avoid problems later. The installation routine will not allow you to use a non browser-valid certificate.
This restriction is incorporated because public posts from you may for example contain references to images on your own hub. If your certificate is not known by the internet browser of users they get a warning message complaining about some security issues. Although these complains are not the real truth - there are no security issues with your encryption! - the users may be confused, nerved or even worse may become scared about Red Matrix having security issues. Use one of the free certification instances!
1. Requirements
- Apache with mod-rewrite enabled and "Options All" so you can use a
local .htaccess file
- PHP 5.2+. The later the better. You'll need 5.3 for encryption of key exchange conversations. On a Windows environment, 5.2+ might not work as the function dns_get_record() is only available with version 5.3.
- PHP 5.3 or later
- PHP *command line* access with register_argc_argv set to true in the
php.ini file
- curl, gd, mysql, and openssl extensions
@ -32,16 +39,22 @@ not be as convenient to use and have not been thoroughly tested.
reasonable price. If your hosting provider doesn't allow Unix shell access,
you might have trouble getting everything to work.]
2. Unpack the Friendica files into the root of your web server document area.
2. Unpack the Red files into the root of your web server document area.
- If you are able to do so, we recommend using git to clone the source repository rather than to use a packaged tar or zip file. This makes the software much easier to update. The Linux command to clone the repository into a directory "mywebsite" would be
`git clone https://github.com/friendica/friendica.git mywebsite`
`git clone https://github.com/friendica/red.git mywebsite`
- and then you can pick up the latest changes at any time with
`git pull`
- make sure folder *view/tpl/smarty3* exists and is writable by webserver
`mkdir view/tpl/smarty3`
`chmod 777 view/smarty3`
- For installing addons
- First you should be **on** your website folder
@ -50,7 +63,7 @@ you might have trouble getting everything to work.]
- Then you should clone the addon repository (separtely)
`git clone https://github.com/friendica/friendica-addons.git addon`
`git clone https://github.com/friendica/red-addons.git addon`
- For keeping the addon tree updated, you should be on you addon tree and issue a git pull
@ -81,7 +94,7 @@ database was not installed correctly. You might wish to move/rename
.htconfig.php to another name and empty (called 'dropping') the database
tables, so that you can start fresh.
7. Set up a cron job or scheduled task to run the poller once every 5-10
7. Set up a cron job or scheduled task to run the poller once every 15
minutes in order to perform background processing. Example:
`cd /base/directory; /path/to/php include/poller.php`
@ -91,21 +104,8 @@ Change "/base/directory", and "/path/to/php" as appropriate for your situation.
If you are using a Linux server, run "crontab -e" and add a line like the
one shown, substituting for your unique paths and settings:
`*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php`
`*/15 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php`
You can generally find the location of PHP by executing "which php". If you
have troubles with this section please contact your hosting provider for
assistance. Friendica will not work correctly if you cannot perform this step.
Alternative: You may be able to use the 'poormancron' plugin to perform this step
if you are using a recent Friendica release. To do this, edit the file ".htconfig.php"
and look for a line describing your plugins. On a fresh installation, it will look like
`$a->config['system']['addon'] = 'js_upload';`
This indicates the "js_upload" addon module is enabled. You may add additional
addons/plugins using this same line in the configuration file. Change it to read
`$a->config['system']['addon'] = 'js_upload,poormancron';`
and save your changes.
assistance. Red will not work correctly if you cannot perform this step.

View File

@ -1,135 +0,0 @@
Installing Connectors (Facebook/Twitter/StatusNet)
==================================================
* [Home](help)
Friendica uses plugins to provide connectivity to some networks, such as Facebook and Twitter.
There is also a plugin to post through to an existing account on a Status.Net service. You do not require this to communicate with Status.Net members from Friendica - only if you wish to post to an existing account.
All three of these plugins require an account on the target network. In addition you (or typically the server administrator) will need to obtain an API key to provide authenticated access to your Friendica server.
**Site Configuration**
Plugins must be installed by the site administrator before they can be used. This is accomplished through the site administration panel.
Each of the connectors also requires an "API key" from the service you wish to connect with. Some plugins allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (.htconfig.php). The method for obtaining these keys varies greatly - but almost always requires an existing account on the target service. Once installed, these API keys can usually be shared by all site members.
The details of configuring each service follows (much of this information comes directly from the plugin source files):
**Twitter Plugin for Friendica**
* Author: Tobias Diekershoff
* tobias.diekershoff@gmx.net
* License:3-clause BSD license
Configuration:
To use this plugin you need a OAuth Consumer key pair (key & secret)
you can get it from Twitter at https://twitter.com/apps
Register your Friendica site as "Client" application with "Read & Write" access.
We do not need "Twitter as login". When you've registered the app you get the
OAuth Consumer key and secret pair for your application/site.
Add this key pair to your global .htconfig.php
```
$a->config['twitter']['consumerkey'] = 'your consumer_key here';
$a->config['twitter']['consumersecret'] = 'your consumer_secret here';
```
After this, your user can configure their Twitter account settings
from "Settings -> Connector Settings".
Documentation: http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Twitter_Plugin
**StatusNet Plugin for Friendica**
* Author: Tobias Diekershoff
* tobias.diekershoff@gmx.net
* License:3-clause BSD license
Configuration
When the addon is activated the user has to aquire the following in order to connect to the StatusNet account of choice.
* The base URL for the StatusNet API, for identi.ca this is https://identi.ca/api/
* OAuth Consumer key & secret
To get the OAuth Consumer key pair the user has to
(a) ask her Friendica admin if a pair already exists or
(b) has to register the Friendica server as a client application on the StatusNet server.
This can be done from the account settings under "Settings -> Connections -> Register an OAuth client application -> Register a new application" on the StatusNet server.
During the registration of the OAuth client remember the following:
* Application names must be unique on the StatusNet site, so we recommend a Name of 'friendica-nnnn', replace 'nnnn' with a random number or your website name.
* there is no callback url
* register a desktop client
* with read & write access
* the Source URL should be the URL of your Friendica server
After the required credentials for the application are stored in the configuration you have to actually connect your Friendica account with StatusNet. This is done from the Settings -> Connector Settings page. Follow the Sign in with StatusNet button, allow access and then copy the security code into the box provided. Friendica will then try to acquire the final OAuth credentials from the API.
If successful the addon settings will allow you to select to post your public messages to your StatusNet account (have a look behind the little lock symbol beneath the status "editor" on your Home or Network pages).
Documentation: http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/StatusNet_Plugin
**Installing the Friendica/Facebook connector**
* register an API key for your site from developer.facebook.com
This requires a Facebook account, and may require additional authentication in the form of credit card or mobile phone verification.
a. We'd be very happy if you include "Friendica" in the application name
to increase name recognition. The Friendica icons are also present
in the images directory and may be uploaded as a Facebook app icon.
Use images/friendica-16.jpg for the Icon and images/friendica-128.jpg for the Logo.
b. The url should be your site URL with a trailing slash.
You **may** be required to provide a privacy and/or terms of service URL.
c. Set the following values in your .htconfig.php file
```
$a->config['facebook']['appid'] = 'xxxxxxxxxxx';
$a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx';
```
Replace with the settings Facebook gives you.
d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set Site URL
to yoursubdomain.yourdomain.com. Set Site Domain to your yourdomain.com.
On Friendica, visit the Facebook Settings section of the "Settings->Connector Settings" page. And click 'Install Facebook Connector'.
This will ask you to login to Facebook and grant permission to the
plugin to do its stuff. Allow it to do so.
You're done. To turn it off visit the Connector Settings page again and
'Remove Facebook posting'.
Videos and embeds will not be posted if there is no other content. Links
and images will be converted to a format suitable for the Facebook API and
long posts truncated - with a link to view the full post.
Facebook contacts will also not be able to view "private" photos, as they are not able to authenticate to your site to establish identity. We will address this in a future release.

105
doc/Intro-for-Developers.md Normal file
View File

@ -0,0 +1,105 @@
File system layout:
===================
[addon] optional addons/plugins
[boot.php] Every process uses this to bootstrap the application structure
[doc] Help Files
[images] core required images
[include] The "model" in MVC - (back-end functions), also contains PHP "executables" for background processing
[index.php] The front-end controller for web access
[install] Installation and upgrade files and DB schema
[js] core required javascript
[library] Third party modules (must be license compatible)
[mod] Controller modules based on URL pathname (e.g. http://sitename/foo loads mod/foo.php)
[spec] protocol specifications
[util] translation tools, main English string database and other miscellaneous utilities
[version.inc] contains current version (auto-updated via cron for the master repository and distributed via git)
[view] theming and language files
[view/(css,js,img,php,tpl)] default theme files
[view/(en,it,es ...)] language strings and resources
[view/theme/] individual named themes containing (css,js,img,php,tpl) over-rides
The Database:
=============
* abook - contact table, replaces Friendica 'contact'
* account - service provider account
* addon - registered plugins
* attach - file attachments
* auth_codes - OAuth usage
* cache - TBD
* challenge - old DFRN structure, may re-use or may deprecate
* channel - replaces Friendica 'user'
* clients - OAuth usage
* config - main configuration storage
* event - Events
* fcontact - friend suggestion stuff
* ffinder - friend suggestion stuff
* fserver - obsolete
* fsuggest - friend suggestion stuff
* gcign - ignored friend suggestions
* gcontact - social graph storage, obsolete
* glink - social graph storage - obsolete
* group - privacy groups
* group_member - privacy groups
* hook - plugin hook registry
* hubloc - Red location storage, ties a location to an xchan
* intro - DFRN introductions, may be obsolete
* item - posts
* item_id - other identifiers on other services for posts
* mail - private messages
* manage - may be unused in Red, table of accounts that can "su" each other
* notify - notifications
* notify-threads - need to factor this out and use item thread info on notifications
* outq - Red output queue
* pconfig - personal (per channel) configuration storage
* photo - photo storage
* profile - channel profiles
* profile_check - DFRN remote auth use, may be obsolete
* queue - old Friendica queue, obsolete
* register - registrations requiring admin approval
* session - web session storage
* site - site table to find directory peers
* spam - unfinished
* term - item taxonomy (categories, tags, etc.) table
* tokens - OAuth usage
* verify - general purpose verification structure
* xchan - replaces 'gcontact', list of known channels in the universe
* xlink - "friends of friends" linkages derived from poco
* xprof - if this hub is a directory server, contains basic public profile info of everybody in the network
* xtag - if this hub is a directory server, contains tags or interests of everybody in the network
How to theme Red - by Olivier Migeot
====================================
This is a short documentation on what I found while trying to modify Red's appearance.
First, you'll need to create a new theme. This is in /view/theme, and I chose to copy 'redbasic' since it's the only available for now. Let's assume I named it <theme>.
Oh, and don't forget to rename the _init function in <theme>/php/theme.php to be <theme>_init() instead of redbasic_init().
At that point, if you need to add javascript or css files, add them to <theme>/js or <theme>/css, and then "register" them in <theme>_init() through head_add_js('file.js') and head_add_css('file.css').
Now you'll probably want to alter a template. These can be found in in /view/tpl OR view/<theme>/tpl. All you should have to do is copy whatever you want to tweak from the first place to your theme's own tpl directory.

View File

@ -1,59 +0,0 @@
Making Friends
==============
* [Home](help)
Friendship in Friendica can take on a great many different meanings. But let's keep it simple, you want to be friends with somebody. How do you do it?
The easiest thing to do is to join the <a href="http://kakste.com/profile/newhere">New Here</a> group. This group is especially for people new to the Friendica network. Simply connect to the group, post to the wall, and make new friends. You don't even have to like us - comment on a few of our posts, and other people will start to add you too.
The next thing you can do is look at the Directory. The directory is split up into two parts. If you click the directory button, you will be presented with a list of all members (who chose to be listed) on your server. You'll also see a link to the Global Directory. If you click through to the global directory, you will be presented with a list of everybody who chose to be listed across all instances of Friendica. You will also see a "Show Community Forums" link, which will direct you to Groups, Forums and Fanpages. You connect to people, groups and forums in the same way, except groups and forums will automatically accept your introduction request, whereas a human will approve you manually.
To connect with other Friendica users:
Visit their profile. Just beneath their profile picture will be the word 'Connect' (we're assuming this is an English language profile).
Click that. It will take you to a "Connect" form.
This is going to ask you for your Identity Address. This is necessary so that this person's website can find yours.
What do you put in the box?
If your Friendica site is called "demo.friendica.com" and your username/nickname on that site is "bob", you would put in "bob@demo.friendica.com".
Notice this looks just like an email address. It was meant to be that way. It's easy for people to remember.
You *could* also put in the URL of your "home" page, such as "http://demo.friendica.com/profile/bob", but the email-style address is certainly easier.
When you've submitted the connection page, it will take you back to your own site where you must then login (if necessary) and verify the connection request on *your* site. Once you've done this, the two websites can communicate with each other to complete the process (after your new friend has approved the request).
If you already know somebody's Identity Address, you can enter it in the "connect" box on your "Contacts" page. This will take you through a similar process.
**Alternate Networks**
You can also use your Identity Address or other people's Identity Addresses to become friends across networks. The list of possible networks is growing all the time. If you know (for instance) "bob" on identi.ca (a Status.Net site) you could put bob@identi.ca into your Contact page and become friends across networks. (Or you can put in the URL to Bob's identi.ca page if you wish). You can also be "partial" friends with somebody on Google Buzz by putting in their gmail address. Google Buzz does not yet support all the protocols we need for direct messaging, but you should be able to follow status updates from within Friendica. You can do the same for Twitter accounts and Diaspora accounts. In fact you can "follow" most anybody or any website that produces a syndication feed (RSS/Atom,etc.). If we can find an information stream and a name to attach to the contact, we'll try to connect with them.
If you have supplied your mailbox connection information on your Settings page, you can enter the email address of anybody that has sent you a message recently and have their email messages show up in your social stream. You can also reply to them from within Friendica.
People can also become friends with you from other networks. If a friend of yours has an identi.ca account, they can become friends with you by putting your Friendica Identity Address into their identi.ca subscription dialog box. A similar mechanism is available for Diaspora members, by putting your iendtity address into their search bar.
Note: Some versions of StatusNet software may require the full URL to your profile and may not work with the identity address.
When somebody requests friendship you will receive a notification. You will need to approve this before the friendship is complete.
Some networks allow people to send you messages without being friends and without your approval. Friendica does not allow this by default, as it would open a gateway for spam.
When you receive a friendship notification from another Friendica member, you will have the option of allowing them as a "fan" or as a "friend". If they are a fan, they can see what you have to say, including private communications that you send to them, but not vice versa. As a friend, you can both communicate with each other.
Diaspora uses a different terminology, and you are given the option of allowing them to "share with you", or being full friends.
Once you have become friends, if you find the person constantly sends you spam or worthless information, you can "Ignore" them - without breaking off the friendship or even alerting them to the fact that you aren't interested in anything they are saying. In many ways they are like a "fan" - but they don't know this. They think they are a friend.
You can also "block" a person. This completely blocks communications with that person. They may still be able to see your public posts, as can anybody in the world, but they cannot communicate with you directly.
You can also delete a friend no matter what the friendship status - which complete removes everything relating to that person from your website.

View File

@ -1,54 +0,0 @@
Friendica Message Flow
This page attempts to document some of the details of how messages get from one person to another in the Friendica network. There are multiple paths, using multiple protocols and message formats.
Those attempting to understand these message flows should become familiar with (at the minimum) the DFRN protocol document (http://dfrn.org/dfrn.pdf) and the message passing elements of the OStatus stack (salmon and Pubsubhubbub).
Most message passing involves the file include/items.php, which has functions for several feed-related import/export activities.
When a message is posted, all immediate deliveries to all networks are made using include/notifier.php, which chooses how (and to whom) to deliver the message. This file also invokes the local side of all deliveries including DFRN-notify.
mod/dfrn_notify.php handles the remote side of DFRN-notify.
Local feeds are generated by mod/dfrn_poll.php - which also handles the remote side of DFRN-poll protocol.
Salmon notifications arrive via mod/salmon.php.
Push (pubsubhubbub) feeds arrive via mod/pubsub.php
DFRN-poll feed imports arrive via include/poller.php as a scheduled task, this implements the local side of the DFRN-poll protocol.
Scenario #1. Bob posts a public status message
This is a public message with no conversation members so no private transport is used. There are two paths it can take - as a bbcode path to DFRN clients, and converted to HTML with the server's PuSH (pubsubhubbub) hubs notified. When a PuSH hub is operational, dfrn-poll clients prefer to receive their information through the PuSH channel. They will fall back on a daily poll in case the hub has delivery issues (this is quite common when using the default Google reference hub). If there is no specified hub or hubs, DFRN clients will poll at a configurable (per-contact) rate at up to 5-minute intervals. Feeds retrieved via dfrn-poll are bbcode and may also contain private conversations which the poller has permissions to see.
Scenario #2. Jack replies to Bob's public message. Jack is on the Friendica/DFRN network.
Jack uses dfrn-notify to send a direct reply to Bob. Bob then creates a feed of the conversation and sends it to everybody involved in the conversation using dfrn-notify. PuSH hubs are notified that new content is available. The hub or hubs will then retrieve the latest feed and transmit it to all hub subscribers (which may be on different networks).
Scenario #3. Mary replies to Bob's public message. Mary is on the Friendica/DFRN network.
Mary uses dfrn-notify to send a direct reply to Bob. Bob then creates a feed of the conversation and sends it to everybody involved in the conversation (excluding himself, the conversation is now sent to both Jack and Mary). Messages are sent using dfrn-notify. Push hubs are also notified that new content is available. The hub or hubs will then retrieve the latest feed and transmit it to all hub subscribers (which may be on different networks).
Scenario #4. William replies to Bob's public message. William is on the OStatus network.
William uses salmon to notify Bob of the reply. Content is html embedded in salmon magic envelope. Bob then creates a feed of the conversation and sends it to all Friendica participants involved in the conversation using dfrn-notify (excluding himself, the conversation is sent to both Jack and Mary). Push hubs are notified that new content is available. The hub or hubs will then retrieve the latest feed and transmit it to all hub subscribers (which may be on different networks).
Scenario #5. Bob posts a private message to Mary and Jack.
Message is delivered immediately to Mary and Jack using dfrn_notify. Public hubs are not notified. Requeueing is attempted in case of timeout. Replies follow the same flow as the public replies except that hubs are not notified and message is never made available in the public feed. The entire conversation is also made available to Mary and Jack (and nobody else) through their dfrn-poll personalised feed.

View File

@ -1,36 +0,0 @@
Pages
=====
* [Home](help)
Friendica also lets you create forum and/or celebrity pages.
Every page in Friendica has a nickname and these must all be unique. This applies to all pages, whether they are normal profiles or forum pages.
Therefore the first thing you need to do to create a new page is to register a new account for the page. Please note that the site administrator can restrict and/or regulate the registration of new accounts.
If you create a second account on a system and use the same email address or OpenID account as an existing account, you will no longer be able to use the email address (or OpenID) to login to the account. You should login using the account nickname instead.
On the new account, visit the 'Settings' page. Towards the end of the page are "Advanced Page Settings". Typically you would use "Normal Account" for a normal personal account. This is the default selection. Group pages provide the ability for people to become friends/fans of the page without requiring approval.
The exact setting you would use depends on how you wish to interact with people who join the page. The "Soapbox" setting let's the page owner control all communications. Everything you post will go out to the page members, but there will be no opportunity for interaction. This setting would typically be used for announcements or corporate communications.
The most common setting is the "Community Account". This creates a group page where all members can freely interact.
The "Automatic Friend Account" is typically used for personal profile pages where you wish to automatically approve any friendship/connection requests.
**Managing Multiple Pages**
We recommend that you create group pages with the same email address and password as your normal account. If you do this, you will find a new "Manage" tab on the menu bar which lets you toggle identities easily and manage your pages. You are not required to do this, but the alternative is to logout and log back into the other account to manage alternate pages - and this could get cumbersome if you manage several different pages/identities.
You may also appoint a delegate to manage your page. Do this by visiting the [Delegation Setup Page](delegate). This will provide you with a list of contacts on this system under "Potential Delegates". Selecting one or more persons will give them access to manage your page. They will be able to edit contacts, profiles, and all content for this account/page. Please use this facility wisely. Delegated managers will not be able to alter basic account settings such as passwords or page types and/or remove the account.
**Posting to Community Pages**
If you are a member of a community page/forum, you may post to the page by including an @-tag in the post mentioning the forum. For example @bicycle would send my post to all members of the group "bicycle" in addition to the normal recipients. If your post is private you must also explicitly include the group in the post permissions (to allow the forum "contact" to see the post) **and** mention it in a tag (which redistributes the post to the forum members).
You may also post to a community page/forum by posting a "wall-to-wall" post using secure cross-site authentication.
Comments which are relayed to community pages will be relayed back to the original post creator. Mentioning the forum/group with an @-tag in a comment does not relay the message, as distribution is controlled entirely by the original post creator.

View File

@ -1,357 +1,260 @@
**Friendica Addon/Plugin development**
Creating Plugins/Addons for the Red Matrix
==========================================
Please see the sample addon 'randplace' for a working example of using some of these features. The facebook addon provides an example of integrating both "addon" and "module" functionality. Addons work by intercepting event hooks - which must be registered. Modules work by intercepting specific page requests (by URL path).
So you want to make the Red Matrix do something it doesn't already do. There are lots of ways. But let's learn how to write a plugin or addon.
Plugin names cannot contain spaces or other punctuation and are used as filenames and function names. You may supply a "friendly" name within the comment block. Each addon must contain both an install and an uninstall function based on the addon/plugin name. For instance "plugin1name_install()". These two functions take no arguments and are usually responsible for registering (and unregistering) event hooks that your plugin will require. The install and uninstall functions will also be called (i.e. re-installed) if the plugin changes after installation - therefore your uninstall should not destroy data and install should consider that data may already exist. Future extensions may provide for "setup" amd "remove".
Plugins should contain a comment block with the four following parameters:
In your Red Matrix folder/directory, you will probably see a sub-directory called 'addon'. If you don't have one already, go ahead and create it.
/*
* Name: My Great Plugin
* Description: This is what my plugin does. It's really cool
* Version: 1.0
* Author: John Q. Public <john@myfriendicasite.com>
*/
mkdir addon
Then figure out a name for your addon. You probably have at least a vague idea of what you want it to do. For our example I'm going to create a plugin called 'randplace' that provides a somewhat random location for each of your posts. The name of your plugin is used to find the functions we need to access and is part of the function names, so to be safe, use only simple text characters.
Once you've chosen a name, create a directory beneath 'addon' to hold your working file or files.
mkdir addon/randplace
Register your plugin hooks during installation.
Now create your plugin file. It needs to have the same name, and it's a PHP script, so using your favourite editor, create the file
register_hook($hookname, $file, $function);
addon/randplace/randplace.php
$hookname is a string and corresponds to a known Friendica hook.
The very first line of this file needs to be
$file is a pathname relative to the top-level Friendica directory. This *should* be 'addon/plugin_name/plugin_name.php' in most cases.
<?php
$function is a string and is the name of the function which will be executed when the hook is called.
Then we're going to create a comment block to describe the plugin. There's a special format for this. We use /* ... */ comment-style and some tagged lines consisting of
/**
*
* Name: Random Place (here you can use better descriptions than you could in the filename)
* Description: Sample Red Matrix plugin, Sets a random place when posting.
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
*
*/
Your hook callback functions will be called with at least one and possibly two arguments
These tags will be seen by the site administrator when he/she installs or manages plugins from the admin panel. There can be more than one author. Just add another line starting with 'Author:'.
The typical plugin will have at least the following functions:
function myhook_function(&$a, &$b) {
* pluginname_load()
* pluginname_unload()
In our case, we'll call them randplace_load() and randplace_unload(), as that is the name of our plugin. These functions are called whenever we wish to either initialise the plugin or remove it from the current webpage. Also if your plugin requires things like altering the database schema before it can run for the very first time, you would likely place these instructions in the functions named
}
* pluginname_install()
* pluginname_uninstall()
If you wish to make changes to the calling data, you must declare them as
reference variables (with '&') during function declaration.
Next we'll talk about **hooks**. Hooks are places in the Red Matrix code where we allow plugins to do stuff. There are a [lot of these](help/Hooks), and they each have a name. What we normally do is use the pluginname_load() function to register a "handler function" for any hooks you are interested in. Then when any of these hooks are triggered, your code will be called.
$a is the Friendica 'App' class - which contains a wealth of information
about the current state of Friendica, such as which module has been called,
configuration info, the page contents at the point the hook was invoked, profile
and user information, etc. It is recommeded you call this '$a' to match its usage
elsewhere.
We register hook handlers with the 'register_hook()' function. It takes 3 arguments. The first is the hook we wish to catch, the second is the filename of the file to find our handler function (relative to the base of your Red Matrix installation), and the third is the function name of your handler function. So let's create our randplace_load() function right now.
$b can be called anything you like. This is information which is specific to the hook
currently being processed, and generally contains information that is being immediately
processed or acted on that you can use, display, or alter. Remember to declare it with
'&' if you wish to alter it.
**Modules**
function randplace_load() {
register_hook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
Plugins/addons may also act as "modules" and intercept all page requests for a given URL path. In order for a plugin to act as a module it needs to define a function "plugin_name_module()" which takes no arguments and need not do anything.
register_hook('feature_settings', 'addon/randplace/randplace.php', 'randplace_settings');
register_hook('feature_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
If this function exists, you will now receive all page requests for "http://my.web.site/plugin_name" - with any number of URL components as additional arguments. These are parsed into an array $a->argv, with a corresponding $a->argc indicating the number of URL components. So http://my.web.site/plugin/arg1/arg2 would look for a module named "plugin" and pass its module functions the $a App structure (which is available to many components). This will include:
$a->argc = 3
$a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
}
Your module functions will often contain the function plugin_name_content(&$a), which defines and returns the page body content. They may also contain plugin_name_post(&$a) which is called before the _content function and typically handles the results of POST forms. You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation.
So we're going to catch three events, 'post_local' which is triggered when a post is made on the local system, 'feature_settings' to set some preferences for our plugin, and 'feature_settings_post' to store those settings.
Next we'll create an unload function. This is easy, as it just unregisters our hooks. It takes exactly the same arguments.
**Current hooks:**
function randplace_unload() {
unregister_hook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
**'authenticate'** - called when a user attempts to login.
$b is an array
'username' => the supplied username
'password' => the supplied password
'authenticated' => set this to non-zero to authenticate the user.
'user_record' => successful authentication must also return a valid user record from the database
unregister_hook('feature_settings', 'addon/randplace/randplace.php', 'randplace_settings');
unregister_hook('feature_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
**'logged_in'** - called after a user has successfully logged in.
$b contains the $a->user array
}
**'display_item'** - called when formatting a post for display.
$b is an array
'item' => The item (array) details pulled from the database
'output' => the (string) HTML representation of this item prior to adding it to the page
Hooks are called with two arguments. The first is always $a, which is our global App structure and contains a huge amount of information about the state of the web request we are processing; as well as who the viewer is, and what our login state is, and the current contents of the web page we're probably constructing.
**'post_local'** - called when a status post or comment is entered on the local system
$b is the item array of the information to be stored in the database
{Please note: body contents are bbcode - not HTML)
The second argument is specific to the hook you're calling. It contains information relevant to that particular place in the program, and often allows you to look at, and even change it. In order to change it, you need to add '&' to the variable name so it is passed to your function by reference. Otherwise it will create a copy and any changes you make will be lost when the hook process returns. Usually (but not always) the second argument is a named array of data structures. Please see the "hook reference" (not yet written as of this date) for details on any specific hook. Occasionally you may need to view the program source to see precisely how a given hook is called and how the results are processed.
**'post_local_end'** - called when a local status post or comment has been stored on the local system
$b is the item array of the information which has just been stored in the database
{Please note: body contents are bbcode - not HTML)
Let's go ahead and add some code to implement our post_local hook handler.
**'post_remote'** - called when receiving a post from another source. This may also be used to post local activity or system generated messages.
$b is the item array of information to be stored in the database and the item
body is bbcode.
function randplace_post_hook($a, &$item) {
**'settings_form'** - called when generating the HTML for the user Settings page
$b is the (string) HTML of the settings page before the final '</form>' tag.
/**
*
* An item was posted on the local system.
* We are going to look for specific items:
* - A status post by a profile owner
* - The profile owner must have allowed our plugin
*
*/
**'settings_post'** - called when the Settings pages are submitted.
$b is the $_POST array
logger('randplace invoked');
**'plugin_settings'** - called when generating the HTML for the addon settings page
$b is the (string) HTML of the addon settings page before the final '</form>' tag.
if(! local_user()) /* non-zero if this is a logged in user of this system */
return;
**'plugin_settings_post'** - called when the Addon Settings pages are submitted.
$b is the $_POST array
if(local_user() != $item['uid']) /* Does this person own the post? */
return;
**'profile_post'** - called when posting a profile page.
$b is the $_POST array
if(($item['parent']) || ($item['item_restrict'])) {
/* If the item has a parent, or item_restrict is non-zero, this is a comment or something else, not a status post. */
return;
}
**'profile_edit'** - called prior to output of profile edit page
$b is array
'profile' => profile (array) record from the database
'entry' => the (string) HTML of the generated entry
/* Retrieve our personal config setting */
$active = get_pconfig(local_user(), 'randplace', 'enable');
**'profile_advanced'** - called when the HTML is generated for the 'Advanced profile', corresponding to the 'Profile' tab within a person's profile page.
$b is the (string) HTML representation of the generated profile
(The profile array details are in $a->profile)
if(! $active)
return;
/**
*
* OK, we're allowed to do our stuff.
* Here's what we are going to do:
* load the list of timezone names, and use that to generate a list of world cities.
* Then we'll pick one of those at random and put it in the "location" field for the post.
*
*/
**'directory_item'** - called from the Directory page when formatting an item for display
$b is an array
'contact' => contact (array) record for the person from the database
'entry' => the (string) HTML of the generated entry
$cities = array();
$zones = timezone_identifiers_list();
foreach($zones as $zone) {
if((strpos($zone,'/')) && (! stristr($zone,'US/')) && (! stristr($zone,'Etc/')))
$cities[] = str_replace('_', ' ',substr($zone,strpos($zone,'/') + 1));
}
**'profile_sidebar_enter'** - called prior to generating the sidebar "short" profile for a page
$b is (array) the person's profile array
if(! count($cities))
return;
$city = array_rand($cities,1);
$item['location'] = $cities[$city];
**'profile_sidebar'** - called when generating the sidebar "short" profile for a page
$b is an array
'profile' => profile (array) record for the person from the database
'entry' => the (string) HTML of the generated entry
return;
}
**'contact_block_end'** - called when formatting the block of contacts/friends on a profile sidebar has completed
$b is an array
'contacts' => array of contacts
'output' => the (string) generated HTML of the contact block
**'bbcode'** - called during conversion of bbcode to html
$b is (string) converted text
Now let's add our functions to create and store preference settings.
**'html2bbcode'** - called during conversion of html to bbcode (e.g. remote message posting)
$b is (string) converted text
/**
*
* Callback from the settings post function.
* $post contains the global $_POST array.
* We will make sure we've got a valid user account
* and that only our own submit button was clicked
* and if so set our configuration setting for this person.
*
*/
**'page_header'** - called after building the page navigation section
$b is (string) HTML of nav region
function randplace_settings_post($a,$post) {
if(! local_user())
return;
if($_POST['randplace-submit'])
set_pconfig(local_user(),'randplace','enable',intval($_POST['randplace']));
}
**'personal_xrd'** - called prior to output of personal XRD file.
$b is an array
'user' => the user record for the person
'xml' => the complete XML to be output
**'home_content'** - called prior to output home page content, shown to unlogged users
$b is (string) HTML of section region
**'contact_edit'** - called when editing contact details on an individual from the Contacts page
$b is (array)
'contact' => contact record (array) of target contact
'output' => the (string) generated HTML of the contact edit page
/**
*
* Called from the Feature Setting form.
* The second argument is a string in this case, the HTML content region of the page.
* Add our own settings info to the string.
*
* For uniformity of settings pages, we use the following convention
* <div class="settings-block">
* <h3>title</h3>
* .... settings html - many elements will be floated...
* <div class="clear"></div> <!-- generic class which clears all floats -->
* <input type="submit" name="pluginnname-submit" class="settings-submit" ..... />
* </div>
*/
**'contact_edit_post'** - called when posting the contact edit page
$b is the $_POST array
**'init_1'** - called just after DB has been opened and before session start
$b is not used or passed
**'page_end'** - called after HTML content functions have completed
$b is (string) HTML of content div
function randplace_settings(&$a,&$s) {
**'avatar_lookup'** - called when looking up the avatar
$b is (array)
'size' => the size of the avatar that will be looked up
'email' => email to look up the avatar for
'url' => the (string) generated URL of the avatar
if(! local_user())
return;
/* Add our stylesheet to the page so we can make our settings look nice */
A complete list of all hook callbacks with file locations (generated 14-Feb-2012): Please see the source for details of any hooks not documented above.
head_add_css(/addon/randplace/randplace.css');
/* Get the current state of our config variable */
boot.php: call_hooks('login_hook',$o);
$enabled = get_pconfig(local_user(),'randplace','enable');
boot.php: call_hooks('profile_sidebar_enter', $profile);
$checked = (($enabled) ? ' checked="checked" ' : '');
boot.php: call_hooks('profile_sidebar', $arr);
/* Add some HTML to the existing form */
boot.php: call_hooks("proc_run", $arr);
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('Randplace Settings') . '</h3>';
$s .= '<div id="randplace-enable-wrapper">';
$s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . t('Enable Randplace Plugin') . '</label>';
$s .= '<input id="randplace-checkbox" type="checkbox" name="randplace" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
include/contact_selectors.php: call_hooks('network_to_name', $nets);
/* provide a submit button */
include/api.php: call_hooks('logged_in', $a->user);
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="randplace-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
include/api.php: call_hooks('logged_in', $a->user);
}
include/queue.php: call_hooks('queue_predeliver', $a, $r);
include/queue.php: call_hooks('queue_deliver', $a, $params);
include/text.php: call_hooks('contact_block_end', $arr);
include/text.php: call_hooks('smilie', $s);
include/text.php: call_hooks('prepare_body_init', $item);
***Advanced Plugins***
include/text.php: call_hooks('prepare_body', $prep_arr);
Sometimes your plugins want to provide a range of new functionality which isn't provided at all or is clumsy to provide using hooks. In this case your plugin can also act as a 'module'. A module in our case refers to a structured webpage handler which responds to a given URL. Then anything which accesses that URL will be handled completely by your plugin.
include/text.php: call_hooks('prepare_body_final', $prep_arr);
The key to this is to create a simple function named pluginname_module() which does nothing.
include/nav.php: call_hooks('page_header', $a->page['nav']);
function randplace_module() { return; }
include/auth.php: call_hooks('authenticate', $addon_auth);
Once this function exists, the URL https://yoursite/randplace will access your plugin as a module. Then you can define functions which are called at various points to build a webpage just like the modules in the mod/ directory. The typical functions and the order which they are called is
include/bbcode.php: call_hooks('bbcode',$Text);
modulename_init($a) // (e.g. randplace_init($a);) called first - if you wish to emit json or xml,
// you should do it here, followed by killme() which will avoid the default action of building a webpage
modulename_aside($a) // Often used to create sidebar content
modulename_post($a) // Called whenever the page is accessed via the "post" method
modulename_content($a) // called to generate the central page content. This function should return a string
// consisting of the central page content.
include/oauth.php: call_hooks('logged_in', $a->user);
Your module functions have access to the URL path as if they were standalone programs in the Unix operating system. For instance if you visit the page
include/acl_selectors.php: call_hooks($a->module . '_pre_' . $selname, $arr);
https://yoursite/randplace/something/somewhere/whatever
include/acl_selectors.php: call_hooks($a->module . '_post_' . $selname, $o);
we will create an argc/argv list for use by your module functions
include/acl_selectors.php: call_hooks('contact_select_options', $x);
$x = argc(); $x will be 4, the number of path arguments after the sitename
include/acl_selectors.php: call_hooks($a->module . '_pre_' . $selname, $arr);
for($x = 0; $x < argc(); $x ++)
echo $x . ' ' . argv($x);
include/acl_selectors.php: call_hooks($a->module . '_post_' . $selname, $o);
include/acl_selectors.php: call_hooks($a->module . '_pre_' . $selname, $arr);
0 randplace
1 something
2 somewhere
3 whatever
include/acl_selectors.php: call_hooks($a->module . '_post_' . $selname, $o);
include/notifier.php: call_hooks('notifier_normal',$target_item);
***Porting Friendica Plugins***
include/notifier.php: call_hooks('notifier_end',$target_item);
The Red Matrix uses a similar plugin architecture to the Friendica project. The authentication, identity, and permissions systems are completely different. Many Friendica can be ported reasonably easily by renaming a few functions - and then ensuring that the permissions model is adhered to. The functions which need to be renamed are:
include/items.php: call_hooks('atom_feed', $atom);
* Friendica's pluginname_install() is pluginname_load()
include/items.php: call_hooks('atom_feed_end', $atom);
* Friendica's pluginname_uninstall() is pluginname_unload()
include/items.php: call_hooks('atom_feed_end', $atom);
The Red Matrix has _install and _uninstall functions but these are used differently.
include/items.php: call_hooks('parse_atom', $arr);
* Friendica's "plugin_settings" hook is called "feature_settings"
include/items.php: call_hooks('post_remote',$arr);
* Friendica's "plugin_settings_post" hook is called "feature_settings_post"
include/items.php: call_hooks('atom_author', $o);
include/items.php: call_hooks('atom_entry', $o);
include/bb2diaspora.php: call_hooks('bb2diaspora',$Text);
include/cronhooks.php: call_hooks('cron', $d);
include/security.php: call_hooks('logged_in', $a->user);
include/html2bbcode.php: call_hooks('html2bbcode', $text);
include/Contact.php: call_hooks('remove_user',$r[0]);
include/Contact.php: call_hooks('contact_photo_menu', $args);
include/conversation.php: call_hooks('conversation_start',$cb);
include/conversation.php: call_hooks('render_location',$locate);
include/conversation.php: call_hooks('display_item', $arr);
include/conversation.php: call_hooks('render_location',$locate);
include/conversation.php: call_hooks('display_item', $arr);
include/conversation.php: call_hooks('item_photo_menu', $args);
include/conversation.php: call_hooks('jot_tool', $jotplugins);
include/conversation.php: call_hooks('jot_networks', $jotnets);
include/plugin.php:if(! function_exists('call_hooks')) {
include/plugin.php:function call_hooks($name, &$data = null) {
index.php: call_hooks('init_1');
index.php:call_hooks('app_menu', $arr);
index.php:call_hooks('page_end', $a->page['content']);
mod/photos.php: call_hooks('photo_post_init', $_POST);
mod/photos.php: call_hooks('photo_post_file',$ret);
mod/photos.php: call_hooks('photo_post_end',$foo);
mod/photos.php: call_hooks('photo_post_end',$foo);
mod/photos.php: call_hooks('photo_post_end',$foo);
mod/photos.php: call_hooks('photo_post_end',intval($item_id));
mod/photos.php: call_hooks('photo_upload_form',$ret);
mod/friendica.php: call_hooks('about_hook', $o);
mod/editpost.php: call_hooks('jot_tool', $jotplugins);
mod/editpost.php: call_hooks('jot_networks', $jotnets);
mod/parse_url.php: call_hooks('parse_link', $arr);
mod/home.php: call_hooks('home_init',$ret);
mod/home.php: call_hooks("home_content",$o);
mod/contacts.php: call_hooks('contact_edit_post', $_POST);
mod/contacts.php: call_hooks('contact_edit', $arr);
mod/settings.php: call_hooks('plugin_settings_post', $_POST);
mod/settings.php: call_hooks('connector_settings_post', $_POST);
mod/settings.php: call_hooks('settings_post', $_POST);
mod/settings.php: call_hooks('plugin_settings', $settings_addons);
mod/settings.php: call_hooks('connector_settings', $settings_connectors);
mod/settings.php: call_hooks('settings_form',$o);
mod/register.php: call_hooks('register_account', $newuid);
mod/like.php: call_hooks('post_local_end', $arr);
mod/xrd.php: call_hooks('personal_xrd', $arr);
mod/item.php: call_hooks('post_local_start', $_REQUEST);
mod/item.php: call_hooks('post_local',$datarray);
mod/item.php: call_hooks('post_local_end', $datarray);
mod/profile.php: call_hooks('profile_advanced',$o);
mod/profiles.php: call_hooks('profile_post', $_POST);
mod/profiles.php: call_hooks('profile_edit', $arr);
mod/tagger.php: call_hooks('post_local_end', $arr);
mod/cb.php: call_hooks('cb_init');
mod/cb.php: call_hooks('cb_post', $_POST);
mod/cb.php: call_hooks('cb_afterpost');
mod/cb.php: call_hooks('cb_content', $o);
mod/directory.php: call_hooks('directory_item', $arr);
Changing these will often allow your plugin to function, but please double check all your permission and identity code because the concepts behind it are completely different in the Red Matrix. Many structured data names (especially DB schema columns) are also quite different.

View File

@ -3,49 +3,34 @@ Profiles
* [Home](help)
Friendica has unlimited profiles. You may use different profiles to show different "sides of yourself" to different audiences.
Red has unlimited profiles. You may use different profiles to show different "sides of yourself" to different audiences. This is different to having different _channels_. Different channels allow for completely different sets of information. You may have a channel for yourself, a channel for your sports team, a channel for your website, or whatever else. A profile allows for finely graded "sides" of each channel. For example, your default public profile might say "Hello, I'm Fred, and I like laughing". You may show your close friends a profile that adds "and I also enjoy dwarf tossing".
You always have a profile known as your "default" or "public" profile. This profile is always available to the general public and cannot be hidden (there may be rare exceptions on privately run or disconnected sites). You may, and probably should restrict the information you make available on your public profile.
That said, if you want other friends to be able to find you, it helps to have the following information in your public profile...
* Your real name
* Your real name or at least a nickname everybody knows
* A photo of **you**
* Your location on the planet, at least to a country level.
Without this basic information, you could get very lonely here. Most people (even your best friends) will not try and connect with somebody that has a fake name or doesn't contain a real photo.
In addition, if you'd like to meet people that share some general interests with you, please take a moment and add some "Public Keywords" to your profile. Such as "music, linux, photography" or whatever. You can add as many keywords as you like.
In addition, if you'd like to meet people that share some general interests with you, please take a moment and add some "Keywords" to your profile. Such as "music, linux, photography" or whatever. You can add as many keywords as you like.
To create an alternate profile, select "View Profile" from the menu of your Red Matrix site, then click on the pencil at your profile photo. You may edit an existing profile, change the profile photo, add things to a profile or create a new profile. You may also create a "clone" of an existing profile if you only wish to change a few items but don't wish to enter all the information again. To do that, click on the profile you want to clone and choose "Clone this profile" there.
Your default or public profile is also shown to contacts on other networks, since they do not have the ability to view your private profiles. Only members of the Friendica network can see alternate/private profiles.
In the list of your profiles, you can also choose the contacts who can see a specific profile. Just click on "Edit visibility" next to the profile in question (only available for the profiles that are not your default profile) and then click on user images to add them to or remove them from the group of people who can see this profile.
Once a profile has been selected, when the person views your profile, they will see the private profile you have assigned. If they are not authenticated, they will see your public profile.
To create an alternate profile, select "Profiles" from the menu of your Friendica site. You may edit an existing profile, change the profile photo, or create a new profile. You may also create a "clone" of an existing profile if you only wish to change a few items but don't wish to enter all the information again.
There is a setting which allows you to publish your profile to a directory and ensure that it can be found by others. You can change this setting on the "Settings" page.
To assign a profile to specific persons, select the person from your "Contacts" page and click the pencil "Edit" icon. You will find a dropdown box listing the various profiles available. If this box is not selectable, the person is not in a supported network and cannot be assigned a specific profile.
Once a profile has been selected, when the person views your profile from one of the "magic profile links" on their site, they will see the private profile you have assigned. If they are not logged into their site or view your profile from elsewhere, they will see your public profile.
A magic profile link is indicated by a special cursor when hovering over a contact's name or photo. Currently this cursor is a hand next to a small padlock. These magic cursors indicate that by following the link, you are able to access special areas of the other person's pages which are only available to friends and may not be available to the general public.
You may also discover that (assuming you have the proper permissions) you may be able to post directly on the other person's profile (often called a "wall-to-wall" post). You may also be able to comment directly on posts from while visiting the other person's profile page.
There are two settings which allow you to publish your profile to a directory and ensure that it can be found by others. You can change these through settings on the "Settings" page. One setting allows you to publish your profile in the site directory of this Friendica server. Another option (this may have been disabled by the site creator) allows you to publish your profile in the "Global Directory". This is a mega directory which contains people from many other Friendica installations world-wide.
If you do not wish to be visible to any of these sites, you may leave your profile unpublished.
Although you may have multiple profiles, you only have one profile photo. This is intentional. In early tests we experimented with different photos for each profile and found it was very confusing for people. They might see a different picture depending on what website they visited or what conversation they were in, and often alerted them to the fact that other people might be able to see different profiles of you than they could see.
(But you can use the rich-text information boxes within a profile such as "Tell us about yourself" and link other photos onto the page.)
If you do not wish to be found be people unless you give them your channel address, you may leave your profile unpublished.
**Keywords and Directory Search**
On the site Directory page, you may search for people with published profiles who are on this site. The search is typically for your nickname or part of your full name. However this search will also match against other profile fields - such as gender, location, "about", work, and education. You may also include "Keywords" in your default profile - which may be used to search for common interests with other members. You have two sets of keywords available - public and private. Private keywords are *not* visible to anybody. You could use these keywords to locate people who share membership in secret societies, or that share a love of fishing (for example) - without making this information visible on your public profile. Public keywords are used in the friend suggestion tool and although they aren't readily visible, they may be seen by viewing the HTML of your profile page.
On the directory page, you may search for people with published profiles. The search is typically for your nickname or part of your full name. However this search will also match against other profile fields - such as gender, location, "about", work, and education. You may also include "Keywords" in your default profile - which may be used to search for common interests with other members. Keywords are used in the channel suggestion tool and although they aren't visible in the directory, they are shown if people visit your profile page.
Directory searches are also able to use "boolean" logic so that you can search for "+lesbian +Florida" and find those who's sexual preference (or keywords) contain the world "lesbian" and that live in Florida. See the section on "Topical Tags" on the [Tags-and-Mentions](help/Tags-and-Mentions) page for more information on performing boolean searches.
On your Contacts page is a link to "Find People with Shared Interests" (unless your site administrator has disabled the global directory). This will combine both your public and private keywords, and find people in the global directory who have matching and/or similar keywords. (Your private keywords are not identified or stored on the global directory). The more keywords you provide, the more relevant the search results that are returned. These are sorted by relevance. You may discover that you are the first person on the list - because you are very likely the most relevant match for your keywords in the directory.
On your Connnections page and in the directory there is a link to "Suggestions" or "Channel Suggestions", respectively. This will find channels who have matching and/or similar keywords. The more keywords you provide, the more relevant the search results that are returned. These are sorted by relevance.

11
doc/README.md Normal file
View File

@ -0,0 +1,11 @@
![the Red Matrix](images/rm-480x115.png)
The RedMatrix (aka "red") is an open source webapp platform providing a complete **decentralised** publishing, sharing, and communications system. It combines communications (private messaging, chat and social networking), and media management (photos, events, files, web pages, app distribution) with enough features to make your head spin.
What makes the RedMatrix unique is what we call "magic authentication" - which is based on our groundbreaking work in decentralised identity services. This ties all RedMatrix sites and channels together into a single super-network where the boundaries between different websites are blurred or seemingly non-existent; where "who you are" has nothing to do with "what computer you're connected to", and where website content can adapt itself according to who is viewing it.
Warning: After experiencing magic authentication and nomadic identity, you may find it disconcerting and a bit "primitive" to go back to the old internet. You shouldn't need hundreds of different passwords to use the web ... or be totally isolated from your friends and family because a server or router in another country is having "*issues*".
For the average person, the biggest advantage of decentralised identity is that you decide who you want to share your stuff with, and if somebody isn't on your list, they're not going to see it. It's all under your control (we're big on privacy). Use the RedMatrix as a social network or a business website or for personal cloud storage or media publishing - or any number of other uses; limited only by your imagination.
The Red Matrix is free and open source distributed under the MIT license.

View File

@ -1,24 +1,23 @@
Remove Account
==============
* [Home](help)
It is presently not possible to remove an account without asking your site administrator for assistance.
We'll have better doco when somebody finishes that bit.
We don't like to see people leave Friendica, but if you need to remove your account, you should visit the URL
http://sitename/removeme
Remove Channel
==============
with your web browser. You will need to be logged in at the time.
Visit the URL
You will be asked for your password to confirm the request. If this matches your stored password, your account will immediately be removed. Unlike some social networks we do **not** hold onto it for a grace period in case you change your mind. Your user details, your conversations, your photos, your friends - everything; will be removed immediately and you will be logged out.
https://yoursite/removeme
When we expire posts we send notifications out to Friendica to remove the posts. Diaspora doesn't have a bulk delete so this step is skipped on that network - and hopefully it will be obvious that deletion doesn't work on any other networks. If you manually delete a post or a range of posts we send individual delete notifications to Friendica and Diaspora for each deleted post.
(replace 'yoursite' with the domain name of your Red Matrix site).
You will need to confirm your password and the channel you are currently logged into will be removed.
Diaspora often loses these.
This is irreversible.
If you delete a post but somebody else has starred it, it is still removed. Your wishes take priority.
If you have identity clones on other sites this only removes the channel instance which exists
on this site.
When you remove your account we physically remove all your posts and your profile and user data, etc. immediately.
In order to send out a bulk remove we would need to keep your account around to do this, as we would need to prove to your friends who it is that is submitting the request. We can't do this if you don't have an account.
Your friends may still see your posts if your account is gone, but there is no public place within Friendica where they can be viewed. If you had friends on Diaspora, your public posts may stick around and be visible to others from that network.

76
doc/Schema-development.md Normal file
View File

@ -0,0 +1,76 @@
Red development - a guide to the schema system
==============================================
A schema, in a nutshell, is a collection of settings for a bunch of variables to define
certain elements of a theme. A schema is loaded as though it were part of config.php
and has access to all the same information. Importantly, this means it is identity aware,
and can be used to do some interesting things. One could, for example, restrict options
by service class, or present different options to different members.
By default, we filter only by whether or not expert mode is enabled. If expert mode is
enabled, all options are presented to the member. If it is not, only scheme, background
image, font face, and iconset are available as choices.
A schema is loaded *after* the member's personal settings. Therefore, to allow a member
to overwrite a particular aspect of a schema you would use the following syntax:
if (! $foo)
$foo = 'bar';
However, there are circumstances - particularly with positional elements - where it
may be desirable (or necessary) to override a member's settings. In this case, the syntax
is even simpler:
$foo = 'bar';
Members will not thank you for this, however, so only use it when it is required.
If no personal options are set, and no schema is selected, we will first try to load a schema
with the file name "default.php". This file should never be included with a theme. If it
is, merge conflicts will occur as people update their code. Rather, this should be defined
by administrators on a site by site basis.
You schema does not need to - and should not - contain all of these values. Only the values
that differ from the defaults should be listed. This gives you some very powerful options
with very few lines of code.
Note the options available differ with each theme. The options available with the Redbasic
theme are as follows:
* nav_colour
The colour of the navigation bar. Options are red, black and silver. Alternatively,
one can set $nav_bg_1, $nav_bg_2, $nav_bg_3 and $nav_bg_4 to provide gradient and
hover effects.
* banner_colour
The font colour of the banner element. Accepts an RGB or Hex value.
* bgcolour
Set the body background colour. Accepts an RGB or Hex value.
* background_image
Sets a background image. Accepts a URL or path.
* item_colour
Set the background colour of items. Accepts an RGB or Hex value.
* item_opacity
Set the opacity of items. Accepts a value from 0.01 to 1
* toolicon_colour
Set the colour of tool icons. Accepts an RGB or Hex value.
* toolicon_activecolour
Set the colour of active or hovered icon tools.
* font_size
Set the size of fonts in items and posts. Accepts px or em.
* body_font_size
Sets the size of fonts at the body level. Accepts px or em.
* font_colour
Sets the font colour. Accepts an RGB or Hex value.
* radius
Set the radius of corners. Accepts a numeral, and is always in px.
* shadow
Set the size of shadows shown with inline images. Accepts a numerical
value. Note shadows are not applied to smileys.
* converse_width
Set the maximum width of conversations. Accepts px, or %.
* nav_min_opacity
* top_photo
* reply_photo
* sloppy_photos
Determins whether photos are "sloppy" or aligned. Set or unset (1 or '')

View File

@ -1,227 +0,0 @@
Here are some of the built-in features which don't have an exposed interface or are otherwise undocumented. Configuration settings are stored in the file ".htconfig.php". Edit this file with a text editor to make the desired changes. Several system settings are already documented in that file and will not be covered here.
**Hot Keys**
Friendica traps the following keyboard events:
* [Pause] - Pauses "Ajax" update activity. This is the process that provides updates without reloading the page. You may wish to pause it to reduce network usage and/or as a debugging aid for javascript developers. A pause indicator will appear at the lower right hand corner of the page. Hit the [pause] key once again to resume.
* [F8] - Displays a language selector
**Birthday Notifications**
Birthday events are published on your Home page for any friends having a birthday in the coming 6 days. In order for your birthday to be discoverable by all of your friends, you must set your birthday (at least the month and day) in your default profile. You are not required to provide the year.
**Configuration settings**
**Language**
System Setting
Please see util/README for information on creating language translations.
Config:
```
$a->config['system']['language'] = 'name';
```
**System Theme**
System Setting
Choose a named theme to be the default system theme (which may be over-ridden by user profiles). Default theme is "default".
Config:
```
$a->config['system']['theme'] = 'theme-name';
```
**Verify SSL Certitificates**
Security setting
By default Friendica allows SSL communication between websites that have "self-signed" SSL certificates. For the widest compatibility with browsers and other networks we do not recommend using self-signed certificates, but we will not prevent you from using them. SSL encrypts all the data transmitted between sites (and to your browser) and this allows you to have completely encrypted communications, and also protect your login session from hijacking. Self-signed certificates can be generated for free, without paying top-dollar for a website SSL certificate - however these aren't looked upon favourably in the security community because they can be subject to so-called "man-in-the-middle" attacks. If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites.
Config:
```
$a->config['system']['verifyssl'] = true;
```
**Allowed Friend Domains**
Corporate/Edu enhancement
Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. (Wildcard support on Windows platforms requires PHP5.3). By default, any (valid) domain may establish friendships with this site.
Config:
```
$a->config['system']['allowed_sites'] = "sitea.com, *siteb.com";
```
**Allowed Email Domains**
Corporate/Edu enhancement
Comma separated list of domains which are allowed in email addresses for registrations to this site. This can lockout those who are not part of this organisation from registering here. Wildcards are accepted. (Wildcard support on Windows platforms requires PHP5.3). By default, any (valid) email address is allowed in registrations.
Config:
```
$a->config['system']['allowed_email'] = "sitea.com, *siteb.com";
```
**Block Public**
Corporate/Edu enhancement
Set to true to block public access to all otherwise public personal pages on this site unless you are currently logged in. This blocks the viewing of profiles, friends, photos, the site directory and search pages to unauthorised persons. A side effect is that entries from this site will not appear in the global directory. We recommend specifically disabling that also (setting is described elsewhere on this page). Note: this is specifically for sites that desire to be "standalone" and do not wish to be connected to any other Friendica sites. Unauthorised persons will also not be able to request friendship with site members. Default is false. Available in version 2.2 or greater.
Config:
```
$a->config['system']['block_public'] = true;
```
**Force Publish**
Corporate/Edu enhancement
By default, each user can choose on their Settings page whether or not to have their profile published in the site directory. This setting forces all
profiles on this site to be listed in the site directory and there is no option provided to the user to change it. Default is false.
Config:
```
$a->config['system']['publish_all'] = true;
```
**Global Directory**
Corporate/Edu enhancement
This configures the URL to update the global directory, and is supplied in the default configuration. The undocumented part is that if this is not set, the global directory is completely unavailable to the application. This allows a private community to be completely isolated from the global mistpark network.
```
$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
```
**Proxy Configuration Settings**
If your site uses a proxy to connect to the internet, you may use these settings to communicate with the outside world (the outside world still needs to be able to see your website, or this will not be very useful).
Config:
```
$a->config['system']['proxy'] = "http://proxyserver.domain:port";
$a->config['system']['proxyuser'] = "username:password";
```
**Network Timeout**
How long to wait on a network communication before timing out. Value is in seconds. Default is 60 seconds. Set to 0 for unlimited (not recommended).
Config:
```
$a->config['system']['curl_timeout'] = 60;
```
**Banner/Logo**
Set the content for the site banner. Default is the Friendica logo and name. You may wish to provide HTML/CSS to style and/or position this content, as it may not be themed by default.
Config:
```
$a->config['system']['banner'] = '<span id="logo-text">My Great Website</span>';
```
**Maximum Image Size**
Maximum size in bytes of uploaded images. Default is 0, which means no limits.
Config:
```
$a->config['system']['maximagesize'] = 1000000;
```
**UTF-8 Regular Expressions**
During registrations, full names are checked using UTF-8 regular expressions. This requires PHP to have been compiled with a special setting to allow UTF-8 expressions. If you are completely unable to register accounts, set no_utf to true. Default is false (meaning UTF8 regular expressions are supported and working).
Config:
```
$a->config['system']['no_utf'] = true;
```
**Check Full Names**
You may find a lot of spammers trying to register on your site. During testing we discovered that since these registrations were automatic, the "Full Name" field was often set to just an account name with no space between first and last name. If you would like to support people with only one name as their full name, you may change this setting to true. Default is false.
Config:
```
$a->config['system']['no_regfullname'] = true;
```
**OpenID**
By default, OpenID may be used for both registration and logins. If you do not wish to make OpenID facilities available on your system (at all), set 'no_openid' to true. Default is false.
Config:
```
$a->config['system']['no_openid'] = true;
```
**Multiple Registrations**
The ability to create "Pages" requires a person to register more than once. Your site configuration can block registration (or require approval to register). By default logged in users can register additional accounts for use as pages. These will still require approval if REGISTER_APPROVE is selected. You may prohibit logged in users from creating additional accounts by setting 'block_extended_register' to true. Default is false.
Config:
```
$a->config['system']['block_extended_register'] = true;
```
**Developer Settings**
Most useful when debugging protocol exchanges and tracking down other communications issues.
Config:
```
$a->config['system']['debugging'] = true;
$a->config['system']['logfile'] = 'logfile.out';
$a->config['system']['loglevel'] = LOGGER_DEBUG;
```
Turns on detailed debugging logs which will be stored in 'logfile.out' (which must be writeable by the webserver). LOGGER_DEBUG will show a good deal of information about system activity but will not include detailed data. You may also select LOGGER_ALL but due to the volume of information we recommend only enabling this when you are tracking down a specific problem. Other log levels are possible but are not being used at the present time.
**PHP error logging**
Use the following settings to redirect PHP errors to a file.
Config:
```
error_reporting(E_ERROR | E_WARNING | E_PARSE );
ini_set('error_log','php.out');
ini_set('log_errors','1');
ini_set('display_errors', '0');
```
This will put all PHP errors in the file php.out (which must be writeable by the webserver). Undeclared variables are occasionally referenced in the program and therefore we do not recommend using E_NOTICE or E_ALL. The vast majority of issues reported at these levels are completely harmless. Please report to the developers any errors you encounter in the logs using the recommended settings above. They generally indicate issues which need to be resolved.
If you encounter a blank (white) page when using the application, view the PHP logs - as this almost always indicates an error has occurred.

View File

@ -1,36 +1,24 @@
Tags and Mentions
=================
* [Home](help)
Like many other modern social networks, Friendica uses a special notation inside messages to indicate "tags" or contextual links to other entities.
Like many other platforms, Red uses a special notation inside messages to indicate "tags" or contextual links to other entities.
**Mentions**
People are tagged by preceding their name with the @ character.
Channels are tagged by simply preceding their name with the @ character. Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts.
The following are various ways of indicating a person:
When you start to mention somebody, it will create an auto-complete box to select from your immediate connections. Select one as appropriate. Some connections will be displayed in different colours. A light blue entry (using the default theme) indicates a channel which will redeliver to others if tagged. This is generally a conversation group or forum. But be aware that when tagged, the message will also go to anybody they choose, in addition to anybody you choose.
* @mike - indicates a known contact in your social circle whose nickname is "mike"
* @mike_macgirvin - indicates a known contact in your social circle whose full name is "Mike Macgirvin". Note that spaces cannot be used inside tags.
* @mike+151 - this form is used by the drop-down tag completion tool. It indicates the contact whose nickname is mike and whose contact identifier number is 151. The drop-down tool may be used to resolve people with duplicate nicknames.
* @mike@macgirvin.com - indicates the Identity Address of a person on a different network, or one that is *not* in your social circle. This is called a "remote mention" and can only be an email-style locator, not a web URL.
**Private Mentions**
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts. Please note that Friendica blocks incoming "mentions" from people with no relationship to you. This is a spam prevention measure.
If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or collections from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to include them (and perhaps restrict the post from "everybody" if this was the default). You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda (in addition to any recipients you selected with the privacy selector - if any).
You may also tag public collections. When you create or edit a collection, there is a checkbox to allow the group members to be seen by others. If this box is checked for a collection and you tag (for instance) @!Friends - the post will be restricted to the Friends collection. Check that the collection is public before doing this - as there is no way to take back a post except to delete it. The collection name will appear in the post and will alert members of that collection that they are members of it.
Remote mentions are delivered using the OStatus protocol. This protocol is used by Friendica and StatusNet and several other systems, but is not currently implemented in Diaspora.
Friendica makes no distinction between people and groups for the purpose of tagging. (Some other networks use !group to indicate a group.)
**Topical Tags**
Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #cars will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration. The same rules apply as with names that spaces within tags are represented by the underscore character. It is therefore not possible to create a tag whose target contains an underscore.
Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #cars will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration. The same rules apply as with names that spaces within tags are represented by the underscore character. It is therefore not possible to create a tag whose target contains an underscore.
Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections.

4
doc/TermsOfService.md Normal file
View File

@ -0,0 +1,4 @@
Terms of Service
================
#include doc/SiteTOS.md;

62
doc/To-Do-Code.md Normal file
View File

@ -0,0 +1,62 @@
Project Code To-Do List
=======================
We need much more than this, but here are areas where developers can help. Please edit this page when items are finished. Another place for developers to start is with the issues list.
* Documentation - see [Red Documentation Project To-Do List](help/To-Do)
* Infinite scroll to the directory pages
* Finish the anti-spam bayesian engine
* Integrate the "open site" list with the register page
* implement oembed provider interface
* implement openid server interface
* Write more webpage layouts
* Write more webpage widgets
* (Advanced) create a UI for building Comanche pages
* External post connectors - create standard interface
* External post connectors, add popular services
* templatise and translate the Web interface to webDAV
* Extend WebDAV to provide desktop access to photo albums
* service classes - provide a pluggable subscription payment gateway for premium accounts
* service classes - account overview page showing resources consumed by channel. With special consideration this page can also be accessed at a meta level by the site admin to drill down on problematic accounts/channels.
* Events module - fix permissions on events, and provide JS translation support for the calendar overview; integrate with calDAV
* Events module - event followups and RSVP
* Uploads - integrate https://github.com/blueimp/jQuery-File-Upload
* App taxonomy
* replace the tinymce visual editor and/or make the visual editor pluggable and responsive to different output formats. We probably want library/bbedit for bbcode. This needs a fair bit of work to catch up with our "enhanced bbcode", but start with images, links, bold and highlight and work from there.
* Photos module - turn photos into normal conversations and fix tagging
* Provide RSS feed support which look like channels (in matrix only - copyright issues)
* Create mobile clients for the top platforms - which involves extending the API so that we can do stuff far beyond the current crop of Twitter/Statusnet clients. Ditto for mobile themes. We can probably use something like the Friendica Android app as a base to start from.
* Implement owned and exchangeable "things".
* Family Account creation - using service classes (an account holder can create a certain number of sub-accounts which are all tied to their subscription - if the subscription lapses they all go away).
* Put mod_admin under Comanche
In many cases some of the work has already been started and code exists so that you needn't start from scratch. Please contact one of the developer channels like Channel One (one@zothub.com) before embarking and we can tell you what we already have and provide some insights on how we envision these features fitting together.

23
doc/To-Do.md Normal file
View File

@ -0,0 +1,23 @@
Documentation we need to write
==============================
* Database schema detailed descriptions
* Complete plugin hook documentation
* API documentation
* Function and code documentation (doxygen)
* New Member guide
* "Extra Feature" reference, description of each
* Detailed Personal Settings Documentation
* Administration Guide (post-install)
* Administration Guide (pre-install)

91
doc/Translations.md Normal file
View File

@ -0,0 +1,91 @@
Translating the Red Matrix
==========================
Translation Process
-------------------
The strings used in the UI of Red is translated at [Transifex][1] and then
included in the git repository at github. If you want to help with translation
for any language, be it correcting terms or translating Red to a
currently not supported language, please register an account at transifex.com
and contact the Red translation team there.
Translating Red is simple. Just use the online tool at transifex. If you
don't want to deal with git & co. that is fine, we check the status of the
translations regularly and import them into the source tree at github so that
others can use them.
We do not include every translation from transifex in the source tree to avoid
a scattered and disturbed overall experience. As an uneducated guess we have a
lower limit of 50% translated strings before we include the language. This
limit is judging only by the amount of translated strings under the assumption
that the most prominent strings for the UI will be translated first by a
translation team. If you feel your translation useable before this limit,
please contact us and we will probably include your teams work in the source
tree.
If you want to get your work into the source tree yourself, feel free to do so
and contact us with and question that arises. The process is simple and
Red ships with all the tools necessary.
The location of the translated files in the source tree is
/view/LNG-CODE/
where LNG-CODE is the language code used, e.g. de for German or fr for French.
For the email templates (the *.tpl files) just place them into the directory
and you are done. The translated strings come as a "messages.po" file from
transifex which needs to be translated into the PHP file Red uses. To do
so, place the file in the directory mentioned above and use the "po2php"
utility from the util directory of your Red installation.
Assuming you want to convert the German localization which is placed in
view/de/messages.po you would do the following.
1. Navigate at the command prompt to the base directory of your
Red installation
2. Execute the po2php script, which will place the translation
in the strings.php file that is used by Red.
$> php util/po2php.php view/de/messages.po
The output of the script will be placed at view/de/strings.php where
froemdoca os expecting it, so you can test your translation mmediately.
3. Visit your Red page to check if it still works in the language you
just translated. If not try to find the error, most likely PHP will give
you a hint in the log/warnings.about the error.
For debugging you can also try to "run" the file with PHP. This should
not give any output if the file is ok but might give a hint for
searching the bug in the file.
$> php view/de/strings.php
4. commit the two files with a meaningful commit message to your git
repository, push it to your fork of the Red repository at github and
issue a pull request for that commit.
Utilities
---------
Additional to the po2php script there are some more utilities for translation
in the "util" directory of the Red source tree. If you only want to
translate Red into another language you wont need any of these tools most
likely but it gives you an idea how the translation process of Red
works.
For further information see the utils/README file.
Known Problems
--------------
* Red uses the language setting of the visitors browser to determain the
language for the UI. Most of the time this works, but there are some known
quirks.
* the early translations are based on the friendica translations, if you
some rough translations please let us know or fix them at Transifex.
Links
------
[1]: http://www.transifex.com/projects/p/red-matrix/

14
doc/Webpages.md Normal file
View File

@ -0,0 +1,14 @@
Creating Webpages
=================
Red enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section.
Once enabled, a new tab will appear on your channel page labelled "Webpages". Clicking this link will take you to the webpage editor. Here you can create a post using either BBCode or the rich text editor.
Pages will be accessible at mydomain/page/username/pagelinktitle
The "page link title" box allows a user to specify the "pagelinktitle" of this URL. If no page link title is set, we will set one for you automatically, using the message ID of the item.
Beneath the page creation box, a list of existing pages will appear with an "edit" link. Clicking this will take you to an editor, similar to that of the post editor, where you can make changes to your webpages.
If you are the admin of a site, you can specify a channel whose webpages we will use at key points around the site. Presently, the only place this is implemented is the home page. If you specify the channel "admin" and then the channel called "admin" creates a webpage called "home", we will display it's content on your websites home page. We expect this functionality to be extended to other areas in future.

81
doc/Widgets.md Normal file
View File

@ -0,0 +1,81 @@
Core Widgets
============
Some/many of these widgets have restrictions which may restrict the type of page where they may appear or may require login
* clock - displays the current time
* args: military (1 or 0) - use 24 hour time as opposed to AM/PM
<br />&nbsp;<br />
* profile - displays a profile sidebar on pages which load profiles (pages with nickname in the URL)
* tagcloud - display a tagcloud of webpage items
* args: count - number of items to return (default 24)
<br />&nbsp;<br />
* collections - collection selector for the current logged in channel
* args: mode - one of "conversation", "group", "abook" depending on module
<br />&nbsp;<br />
* suggestions - friend suggestions for the current logged on channel
* follow - presents a text box for following another channel
* notes - private notes area for the current logged in channel if private_notes feature is enabled
* savedsearch - network/matrix search with save - must be logged in and savedsearch feature enabled
* filer - select filed items from network/matrix stream - must be logged in
* archive - date range selector for network and channel pages
* args: 'wall' - 1 or 0, limit to wall posts or network/matrix posts (default)
<br />&nbsp;<br />
* fullprofile - same as profile currently
* categories - categories filter (channel page)
* tagcloud_wall - tagcloud for channel page only
* affinity - affinity slider for network page - must be logged in
* settings_menu - sidebar menu for settings page, must be logged in
* mailmenu - sidebar menu for private message page - must be logged in
* design_tools - design tools menu for webpage building pages, must be logged in
* findpeople - tools to find other channels
* photo_albums - list photo albums of the current page owner with a selector menu
* vcard - mini profile sidebar for the person of interest (page owner, whatever)
* dirsafemode - directory selection tool - only on directory pages
* dirsort - directory selection tool - only on directory pages
* dirtags - directory tool - only on directory pages
* menu_preview - preview a menu - only on menu edit pages
* chatroom_list - list of chatrooms for the page owner
* bookmarkedchats - list of bookmarked chatrooms collected on this site for the current observer
* suggestedchats - "interesting" chatrooms chosen for the current observer
* item - displays a single webpage item by mid
* args: mid - message_id of webpage to display
<br />&nbsp;<br />
* photo - display a single photo
* args:
* url - URL of photo, must be http or https
* zrl - use zid authenticated link
* style - CSS style string
<br />&nbsp;<br />

View File

@ -0,0 +1,107 @@
# Zot - A High Level Overview
Here's a high level description of how zot works.
In this example, "Indigo" is going to send a public message from his website at "podunk.edu". "Nickordo" is a recipient on another site ("example.com").
Indigo first posts his message at podunk.edu. podunk.edu looks up who should receive the message and finds Nickordo. Nickordo usually posts from example.com so we add that destination to our list of recipients. We may also add other destinations for nickordo and anybody else that is following Indigo's posts.
In this example we find that we only have one known recipient at one known location.
We send a packet to example.com:
{
"type":"notify",
"sender":{
"guid":"kgVFf_1_SSbyqH-BNWjWuhAvJ2EhQBTUdw-Q1LwwssAntr8KTBgBSzNVzUm9_RwuDpxI6X8me_QQhZMf7RfjdA",
"guid_sig":"PT9-TApzpm7QtMxC63MjtdK2nUyxNI0tUoWlOYTFGke3kNdtxSzSvDV4uzq_7SSBtlrNnVMAFx2_1FDgyKawmqVtRPmT7QSXrKOL2oPzL8Hu_nnVVTs_0YOLQJJ0GYACOOK-R5874WuXLEept5-KYg0uShifsvhHnxnPIlDM9lWuZ1hSJTrk3NN9Ds6AKpyNRqf3DUdz81-Xvs8I2kj6y5vfFtm-FPKAqu77XP05r74vGaWbqb1r8zpWC7zxXakVVOHHC4plG6rLINjQzvdSFKCQb5R_xtGsPPfvuE24bv4fvN4ZG2ILvb6X4Dly37WW_HXBqBnUs24mngoTxFaPgNmz1nDQNYQu91-ekX4-BNaovjDx4tP379qIG3-NygHTjFoOMDVUvs-pOPi1kfaoMjmYF2mdZAmVYS2nNLWxbeUymkHXF8lT_iVsJSzyaRFJS1Iqn7zbvwH1iUBjD_pB9EmtNmnUraKrCU9eHES27xTwD-yaaH_GHNc1XwXNbhWJaPFAm35U8ki1Le4WbUVRluFx0qwVqlEF3ieGO84PMidrp51FPm83B_oGt80xpvf6P8Ht5WvVpytjMU8UG7-js8hAzWQeYiK05YTXk-78xg0AO6NoNe_RSRk05zYpF6KlA2yQ_My79rZBv9GFt4kUfIxNjd9OiV1wXdidO7Iaq_Q",
"url":"http:\/\/podunk.edu",
"url_sig":"T8Bp7j5DHHhQDCFcAHXfuhUfGk2P3inPbImwaXXF1xJd3TGgluoXyyKDx6WDm07x0hqbupoAoZB1qBP3_WfvWiJVAK4N1FD77EOYttUEHZ7L43xy5PCpojJQmkppGbPJc2jnTIc_F1vvGvw5fv8gBWZvPqTdb6LWF6FLrzwesZpi7j2rsioZ3wyUkqb5TDZaNNeWQrIEYXrEnWkRI_qTSOzx0dRTsGO6SpU1fPWuOOYMZG8Nh18nay0kLpxReuHCiCdxjXRVvk5k9rkcMbDBJcBovhiSioPKv_yJxcZVBATw3z3TTE95kGi4wxCEenxwhSpvouwa5b0hT7NS4Ay70QaxoKiLb3ZjhZaUUn4igCyZM0h6fllR5I6J_sAQxiMYD0v5ouIlb0u8YVMni93j3zlqMWdDUZ4WgTI7NNbo8ug9NQDHd92TPmSE1TytPTgya3tsFMzwyq0LZ0b-g-zSXWIES__jKQ7vAtIs9EwlPxqJXEDDniZ2AJ6biXRYgE2Kd6W_nmI7w31igwQTms3ecXe5ENI3ckEPUAq__llNnND7mxp5ZrdXzd5HHU9slXwDShYcW3yDeQLEwAVomTGSFpBrCX8W77n9hF3JClkWaeS4QcZ3xUtsSS81yLrp__ifFfQqx9_Be89WVyIOoF4oydr08EkZ8zwlAsbZLG7eLXY"
},
"callback":"\/post",
"version":1,
"secret":"1eaa6613699be6ebb2adcefa5379c61a3678aa0df89025470fac871431b70467"
}
This packet says the following:
I'm Indigo and here is proof. I'm posting from podunk.edu and here is proof. I've got a package for you. The tracking number is "1eaa6613....".
Example.com accepts this packet and says "whoa, hold on - I don't know you. I want to prove who you are." So Example.com connects to podunk.edu through a "well-known URL" that we use for this purpose and looks up the "guid" mentioned above. It should return a bunch of information, one item of which is a public key. Example.com uses this key to verify the signatures in the message to verify that indeed there is a person named Indigo at podunk.edu. We only need to do this once. (Note that Indigo can post from any location. All we have to do is prove that it's Indigo and that Indigo can prove that he's posting from another site.)
Then example.com disconnects and flags that there's a message waiting at podunk.edu. Either immediately, or whenever the urge hits (depending on how important Indigo is to anybody on this site), example.com "calls" podunk.edu. It says something like this:
{
"type":"pickup",
"url":"http:\/\/example.com",
"callback_sig":"teE1_fLIqfyeCuZY4iS7sNU8jUlUuqYOYBiHLarkC99I9K-uSr8DAwVW8ZPZRK-uYdxRMuKFb6cumF_Gt9XjecCPBM8HkoXHOi_VselzJkxPwor4ZPtWYWWaFtRfcAm794LrWjdz62zdESTQd2JJIZWbrli1sUhK801BF3n0Ye6-X1MWhy9EUTVlNimOeRipcuD_srMhUcAXOEbLlrugZ8ovy2YBe6YOXkS8jj0RSFjsOduXAoVhQmNpcobSYsDvaQS3e3MvE6-oXE602zGQhuNLr7DIMt9PCdAeQo-ZM-DHlZGCkGk4O2oQFCXFzGPqLUMWDACGJfTfIWGoh_EJqT_SD5b_Yi_Wk9S1lj7vb-lmxe5JuIf7ezWzHoBT8vswnZxPYlidH2i9wapdzij9il_qqcCWWHIp7q_XkY_Zj52Z4r4gdmiqM-8y1c_1SDX7hrJFRwqL_PKFbEvyi5nMWTEzqp55Tay5Woiv19STK_H_8ufFfD9AOkYnk6rIOMsk9dn3a5tAFpDRyRndXkBWAXwiJjiND2zjue7BFu7Ty40THXcfYRh1a5XrAXcaGeYuagg-8J9tAufu9_LY3qGazFg8kRBVMOn4M8DRKSIhKj7z4MnbYL0s09gREojy4jqWO3VkaOjP2jUGzoPuUDLasudE1ehWFq0K_MTQNavgmp8",
"callback":"http:\/\/example.com\/post",
"secret":"1eaa6613699be6ebb2adcefa5379c61a3678aa0df89025470fac871431b70467",
"secret_sig":"O7nB4_UJHBXi28Suwl9LBZF9hI_9KGVTgehnUlWF1oYMNRnBbVHB9lzUfAoalvp3STbU3xJbtD_S58tv6MfV7J5j2V_S1W5ex3dulmDGB8Pt_7Fe5mbEPmjQFcfv3Eg5dUjYIuDl0TDScfrHyImj7RZIWHbwd7wWVoMzzDa_o33klpYmKZCBvObCh55bRrlFkXZs_dRuOiPwkfX0C6_XES4OyOIYl45V30rdhmf-STrf4L9dKYy_axQ12RIwRcKychvVLwlUJn3bn9lgNXRRU_HTne-09OPcJbUOdcD3DkFoKOxMULBNKPHzsCau0ICYug7S0EP6LpCom_mW78s08LyVA1vYeFZjevBCiGecj57yIAQDYi6_rpWJfihYaWHRN0oqtScUR4Bdf0bQbEHxMs4zAtrOAxfyJCbi6U1pfnGgzXzB9ulOYGnVGNTF7Ey4K7FOZIBtk0ILY2JfvBUaVvVs8ttagOOHmhWhnbCvrnOFlkNdlce7zoJCSUJENUOCYmTRfwB_Jno5fAzRnrsYU3_Z-l1mzniU_OmUPz8mPEh7PwhkqAiVlyaM-q15gn7l2lAIDk9kp2X_iCme7v4V0ADN_DbpaI_0-6mPw5HLbKrCsA-sxlSMB4DO4lDCHYkauj0l25sbfroRWB_hax1O4Q0oWyOlVJLUqEC5nuUJCCE"
}
What this message says is: This is example.com, I have proof, and I'm here to pick up a package. Here's the tracking number, and here's proof that this is the tracking number you presumably sent to example.com.
Good enough. Podunk.edu checks out the story and indeed, it is example.com, and yes, there's a package waiting with that tracking number. Here's the package...
{
"success":1,
"pickup":{
"notify":{
"type":"notify",
"sender":{
"guid":"kgVFf_1_SSbyqH-BNWjWuhAvJ2EhQBTUdw-Q1LwwssAntr8KTBgBSzNVzUm9_RwuDpxI6X8me_QQhZMf7RfjdA",
"guid_sig":"PT9-TApzpm7QtMxC63MjtdK2nUyxNI0tUoWlOYTFGke3kNdtxSzSvDV4uzq_7SSBtlrNnVMAFx2_1FDgyKawmqVtRPmT7QSXrKOL2oPzL8Hu_nnVVTs_0YOLQJJ0GYACOOK-R5874WuXLEept5-KYg0uShifsvhHnxnPIlDM9lWuZ1hSJTrk3NN9Ds6AKpyNRqf3DUdz81-Xvs8I2kj6y5vfFtm-FPKAqu77XP05r74vGaWbqb1r8zpWC7zxXakVVOHHC4plG6rLINjQzvdSFKCQb5R_xtGsPPfvuE24bv4fvN4ZG2ILvb6X4Dly37WW_HXBqBnUs24mngoTxFaPgNmz1nDQNYQu91-ekX4-BNaovjDx4tP379qIG3-NygHTjFoOMDVUvs-pOPi1kfaoMjmYF2mdZAmVYS2nNLWxbeUymkHXF8lT_iVsJSzyaRFJS1Iqn7zbvwH1iUBjD_pB9EmtNmnUraKrCU9eHES27xTwD-yaaH_GHNc1XwXNbhWJaPFAm35U8ki1Le4WbUVRluFx0qwVqlEF3ieGO84PMidrp51FPm83B_oGt80xpvf6P8Ht5WvVpytjMU8UG7-js8hAzWQeYiK05YTXk-78xg0AO6NoNe_RSRk05zYpF6KlA2yQ_My79rZBv9GFt4kUfIxNjd9OiV1wXdidO7Iaq_Q",
"url":"http:\/\/z.podunk.edu",
"url_sig":"T8Bp7j5DHHhQDCFcAHXfuhUfGk2P3inPbImwaXXF1xJd3TGgluoXyyKDx6WDm07x0hqbupoAoZB1qBP3_WfvWiJVAK4N1FD77EOYttUEHZ7L43xy5PCpojJQmkppGbPJc2jnTIc_F1vvGvw5fv8gBWZvPqTdb6LWF6FLrzwesZpi7j2rsioZ3wyUkqb5TDZaNNeWQrIEYXrEnWkRI_qTSOzx0dRTsGO6SpU1fPWuOOYMZG8Nh18nay0kLpxReuHCiCdxjXRVvk5k9rkcMbDBJcBovhiSioPKv_yJxcZVBATw3z3TTE95kGi4wxCEenxwhSpvouwa5b0hT7NS4Ay70QaxoKiLb3ZjhZaUUn4igCyZM0h6fllR5I6J_sAQxiMYD0v5ouIlb0u8YVMni93j3zlqMWdDUZ4WgTI7NNbo8ug9NQDHd92TPmSE1TytPTgya3tsFMzwyq0LZ0b-g-zSXWIES__jKQ7vAtIs9EwlPxqJXEDDniZ2AJ6biXRYgE2Kd6W_nmI7w31igwQTms3ecXe5ENI3ckEPUAq__llNnND7mxp5ZrdXzd5HHU9slXwDShYcW3yDeQLEwAVomTGSFpBrCX8W77n9hF3JClkWaeS4QcZ3xUtsSS81yLrp__ifFfQqx9_Be89WVyIOoF4oydr08EkZ8zwlAsbZLG7eLXY"
},
"callback":"\/post",
"version":1,
"secret":"1eaa6613699be6ebb2adcefa5379c61a3678aa0df89025470fac871431b70467"
},
"message":{
"message_id":"10b049ce384cbb2da9467319bc98169ab36290b8bbb403aa0c0accd9cb072e76@podunk.edu",
"message_top":"10b049ce384cbb2da9467319bc98169ab36290b8bbb403aa0c0accd9cb072e76@podunk.edu",
"message_parent":"10b049ce384cbb2da9467319bc98169ab36290b8bbb403aa0c0accd9cb072e76@podunk.edu",
"created":"2012-11-20 04:04:16",
"edited":"2012-11-20 04:04:16",
"title":"",
"body":"Hi Nickordo",
"app":"",
"verb":"post",
"object_type":"",
"target_type":"",
"permalink":"",
"location":"",
"longlat":"",
"owner":{
"name":"Indigo",
"address":"indigo@podunk.edu",
"url":"http:\/\/podunk.edu",
"photo":{
"mimetype":"image\/jpeg",
"src":"http:\/\/podunk.edu\/photo\/profile\/m\/5"
},
"guid":"kgVFf_1_SSbyqH-BNWjWuhAvJ2EhQBTUdw-Q1LwwssAntr8KTBgBSzNVzUm9_RwuDpxI6X8me_QQhZMf7RfjdA",
"guid_sig":"PT9-TApzpm7QtMxC63MjtdK2nUyxNI0tUoWlOYTFGke3kNdtxSzSvDV4uzq_7SSBtlrNnVMAFx2_1FDgyKawmqVtRPmT7QSXrKOL2oPzL8Hu_nnVVTs_0YOLQJJ0GYACOOK-R5874WuXLEept5-KYg0uShifsvhHnxnPIlDM9lWuZ1hSJTrk3NN9Ds6AKpyNRqf3DUdz81-Xvs8I2kj6y5vfFtm-FPKAqu77XP05r74vGaWbqb1r8zpWC7zxXakVVOHHC4plG6rLINjQzvdSFKCQb5R_xtGsPPfvuE24bv4fvN4ZG2ILvb6X4Dly37WW_HXBqBnUs24mngoTxFaPgNmz1nDQNYQu91-ekX4-BNaovjDx4tP379qIG3-NygHTjFoOMDVUvs-pOPi1kfaoMjmYF2mdZAmVYS2nNLWxbeUymkHXF8lT_iVsJSzyaRFJS1Iqn7zbvwH1iUBjD_pB9EmtNmnUraKrCU9eHES27xTwD-yaaH_GHNc1XwXNbhWJaPFAm35U8ki1Le4WbUVRluFx0qwVqlEF3ieGO84PMidrp51FPm83B_oGt80xpvf6P8Ht5WvVpytjMU8UG7-js8hAzWQeYiK05YTXk-78xg0AO6NoNe_RSRk05zYpF6KlA2yQ_My79rZBv9GFt4kUfIxNjd9OiV1wXdidO7Iaq_Q"
},
"author":{
"name":"Indigo",
"address":"indigo@podunk.edu",
"url":"http:\/\/podunk.edu",
"photo":{
"mimetype":"image\/jpeg",
"src":"http:\/\/podunk.edu\/photo\/profile\/m\/5"
},
"guid":"kgVFf_1_SSbyqH-BNWjWuhAvJ2EhQBTUdw-Q1LwwssAntr8KTBgBSzNVzUm9_RwuDpxI6X8me_QQhZMf7RfjdA",
"guid_sig":"PT9-TApzpm7QtMxC63MjtdK2nUyxNI0tUoWlOYTFGke3kNdtxSzSvDV4uzq_7SSBtlrNnVMAFx2_1FDgyKawmqVtRPmT7QSXrKOL2oPzL8Hu_nnVVTs_0YOLQJJ0GYACOOK-R5874WuXLEept5-KYg0uShifsvhHnxnPIlDM9lWuZ1hSJTrk3NN9Ds6AKpyNRqf3DUdz81-Xvs8I2kj6y5vfFtm-FPKAqu77XP05r74vGaWbqb1r8zpWC7zxXakVVOHHC4plG6rLINjQzvdSFKCQb5R_xtGsPPfvuE24bv4fvN4ZG2ILvb6X4Dly37WW_HXBqBnUs24mngoTxFaPgNmz1nDQNYQu91-ekX4-BNaovjDx4tP379qIG3-NygHTjFoOMDVUvs-pOPi1kfaoMjmYF2mdZAmVYS2nNLWxbeUymkHXF8lT_iVsJSzyaRFJS1Iqn7zbvwH1iUBjD_pB9EmtNmnUraKrCU9eHES27xTwD-yaaH_GHNc1XwXNbhWJaPFAm35U8ki1Le4WbUVRluFx0qwVqlEF3ieGO84PMidrp51FPm83B_oGt80xpvf6P8Ht5WvVpytjMU8UG7-js8hAzWQeYiK05YTXk-78xg0AO6NoNe_RSRk05zYpF6KlA2yQ_My79rZBv9GFt4kUfIxNjd9OiV1wXdidO7Iaq_Q"
}
}
}
}
And that's the package (the original message). Example.com converts this into a form suitable for viewing by Nickordo and notifies Nickordo that there's a new message. Podunk.edu **might** discover that there are other packages waiting for example.com. If this happens it may also send any and all other waiting packages at this time. Each has the original tracking number attached.

Some files were not shown because too many files have changed in this diff Show More