Iīve installed the TOP X SSI Mod von Delpierro:
http://www.simball.de/...s_mods/top_ssi.shtml
It displayed the TOP 20 entrys sorted by hits, here you can see my TOP 20:
http://www.kegel-zone.de/links/top20.php
Now will I install this MOD a second time, to show my entrys also sorted by hits for the place 21 to 40.
What must I change in the code?
#!/usr/bin/perl
# ================================================
# Top X SSI Mod by Delpierro
#
# Author: DelPierro
# Mail: delpierro@fussballsuche.de
# Web: www.simball.de/links_mods/
#
# This script (modification) is freeware.
#
# This script is a modification, extension for
# Links 2.0 Links Manager by Gossamer Threads Inc.
# Web: http://www.gossamer-threads.com/
# Note: The Links 2.0 script is not freeware!
# ================================================
# Paths and Options
# ===========================================
use CGI qw/:standard/;
require "admin/links.cfg";
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
require "$db_lib_path/site_html_templates.pl";
$category = param('category');
open (NAME,"<$db_file_name") or &cgierr("error in numlinks. unable to open database:$db_links_name.\nReason: $!");
LINE: while(<NAME> ){
next LINE if (/^#/);
next LINE if (/^\s*$/);
@data=split (/\|/);
$tophits{$data[0]} = $data[8];
$hits{$data[0]} = $data[8];
$id{$data[0]} = $data[0];
$name{$data[0]} = $data[1];
$url{$data[0]} = $data[2];
$istop{$data[0]} = $data[10];
$cat{$data[0]} = $data[4];
}
close (NAME);
my $count=1;
$topx_output .= "<table width=\"440\" border=\"0\" bordercolor=\"#000000\" cellspacing=\"1\" cellpadding=\"2\" bgColor=\"#000000\"><tr><td width=\"65\" bgcolor=\"#004182\"><p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#FFFFFF\"><b>Platz</b></font></p></td><td width=\"310\" bgcolor=\"#004182\"><p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#FFFFFF\"><b>Beschreibung</b></font></p></font></td><td width=\"65\" bgcolor=\"#004182\"><p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#FFFFFF\"><b>Raus</b></font></td></tr>\n";
foreach $field (sort { $tophits{$b} <=> $tophits{$a} } keys %tophits) {
#if ( $cat{$field} eq "$category" ) {
if ($count <= 20) {
$topx_output .= "<tr><td width=\"65\" height=\"39\" bgcolor=\"#EEEEEE\" align=\"center\"><font face=\"Arial\" size=\"4\" color=\"#000000\">$count.</font></td><td width=\"310\" bgcolor=\"#EEEEEE\"><center><font face=\"Verdana\" size=\"2\"><a href=\"$db_cgi_url/verweis.cgi?ID=$id{$field}\" target=\"_blank\"><b>$name{$field}</b></a><br></center></td><td width=\"65\" bgcolor=\"#EEEEEE\" align=\"center\"><font face=\"Arial\" size=\"4\" color=\"#000000\">$hits{$field}</font></td></tr>\n";
}
$count++;
#}
}
$topx_output .= "</table>\n";
print "Content-type: text/html\n\n";
print "$topx_output";
I already change: my $count=1; to: my $count=21;
and
if ($count <= 20) to: if ($count <= 40)
but with this changes, I donīt see the entrys from 21 to 40.
May be somebody can halp me, with my problem.
Thanks & Greets Daniel
http://www.simball.de/...s_mods/top_ssi.shtml
It displayed the TOP 20 entrys sorted by hits, here you can see my TOP 20:
http://www.kegel-zone.de/links/top20.php
Now will I install this MOD a second time, to show my entrys also sorted by hits for the place 21 to 40.
What must I change in the code?
Code:
#!/usr/bin/perl
# ================================================
# Top X SSI Mod by Delpierro
#
# Author: DelPierro
# Mail: delpierro@fussballsuche.de
# Web: www.simball.de/links_mods/
#
# This script (modification) is freeware.
#
# This script is a modification, extension for
# Links 2.0 Links Manager by Gossamer Threads Inc.
# Web: http://www.gossamer-threads.com/
# Note: The Links 2.0 script is not freeware!
# ================================================
# Paths and Options
# ===========================================
use CGI qw/:standard/;
require "admin/links.cfg";
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
require "$db_lib_path/site_html_templates.pl";
$category = param('category');
open (NAME,"<$db_file_name") or &cgierr("error in numlinks. unable to open database:$db_links_name.\nReason: $!");
LINE: while(<NAME> ){
next LINE if (/^#/);
next LINE if (/^\s*$/);
@data=split (/\|/);
$tophits{$data[0]} = $data[8];
$hits{$data[0]} = $data[8];
$id{$data[0]} = $data[0];
$name{$data[0]} = $data[1];
$url{$data[0]} = $data[2];
$istop{$data[0]} = $data[10];
$cat{$data[0]} = $data[4];
}
close (NAME);
my $count=1;
$topx_output .= "<table width=\"440\" border=\"0\" bordercolor=\"#000000\" cellspacing=\"1\" cellpadding=\"2\" bgColor=\"#000000\"><tr><td width=\"65\" bgcolor=\"#004182\"><p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#FFFFFF\"><b>Platz</b></font></p></td><td width=\"310\" bgcolor=\"#004182\"><p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#FFFFFF\"><b>Beschreibung</b></font></p></font></td><td width=\"65\" bgcolor=\"#004182\"><p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#FFFFFF\"><b>Raus</b></font></td></tr>\n";
foreach $field (sort { $tophits{$b} <=> $tophits{$a} } keys %tophits) {
#if ( $cat{$field} eq "$category" ) {
if ($count <= 20) {
$topx_output .= "<tr><td width=\"65\" height=\"39\" bgcolor=\"#EEEEEE\" align=\"center\"><font face=\"Arial\" size=\"4\" color=\"#000000\">$count.</font></td><td width=\"310\" bgcolor=\"#EEEEEE\"><center><font face=\"Verdana\" size=\"2\"><a href=\"$db_cgi_url/verweis.cgi?ID=$id{$field}\" target=\"_blank\"><b>$name{$field}</b></a><br></center></td><td width=\"65\" bgcolor=\"#EEEEEE\" align=\"center\"><font face=\"Arial\" size=\"4\" color=\"#000000\">$hits{$field}</font></td></tr>\n";
}
$count++;
#}
}
$topx_output .= "</table>\n";
print "Content-type: text/html\n\n";
print "$topx_output";
I already change: my $count=1; to: my $count=21;
and
if ($count <= 20) to: if ($count <= 40)
but with this changes, I donīt see the entrys from 21 to 40.
May be somebody can halp me, with my problem.
Thanks & Greets Daniel