#!/usr/bin/perl $| = 1; ### EDIT ### # change url below to point to the recentpost.dat on your board. # MUST BE ABSOLUTE PATH, not URL # When you first install this Hack, this file shouldn't exist # (it gets created by the hack). Just make sure it's in the Data folder open(FILE,"/путь/cgi-bin/data/recentpost.dat"); @datas = <FILE>; close (FILE); $ranks = 4; while ($ranks > -1) { @top5 = split(/\|/,@datas[$ranks]); ### EDIT ### # change both occurrances of the muber 70 below to suit needs. # It's the number of characters of each post that will be # displayed on your pages. $top5[3] = substr($top5[3],0,70) . "..." if (length($top5[3]) > 70); $top5[3] = join('',split(/<br>/,$top5[3])); $top5[3] = join('',split(/<p>/,$top5[3])); $ranks--; ### EDIT ### # modify the HTML in the the line below to suit needs. # Eg - change >  to <li> for bullet points instead of '>' # also change the font to fit in with your site $html .= "Здесь хочу картинку вставить, только все мои попытки приводят к ошики 500, напр. так: <img src="/img/forum.gif" width="18" height="16"> <font face=\"verdana,arial,helvetica\" size=1>> "; ### EDIT ### # modify the two urls in the code below to point to your Ikonboard. # This must be a URL not path. if ($top5[0]) { $html .= "<a href=\"http://www.***.ru//cgi-bin/topic.cgi?forum=$top5[0]&topic=$top5[1]\">$top5[2]</a><br></font><font face=\"verdana\" size=1> \"$top5[3]\"</font><br>"; } else { $html .= "<a href=\"http://www.***.ru//cgi-bin/ikonboard.cgi\">Forums</a><br>"; } } ### EDIT ### # for some reason this appeared on the page as well, so i edited it # out. I left it here cos Scott must have had a reason for putting # it there in the first place. But i dont know why # # print "Content-type: text/html\n\n"; print "$html"; exit; |