Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
|
Just a little "hack" for displaying top download table listings as hyperlinks.
SSI
In status.pl search for
print " <tr>\n <td><font $font_size>$descript_array{$file_id}</font></td>\n <td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td>\n </tr>\n";
}
else {
print " <tr>\n <td><font $font_size>$file_id</font></td>\n <td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td>\n </tr>\n";
Replace it with
print " <tr>\n <td><font $font_size><a href=\"path/to/download.pl?file=$file_id\">$descript_array{$file_id}</a></font></td>\n <td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td>\n </tr>\n";
}
else {
print " <tr>\n <td><font $font_size><a href=\"path/to/download.pl?file=$file_id\">$file_id</a></font></td>\n <td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td>\n </tr>\n";
-------------------------------------
JavaScript
In stat_js.pl search for
print "document.write('<tr><td><font $font_size>$descript_array{$file_id}</font></td><td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td></tr>');\n";
}
else {
print "document.write('<tr><td><font $font_size>$file_id</font></td><td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td></tr>');\n";
Replace with
print "document.write('<tr><td><font $font_size><a href=\"path/to/download.pl?file=$file_id\">$descript_array{$file_id}</a></font></td><td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td></tr>');\n";
}
else {
print "document.write('<tr><td><font $font_size><a href=\"path/to/download.pl?file=$file_id\">$file_id</a></font></td><td><font $font_size><img src=\"$base_gif/$img\" width=$img_width height=10> $name_array{$file_id}</font></td></tr>');\n";
Replace path/to/ with the relative or full path to your download.pl file
In my case the link looks like this: <a href=\"cgi-bin/downloads/download.pl?file=$file_id\">
Now your Top Download table listings should be hyperlinks for both JS and SSI inclusion.
Oh, you might wanna make backups of your files _before_ applying this hack, just in case something goes wrong
|
|
|
|
|
|
Based on the open source JForum
|