This commit is contained in:
friendica 2014-06-24 17:27:35 -07:00
commit ecd472b7bb
19 changed files with 7023 additions and 5988 deletions

View File

@ -1,4 +1,4 @@
![the Red Matrix](images/rm-480x115.png)
![the Red Matrix](images/rm.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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

218
assets/nb-no/narrow.css Normal file
View File

@ -0,0 +1,218 @@
body {
font-family: 'Ubuntu',Tahoma,Helvetica,Arial,sans-serif;
color: #111111;
text-align: center;
padding:0 0 22px 0;
}
div#header{
position:absolute;
z-index: 100;
top:0;
left:0;
width:100%;
height: 55px;
background: rgba(100, 0, 0, 0.8);
background-size:3000px 55px;
color: #fff;
display:none;
}
@media screen{
body>div#header{
position: fixed;
}
body>div#footer{
position:fixed;
}
}
div#footer{
position:absolute;
bottom:0;
left:0;
width:100%;
height:22px;
background: #AD002C;
color: #fff;
}
#intro-text {
color:#c60032;font-size:1.2em;width:70%;margin-right:auto;margin-left:auto;text-align:justify;
}
div.section-text {
color:#c60032;font-size:1.2em;width:80%;margin-right:auto;margin-left:auto;text-align:justify;
}
#tagline {
color: #c60032;
width:80%;
margin-top:0px;
margin-bottom:20px;
margin-left: auto;
margin-right: auto;
}
div.red-button {
width:150px;
margin-left: auto;
margin-right: auto;
font-weight: 500;
font-size: larger;
background-color: #c60032;
border: 2px solid lightgray;
border-radius: 5px;
padding: 12px;
}
div.red-button a {
text-decoration: none;
color:#FFFFFF;
}
div.red-button a:hover {
text-decoration: none;
font-weight:600;
}
#footer {
font-size: 12px;
color:#fff;
padding-top: 4px;
}
#footer a {
text-decoration: none;
color:#fff;
}
.bg {
display:none;
}
.bg2 {
display:none;
}
.bg-mask {
display:none;
}
#bg-narrow {
background: url('diamondlattice.png') center center no-repeat ;
opacity: 0.05;
position:absolute;
top:0;
left:0;
z-index: -1;
width:100%;
height:300%;
display:none;
}
div.summary-nodes-container {
display:none;
}
div.summary-menu-container {
display:block;
}
a.summary-menu-item {
display: block;
width:70%;
margin-left:auto;margin-right:auto;
border-radius:10px;
color:#FFFFFF;
font-size:1.2em;
text-align:center;
background:#c60032;
margin-bottom:5px;
}
a.summary-menu-item:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton1 {
position: fixed;
top:10px;
left:200px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#c60032;
display: none;
z-index:200;
}
div#menubutton1:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton2 {
position: fixed;
top:10px;
left:350px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#c60032;
display: none;
z-index:200;
}
div#menubutton2:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton3 {
position: fixed;
top:10px;
right:350px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#c60032;
display: none;
z-index:200;
}
div#menubutton3:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton4 {
position: fixed;
top:10px;
right:200px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#c60032;
display: none;
z-index:200;
}
div#menubutton4:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.section-heading {
font-size:2.0em;
color:#c60032;
}
div.section-subtitle {
font-size:1.5em;
color:#c60032;
}

Binary file not shown.

BIN
assets/nb-no/uluru2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

396
assets/nb-no/wide.css Normal file
View File

