theIggs
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Итак, баг был из-за несовместимости версий. В 1.1.1, 1.1.2 и ещё фиг знает где следует делать так: Код: Открыть sources/Topics.php Найти: $std->boink_it($ibforums->base_url."&act=ST&f=".$this->topic['forum_id']."&t=".$this->topic['tid']."&st=$st".$pid); exit(); } else { $this->return_last_post(); } } Ниже добавить: else if ($ibforums->input['view'] == 'pid') { $st = 0; $pid = ""; $DB->query("SELECT pid, post_date FROM ibf_posts WHERE queued <> 1 AND topic_id='".$this->topic['tid']."' AND pid='".$ibforums->input['pid']."' LIMIT 1"); if ( $post = $DB->fetch_row() ) { $pid = "&#entry".$post['pid']; $DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE topic_id='".$this->topic['tid']."' AND pid <= '".$post['pid']."'"); $cposts = $DB->fetch_row(); if ( (($cposts['posts']) % $ibforums->vars['display_max_posts']) == 0 ) { $pages = ($cposts['posts']) / $ibforums->vars['display_max_posts']; } else { $number = ( ($cposts['posts']) / $ibforums->vars['display_max_posts'] ); $pages = ceil( $number); } $st = ($pages - 1) * $ibforums->vars['display_max_posts']; $std->boink_it($ibforums->base_url."&act=ST&f=".$this->topic['forum_id']."&t=".$this->topic['tid']."&st=$st".$pid); exit(); } else { $ibforums->lang['no_umm_exist']="The specified post does not exist."; $std->error( Array( 'LEVEL' => 1, 'MSG' => 'no_umm_exist')); } } | Теперь при переходе из профиля по ссылке должно выкидывать точно на указанный пост. Кстати, судя по тому, что одни и те же топики в профиле могут упоминаться несколько раз, можно сделать логический вывод: это хак не "Last 10 Topics", a "Last 10 Posts"... (o: Вот так.
| Всего записей: 1114 | Зарегистр. 13-11-2002 | Отправлено: 11:28 16-06-2003 | Исправлено: theIggs, 11:31 16-06-2003 |
|