Merras:
IPB 2.2.1 alatt tesztelve, működik, mondjuk nagyon látszik, hogy 5 perces megoldás
sources/classes/class_display.php
Kód:
function autolinker() {
$text =& $this->ipsclass->skin['_wrapper'];
$this->ipsclass->DB->simple_construct( array ( 'select' => 'tid,title',
'from' => 'topics'));
$this->ipsclass->DB->simple_exec();
$array = array('from' => array(), 'to' => array());
while($row = $this->ipsclass->DB->fetch_row()) {
if($row['tid'] != @$_GET['showtopic']) {
$array['from'] = $row['title'];
$array['to'] = '<a href="' . $this->ipsclass->vars['board_url'] . '/index.php?showtopic=' . $row['tid'] . '">' . $row['title'] . '</a>';
}
}
$text = str_replace($array['from'], $array['to'], $text);
}
Ez a class display-en belülre, aztán a
sor után
Kód:
$this->autolinker();
BlackY
Könyvjelzők