@ -0,0 +1,396 @@
body {
font-family: 'Ubuntu',Tahoma,Helvetica,Arial,sans-serif;
color: #111111;
/*color: rgba(0,0,0,0.0); */
text-align: center;
/* background-image: url("redmatrixbkgd.jpg"); */
/*background: #ececec;*/
padding:0 0 22px 0;
/* background: url(redmatrixbkgd.jpg) no-repeat center center scroll; */
/*
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
*/
}
#intro-textl, #intro-textr {
text-align: left; color:#444444;font-size:1.3em;
}
div.section-text {
color:#C60032;font-size:1.2em;width:700px;margin-right:auto;margin-left:auto;text-align:justify;
}
div#header{
display:none;
position:absolute;
z-index: 100;
top:0;
left:0;
width:100%;
height: 55px;
/* background-image: url("redmatrixbkgd.jpg"); */
background: rgba(198, 0, 50, 0.8);
background-size:3000px 55px;
/* background: #afafaf;*/
color: #fff;
}
@media screen{
body>div#header{
position: fixed;
}
body>div#footer{
position:fixed;
}
}
div#footer{
position:absolute;
bottom:0;
left:0;
width:100%;
height:22px;
background: #AD002C;
color: #fff;
}
#tagline {
color: #880000;
/* width:600px;
margin-top:0px;
margin-bottom:20px;
margin-left: auto;
margin-right: auto; */
}
.clear {
clear: both;
}
div.red-button {
width:150px;
margin-left: auto;
margin-right: auto;
font-weight: 500;
font-size: larger;
background-color: #C60032;
border: 2px solid lightgray;
border-radius: 5px;
padding: 12px;
}
div.red-button a {
text-decoration: none;
color:#FFFFFF;
}
div.red-button a:hover {
text-decoration: none;
font-weight:600;
}
#footer {
font-size: 12px;
color:#fff;
padding-top: 4px;
}
#footer a {
text-decoration: none;
color:#fff;
}
.bg {
background: url('diamondlattice.png') center center no-repeat ;
position: fixed;
width: 100%;
height: 1350px;
top:0px;
left:0px;
opacity: 1.0;
z-index: -1;
}
.bg2 {
background: url('diamondlattice.png') center center no-repeat;
position: fixed;
width: 100%;
height: 1350px;
top:0px;
left:0px;
opacity: 1.0;
z-index: -1;
}
.bg-mask {
background: rgba(255, 255, 255, 0.95) center center no-repeat;
position: fixed;
width: 100%;
height: 1350px;
top:0;
left:0px;
z-index: -1;
}
.bg-narrow {
display:none;
}
div.summary-menu-container {
display:none;
}
div.summary-node {
position: fixed;
width: 50px;
text-align: center ;
font-size:1.2em;
}
div.summary-node-header {
font-size: 1.2em;
color:#FFFFFF;
font-weight:bold;
}
div.summary-node-1 {
position: absolute;
top:0px;
left:0px;
width:200px;
height:200px;
border-radius:100px;
color:#CCCCCC;
/* line-height:100px; */
text-align:center;
background:#C60032;
}
div.summary-node-1:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.summary-node-1-text {
margin-top:25%;
width: 150px;
margin-left:auto;
margin-right:auto;
}
div.summary-node-2 {
position: absolute;
top:50px;
left:170px;
width:220px;
height:220px;
border-radius:200px;
color:#CCCCCC;
/* line-height:100px; */
text-align:center;
background:#C60032;
}
div.summary-node-2:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.summary-node-2-text {
margin-top:30%;
width: 150px;
margin-left:auto;
margin-right:auto;
}
div.summary-node-3 {
position: absolute;
top:0px;
right:20px;
width:250px;
height:250px;
border-radius:200px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
}
div.summary-node-3:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.summary-node-3-text {
margin-top:25%;
width: 200px;
margin-left:auto;
margin-right:auto;
}
div.summary-node-4 {
position: absolute;
top:200px;
right:180px;
width:200px;
height:200px;
border-radius:200px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
}
div.summary-node-4:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.summary-node-4-text {
margin-top:25%;
width: 150px;
margin-left:auto;
margin-right:auto;
}
div.summary-node-5 {
position: absolute;
top:250px;
left:120px;
width:150px;
height:150px;
border-radius:150px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
}
div.summary-node-5:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.summary-node-5-text {
margin-top:55px;
width: 150px;
margin-left:auto;
margin-right:auto;
font-size:2.0em;
}
div.summary-node-6 {
position: absolute;
top:20px;
right:270px;
width:150px;
height:150px;
border-radius:150px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
}
div.summary-node-6:hover{
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.summary-node-6-text {
margin-top:30px;
width: 100px;
margin-left:auto;
margin-right:auto;
}
div.summary-nodes-container {
position: relative;
margin-left: auto ;
margin-right: auto ;
margin-top:30px;
margin-bottom:30px;
width: 800px;
height: 400px;
text-align: center ;
}
div#menubutton1 {
position: fixed;
top:10px;
left:200px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
display: none;
z-index:200;
}
div#menubutton1:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton2 {
position: fixed;
top:10px;
left:350px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
display: none;
z-index:200;
}
div#menubutton2:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton3 {
position: fixed;
top:10px;
right:350px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
display: none;
z-index:200;
}
div#menubutton3:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div#menubutton4 {
position: fixed;
top:10px;
right:200px;
width:150px;
height:30px;
border-radius:10px;
color:#FFFFFF;
/* line-height:100px; */
text-align:center;
background:#C60032;
display: none;
z-index:200;
}
div#menubutton4:hover {
color:#FFFFFF;
text-decoration:none;
background:#550000
}
div.section-heading {
font-size:2.0em;
color:#C60032;
width:700px;
margin-bottom: 1em;
margin-left:auto;
margin-right:auto;
}
div.section-subtitle {
font-size:1.5em;
color:#BB0000;
}

