From 36f30d1ca1d08c54361508c7390a280e344ae0ee Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 22 Dec 2014 18:52:04 +0100 Subject: Rename some apps, fix webpages requires --- app/bookmarks.apd | 2 +- app/chat.apd | 2 +- app/probe.apd | 2 +- app/suggest.apd | 2 +- app/webpages.apd | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/bookmarks.apd b/app/bookmarks.apd index f126a35c5..6c3d718a8 100644 --- a/app/bookmarks.apd +++ b/app/bookmarks.apd @@ -1,4 +1,4 @@ url: $baseurl/bookmarks requires: local_user -name: Bookmarks +name: View bookmarks photo: $baseurl/app/bookmarks.png diff --git a/app/chat.apd b/app/chat.apd index 2eba8edba..249608f57 100644 --- a/app/chat.apd +++ b/app/chat.apd @@ -1,4 +1,4 @@ url: $baseurl/chat/$nick requires: local_user -name: Chat +name: My chatrooms photo: $baseurl/app/chat.png diff --git a/app/probe.apd b/app/probe.apd index c96399391..e2d2428a0 100644 --- a/app/probe.apd +++ b/app/probe.apd @@ -1,4 +1,4 @@ url: $baseurl/probe requires: local_user -name: Probe +name: Remote diagnostics photo: $baseurl/app/probe.png diff --git a/app/suggest.apd b/app/suggest.apd index ff82a73d3..f4ca79410 100644 --- a/app/suggest.apd +++ b/app/suggest.apd @@ -1,4 +1,4 @@ url: $baseurl/suggest requires: local_user -name: Suggest +name: Suggest channels photo: $baseurl/app/suggest.png diff --git a/app/webpages.apd b/app/webpages.apd index 4241dbb8e..7c7528d6b 100644 --- a/app/webpages.apd +++ b/app/webpages.apd @@ -1,4 +1,4 @@ url: $baseurl/webpages/$nick -requires: local_user +requires: local_user, webpages name: Webpages photo: $baseurl/app/webpages.png -- cgit v1.2.3 From 37534d110c0a544d76c4cd2d38d5cffa9f049ca9 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 22 Dec 2014 18:53:13 +0100 Subject: Center app names --- view/theme/redbasic/css/style.css | 1 - view/tpl/app.tpl | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 4681ef5ba..50a501ac3 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -583,7 +583,6 @@ footer { } .app-name { - width: 125px; overflow: none; } diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index 4719f7f96..bc4b3cc67 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -1,6 +1,6 @@
- -
{{$app.name}}
+
+
{{$app.name}}
{{if $app.type !== 'system'}} {{if $purchase}} -- cgit v1.2.3 From c819c276f0bed98c2215ca0e5815ec8fb0f548c5 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 22 Dec 2014 19:05:16 +0100 Subject: Remove unused apps.tpl --- view/tpl/apps.tpl | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 view/tpl/apps.tpl diff --git a/view/tpl/apps.tpl b/view/tpl/apps.tpl deleted file mode 100755 index d8e538cb7..000000000 --- a/view/tpl/apps.tpl +++ /dev/null @@ -1,11 +0,0 @@ -

{{$title}}

