From 211f729622afa057ffd8d4aac1b984a3b6121010 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 30 May 2012 03:37:30 -0700 Subject: [PATCH] separate the demo sites --- mod/siteinfo.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/mod/siteinfo.php b/mod/siteinfo.php index e436800c..b6085b9e 100755 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -26,12 +26,14 @@ function siteinfo_content(&$a) { $o .= '

Friendica is experiencing very rapid growth and we need more public portals - as some of our primary servers are reaching capacity. Friendica is a decentralised and distributed network. Help us share the load. If you can provide a Friendica server for public use, please send the URL to info at friendica dot com. We will include you in our list.

'; - $r = q("select * from site where url != '' and version != '' order by rand()"); + $r = q("select * from site where url != '' and version != '' and not plugins like '%%testdrive%%' order by rand()"); $policy = array ( 'REGISTER_CLOSED' => 'closed', 'REGISTER_OPEN' => 'open', 'REGISTER_APPROVE' => 'requires approval'); + $results = false; if(count($r)) { + $results = true; $o .= ''; $o .= ''; $o .= ''; @@ -56,17 +58,38 @@ function siteinfo_content(&$a) { $o .= ''; $o .= ''; } - $o .= '
' . t('Site Name') . '' . $rr['updated'] . '
'; } - $r = q("select * from site where url != '' and version = '' order by name asc"); + $r = q("select * from site where url != '' and version != '' and plugins like '%%testdrive%%' order by rand()"); + if(count($r)) { - $o .= '

Sites that could not be verified. May be running older versions.

'; + $o .= '-- Demo and test sites -- Limited account duration with expiration --'; foreach($r as $rr) { - $o .= '' . $rr['url'] . '
'; + if(! $rr['version']) + continue; + $o .= ''; + $o .= '' . '' . $rr['name'] . '
' . $rr['url'] . '
' . ''; + $o .= '' . $policy[$rr['reg_policy']] . ''; + $o .= '' . $rr['info'] . ''; + $o .= '' . $rr['version'] . ''; + $o .= '' . str_replace(',',', ',$rr['plugins']) . ''; + $o .= '' . '' . $rr['admin_name'] . '' . ''; + $o .= '' . $rr['updated'] . ''; + $o .= ''; } } + if($results) + $o .= ''; + +// $r = q("select * from site where url != '' and version = '' order by name asc"); +// if(count($r)) { +// $o .= '

Sites that could not be verified. May be running older versions.

'; +// foreach($r as $rr) { +// $o .= '' . $rr['url'] . '
'; +// } +// } +