Permalink
Browse files

add rows var for domains and tlds tables to config

  • Loading branch information...
1 parent 06bedc5 commit d0b9c4a23046ba6ceaac64346d39fde37df58c52 @tommyrot committed Nov 3, 2012
Showing with 7 additions and 4 deletions.
  1. +6 −4 html.php
  2. +1 −0 sss.conf
View
@@ -37,6 +37,7 @@
private $maxrows_people_year = 10;
private $maxrows_recenturls = 25;
private $minrows = 3;
+ private $rows_domains_tlds = 10;
private $sectionbits = 127;
private $stylesheet = 'sss.css';
private $userstats = false;
@@ -80,6 +81,7 @@
'maxrows_recenturls' => 'int',
'minrows' => 'int',
'outputbits' => 'int',
+ 'rows_domains_tlds' => 'int',
'sectionbits' => 'int',
'stylesheet' => 'string',
'userstats' => 'bool');
@@ -714,25 +716,25 @@ public function make_html($mysqli)
if ($this->sectionbits & 32) {
$output = '';
- $t = new table('Most Referenced Domain Names', 10, 10);
+ $t = new table('Most Referenced Domain Names', $this->rows_domains_tlds, $this->rows_domains_tlds);
$t->set_value('keys', array(
'k1' => 'Total',
'k2' => 'Domain',
'k3' => 'First Used',
'v1' => 'int',
'v2' => 'url',
'v3' => 'date'));
- $t->set_value('queries', array('main' => 'select count(*) as `v1`, (select concat(\'http://\', `fqdn`) from `fqdns` where `fid` = `urls`.`fid`) as `v2`, min(`datetime`) as `v3` from `user_urls` join `urls` on `user_urls`.`lid` = `urls`.`lid` where `fid` is not null group by `fid` order by `v1` desc, `v3` asc limit 10'));
+ $t->set_value('queries', array('main' => 'select count(*) as `v1`, (select concat(\'http://\', `fqdn`) from `fqdns` where `fid` = `urls`.`fid`) as `v2`, min(`datetime`) as `v3` from `user_urls` join `urls` on `user_urls`.`lid` = `urls`.`lid` where `fid` is not null group by `fid` order by `v1` desc, `v3` asc limit '.$this->rows_domains_tlds));
$t->set_value('medium', true);
$output .= $t->make_table($this->mysqli);
- $t = new table('Most Referenced TLDs', 10, 10);
+ $t = new table('Most Referenced TLDs', $this->rows_domains_tlds, $this->rows_domains_tlds);
$t->set_value('keys', array(
'k1' => 'Total',
'k2' => 'TLD',
'v1' => 'int',
'v2' => 'string'));
- $t->set_value('queries', array('main' => 'select count(*) as `v1`, `tld` as `v2` from `user_urls` join `urls` on `user_urls`.`lid` = `urls`.`lid` where `tld` != \'\' group by `tld` order by `v1` desc, `v2` asc limit 10'));
+ $t->set_value('queries', array('main' => 'select count(*) as `v1`, `tld` as `v2` from `user_urls` join `urls` on `user_urls`.`lid` = `urls`.`lid` where `tld` != \'\' group by `tld` order by `v1` desc, `v2` asc limit '.$this->rows_domains_tlds));
$output .= $t->make_table($this->mysqli);
$t = new table('Most Recent URLs', $this->minrows, $this->maxrows_recenturls);
View
@@ -66,4 +66,5 @@ maxrows_people2 = "10" # Less Talkative People - Alltime
maxrows_people_year = "10" # Most Talkative People - Year
maxrows_people_month = "10" # Most Talkative People - Month
maxrows_people_timeofday = "10" # Most Talkative People by Time of Day
+rows_domains_tlds = "10" # Fixed amount of rows for Domains and TLDs
maxrows_recenturls = "25" # Most Recent URLs

0 comments on commit d0b9c4a

Please sign in to comment.