View File

@ -15,7 +15,7 @@ Red Matrix Documentation and Resources
* [Web Pages](help/Webpages)
* [Remove Account](help/Remove-Account)
* [BBcode reference for posts and comments](help/bbcode)
* [Help With Addons](help/addons)
**Technical Documentation**
* [Install](help/Install)

2
doc/addons.bb Normal file
View File

@ -0,0 +1,2 @@
* [zrl=[baseurl]/help/addons_gnusocial]Posting To Gnu Social[/zrl]

61
doc/addons_gnusocial.bb Normal file
View File

@ -0,0 +1,61 @@
[b]How to cross-post to a GNUsocial instance[/b]
Start on the GNUSocial instance where you have your account.
In the GNUSocial instance, go to Settings > Connections. In the right column under "Developers," click the link to "Register an OAuth client application to use with this instance of StatusNet." This link may be found at your instance here:
https://yourgnusocialinstance.org/settings/oauthapps
Next, click the link to Register a new application. That brings up the new application form. Here's what to do on each field.
Icon. I uploaded the RedMatrix icon located at this link, after saving it to my computer:
https://github.com/friendica/red/blob/master/images/rm-32.png
Name. Give the application an appropriate name. I called mine redmatrix. You might prefer r2g.
Description. Use this field to describe the purpose of the application. I put something to the effect of use for crossposting from RedMatrix to GNUsocial.
Source URL. Put the main domain name of the Red site you're using. Don't forget to put the "s" in https://yourredmatrixsite.com. If your Red installation is a subdomain, that would probably be called for.
Organization. Since RedMatrix is unorganized, I put that. If you use your installation for a group or business, that might be a good option.
Homepage. If your group is using a subdomain, you probably want to put your main domain URI here. Since I'm on a hosted site, I put redmatrix.me.
Callback URL. Leave blank.
Type of application: select "desktop."
Default access: select "Read-write."
All fields except the callback URL must be filled in.
Click on the save button.
Then click on the icon or the name of the application for the information you'll need to insert over on RedMatrix.
*****
Now open up a new tab or window and go to your RedMatrix account, to Settings > Feature settings. Find the StatusNet Posting Settings.
Insert the strings of numbers given on the GNUsocial site into the RedMatrix fields for Consumer Key and Consumer Secret.
The Base API Path (remember the trailing /) will be your instance domain, plus the /api/ following. It will probably look like this:
https://yourgnusocialinstance.org/api/
In case of doubt check on your GNUsocial instance site in order to find the domain URLs of the Request token, Access token, and Authorization. It will be the first part of the domains, minus the /oauth/....
StatusNet application name: Insert the name you gave to the application over on the GNUsocial site.
Click Submit.
A button will appear for you to "Sign in to StatusNet." Click it and that will open a tab or window on the GNUsocial site for you to click "Allow." Once clicked and successfully authorized, a security code number will appear. Copy it and go back to the RedMatrix app you just left and insert it in the field: "Copy the security code from StatusNet here." Click Submit.
If successful, your information from the GNUsocial instance should appear in the RedMatrix app.
You now have several options to choose, if you desire, and those will need to be confirmed by clicking "Submit" also. The most interesting is "Send public postings to StatusNet by default." This option automatically sends any post of yours made in your RedMatrix account to your GNUsocial instance.
If you don't choose this option, you will have an option to send a post to your GNUsocial instance by first opening the post (by clicking in the post text area) and clicking on the lock icon next to the Share button. Select the GNUsocial icon made up of three colored dialog baloons. Close that window, then make your post.
If all goes well, you have just cross-posted your RedMatrix post to your account on a GNUsocial instance.

