Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
24b90b475b
@ -2,10 +2,10 @@
|
|||||||
Hubzilla
|
Hubzilla
|
||||||
========
|
========
|
||||||
|
|
||||||
###Websites. Redefined.
|
Websites. Redefined.
|
||||||
|
--------------------
|
||||||
|
|
||||||
|

|
||||||

|
|
||||||
|
|
||||||
**What are Hubs?**
|
**What are Hubs?**
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[b]Using The Cloud - Dolphin[/b]
|
[b]Using The Cloud - Dolphin[/b]
|
||||||
|
|
||||||
Visit webdavs://example.com/cloud where "example.com" is the URL of your hub.
|
Visit webdavs://example.com/dav where "example.com" is the URL of your hub.
|
||||||
|
|
||||||
When prompted for a username and password, enter your username (the first part of your webbie - no @ or domain name) and password for your normal account.
|
When prompted for a username and password, enter your channel name (the first part of your webbie - no @ or domain name) and password for your normal account.
|
||||||
|
|
||||||
Note, if you are already logged in to the web interface via Konqueror, you will not be prompted for further authentication.
|
Note, if you are already logged in to the web interface via Konqueror, you will not be prompted for further authentication.
|
||||||
|
|
||||||
|
@ -25,14 +25,14 @@ Edit /etc/fstab
|
|||||||
to include your cloud directory by adding
|
to include your cloud directory by adding
|
||||||
|
|
||||||
[code]
|
[code]
|
||||||
[baseurl]/cloud/ /mount/point davfs user,noauto,uid=<DesktopUser>,file_mode=600,dir_mode=700 0 1
|
[baseurl]/dav/ /mount/point davfs user,noauto,uid=<DesktopUser>,file_mode=600,dir_mode=700 0 1
|
||||||
[/code]
|
[/code]
|
||||||
|
|
||||||
Where [baseurl] is the URL of your hub, /mount/point is the location you want to mount the cloud, and <DesktopUser> is the user you log in to one your computer. Note that if you are mounting as a normal user (not root) the mount point must be in your home directory.
|
Where [baseurl] is the URL of your hub, /mount/point is the location you want to mount the cloud, and <DesktopUser> is the user you log in to one your computer. Note that if you are mounting as a normal user (not root) the mount point must be in your home directory.
|
||||||
|
|
||||||
For example, if I wanted to mount my cloud to a directory called 'cloud' in my home directory, and my username was bob, my fstab would be
|
For example, if I wanted to mount my cloud to a directory called 'cloud' in my home directory, and my username was bob, my fstab would be
|
||||||
|
|
||||||
[code][baseurl]/cloud/ /home/bob/cloud davfs user,noauto,uid=bob,file_mode=600,dir_mode=700 0 1[/code]
|
[code][baseurl]/dav/ /home/bob/cloud davfs user,noauto,uid=bob,file_mode=600,dir_mode=700 0 1[/code]
|
||||||
|
|
||||||
Now, create the mount point.
|
Now, create the mount point.
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ Create a file called 'secrets'
|
|||||||
and add your cloud login credentials
|
and add your cloud login credentials
|
||||||
|
|
||||||
[code]
|
[code]
|
||||||
[baseurl]/cloud <username> <password>
|
[baseurl]/dav <username> <password>
|
||||||
[/code]
|
[/code]
|
||||||
|
|
||||||
Where <username> and <password> are the username and password [i]for your hub[/i].
|
Where <username> and <password> are the username and password [i]for your hub[/i].
|
||||||
@ -60,7 +60,7 @@ Don't let this file be writeable by anyone who doesn't need it with
|
|||||||
|
|
||||||
Finally, mount the drive.
|
Finally, mount the drive.
|
||||||
|
|
||||||
[code]mount [baseurl]/cloud[/code]
|
[code]mount [baseurl]/dav[/code]
|
||||||
|
|
||||||
You can now find your cloud at /home/bob/cloud and use it as though it were part of your local filesystem - even if the applications you are using have no dav support themselves.
|
You can now find your cloud at /home/bob/cloud and use it as though it were part of your local filesystem - even if the applications you are using have no dav support themselves.
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
1. Open a File browsing window (that's Nautilus)
|
1. Open a File browsing window (that's Nautilus)
|
||||||
2. Select File > Connect to server from the menu
|
2. Select File > Connect to server from the menu
|
||||||
3. Type davs://<domain_name>/cloud/<your_username> and click Connect
|
3. Type davs://<domain_name>/dav/<your_channelname> and click Connect
|
||||||
4. You will be prompted for your username (same as above) and password
|
4. You will be prompted for your channel name (same as above) and password
|
||||||
5. Your personal DAV directory will be shown in the window
|
5. Your personal DAV directory will be shown in the window
|
||||||
|
|
||||||
#include doc/macros/cloud_footer.bb;
|
#include doc/macros/cloud_footer.bb;
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
For (file browser) Nemo 1.8.2 under Linux Mint 15, Cinnamon 1.8.8. Nemo ist the standard file browser there.
|
For (file browser) Nemo 1.8.2 under Linux Mint 15, Cinnamon 1.8.8. Nemo ist the standard file browser there.
|
||||||
|
|
||||||
1st way
|
1st way
|
||||||
type "davs://yourusername@friendicared.net/cloud" in the address bar
|
type "davs://<domain_name>/dav/<your_channelname>" in the address bar.
|
||||||
|
|
||||||
2nd way
|
2nd way
|
||||||
Menu > file > connect to server
|
Menu > file > connect to server
|
||||||
Fill the dialog
|
Fill the dialog
|
||||||
- Server: friendicared.net
|
- Server: hubzilla_domain_name
|
||||||
- Type: Secure WebDAV (https)
|
- Type: Secure WebDAV (https)
|
||||||
- Folder: /cloud
|
- Folder: /dav
|
||||||
- Username: yourusername
|
- Username: yourchannelname
|
||||||
- Passwort: yourpasswort
|
- Password: yourpassword
|
||||||
|
|
||||||
Once open you can set a bookmark.
|
Once open you can set a bookmark.
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ RedDav using Windows 7 graphical user interface wizard:
|
|||||||
1. Left-click the Start-button to open the start menu.
|
1. Left-click the Start-button to open the start menu.
|
||||||
2. Right-click the My computer icon to access its menu.
|
2. Right-click the My computer icon to access its menu.
|
||||||
3. Left-click Map network drive... to open the connection dialog wizard.
|
3. Left-click Map network drive... to open the connection dialog wizard.
|
||||||
4. Type #^[url=https://example.net/cloud/your_user_name]https://example.net/cloud/your_user_name[/url] in the textbox and click the Complete button where "example.net" is the URL of your hub.
|
4. Type #^[url=https://example.net/dav/your_channel_name]https://example.net/dav/your_channel_name[/url] in the textbox and click the Complete button where "example.net" is the URL of your hub.
|
||||||
5. Type your Red account's user name. IMPORTANT - NO at-sign or domain name.
|
5. Type your Hubzilla account's user name. IMPORTANT - NO at-sign or domain name.
|
||||||
6. Type your Red password
|
6. Type your Hubzilla password
|
||||||
|
|
||||||
#include doc/macros/cloud_footer.bb;
|
#include doc/macros/cloud_footer.bb;
|
||||||
|
BIN
images/hubzilla_house_arrows.png
Normal file
BIN
images/hubzilla_house_arrows.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -405,6 +405,9 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
|
|
||||||
require_once('include/photos.php');
|
require_once('include/photos.php');
|
||||||
|
|
||||||
|
|
||||||
|
call_hooks('photo_upload_begin',$arr);
|
||||||
|
|
||||||
$ret = array('success' => false);
|
$ret = array('success' => false);
|
||||||
$channel_id = $channel['channel_id'];
|
$channel_id = $channel['channel_id'];
|
||||||
$sql_options = '';
|
$sql_options = '';
|
||||||
@ -451,15 +454,28 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
$hash = $arr['resource_id'];
|
$hash = $arr['resource_id'];
|
||||||
}
|
}
|
||||||
elseif($options !== 'update') {
|
elseif($options !== 'update') {
|
||||||
if(! x($_FILES,'userfile')) {
|
$f = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => '');
|
||||||
$ret['message'] = t('No source file.');
|
|
||||||
return $ret;
|
call_hooks('photo_upload_file',$f);
|
||||||
|
call_hooks('attach_upload_file',$f);
|
||||||
|
|
||||||
|
if (x($f,'src') && x($f,'filesize')) {
|
||||||
|
$src = $f['src'];
|
||||||
|
$filename = $f['filename'];
|
||||||
|
$filesize = $f['filesize'];
|
||||||
|
$type = $f['type'];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(! x($_FILES,'userfile')) {
|
||||||
|
$ret['message'] = t('No source file.');
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
$src = $_FILES['userfile']['tmp_name'];
|
||||||
|
$filename = basename($_FILES['userfile']['name']);
|
||||||
|
$filesize = intval($_FILES['userfile']['size']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$src = $_FILES['userfile']['tmp_name'];
|
|
||||||
$filename = basename($_FILES['userfile']['name']);
|
|
||||||
$filesize = intval($_FILES['userfile']['size']);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$existing_size = 0;
|
$existing_size = 0;
|
||||||
@ -615,6 +631,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
if(($maxfilesize) && ($filesize > $maxfilesize)) {
|
if(($maxfilesize) && ($filesize > $maxfilesize)) {
|
||||||
$ret['message'] = sprintf( t('File exceeds size limit of %d'), $maxfilesize);
|
$ret['message'] = sprintf( t('File exceeds size limit of %d'), $maxfilesize);
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
call_hooks('photo_upload_end',$ret);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -627,10 +644,11 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
if(($r) && (($r[0]['total'] + $filesize) > ($limit - $existing_size))) {
|
if(($r) && (($r[0]['total'] + $filesize) > ($limit - $existing_size))) {
|
||||||
$ret['message'] = upgrade_message(true) . sprintf(t("You have reached your limit of %1$.0f Mbytes attachment storage."), $limit / 1024000);
|
$ret['message'] = upgrade_message(true) . sprintf(t("You have reached your limit of %1$.0f Mbytes attachment storage."), $limit / 1024000);
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
call_hooks('photo_upload_end',$ret);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$mimetype = z_mime_content_type($filename);
|
$mimetype = ((isset($type) && $type) ? $type : z_mime_content_type($filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
$os_basepath = 'store/' . $channel['channel_address'] . '/' ;
|
$os_basepath = 'store/' . $channel['channel_address'] . '/' ;
|
||||||
@ -658,7 +676,6 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
else
|
else
|
||||||
$edited = $created;
|
$edited = $created;
|
||||||
|
|
||||||
|
|
||||||
if($options === 'replace') {
|
if($options === 'replace') {
|
||||||
$r = q("update attach set filename = '%s', filetype = '%s', folder = '%s', filesize = %d, os_storage = %d, is_photo = %d, data = '%s', edited = '%s' where id = %d and uid = %d",
|
$r = q("update attach set filename = '%s', filetype = '%s', folder = '%s', filesize = %d, os_storage = %d, is_photo = %d, data = '%s', edited = '%s' where id = %d and uid = %d",
|
||||||
dbesc($filename),
|
dbesc($filename),
|
||||||
@ -714,6 +731,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, filetype, folder, filesize, revision, os_storage, is_photo, data, created, edited, allow_cid, allow_gid,deny_cid, deny_gid )
|
$r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, filetype, folder, filesize, revision, os_storage, is_photo, data, created, edited, allow_cid, allow_gid,deny_cid, deny_gid )
|
||||||
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
|
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
|
||||||
intval($channel['channel_account_id']),
|
intval($channel['channel_account_id']),
|
||||||
@ -738,6 +756,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($is_photo) {
|
if($is_photo) {
|
||||||
|
|
||||||
$args = array( 'source' => $source, 'visible' => 0, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct);
|
$args = array( 'source' => $source, 'visible' => 0, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct);
|
||||||
if($arr['contact_allow'])
|
if($arr['contact_allow'])
|
||||||
$args['contact_allow'] = $arr['contact_allow'];
|
$args['contact_allow'] = $arr['contact_allow'];
|
||||||
@ -772,6 +791,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
|
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
$ret['message'] = t('File upload failed. Possible system limit or action terminated.');
|
$ret['message'] = t('File upload failed. Possible system limit or action terminated.');
|
||||||
|
call_hooks('photo_upload_end',$ret);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,13 +804,17 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
|
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
$ret['message'] = t('Stored file could not be verified. Upload failed.');
|
$ret['message'] = t('Stored file could not be verified. Upload failed.');
|
||||||
|
call_hooks('photo_upload_end',$ret);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$ret['success'] = true;
|
$ret['success'] = true;
|
||||||
$ret['data'] = $r[0];
|
$ret['data'] = $r[0];
|
||||||
|
if(! $is_photo) {
|
||||||
|
// This would've been called already with a success result in photos_upload() if it was a photo.
|
||||||
|
call_hooks('photo_upload_end',$ret);
|
||||||
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3322,7 +3322,7 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
|
|||||||
dbesc($title),
|
dbesc($title),
|
||||||
dbesc($body),
|
dbesc($body),
|
||||||
intval($item_wall),
|
intval($item_wall),
|
||||||
$intval($item_origin),
|
intval($item_origin),
|
||||||
intval($item_id)
|
intval($item_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
call_hooks('photo_upload_begin', $args);
|
// call_hooks('photo_upload_begin', $args);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine the album to use
|
* Determine the album to use
|
||||||
@ -84,7 +84,7 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
} else {
|
} else {
|
||||||
$f = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => '');
|
$f = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => '');
|
||||||
|
|
||||||
call_hooks('photo_upload_file',$f);
|
// call_hooks('photo_upload_file',$f);
|
||||||
|
|
||||||
if (x($f,'src') && x($f,'filesize')) {
|
if (x($f,'src') && x($f,'filesize')) {
|
||||||
$src = $f['src'];
|
$src = $f['src'];
|
||||||
|
@ -85,7 +85,7 @@ function photos_post(&$a) {
|
|||||||
|
|
||||||
$owner_record = $s[0];
|
$owner_record = $s[0];
|
||||||
|
|
||||||
$acl = AccessList($a->data['channel']);
|
$acl = new AccessList($a->data['channel']);
|
||||||
|
|
||||||
if((argc() > 3) && (argv(2) === 'album')) {
|
if((argc() > 3) && (argv(2) === 'album')) {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ function public_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
$maxheight = get_config('system','home_divmore_height');
|
$maxheight = get_config('system','home_divmore_height');
|
||||||
if(! $maxheight)
|
if(! $maxheight)
|
||||||
$maxheight = 75;
|
$maxheight = 400;
|
||||||
|
|
||||||
$o .= '<div id="live-public"></div>' . "\r\n";
|
$o .= '<div id="live-public"></div>' . "\r\n";
|
||||||
$o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1))
|
$o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1))
|
||||||
@ -80,10 +80,12 @@ function public_content(&$a, $update = 0, $load = false) {
|
|||||||
$a->data['firehose'] = intval($sys['channel_id']);
|
$a->data['firehose'] = intval($sys['channel_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(get_config('system','public_list_mode'))
|
||||||
|
$page_mode = 'list';
|
||||||
|
else
|
||||||
|
$page_mode = 'client';
|
||||||
|
|
||||||
|
|
||||||
$page_mode = 'list';
|
|
||||||
|
|
||||||
$simple_update = (($update) ? " and item.item_unseen = 1 " : '');
|
$simple_update = (($update) ? " and item.item_unseen = 1 " : '');
|
||||||
|
|
||||||
if($update && $_SESSION['loadtime'])
|
if($update && $_SESSION['loadtime'])
|
||||||
|
@ -94,15 +94,13 @@ function rpost_content(&$a) {
|
|||||||
|
|
||||||
$channel = $a->get_channel();
|
$channel = $a->get_channel();
|
||||||
|
|
||||||
$channel_acl = array(
|
|
||||||
'allow_cid' => $channel['channel_allow_cid'],
|
$acl = new AccessList($channel);
|
||||||
'allow_gid' => $channel['channel_allow_gid'],
|
|
||||||
'deny_cid' => $channel['channel_deny_cid'],
|
$channel_acl = $acl->get();
|
||||||
'deny_gid' => $channel['channel_deny_gid']
|
|
||||||
);
|
|
||||||
|
|
||||||
if($_REQUEST['url']) {
|
if($_REQUEST['url']) {
|
||||||
$x = z_fetch_url(z_root() . '/urlinfo?f=&url=' . urlencode($_REQUEST['url']));
|
$x = z_fetch_url(z_root() . '/linkinfo?f=&url=' . urlencode($_REQUEST['url']));
|
||||||
if($x['success'])
|
if($x['success'])
|
||||||
$_REQUEST['body'] = $_REQUEST['body'] . $x['body'];
|
$_REQUEST['body'] = $_REQUEST['body'] . $x['body'];
|
||||||
}
|
}
|
||||||
@ -112,8 +110,7 @@ function rpost_content(&$a) {
|
|||||||
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
|
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
|
||||||
'default_location' => $channel['channel_location'],
|
'default_location' => $channel['channel_location'],
|
||||||
'nickname' => $channel['channel_address'],
|
'nickname' => $channel['channel_address'],
|
||||||
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid']
|
'lockstate' => (($acl->is_private()) ? 'lock' : 'unlock'),
|
||||||
|| $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
|
|
||||||
'acl' => populate_acl($channel_acl),
|
'acl' => populate_acl($channel_acl),
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => true,
|
'visitor' => true,
|
||||||
|
1
view/js/mod_rpost.js
Normal file
1
view/js/mod_rpost.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
$(document).ready(function() { initEditor(); });
|
Reference in New Issue
Block a user