- -{{foreach $apps as $ap}} - -{{/foreach}} -
- -- cgit v1.2.3 From 83eb7a10e27a634dc64f093a885e9cb0d9f05eed Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 22 Dec 2014 22:57:58 +0100 Subject: Option to check that a random profile works before returning it --- doc/hidden_configs.bb | 41 +++++++++++++++++++++++------------------ include/Contact.php | 29 +++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb index 727428176..bf9705920 100644 --- a/doc/hidden_configs.bb +++ b/doc/hidden_configs.bb @@ -106,24 +106,29 @@ This document assumes you're an administrator. list of names (no spaces) [b]system > auto_follow[/b] Make the first channel of an account auto-follow channels listed here - comma separated list of webbies (member@hub addresses). - [b]system > admin_email[/b] - Specifies the administrators email for this site. This is initially set during install. - [b]system > cron_hour[/b] - Specify an hour in which to run cron_daily. By default with no config, this will run at midnight UTC. - [b]system > minimum_feedcheck_minutes[/b] - The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds will be polled with each cronjob - [b]system > blacklisted_sites[/b] - An array of specific hubs to block from this hub completely. - [b]system > ignore_imagick[/b] - Ignore imagick and use GD, even if imagick is installed on the server. Prevents some issues with PNG files in older versions of imagick. - [b]system > no_age_restriction[/b] - Do not restric registration to people over the age of 13 - [b]system > override_poll_lockfile[/b] - Ignore the lock file in the poller process to allow more than one process to run at a time. - [b]system > projecthome[/b] - Display the project page on your home page for logged out viewers. - [b]system > sellpage[/b] - A URL shown in the public sites list to sell your hub - display service classes, etc. + [b]system > admin_email[/b] + Specifies the administrators email for this site. This is initially set during install. + [b]system > cron_hour[/b] + Specify an hour in which to run cron_daily. By default with no config, this will run at midnight UTC. + [b]system > minimum_feedcheck_minutes[/b] + The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds will be polled with each cronjob + [b]system > blacklisted_sites[/b] + An array of specific hubs to block from this hub completely. + [b]system > ignore_imagick[/b] + Ignore imagick and use GD, even if imagick is installed on the server. Prevents some issues with PNG files in older versions of imagick. + [b]system > no_age_restriction[/b] + Do not restric registration to people over the age of 13 + [b]system > override_poll_lockfile[/b] + Ignore the lock file in the poller process to allow more than one process to run at a time. + [b]system > projecthome[/b] + Display the project page on your home page for logged out viewers. + [b]system > sellpage[/b] + A URL shown in the public sites list to sell your hub - display service classes, etc. + [b]randprofile > check[/b] + When requesting a random profile, check that it actually exists first + [b]randprofile > retry[/b] + Number of times to retry getting a random profile + #include doc/macros/main_footer.bb; diff --git a/include/Contact.php b/include/Contact.php index 4fd43db44..4b45a2392 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -581,12 +581,29 @@ function contact_remove($channel_id, $abook_id) { function random_profile() { $randfunc = db_getfunc('rand'); - $r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where hubloc_connected > %s - interval %s order by $randfunc limit 1", - db_utcnow(), db_quoteinterval('30 day') - ); - if($r) - return $r[0]['xchan_url']; + + $checkrandom = get_config('randprofile','check'); // False by default + $retryrandom = intval(get_config('randprofile','retry')); + if($retryrandom === false) $retryrandom = 5; + + for($i = 0; $i < $retryrandom; $i++) { + $r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where hubloc_connected > %s - interval %s order by $randfunc limit 1", + db_utcnow(), db_quoteinterval('30 day') + ); + + if(!$r) return ''; // Couldn't get a random channel + + if($checkrandom) { + if(z_fetch_url($r[0]['xchan_url'])['success']) + return $r[0]['xchan_url']; + else + logger('Random channel turned out to be bad.'); + } + else { + return $r[0]['xchan_url']; + } + + } return ''; } - -- cgit v1.2.3 From fa65d31f3fb143acc8cc273d21a43c0bbd4f0524 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 22 Dec 2014 23:06:04 +0100 Subject: Move app icon centering to style.css --- view/theme/redbasic/css/style.css | 8 ++++++++ view/tpl/app.tpl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 50a501ac3..e5a0e31d8 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -586,6 +586,14 @@ footer { overflow: none; } +.app-container img { + margin-left: auto; + margin-right: auto; + width: 80px; + height: 80px; + display: block; +} + .pager { padding: 10px; diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index bc4b3cc67..9f0b1746b 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -1,5 +1,5 @@
- +
{{$app.name}}
{{if $app.type !== 'system'}} -- cgit v1.2.3