From dd5023e494d2b5d80494026cb82d490e2dfbd27b Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 15 Aug 2015 12:49:56 -0400 Subject: Updating logo icon in Readme file and change markup heading for universality. --- README.md | 6 +++--- images/hubzilla_house_arrows.png | Bin 0 -> 22076 bytes 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 images/hubzilla_house_arrows.png diff --git a/README.md b/README.md index ac62f721a..44357eb3c 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ Hubzilla ======== -###Websites. Redefined. +Websites. Redefined. +-------------------- - -![Hubzilla](images/ghash-32.png) +![Hubzilla](images/hubzilla_house_arrows.png) **What are Hubs?** diff --git a/images/hubzilla_house_arrows.png b/images/hubzilla_house_arrows.png new file mode 100644 index 000000000..56402a96b Binary files /dev/null and b/images/hubzilla_house_arrows.png differ -- cgit v1.2.3 From fc804751a2967db0d46385bb89248228b2b5d8bf Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Fri, 4 Sep 2015 12:39:47 +0200 Subject: Fix for PHP Fatal error: Function name must be a string in /var/www/hubzilla/include/items.php on line 3325 Please review if this is correct? --- include/items.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 9807831e3..91afad0e6 100755 --- a/include/items.php +++ b/include/items.php @@ -3322,7 +3322,7 @@ function start_delivery_chain($channel, $item, $item_id, $parent) { dbesc($title), dbesc($body), intval($item_wall), - $intval($item_origin), + intval($item_origin), intval($item_id) ); -- cgit v1.2.3 From 3f6d6745def41da7ab2abc04eb0554f2a27a085d Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 5 Sep 2015 15:33:09 -0700 Subject: syntax --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index d06a8e69c..f48603d71 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -85,7 +85,7 @@ function photos_post(&$a) { $owner_record = $s[0]; - $acl = AccessList($a->data['channel']); + $acl = new AccessList($a->data['channel']); if((argc() > 3) && (argv(2) === 'album')) { -- cgit v1.2.3 From 55ab968edf93c4c903e2a88e0eed94741cc80fb6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 5 Sep 2015 17:35:00 -0700 Subject: make js_upload work with hubzilla. It still needs a rewrite. --- include/attach.php | 44 ++++++++++++++++++++++++++++++++++---------- include/photos.php | 4 ++-- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/include/attach.php b/include/attach.php index 620c7620c..513486bfc 100644 --- a/include/attach.php +++ b/include/attach.php @@ -405,6 +405,9 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { require_once('include/photos.php'); + + call_hooks('photo_upload_begin',$arr); + $ret = array('success' => false); $channel_id = $channel['channel_id']; $sql_options = ''; @@ -451,15 +454,28 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { $hash = $arr['resource_id']; } elseif($options !== 'update') { - if(! x($_FILES,'userfile')) { - $ret['message'] = t('No source file.'); - return $ret; - } + $f = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''); - $src = $_FILES['userfile']['tmp_name']; - $filename = basename($_FILES['userfile']['name']); - $filesize = intval($_FILES['userfile']['size']); + 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']); + } } $existing_size = 0; @@ -615,6 +631,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { if(($maxfilesize) && ($filesize > $maxfilesize)) { $ret['message'] = sprintf( t('File exceeds size limit of %d'), $maxfilesize); @unlink($src); + call_hooks('photo_upload_end',$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))) { $ret['message'] = upgrade_message(true) . sprintf(t("You have reached your limit of %1$.0f Mbytes attachment storage."), $limit / 1024000); @unlink($src); + call_hooks('photo_upload_end',$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'] . '/' ; @@ -658,7 +676,6 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { else $edited = $created; - 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", dbesc($filename), @@ -714,6 +731,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { ); } 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 ) VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", intval($channel['channel_account_id']), @@ -738,6 +756,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { } 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); if($arr['contact_allow']) $args['contact_allow'] = $arr['contact_allow']; @@ -772,6 +791,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { if(! $r) { $ret['message'] = t('File upload failed. Possible system limit or action terminated.'); + call_hooks('photo_upload_end',$ret); return $ret; } @@ -784,13 +804,17 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { if(! $r) { $ret['message'] = t('Stored file could not be verified. Upload failed.'); + call_hooks('photo_upload_end',$ret); return $ret; } $ret['success'] = true; $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; } diff --git a/include/photos.php b/include/photos.php index b4129fbf1..25818124a 100644 --- a/include/photos.php +++ b/include/photos.php @@ -27,7 +27,7 @@ function photo_upload($channel, $observer, $args) { return $ret; } - call_hooks('photo_upload_begin', $args); +// call_hooks('photo_upload_begin', $args); /* * Determine the album to use @@ -84,7 +84,7 @@ function photo_upload($channel, $observer, $args) { } else { $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')) { $src = $f['src']; -- cgit v1.2.3 From ebb07def7e8f64776aad64be9a04a0ca8da363b6 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 6 Sep 2015 23:26:28 +0200 Subject: Update dav_nautilus.bb --- doc/dav_nautilus.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/dav_nautilus.bb b/doc/dav_nautilus.bb index 51663b6de..c8911cda8 100644 --- a/doc/dav_nautilus.bb +++ b/doc/dav_nautilus.bb @@ -2,8 +2,8 @@ 1. Open a File browsing window (that's Nautilus) 2. Select File > Connect to server from the menu -3. Type davs://<domain_name>/cloud/<your_username> and click Connect -4. You will be prompted for your username (same as above) and password +3. Type davs://<domain_name>/dav/<your_channelname> and click Connect +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 #include doc/macros/cloud_footer.bb; -- cgit v1.2.3 From 20f211b70af874e04a004a6e6a8c127c02062e13 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 6 Sep 2015 23:27:55 +0200 Subject: Update dav_dolphin.bb --- doc/dav_dolphin.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/dav_dolphin.bb b/doc/dav_dolphin.bb index a1ebba394..ae60a6d52 100644 --- a/doc/dav_dolphin.bb +++ b/doc/dav_dolphin.bb @@ -1,8 +1,8 @@ [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. -- cgit v1.2.3 From 67ed7e40be69e82fdff674aee71cfa5dc789f4d3 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 6 Sep 2015 23:30:25 +0200 Subject: Update dav_mount.bb --- doc/dav_mount.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/dav_mount.bb b/doc/dav_mount.bb index d8cb2e08e..663251a9d 100644 --- a/doc/dav_mount.bb +++ b/doc/dav_mount.bb @@ -25,7 +25,7 @@ Edit /etc/fstab to include your cloud directory by adding [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] 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. -- cgit v1.2.3 From 38ea8d1d86a1a10473f6999133e92be78a1fa179 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 6 Sep 2015 23:32:14 +0200 Subject: Update dav_mount.bb --- doc/dav_mount.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/dav_mount.bb b/doc/dav_mount.bb index 663251a9d..0fd3d4691 100644 --- a/doc/dav_mount.bb +++ b/doc/dav_mount.bb @@ -32,7 +32,7 @@ Where [baseurl] is the URL of your hub, /mount/point is the location you want to 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. @@ -49,7 +49,7 @@ Create a file called 'secrets' and add your cloud login credentials [code] -[baseurl]/cloud <username> <password> +[baseurl]/dav <username> <password> [/code] 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. -[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. -- cgit v1.2.3 From 302fe94705c95183ce309fa27a1354d4b7037b55 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 6 Sep 2015 23:35:35 +0200 Subject: Update dav_nemo.bb --- doc/dav_nemo.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/dav_nemo.bb b/doc/dav_nemo.bb index 2c88b0782..f2d994fbb 100644 --- a/doc/dav_nemo.bb +++ b/doc/dav_nemo.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. 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 Menu > file > connect to server Fill the dialog -- Server: friendicared.net +- Server: hubzilla_domain_name - Type: Secure WebDAV (https) -- Folder: /cloud -- Username: yourusername -- Passwort: yourpasswort +- Folder: /dav +- Username: yourchannelname +- Password: yourpassword Once open you can set a bookmark. -- cgit v1.2.3 From 6ea1cf71b513701777cb0992a4a37bd9819ade3a Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 6 Sep 2015 23:36:26 +0200 Subject: Update dav_windows.bb --- doc/dav_windows.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/dav_windows.bb b/doc/dav_windows.bb index 0eaffd4d0..96862e2b5 100644 --- a/doc/dav_windows.bb +++ b/doc/dav_windows.bb @@ -4,8 +4,8 @@ RedDav using Windows 7 graphical user interface wizard: 1. Left-click the Start-button to open the start menu. 2. Right-click the My computer icon to access its menu. 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. -5. Type your Red account's user name. IMPORTANT - NO at-sign or domain name. -6. Type your Red password +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 Hubzilla account's user name. IMPORTANT - NO at-sign or domain name. +6. Type your Hubzilla password #include doc/macros/cloud_footer.bb; -- cgit v1.2.3 From 1d09e4b6201a75e830c303746291ba75d94f937d Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 6 Sep 2015 16:42:50 -0700 Subject: use conversation defaults for /public page instead of collapsed list mode, but allow over-ride --- mod/public.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mod/public.php b/mod/public.php index 2106be7a6..45edda6c0 100644 --- a/mod/public.php +++ b/mod/public.php @@ -22,7 +22,7 @@ function public_content(&$a, $update = 0, $load = false) { $maxheight = get_config('system','home_divmore_height'); if(! $maxheight) - $maxheight = 75; + $maxheight = 400; $o .= '
' . "\r\n"; $o .= "