remove more hardwired branding

This commit is contained in:
zotlabs 2017-03-12 20:54:48 -07:00
parent 4bb90dffc1
commit 1ee76cb506
3 changed files with 67 additions and 65 deletions

View File

@ -6,7 +6,7 @@ to a personal channel in a natural way.</p>
<h3 id="Create_a_new_channel">Create a new channel</h3> <h3 id="Create_a_new_channel">Create a new channel</h3>
<p>When you log in for the first time after registering, you must create a channel. <p>When you log in for the first time after registering, you must create a channel.
(Alternatively you can load https://grid.reticu.li/new_channel)</p> (Alternatively you can visit https://your_website/new_channel)</p>
<p><img class="img-responsive" src="/help/tutorials/assets/c9a880cc82ffa1f7c2f460397bb083bf7dc2a2b8f065e64da598b45b4a2b.png" alt="image"></p> <p><img class="img-responsive" src="/help/tutorials/assets/c9a880cc82ffa1f7c2f460397bb083bf7dc2a2b8f065e64da598b45b4a2b.png" alt="image"></p>
@ -76,7 +76,7 @@ so you can specify exactly who can access this post.</p>
<h3 id="Use_an_uploaded_image_as_a_channel_cover_photo">Use an uploaded image as a channel cover photo</h3> <h3 id="Use_an_uploaded_image_as_a_channel_cover_photo">Use an uploaded image as a channel cover photo</h3>
<p>One way to add some pizzazz your channel is to add a cover photo that visitors will <p>One way to add some pizzazz your channel is to add a cover photo that visitors will
see when they load your channel page. Hubzilla's integrated cloud file system see when they load your channel page. The integrated cloud file system
allows you to choose an existing photo for this purpose.</p> allows you to choose an existing photo for this purpose.</p>
<p>Visit your photos in the <strong>Photos</strong> app</p> <p>Visit your photos in the <strong>Photos</strong> app</p>
@ -99,9 +99,9 @@ channel page will fade in as you scroll down.</p>
<h3 id="Make_a_connection">Make a connection</h3> <h3 id="Make_a_connection">Make a connection</h3>
<p>Making connections between channels to share things is what Hubzilla is all about. <p>Making connections between channels to share things is what social communications are all about.
Making a connection is simple. If you do not already know how to reach a channel's home Making a connection is simple. If you do not already know how to reach a channel's home
page, you might try a directory search by opening the <strong>Directory</strong> link on the right page, you might try a directory search by opening the <strong>Directory</strong> link from the menu on the right
side of the top navbar.</p> side of the top navbar.</p>
<p><img class="img-responsive" src="/help/tutorials/assets/ef78bc6aa3fafebd46f353514c907b3fdfe019918fc5553bb3f31388a36f.png" alt="image"></p> <p><img class="img-responsive" src="/help/tutorials/assets/ef78bc6aa3fafebd46f353514c907b3fdfe019918fc5553bb3f31388a36f.png" alt="image"></p>
@ -160,4 +160,4 @@ editor by pressing the edit button beside the <strong>Delete</strong> button.</p
<p><img class="img-responsive" src="/help/tutorials/assets/c4cad3e4c356dd2a227df79bd4dc6d47edf1b66ea243f005b6b452ec366b.png" alt="image"></p> <p><img class="img-responsive" src="/help/tutorials/assets/c4cad3e4c356dd2a227df79bd4dc6d47edf1b66ea243f005b6b452ec366b.png" alt="image"></p>

View File

@ -1611,33 +1611,33 @@ function get_site_info() {
$data = Array( $data = [
'version' => $version, 'url' => z_root(),
'version_tag' => $tag, 'platform' => Zotlabs\Lib\System::get_platform_name(),
'server_role' => Zotlabs\Lib\System::get_server_role(), 'site_name' => (($site_name) ? $site_name : ''),
'commit' => $commit, 'version' => $version,
'url' => z_root(), 'version_tag' => $tag,
'plugins' => $visible_plugins, 'server_role' => Zotlabs\Lib\System::get_server_role(),
'register_policy' => $register_policy[get_config('system','register_policy')], 'commit' => $commit,
'invitation_only' => intval(get_config('system','invitation_only')), 'plugins' => $visible_plugins,
'directory_mode' => $directory_mode[get_config('system','directory_mode')], 'register_policy' => $register_policy[get_config('system','register_policy')],
'language' => get_config('system','language'), 'invitation_only' => intval(get_config('system','invitation_only')),
'rss_connections' => intval(get_config('system','feed_contacts')), 'directory_mode' => $directory_mode[get_config('system','directory_mode')],
'expiration' => $site_expire, 'language' => get_config('system','language'),
'rss_connections' => intval(get_config('system','feed_contacts')),
'expiration' => $site_expire,
'default_service_restrictions' => $service_class, 'default_service_restrictions' => $service_class,
'locked_features' => $locked_features, 'locked_features' => $locked_features,
'admin' => $admin, 'admin' => $admin,
'site_name' => (($site_name) ? $site_name : ''), 'dbdriver' => DBA::$dba->getdriver(),
'platform' => Zotlabs\Lib\System::get_platform_name(), 'lastpoll' => get_config('system','lastpoll'),
'dbdriver' => DBA::$dba->getdriver(), 'info' => (($site_info) ? $site_info : ''),
'lastpoll' => get_config('system','lastpoll'), 'channels_total' => $channels_total_stat,
'info' => (($site_info) ? $site_info : ''), 'channels_active_halfyear' => $channels_active_halfyear_stat,
'channels_total' => $channels_total_stat, 'channels_active_monthly' => $channels_active_monthly_stat,
'channels_active_halfyear' => $channels_active_halfyear_stat, 'local_posts' => $local_posts_stat,
'channels_active_monthly' => $channels_active_monthly_stat, 'hide_in_statistics' => $hide_in_statistics
'local_posts' => $local_posts_stat, ];
'hide_in_statistics' => $hide_in_statistics
);
return $data; return $data;
} }

