| # | Added by | When | Quote |
|---|---|---|---|
| id\">id\">" . $quote->id . " | ";
echo "host . "\">";
echo $quote->nick;
echo "";
if ($chan == "__all") {
echo " in " . $quote->channel . ""; } echo " | ";
echo ""; echo date("H:i j M y", $quote->timestamp); echo " | "; if (empty($quoter[$quote->nick])) { $quoter[$quote->nick] = 1; } else { $quoter[$quote->nick]++; } $quote_text = htmlentities($quote->quote); $quotes = @preg_split("/ \| /", $quote_text); $newquote = ""; foreach ($quotes as $q) { $q = trim($q); //no timestamps $q = preg_replace('/^\[?[0-9:.]+\]?/', '', $q); //$q = preg_replace('/^((<|\\[|\\()*.*?)( )(.*?(>|\\]|\\))+:?)/', "\\1 \\4", $q); //hilight nicks if (!preg_match("/^\* /", $q)) { if (preg_match('/^((<|\\[|\\()*[@%+]?([^\]>\\\)]+?)[@%+]?(>|\\]|\\))+:?)/', $q, $matches)) { if (empty($quoted[$matches[3]])) { $quoted[$matches[3]] = 1; } else { $quoted[$matches[3]] = $quoted[$matches[3]] + 1; } } $q = preg_replace('/^((<|\\[|\\()*[^\]>\\\)]+?(>|\\]|\\))+:?)/', "\\1", $q); } else { if (preg_match('/^\* [@%+]?(\S+)[@%+]?/', $q, $matches)) { if (empty($quoted[$matches[1]])) { $quoted[$matches[1]] = 1; } else { $quoted[$matches[1]] = $quoted[$matches[1]] + 1; } } $q = preg_replace('/^\* (\S+)/', "* \\1", $q); } //$newquote .= preg_replace('/ /', " ", $q); $newquote .= $q; $newquote .= "" . $newquote . " | "; echo "
";
arsort($quoted);
$i = 0;
echo "Top 5 Quoted"; echo "on this page of results"; foreach($quoted as $q => $count) { echo "$q was quoted $count times "; if (++$i > 5) { break; } } echo " | ";
echo "Top 5 Quoters"; echo "on this page of results"; arsort($quoter); $i = 0; foreach($quoter as $q => $count) { echo "$q added $count quotes "; if (++$i > 5) { break; } } echo " |