CarHelp
Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору lynx Он не большой , морочится не буду ложу прям тут! Код: #!/usr/bin/perl #################################################################### # RecentPost Mod V1.0 #################################################################### # Scott Harrison # Homepage: http://www.dirtsims.com # Forum: http://www.dirtsims.com/cgi-bin/ikonboard/ikonboard.cgi # # This mod will let you post the most recent post to your board at # the top of your board index. Your also givin the ability to post # the last 5 post to your board anywhere on your site useing SSI. # # NOTE: Not all code used to make this file was written by myself. # If you have any questions email me at webmaster@dirtsims.com # #-------------------------------------------------------------------# # Modification Details (Please do not remove) #-------------------------------------------------------------------# # # Modified by : Chris Andrews # # Date Modified : 3rd February 2001 # # URL : http://www.darkslay.co.uk # # Email : webmaster@slay-uk.com # # Whats New : # Modified all code so that it works with version 2.1.7 # of ikonboard. Also modified it so that it displays beginnning chunk # of each post as well as post title. Also made it easier to read and # install by adding comments and a new README.TXT # #-------------------------------------------------------------------# # # Modified by : # Date Modified : # URL : # Email : # Whats New : # #-------------------------------------------------------------------# # # Please leave all modified user information as is. Its only fair # that everyone who modifies this script gets recognized for it. # #-------------------------------------------------------------------# $| = 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 shouldnt exist # (it gets created by the hack). Just make sure its in the Data folder open(FILE,"/hsphere/local/home/carhelp/carhelp.ukrhost.com/cgi-bin/ikonboard/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. # Its 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 = "<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://carhelp.ukrhost.com/cgi-bin/ikonboard/topic.cgi?forum=$top5[0]&topic=$top5[1]\"><b>$top5[2]</b></a><br></font><font face=\"verdana,arial,helvetica\" size=1> \"$top5[3]\"</font><br>"; } else { $html = "<a href=\"http://carhelp.ukrhost.com/cgi-bin/ikonboard/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; |
Хаки из архива в топике не нужны. | Всего записей: 369 | Зарегистр. 29-01-2002 | Отправлено: 21:19 01-11-2002 | Исправлено: Ausw, 17:22 03-11-2002 |
|