138
doc/nb-no/api_functions.md Normal file
View File

@ -0,0 +1,138 @@
Red Twitter API
===============
Det "grunnleggende" Red web API-et er basert på Twitter API-et, siden dette gir umiddelbar samhandling med et stort antall tredjepartsklienter og programmer uten å kreve noen kodeendring hos disse. Det er også et super-set av StatusNet-versjonen av Twitter API-et, siden den også har bred eksisterende støtte.
Red har flere muligheter som ikke vises gjennom Twitter-grensesnittene, der vi tvinges til å gjøre API-funksjoner "dummere" for å kunne arbeide med den primitive kommunikasjons- og personvernmodellen i Twitter/StatusNet. Vi planlegger å utvide Twitter-API-et slik at Red-spesifikke klienter kan ta i bruk alle funksjoner i Red uten begrensninger.
Et dedikert Red API som samvirker med egne datastrukturer og tillatelser er under utvikling, og dette krever ikke oversettelse til andre personvern- og tillatelsesmodeller og lagringsformater. Denne vil bli beskrevet i andre dokumenter. Prefikset for alle egne endepunkter er 'api/red'.
Red tilbyr tilgang til flere kanaler via samme innloggingskonto. Med Red vil enhver API-funksjon som krever autentisering akseptere et parameter - &channel={channel_nickname} - og vil velge den kanalen og gjøre den gjeldende før utføring av API-kommandoen. Som standard er det standardkanalen i kontoen som velges.
Red tilbyr også en utvidet tillatelsesmodell. Grunnet fraværet av Red-spesifikke API kall til å angi tillatelser, så vil disse innstillingene bli satt til standardtillatelsene assosiert med den gjeldende kanalen.
Red vil antakelig aldri helt kunne støtte Twitter sine 'api/friendships' funksjoner, fordi Red er ikke et sosialt nettverk og har ikke innebygget noe konsept om "vennskap" - den gjenkjenner tillatelser til å gjøre ting (eller ikke gjøre ting hvis det er det som trengs).
Tegnforklaring: T= Twitter, S= StatusNet, F= Friendica, R= Red, ()=Virker ikke ennå, J= kun JSON (XML-formater er avlegs)
Twitter API kompatible funksjoner:
* api/account/verify_credentials T,S,F,R
* api/statuses/update T,S,F,R
* api/users/show T,S,F,R
* api/statuses/home_timeline T,S,F,R
* api/statuses/friends_timeline T,S,F,R
* api/statuses/public_timeline T,S,F,R
* api/statuses/show T,S,F,R
* api/statuses/retweet T,S,F,R
* api/statuses/destroy T,S,F,(R)
* api/statuses/mentions T,S,F,(R)
* api/statuses/replies T,S,F,(R)
* api/statuses/user_timeline T,S,F,(R)
* api/favorites T,S,F,(R)
* api/account/rate_limit_status T,S,F,R
* api/help/test T,S,F,R
* api/statuses/friends T,S,F,R
* api/statuses/followers T,S,F,R
* api/friends/ids T,S,F,R
* api/followers/ids T,S,F,R
* api/direct_messages/new T,S,F,(R)
* api/direct_messages/conversation T,S,F,(R)
* api/direct_messages/all T,S,F,(R)
* api/direct_messages/sent T,S,F,(R)
* api/direct_messages T,S,F,(R)
* api/oauth/request_token T,S,F,R
* api/oauth/access_token T,S,F,R
Twitter API funksjoner støttet av StatusNet men for øyeblikket ikke av Friendica eller Red
* api/favorites T,S
* api/favorites/create T,S
* api/favorites/destroy T,S
* api/statuses/retweets_of_me T,S
* api/friendships/create T,S
* api/friendships/destroy T,S
* api/friendships/exists T,S
* api/friendships/show T,S
* api/account/update_location T,S
* api/account/update_profile_background_image T,S
* api/account/update_profile_image T,S
* api/blocks/create T,S
* api/blocks/destroy T,S
Twitter API funksjoner som for øyeblikket ikke er støttet av StatusNet
* api/statuses/retweeted_to_me T
* api/statuses/retweeted_by_me T
* api/direct_messages/destroy T
* api/account/end_session T,(R)
* api/account/update_delivery_device T
* api/notifications/follow T
* api/notifications/leave T
* api/blocks/exists T
* api/blocks/blocking T
* api/lists T
StatusNet kompatible utvidelser til Twitter API-et støttet av både Friendica og Red
* api/statusnet/version S,F,R
* api/statusnet/config S,F,R
Friendica API utvidelser til Twitter API-et støttet av både Friendica og Red
* api/statuses/mediap F,R
Red-spesifikke API utvidelser til Twitter API-et som ikke er støttet av Friendica
* api/account/logout R
* api/export/basic R,J
* api/friendica/config R
* api/red/config R
* api/friendica/version R
* api/red/version R
* api/red/channel/export/basic R,J
* api/red/channel/stream R,J (currently post only)
* api/red/albums R,J
* api/red/photos R,J (option album=xxxx)
Foreslåtte Red API utvidelser til Twitter API-et
* api/statuses/edit (R),J
* api/statuses/permissions (R),J
* api/statuses/permissions/update (R),J
* api/statuses/ids (R),J # søk etter eksisterende message_id før importering av fremmed innlegg
* api/files/show (R),J
* api/files/destroy (R),J
* api/files/update (R),J
* api/files/permissions (R),J
* api/files/permissions/update (R),J
* api/pages/show (R),J
* api/pages/destroy (R),J
* api/pages/update (R),J
* api/pages/permissions (R),J
* api/pages/permissions/update (R),J
* api/events/show (R),J
* api/events/update (R),J
* api/events/permissions (R),J
* api/events/permissions/update (R),J
* api/events/destroy (R),J
* api/photos/show (R),J
* api/photos/update (R),J
* api/photos/permissions (R),J
* api/photos/permissions/update (R),J
* api/albums/destroy (R),J
* api/albums/show (R),J
* api/albums/update (R),J
* api/albums/permissions (R),J
* api/albums/permissions/update (R),J
* api/albums/destroy (R),J
* api/friends/permissions (R),J