View File

@ -17,6 +17,7 @@ require_once('include/text.php');
* @param array $args * @param array $args
* @return array * @return array
*/ */
function photo_upload($channel, $observer, $args) { function photo_upload($channel, $observer, $args) {
$ret = array('success' => false); $ret = array('success' => false);
@ -28,9 +29,6 @@ function photo_upload($channel, $observer, $args) {
return $ret; return $ret;
} }
//call_hooks('photo_upload_begin', $args);
/* /*
* Determine the album to use * Determine the album to use
*/ */
@ -90,8 +88,6 @@ 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);
if (x($f,'src') && x($f,'filesize')) { if (x($f,'src') && x($f,'filesize')) {
$src = $f['src']; $src = $f['src'];
$filename = $f['filename']; $filename = $f['filename'];
@ -374,38 +370,38 @@ function photo_upload($channel, $observer, $args) {
else { else {
$mid = item_message_id(); $mid = item_message_id();
$arr = array(); $arr = [
'aid' => $account_id,
'uid' => $channel_id,
'mid' => $mid,
'parent_mid' => $mid,
'item_hidden' => $item_hidden,
'resource_type' => 'photo',
'resource_id' => $photo_hash,
'owner_xchan' => $channel['channel_hash'],
'author_xchan' => $observer['xchan_hash'],
'title' => $title,
'allow_cid' => $ac['allow_cid'],
'allow_gid' => $ac['allow_gid'],
'deny_cid' => $ac['deny_cid'],
'deny_gid' => $ac['deny_gid'],
'verb' => ACTIVITY_POST,
'obj_type' => ACTIVITY_OBJ_PHOTO,
'obj' => json_encode($object),
'tgt_type' => ACTIVITY_OBJ_ALBUM,
'target' => json_encode($target),
'item_wall' => $visible,
'item_origin' => 1,
'item_thread_top' => 1,
'item_private' => intval($acl->is_private()),
'body' => $summary
];
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . urlencode($arr['mid']);
if($lat && $lon) if($lat && $lon)
$arr['coord'] = $lat . ' ' . $lon; $arr['coord'] = $lat . ' ' . $lon;
$arr['aid'] = $account_id;
$arr['uid'] = $channel_id;
$arr['mid'] = $mid;
$arr['parent_mid'] = $mid;
$arr['item_hidden'] = $item_hidden;
$arr['resource_type'] = 'photo';
$arr['resource_id'] = $photo_hash;
$arr['owner_xchan'] = $channel['channel_hash'];
$arr['author_xchan'] = $observer['xchan_hash'];
$arr['title'] = $title;
$arr['allow_cid'] = $ac['allow_cid'];
$arr['allow_gid'] = $ac['allow_gid'];
$arr['deny_cid'] = $ac['deny_cid'];
$arr['deny_gid'] = $ac['deny_gid'];
$arr['verb'] = ACTIVITY_POST;
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
$arr['obj'] = json_encode($object);
$arr['tgt_type'] = ACTIVITY_OBJ_ALBUM;
$arr['target'] = json_encode($target);
$arr['item_wall'] = 1;
$arr['item_origin'] = 1;
$arr['item_thread_top'] = 1;
$arr['item_private'] = intval($acl->is_private());
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . urlencode($arr['mid']);
$arr['body'] = $summary;
// this one is tricky because the item and the photo have the same permissions, those of the photo. // this one is tricky because the item and the photo have the same permissions, those of the photo.
// Use the channel read_stream permissions to get the correct public_policy for the item and recalculate the // Use the channel read_stream permissions to get the correct public_policy for the item and recalculate the
// private flag accordingly. This may cause subtle bugs due to custom permissions roles. We want to use // private flag accordingly. This may cause subtle bugs due to custom permissions roles. We want to use
@ -451,6 +447,7 @@ function photo_upload($channel, $observer, $args) {
* * \e boolean \b success * * \e boolean \b success
* * \e array \b albums * * \e array \b albums
*/ */
function photos_albums_list($channel, $observer, $sort_key = 'album', $direction = 'asc') { function photos_albums_list($channel, $observer, $sort_key = 'album', $direction = 'asc') {
$channel_id = $channel['channel_id']; $channel_id = $channel['channel_id'];
@ -531,6 +528,7 @@ function photos_album_widget($channelx,$observer,$sortkey = 'album',$direction =
* @param string $album default empty * @param string $album default empty
* @return boolean|array * @return boolean|array
*/ */
function photos_list_photos($channel, $observer, $album = '') { function photos_list_photos($channel, $observer, $album = '') {
$channel_id = $channel['channel_id']; $channel_id = $channel['channel_id'];
@ -570,6 +568,7 @@ function photos_list_photos($channel, $observer, $album = '') {
* @param string $album name of the album * @param string $album name of the album
* @return boolean * @return boolean
*/ */
function photos_album_exists($channel_id, $album) { function photos_album_exists($channel_id, $album) {
$r = q("SELECT id FROM photo WHERE album = '%s' AND uid = %d limit 1", $r = q("SELECT id FROM photo WHERE album = '%s' AND uid = %d limit 1",
dbesc($album), dbesc($album),
@ -589,6 +588,7 @@ function photos_album_exists($channel_id, $album) {
* @param string $newname The new name of the album * @param string $newname The new name of the album
* @return bool|array * @return bool|array
*/ */
function photos_album_rename($channel_id, $oldname, $newname) { function photos_album_rename($channel_id, $oldname, $newname) {
return q("UPDATE photo SET album = '%s' WHERE album = '%s' AND uid = %d", return q("UPDATE photo SET album = '%s' WHERE album = '%s' AND uid = %d",
dbesc($newname), dbesc($newname),
@ -607,6 +607,7 @@ function photos_album_rename($channel_id, $oldname, $newname) {
* @param string $remote_xchan * @param string $remote_xchan
* @return string|boolean * @return string|boolean
*/ */
function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') { function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') {
if ($remote_xchan) { if ($remote_xchan) {
@ -642,6 +643,7 @@ function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') {
* @param boolean $visible default false * @param boolean $visible default false
* @return int item_id * @return int item_id
*/ */
function photos_create_item($channel, $creator_hash, $photo, $visible = false) { function photos_create_item($channel, $creator_hash, $photo, $visible = false) {
// Create item container // Create item container
@ -697,7 +699,7 @@ function getGps($exifCoord, $hemi) {
function getGpstimestamp($exifCoord) { function getGpstimestamp($exifCoord) {
$hours = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0; $hours = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0;
$minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0; $minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0;
$seconds = count($exifCoord) > 2 ? gps2Num($exifCoord[2]) : 0; $seconds = count($exifCoord) > 2 ? gps2Num($exifCoord[2]) : 0;