summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author8chan <admin@8chan.co>2014-06-24 19:40:16 +0000
committerczaks <marcin@6irc.net>2014-07-06 01:14:59 +0200
commitf2809d47930bfd2570daa6bae16f563c0e0dcd6d (patch)
tree9315e45d5d0164717cfe6de0f904b7e4689c8eef
parentb21eccfd9023db1eb18323cc7d18e7a30a546e7a (diff)
Fix issue #45
-rw-r--r--inc/display.php8
-rw-r--r--templates/post_reply.html4
-rw-r--r--templates/post_thread.html4
3 files changed, 8 insertions, 8 deletions
diff --git a/inc/display.php b/inc/display.php
index 4e8ab8fb..f02df433 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -377,10 +377,10 @@ class Post {
$this->body
);
}
- public function link($pre = '') {
+ public function link($pre = '', $page = false) {
global $config, $board;
- return $this->root . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $this->thread) . '#' . $pre . $this->id;
+ return $this->root . $board['dir'] . $config['dir']['res'] . sprintf(($page ? $page : $config['file_page']), $this->thread) . '#' . $pre . $this->id;
}
public function postControls() {
global $board, $config;
@@ -482,10 +482,10 @@ class Thread {
$this->body
);
}
- public function link($pre = '') {
+ public function link($pre = '', $page = false) {
global $config, $board;
- return $this->root . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $this->id) . '#' . $pre . $this->id;
+ return $this->root . $board['dir'] . $config['dir']['res'] . sprintf(($page ? $page : $config['file_page']), $this->id) . '#' . $pre . $this->id;
}
public function add(Post $post) {
$this->posts[] = $post;
diff --git a/templates/post_reply.html b/templates/post_reply.html
index c2254844..ab0dc9da 100644
--- a/templates/post_reply.html
+++ b/templates/post_reply.html
@@ -12,8 +12,8 @@
{% include 'post/time.html' %}
</label>
{% include 'post/poster_id.html' %}&nbsp;
- <a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{{ post.link }}">No.</a>
- <a class="post_no" onclick="citeReply({{ post.id }})" href="{{ post.link('q') }}">{{ post.id }}</a>
+ <a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('', config.file_page50) }}{% else %}{{ post.link }}{% endif %}">No.</a>
+ <a class="post_no" onclick="citeReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('q', config.file_page50) }}{% else %}{{ post.link('q') }}{% endif %}">{{ post.id }}</a>
</p>
{% if post.embed %}
{{ post.embed }}
diff --git a/templates/post_thread.html b/templates/post_thread.html
index 61d09636..cd8ba74a 100644
--- a/templates/post_thread.html
+++ b/templates/post_thread.html
@@ -44,8 +44,8 @@
{% include 'post/time.html' %}
</label>
{% include 'post/poster_id.html' %}&nbsp;
- <a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{{ post.link }}">No.</a>
- <a class="post_no" onclick="citeReply({{ post.id }})" href="{{ post.link('q') }}">{{ post.id }}</a>
+ <a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('', config.file_page50) }}{% else %}{{ post.link }}{% endif %}">No.</a>
+ <a class="post_no" onclick="citeReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('q', config.file_page50) }}{% else %}{{ post.link('q') }}{% endif %}">{{ post.id }}</a>
{% if post.sticky %}
{% if config.font_awesome %}
<i class="fa fa-thumb-tack"></i>