View File

@ -834,6 +834,51 @@ function get_cloudpath($arr) {
return $path;
}
/**
* @brief Returns path to parent folder in cloud/.
*
* @param $arr
* @return string with the folder path
*/
function get_parent_cloudpath($channel_id, $channel_name, $attachHash) {
//Build directory tree and redirect
$parentHash = $attachHash;
do {
$parentHash = find_folder_hash_by_attach_hash($channel_id, $parentHash);
if ($parentHash) {
$parentName = find_filename_by_hash($channel_id, $parentHash);
$parentFullPath = $parentName."/".$parentFullPath;
}
} while ($parentHash);
$parentFullPath = z_root() . "/cloud/" . $channel_name . "/" . $parentFullPath;
return $parentFullPath;
}
function find_folder_hash_by_attach_hash($channel_id, $attachHash) {
$r = q("select * from attach where uid = %d and hash = '%s' limit 1",
intval($channel_id), dbesc($attachHash)
);
$hash = "";
if($r) {
foreach($r as $rr) {
$hash = $rr['folder'];
}
}
return $hash;
}
function find_filename_by_hash($channel_id, $attachHash) {
$r = q("select * from attach where uid = %d and hash = '%s' limit 1",
intval($channel_id), dbesc($attachHash)
);
$filename = "";
if($r) {
foreach($r as $rr) {
$filename = $rr['filename'];
}
}
return $filename;
}
/**
*
* @param $in

View File

@ -1028,16 +1028,16 @@ class RedBrowser extends DAV\Browser\Plugin {
}
}
$attachId = $this->findAttachIdByHash($attachHash);
$fileStorageUrl = str_replace("cloud/","filestorage/",$path);
$fileStorageUrl = substr($fullPath, 0, strpos($fullPath,"cloud/")) . "filestorage/".$this->auth->channel_name;
$attachIcon = ""; // "<a href=\"attach/".$attachHash."\" title=\"".$displayName."\"><i class=\"icon-download\"></i></a>";
$html.= "<tr>
<td>$icon</td>
<td><a href=\"{$fullPath}\">{$displayName}</a></td>";
<td style=\"min-width: 15em\"><a href=\"{$fullPath}\">{$displayName}</a></td>";
if($is_owner) {
$html .= "<td>" . (($size) ? $attachIcon : '') . "</td>
<td><a href=\"".$fileStorageUrl."/".$attachId."/edit\" title=\"".t('Edit')."\"><i class=\"icon-pencil btn btn-default\"></i></a></td>
<td><a href=\"".$fileStorageUrl."/".$attachId."/delete\" title=\"".t('Delete')."\"><i class=\"icon-remove btn btn-default drop-icons\"></i></a></td>";
<td><a href=\"".$fileStorageUrl."/".$attachId."/delete\" title=\"".t('Delete')."\" onclick=\"return confirm('Are you sure you want to delete this item?');\"><i class=\"icon-remove btn btn-default drop-icons\"></i></a></td>";
}
else {
$html .= "<td></td><td></td><td></td>";
@ -1090,20 +1090,24 @@ class RedBrowser extends DAV\Browser\Plugin {
if (get_class($node)==='Sabre\\DAV\\SimpleCollection')
return;
$output.= '<tr><td colspan="2"><form method="post" action="">
<h3>Create new folder</h3>
<input type="hidden" name="sabreAction" value="mkcol" />
Name: <input type="text" name="name" />
<input type="submit" value="create" />
</form>
<form method="post" action="" enctype="multipart/form-data">
<h3>Upload file</h3>
<input type="hidden" name="sabreAction" value="put" />
Name (optional): <input type="text" name="name" /><br />
File: <input type="file" name="file" /><br />
<input type="submit" value="upload" />
</form>
</td></tr>';
$output.= '<table>
<tr>
<td><strong>Create new folder</strong>&nbsp;&nbsp;&nbsp;</td>
<td><form method="post" action="">
<input type="text" name="name" />
<input type="submit" value="create" />
<input type="hidden" name="sabreAction" value="mkcol" />
</form></td>
</tr><tr>
<td><strong>Upload file</strong>&nbsp;&nbsp;&nbsp;</td>
<td><form method="post" action="" enctype="multipart/form-data">
<input type="file" name="file" style="display: inline;"/>
<input type="submit" value="upload" />
<input type="hidden" name="sabreAction" value="put" />
<!-- Name (optional): <input type="text" name="name" /> we should rather provide a rename action in edit form-->
</form></td>
</tr>
</table>';
}

View File

@ -26,12 +26,12 @@ function filestorage_post(&$a) {
attach_change_permissions($channel_id,$resource,$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny,$recurse = false);
//Build directory tree and redirect
$channel = $a->get_channel();
$cloudPath = get_parent_cloudpath($channel_id, $channel['channel_address'], $resource) ;
goaway($cloudPath);
}
function filestorage_content(&$a) {
if(argc() > 1)
@ -83,12 +83,12 @@ function filestorage_content(&$a) {
);
if(! $r) {
notice( t('File not found.') . EOL);
goaway(z_root() . '/filestorage/' . $which);
goaway(z_root() . '/cloud/' . $which);
}
attach_delete($owner,$r[0]['hash']);
goaway(z_root() . '/filestorage/' . $which);
goaway(z_root() . '/cloud/' . $which);
}
@ -110,6 +110,7 @@ function filestorage_content(&$a) {
$channel = $a->get_channel();
$cloudpath = get_cloudpath($f) . (($f['flags'] & ATTACH_FLAG_DIR) ? '?f=&davguest=1' : '');
$parentpath = get_parent_cloudpath($channel['channel_id'], $channel['channel_address'], $f['hash']);
$aclselect_e = populate_acl($f,false);
$is_a_dir = (($f['flags'] & ATTACH_FLAG_DIR) ? true : false);
@ -121,6 +122,7 @@ function filestorage_content(&$a) {
'$header' => t('Edit file permissions'),
'$file' => $f,
'$cloudpath' => z_root() . '/' . $cloudpath,
'$parentpath' => $parentpath,
'$uid' => $channel['channel_id'],
'$channelnick' => $channel['channel_address'],
'$permissions' => t('Permissions'),
@ -139,45 +141,6 @@ function filestorage_content(&$a) {
return $o;
}
$r = q("select * from attach where uid = %d order by edited desc",
intval($owner)
);
$files = null;
if($r) {
$files = array();
foreach($r as $rr) {
$files[$rr['id']][] = array(
'id' => $rr['id'],
'download' => $rr['hash'],
'title' => $rr['filename'],
'size' => $rr['filesize'],
'rev' => $rr['revision'],
'dir' => (($rr['flags'] & ATTACH_FLAG_DIR) ? true : false)
);
}
}
$limit = service_class_fetch ($owner,'attach_upload_limit');
$r = q("select sum(filesize) as total from attach where aid = %d ",
intval($channel['channel_account_id'])
);
$used = $r[0]['total'];
$url = z_root() . "/filestorage/" . $which;
return $o . replace_macros(get_markup_template("filestorage.tpl"), array(
'$baseurl' => $url,
'$download' => t('Download'),
'$files' => $files,
'$channel' => $which,
'$edit' => t('Edit'),
'$delete' => t('Delete'),
'$used' => $used,
'$usedlabel' => t('Used: '),
'$directory' => t('[directory]'),
'$limit' => $limit,
'$limitlabel' => t('Limit: '),
));
goaway(z_root() . '/cloud/' . $which);
}

View File

@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: Red Matrix\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-20 00:03-0700\n"
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
"PO-Revision-Date: 2014-06-23 08:47+0000\n"
"Last-Translator: tuscanhobbit <pynolo@tarine.net>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/red-matrix/language/it/)\n"
"MIME-Version: 1.0\n"
@ -1293,7 +1293,7 @@ msgstr "Scrivi un nome o un interesse"
#: ../../include/contact_widgets.php:24
msgid "Connect/Follow"
msgstr "Entra in contatto"
msgstr "Aggiungi"
#: ../../include/contact_widgets.php:25
msgid "Examples: Robert Morgenstein, Fishing"
@ -2003,7 +2003,7 @@ msgstr "Il profilo richiesto non è disponibile."
#: ../../mod/directory.php:183 ../../mod/dirprofile.php:164
#: ../../mod/suggest.php:51 ../../mod/match.php:62
msgid "Connect"
msgstr "Entra in contatto"
msgstr "Aggiungi"
#: ../../include/identity.php:689 ../../mod/profiles.php:612
msgid "Change profile photo"

View File

@ -27,7 +27,7 @@ $a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "A %1\$s non piace %3\$s di %2
$a->strings["%1\$s is now connected with %2\$s"] = "%1\$s adesso è connesso con %2\$s";
$a->strings["%1\$s poked %2\$s"] = "%1\$s ha mandato un poke a %2\$s";
$a->strings["poked"] = "ha ricevuto un poke";
$a->strings["%1\$s is %2\$s"] = "%1\$s è %2\$s";
$a->strings["__ctx:mood__ %1\$s is %2\$s"] = "%1\$s è %2\$s";
$a->strings["Select"] = "Seleziona";
$a->strings["Delete"] = "Elimina";
$a->strings["Private Message"] = "Messaggio privato";
@ -293,7 +293,7 @@ $a->strings["%d invitation available"] = array(
$a->strings["Advanced"] = "Avanzate";
$a->strings["Find Channels"] = "Ricerca canali";
$a->strings["Enter name or interest"] = "Scrivi un nome o un interesse";
$a->strings["Connect/Follow"] = "Entra in contatto";
$a->strings["Connect/Follow"] = "Aggiungi";
$a->strings["Examples: Robert Morgenstein, Fishing"] = "Per esempio: Mario Rossi, Pesca";
$a->strings["Find"] = "Cerca";
$a->strings["Channel Suggestions"] = "Canali suggeriti";
@ -458,7 +458,7 @@ $a->strings["Default Profile"] = "Profilo predefinito";
$a->strings["Friends"] = "Amici";
$a->strings["Requested channel is not available."] = "Il canale che cerchi non è disponibile.";
$a->strings["Requested profile is not available."] = "Il profilo richiesto non è disponibile.";
$a->strings["Connect"] = "Entra in contatto";
$a->strings["Connect"] = "Aggiungi";
$a->strings["Change profile photo"] = "Cambia la foto del profilo";
$a->strings["Profiles"] = "Profili";
$a->strings["Manage/edit profiles"] = "Gestisci/modifica i profili";
@ -639,11 +639,11 @@ $a->strings["Bookmarked Chatrooms"] = "Chat nei segnalibri";
$a->strings["Suggested Chatrooms"] = "Chat suggerite";
$a->strings["Save to Folder"] = "Salva nella cartella";
$a->strings["View all"] = "Vedi tutto";
$a->strings["Like"] = array(
$a->strings["__ctx:noun__ Like"] = array(
0 => "Mi piace",
1 => "Mi piace",
);
$a->strings["Dislike"] = array(
$a->strings["__ctx:noun__ Dislike"] = array(
0 => "Non mi piace",
1 => "Non mi piace",
);
@ -663,8 +663,8 @@ $a->strings["Wall-to-Wall"] = "Da bacheca a bacheca";
$a->strings["via Wall-To-Wall:"] = "da bacheca a bacheca:";
$a->strings["Save Bookmarks"] = "Salva segnalibro";
$a->strings["Add to Calendar"] = "Aggiungi al calendario";
$a->strings["Likes"] = "Mi piace";
$a->strings["Dislikes"] = "Non mi piace";
$a->strings["__ctx:noun__ Likes"] = "Mi piace";
$a->strings["__ctx:noun__ Dislikes"] = "Non mi piace";
$a->strings["%d comment"] = array(
0 => "%d commento",
1 => "%d commenti",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
<div id="attach-edit-backlink">< <a href="filestorage/{{$channelnick}}">{{$backlink}}</a></div>
<div id="attach-edit-backlink">< <a href="{{$parentpath}}">{{$backlink}}</a></div>
<h1>{{$header}}</h1>